Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

phy: broadcom: ns-usb3: fix Wvoid-pointer-to-enum-cast warning

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

drivers/phy/broadcom/phy-bcm-ns-usb3.c:209:17: error: cast to smaller integer type 'enum bcm_ns_family' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230810111958.205705-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Vinod Koul
bd6e74a2 d35c12b7

+1 -1
+1 -1
drivers/phy/broadcom/phy-bcm-ns-usb3.c
··· 206 206 of_id = of_match_device(bcm_ns_usb3_id_table, dev); 207 207 if (!of_id) 208 208 return -EINVAL; 209 - usb3->family = (enum bcm_ns_family)of_id->data; 209 + usb3->family = (uintptr_t)of_id->data; 210 210 211 211 syscon_np = of_parse_phandle(dev->of_node, "usb3-dmp-syscon", 0); 212 212 err = of_address_to_resource(syscon_np, 0, &res);