Commit 81c8920d authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Lee Jones

mfd: max14577: Fix Wvoid-pointer-to-enum-cast warning (again)

'type' is an enum, thus cast of pointer on 64-bit compile test with
clang and W=1 causes:

  max14577.c:400:23: error: cast to smaller integer type 'enum maxim_device_type' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Year ago this was solved, although LKML discussion suggested warning is
not suitable for kernel.  Nothing changed in this regard for a year, so
assume the warning will stay and we want to have warnings-free builds.

Link: https://lore.kernel.org/all/20230814160457.GA2836@dev-arch.thelio-3990X/
Link: https://lore.kernel.org/all/20230810095849.123321-1-krzysztof.kozlowski@linaro.org/Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240606143648.152668-1-krzysztof.kozlowski@linaro.orgSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent 5fed47ab
......@@ -397,7 +397,7 @@ static int max14577_i2c_probe(struct i2c_client *i2c)
return ret;
}
max14577->dev_type = (enum maxim_device_type)i2c_get_match_data(i2c);
max14577->dev_type = (kernel_ulong_t)i2c_get_match_data(i2c);
max14577_print_dev_type(max14577);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment