On Fri, 01 Dec 2017, Pavel Machek wrote: > On Fri 2017-12-01 07:57:15, Lee Jones wrote: > > On Thu, 30 Nov 2017, Bjorn Andersson wrote: > > > - led->ledtype = (u32)of_device_get_match_data(&pdev->dev); > > > + led->ledtype = (u32)(unsigned long)of_device_get_match_data(&pdev->dev); > > > > Wouldn't (u32)(void *) be even more correct? > > > > ... if the compiler will let you get away with it. > > Afaict that would still produce the warning. of_device_get_match_data > already returns void *. Just tested. It actually still suffers from the original error. warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-next" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html