On 05.05.2021 03:25:57, kernel test robot wrote:
Hi Schrempf,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mkl-can-next/testing] [also build test WARNING on v5.12 next-20210504] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Schrempf-Frieder/can-mcp251x-Fix-re... base: https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git testing config: x86_64-randconfig-r012-20210503 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 8f5a2a5836cc8e4c1def2bdeb022e7b496623439) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu # https://github.com/0day-ci/linux/commit/a6e3fbb55cde65e2254ce0351b92997d1472... git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Schrempf-Frieder/can-mcp251x-Fix-resume-from-sleep-before-interface-was-brought-up/20210505-000504 git checkout a6e3fbb55cde65e2254ce0351b92997d14724726 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot lkp@intel.com
All warnings (new ones prefixed by >>):
drivers/net/can/spi/mcp251x.c:1244:1: warning: unused label 'out_clean' [-Wunused-label]
out_clean: ^~~~~~~~~~
Thanks, I'll squash that into the original patch.
drivers/net/can/spi/mcp251x.c:1335:17: warning: cast to smaller integer type 'enum mcp251x_model' from 'const void *' [-Wvoid-pointer-to-enum-cast] priv->model = (enum mcp251x_model)match; ^~~~~~~~~~~~~~~~~~~~~~~~~
This is technically correct, but we only put the enum into the struct of_device_id:
| static const struct of_device_id mcp251x_of_match[] = { | { | .compatible = "microchip,mcp2510", | .data = (void *)CAN_MCP251X_MCP2510, | }, | { | .compatible = "microchip,mcp2515", | .data = (void *)CAN_MCP251X_MCP2515, | }, | { | .compatible = "microchip,mcp25625", | .data = (void *)CAN_MCP251X_MCP25625, | }, | { } | };
An intermediate cast to kernel_ulong_t silences the warning:
| - priv->model = (enum mcp251x_model)match; | + priv->model = (enum mcp251x_model)(kernel_ulong_t)match;
I'll send a patch.
regards, Marc