1
0
Fork 0

power: supply: max17040: Fix ptr to enum cast

clang complains about casting pointers to smaller enum types.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Iskren Chernev <iskren.chernev@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
zero-sugar-mainline-defconfig
Iskren Chernev 2020-10-05 23:00:38 +03:00 committed by Sebastian Reichel
parent d4fbca833b
commit 7f977e6437
1 changed files with 1 additions and 1 deletions

View File

@ -247,7 +247,7 @@ static int max17040_get_of_data(struct max17040_chip *chip)
{
struct device *dev = &chip->client->dev;
struct chip_data *data = &max17040_family[
(enum chip_id) of_device_get_match_data(dev)];
(uintptr_t) of_device_get_match_data(dev)];
int rcomp_len;
u8 rcomp[2];