linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
Cc: oe-kbuild-all@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	Michal Simek <monstr@monstr.eu>
Subject: [xilinx-xlnx:xlnx_rebase_v6.1 883/1065] drivers/spi/spi-sh-msiof.c:590:29: warning: passing argument 1 of 'spi_get_csgpiod' discards 'const' qualifier from pointer target type
Date: Fri, 14 Apr 2023 00:40:50 +0800	[thread overview]
Message-ID: <202304140009.1EEA8HuJ-lkp@intel.com> (raw)

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v6.1
head:   bbf25ceb15a43c9047e14ab46a1d25c8ae6b67b4
commit: 570ea9b08474a574958a1857b5d71d1ff2f47cc0 [883/1065] spi: Replace all spi->chip_select and spi->cs_gpiod references with function call
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20230414/202304140009.1EEA8HuJ-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 12.1.0
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
        # https://github.com/Xilinx/linux-xlnx/commit/570ea9b08474a574958a1857b5d71d1ff2f47cc0
        git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xilinx-xlnx xlnx_rebase_v6.1
        git checkout 570ea9b08474a574958a1857b5d71d1ff2f47cc0
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=sh SHELL=/bin/bash drivers/spi/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304140009.1EEA8HuJ-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/spi/spi-sh-msiof.c: In function 'sh_msiof_prepare_message':
>> drivers/spi/spi-sh-msiof.c:590:29: warning: passing argument 1 of 'spi_get_csgpiod' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     590 |         if (spi_get_csgpiod(spi, 0)) {
         |                             ^~~
   In file included from drivers/spi/spi-sh-msiof.c:29:
   include/linux/spi/spi.h:276:68: note: expected 'struct spi_device *' but argument is of type 'const struct spi_device *'
     276 | static inline struct gpio_desc *spi_get_csgpiod(struct spi_device *spi, u8 idx)
         |                                                 ~~~~~~~~~~~~~~~~~~~^~~
>> drivers/spi/spi-sh-msiof.c:594:41: warning: passing argument 1 of 'spi_get_chipselect' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     594 |                 ss = spi_get_chipselect(spi, 0);
         |                                         ^~~
   include/linux/spi/spi.h:266:56: note: expected 'struct spi_device *' but argument is of type 'const struct spi_device *'
     266 | static inline u8 spi_get_chipselect(struct spi_device *spi, u8 idx)
         |                                     ~~~~~~~~~~~~~~~~~~~^~~


vim +590 drivers/spi/spi-sh-msiof.c

   581	
   582	static int sh_msiof_prepare_message(struct spi_controller *ctlr,
   583					    struct spi_message *msg)
   584	{
   585		struct sh_msiof_spi_priv *p = spi_controller_get_devdata(ctlr);
   586		const struct spi_device *spi = msg->spi;
   587		u32 ss, cs_high;
   588	
   589		/* Configure pins before asserting CS */
 > 590		if (spi_get_csgpiod(spi, 0)) {
   591			ss = ctlr->unused_native_cs;
   592			cs_high = p->native_cs_high;
   593		} else {
 > 594			ss = spi_get_chipselect(spi, 0);
   595			cs_high = !!(spi->mode & SPI_CS_HIGH);
   596		}
   597		sh_msiof_spi_set_pin_regs(p, ss, !!(spi->mode & SPI_CPOL),
   598					  !!(spi->mode & SPI_CPHA),
   599					  !!(spi->mode & SPI_3WIRE),
   600					  !!(spi->mode & SPI_LSB_FIRST), cs_high);
   601		return 0;
   602	}
   603	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

                 reply	other threads:[~2023-04-13 16:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202304140009.1EEA8HuJ-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=amit.kumar-mahapatra@amd.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=monstr@monstr.eu \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).