From: kernel test robot <lkp@intel.com>
To: Kashyap Desai <kashyap.desai@broadcom.com>, linux-scsi@vger.kernel.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
Kashyap Desai <kashyap.desai@broadcom.com>,
dgilbert@interlog.com, linux-block@vger.kernel.org
Subject: Re: [PATCH 3/3] scsi_debug: iouring iopoll support
Date: Thu, 15 Oct 2020 00:39:29 +0800 [thread overview]
Message-ID: <202010150001.cnQpUNIt-lkp@intel.com> (raw)
In-Reply-To: <20201014122734.201426-1-kashyap.desai@broadcom.com>
[-- Attachment #1: Type: text/plain, Size: 10387 bytes --]
Hi Kashyap,
I love your patch! Perhaps something to improve:
[auto build test WARNING on next-20201013]
[cannot apply to scsi/for-next mkp-scsi/for-next v5.9 v5.9-rc8 v5.9-rc7 v5.9]
[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/Kashyap-Desai/add-io_uring-with-IOPOLL-support-in-scsi-layer/20201014-202916
base: f2fb1afc57304f9dd68c20a08270e287470af2eb
config: powerpc64-randconfig-r006-20201014 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project e7fe3c6dfede8d5781bd000741c3dea7088307a4)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/0day-ci/linux/commit/a3173d0d1c2ca8a45007fa994f2641aa7262719c
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kashyap-Desai/add-io_uring-with-IOPOLL-support-in-scsi-layer/20201014-202916
git checkout a3173d0d1c2ca8a45007fa994f2641aa7262719c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
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 >>):
In file included from drivers/scsi/scsi_debug.c:32:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:43:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:29:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:541:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/scsi/scsi_debug.c:32:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:31:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/scsi/scsi_debug.c:32:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:33:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/scsi/scsi_debug.c:32:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:35:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/scsi/scsi_debug.c:32:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:37:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/scsi/scsi_debug.c:32:
In file included from include/linux/scatterlist.h:9:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:39:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
drivers/scsi/scsi_debug.c:5442:3: error: non-void function 'schedule_resp' should return a value [-Wreturn-type]
return;
^
>> drivers/scsi/scsi_debug.c:7246:5: warning: no previous prototype for function 'sdebug_blk_mq_poll' [-Wmissing-prototypes]
int sdebug_blk_mq_poll(struct Scsi_Host *shost, unsigned int queue_num)
^
drivers/scsi/scsi_debug.c:7246:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int sdebug_blk_mq_poll(struct Scsi_Host *shost, unsigned int queue_num)
^
static
7 warnings and 1 error generated.
vim +/sdebug_blk_mq_poll +7246 drivers/scsi/scsi_debug.c
7245
> 7246 int sdebug_blk_mq_poll(struct Scsi_Host *shost, unsigned int queue_num)
7247 {
7248 int qc_idx;
7249 int retiring = 0;
7250 unsigned long iflags;
7251 struct sdebug_queue *sqp;
7252 struct sdebug_queued_cmd *sqcp;
7253 struct scsi_cmnd *scp;
7254 struct sdebug_dev_info *devip;
7255 int num_entries = 0;
7256
7257 sqp = sdebug_q_arr + queue_num;
7258
7259 do {
7260 spin_lock_irqsave(&sqp->qc_lock, iflags);
7261 qc_idx = find_first_bit(sqp->in_use_bm, sdebug_max_queue);
7262 if (unlikely((qc_idx < 0) || (qc_idx >= SDEBUG_CANQUEUE)))
7263 goto out;
7264
7265 sqcp = &sqp->qc_arr[qc_idx];
7266 scp = sqcp->a_cmnd;
7267 if (unlikely(scp == NULL)) {
7268 pr_err("scp is NULL, queue_num=%d, qc_idx=%d from %s\n",
7269 queue_num, qc_idx, __func__);
7270 goto out;
7271 }
7272 devip = (struct sdebug_dev_info *)scp->device->hostdata;
7273 if (likely(devip))
7274 atomic_dec(&devip->num_in_q);
7275 else
7276 pr_err("devip=NULL from %s\n", __func__);
7277 if (unlikely(atomic_read(&retired_max_queue) > 0))
7278 retiring = 1;
7279
7280 sqcp->a_cmnd = NULL;
7281 if (unlikely(!test_and_clear_bit(qc_idx, sqp->in_use_bm))) {
7282 pr_err("Unexpected completion sqp %p queue_num=%d qc_idx=%d from %s\n",
7283 sqp, queue_num, qc_idx, __func__);
7284 goto out;
7285 }
7286
7287 if (unlikely(retiring)) { /* user has reduced max_queue */
7288 int k, retval;
7289
7290 retval = atomic_read(&retired_max_queue);
7291 if (qc_idx >= retval) {
7292 pr_err("index %d too large\n", retval);
7293 goto out;
7294 }
7295 k = find_last_bit(sqp->in_use_bm, retval);
7296 if ((k < sdebug_max_queue) || (k == retval))
7297 atomic_set(&retired_max_queue, 0);
7298 else
7299 atomic_set(&retired_max_queue, k + 1);
7300 }
7301 spin_unlock_irqrestore(&sqp->qc_lock, iflags);
7302 scp->scsi_done(scp); /* callback to mid level */
7303 num_entries++;
7304 } while (1);
7305
7306 out:
7307 spin_unlock_irqrestore(&sqp->qc_lock, iflags);
7308 return num_entries;
7309 }
7310
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28887 bytes --]
next prev parent reply other threads:[~2020-10-14 16:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-14 12:27 [PATCH 3/3] scsi_debug: iouring iopoll support Kashyap Desai
2020-10-14 16:39 ` kernel test robot [this message]
2020-10-14 18:16 ` kernel test robot
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=202010150001.cnQpUNIt-lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=dgilbert@interlog.com \
--cc=kashyap.desai@broadcom.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.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).