linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Adithya K V <adithya.kv@samsung.com>
Cc: kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	Mark Brown <broonie@kernel.org>
Subject: [linux-next:master 923/1853] drivers/spi/spi-s3c64xx.c:357:34: sparse: sparse: Using plain integer as NULL pointer
Date: Wed, 8 Jun 2022 15:53:01 +0800	[thread overview]
Message-ID: <202206081502.jlwKFxtv-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   03c312cc5f473c220fd2c80f7f5d32ed24005dd4
commit: f52b03c707444c5a3d1a0b9c5724f93ddc3c588e [923/1853] spi: s3c64xx: requests spi-dma channel only during data transfer
config: arm64-randconfig-s032-20220605 (https://download.01.org/0day-ci/archive/20220608/202206081502.jlwKFxtv-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-26-gb3cf30ba-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f52b03c707444c5a3d1a0b9c5724f93ddc3c588e
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout f52b03c707444c5a3d1a0b9c5724f93ddc3c588e
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/spi/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/spi/spi-s3c64xx.c:357:34: sparse: sparse: Using plain integer as NULL pointer
   drivers/spi/spi-s3c64xx.c:365:34: sparse: sparse: Using plain integer as NULL pointer
   drivers/spi/spi-s3c64xx.c:366:34: sparse: sparse: Using plain integer as NULL pointer
   drivers/spi/spi-s3c64xx.c:811:34: sparse: sparse: Using plain integer as NULL pointer
   drivers/spi/spi-s3c64xx.c:812:34: sparse: sparse: Using plain integer as NULL pointer

vim +357 drivers/spi/spi-s3c64xx.c

   345	
   346	static int s3c64xx_spi_prepare_transfer(struct spi_master *spi)
   347	{
   348		struct s3c64xx_spi_driver_data *sdd = spi_master_get_devdata(spi);
   349	
   350		if (is_polling(sdd))
   351			return 0;
   352	
   353		/* Requests DMA channels */
   354		sdd->rx_dma.ch = dma_request_chan(&sdd->pdev->dev, "rx");
   355		if (IS_ERR(sdd->rx_dma.ch)) {
   356			dev_err(&sdd->pdev->dev, "Failed to get RX DMA channel\n");
 > 357			sdd->rx_dma.ch = 0;
   358			return 0;
   359		}
   360	
   361		sdd->tx_dma.ch = dma_request_chan(&sdd->pdev->dev, "tx");
   362		if (IS_ERR(sdd->tx_dma.ch)) {
   363			dev_err(&sdd->pdev->dev, "Failed to get TX DMA hannel\n");
   364			dma_release_channel(sdd->rx_dma.ch);
   365			sdd->tx_dma.ch = 0;
   366			sdd->rx_dma.ch = 0;
   367			return 0;
   368		}
   369	
   370		spi->dma_rx = sdd->rx_dma.ch;
   371		spi->dma_tx = sdd->tx_dma.ch;
   372	
   373		return 0;
   374	}
   375	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


                 reply	other threads:[~2022-06-08  7:53 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=202206081502.jlwKFxtv-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=adithya.kv@samsung.com \
    --cc=broonie@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    /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).