mailbox: stm32-ipcc: cast void pointers to unsigned long
authorMartin Kaiser <martin@kaiser.cx>
Sun, 29 Nov 2020 18:52:28 +0000 (19:52 +0100)
committerJassi Brar <jaswinder.singh@linaro.org>
Wed, 2 Dec 2020 01:17:20 +0000 (19:17 -0600)
commit017909281eb0f8a00445840a36c799d3aed00841
tree1debac3b227d9d28983e9088c6f170fb9bf73e03
parent133af21f7c00a2bfc2b6c6aa7bfad4dc3eeb0401
mailbox: stm32-ipcc: cast void pointers to unsigned long

Now that the driver can be enabled by COMPILE_TEST, we see warnings on
64bit platforms when void pointers are cast to unsigned int (and
vice versa).

warning: cast to smaller integer type 'unsigned int' from 'void *'
           unsigned int chan = (unsigned int)link->con_priv;
...
warning: cast to 'void *' from smaller integer type 'unsigned int'
           ipcc->controller.chans[i].con_priv = (void *)i;

Update these casts to use unsigned long variables, which are the same
size as pointers on all platforms.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/stm32-ipcc.c