Re: [PATCH v2] gpio: mxc: Remove unused .id_table support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Fabio,

I love your patch! Perhaps something to improve:

[auto build test WARNING on gpio/for-next]
[also build test WARNING on v5.10-rc4 next-20201116]
[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/Fabio-Estevam/gpio-mxc-Remove-unused-id_table-support/20201117-015424
base:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next
config: powerpc-randconfig-r015-20201116 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c044709b8fbea2a9a375e4173a6bd735f6866c0c)
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 powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # https://github.com/0day-ci/linux/commit/a6943017beed6fb9b48fc297c02ac3f0f4e680cb
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Fabio-Estevam/gpio-mxc-Remove-unused-id_table-support/20201117-015424
        git checkout a6943017beed6fb9b48fc297c02ac3f0f4e680cb
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/gpio/gpio-mxc.c:361:32: warning: cast to smaller integer type 'enum mxc_gpio_hwtype' from 'const void *' [-Wvoid-pointer-to-enum-cast]
           enum mxc_gpio_hwtype hwtype = (enum mxc_gpio_hwtype)of_id->data;
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 warning generated.

vim +361 drivers/gpio/gpio-mxc.c

   356	
   357	static void mxc_gpio_get_hw(struct platform_device *pdev)
   358	{
   359		const struct of_device_id *of_id =
   360				of_match_device(mxc_gpio_dt_ids, &pdev->dev);
 > 361		enum mxc_gpio_hwtype hwtype = (enum mxc_gpio_hwtype)of_id->data;
   362	
   363		if (mxc_gpio_hwtype) {
   364			/*
   365			 * The driver works with a reasonable presupposition,
   366			 * that is all gpio ports must be the same type when
   367			 * running on one soc.
   368			 */
   369			BUG_ON(mxc_gpio_hwtype != hwtype);
   370			return;
   371		}
   372	
   373		if (hwtype == IMX35_GPIO)
   374			mxc_gpio_hwdata = &imx35_gpio_hwdata;
   375		else if (hwtype == IMX31_GPIO)
   376			mxc_gpio_hwdata = &imx31_gpio_hwdata;
   377		else
   378			mxc_gpio_hwdata = &imx1_imx21_gpio_hwdata;
   379	
   380		mxc_gpio_hwtype = hwtype;
   381	}
   382	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux