All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: kbuild-all@lists.01.org
Subject: Re: [block:block-5.9 41/41] net/sunrpc/xprtsock.c:392:9: sparse: sparse: incompatible types in conditional expression (different base types):
Date: Thu, 03 Sep 2020 09:11:14 +0800	[thread overview]
Message-ID: <20200903011114.GD638071@T590> (raw)
In-Reply-To: <202009030441.gMnEeCqJ%lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2451 bytes --]

On Thu, Sep 03, 2020 at 04:51:44AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git block-5.9
> head:   fc703681a3cfa4178fb69ee6a90feb2ffb250e5f
> commit: fc703681a3cfa4178fb69ee6a90feb2ffb250e5f [41/41] block: allow for_each_bvec to support zero len bvec
> config: powerpc64-randconfig-s032-20200902 (attached as .config)
> compiler: powerpc64-linux-gcc (GCC) 9.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.2-191-g10164920-dirty
>         git checkout fc703681a3cfa4178fb69ee6a90feb2ffb250e5f
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=powerpc64 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> 
> sparse warnings: (new ones prefixed by >>)
> 
> >> net/sunrpc/xprtsock.c:392:9: sparse: sparse: incompatible types in conditional expression (different base types):
> >> net/sunrpc/xprtsock.c:392:9: sparse:    bool
> >> net/sunrpc/xprtsock.c:392:9: sparse:    void
> --
> >> net/sunrpc/svcsock.c:236:9: sparse: sparse: incompatible types in conditional expression (different base types):
> >> net/sunrpc/svcsock.c:236:9: sparse:    bool
> >> net/sunrpc/svcsock.c:236:9: sparse:    void

The above sparse warning can be killed by the following delta patch, and it
isn't a problem actually:

diff --git a/include/linux/bvec.h b/include/linux/bvec.h
index 9c4fab5f22a7..dd74503f7e5e 100644
--- a/include/linux/bvec.h
+++ b/include/linux/bvec.h
@@ -127,7 +127,7 @@ static inline void bvec_iter_skip_zero_bvec(struct bvec_iter *iter)
        for (iter = (start);                                            \
             (iter).bi_size &&                                          \
                ((bvl = bvec_iter_bvec((bio_vec), (iter))), 1); \
-            (bvl).bv_len ? bvec_iter_advance((bio_vec), &(iter),       \
+            (bvl).bv_len ? (void)bvec_iter_advance((bio_vec), &(iter), \
                     (bvl).bv_len) : bvec_iter_skip_zero_bvec(&(iter)))

Jens, do you need me to post a new version with above change?


Thanks, 
Ming

      reply	other threads:[~2020-09-03  1:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 20:51 [block:block-5.9 41/41] net/sunrpc/xprtsock.c:392:9: sparse: sparse: incompatible types in conditional expression (different base types): kernel test robot
2020-09-03  1:11 ` Ming Lei [this message]

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=20200903011114.GD638071@T590 \
    --to=ming.lei@redhat.com \
    --cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.