public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Leon Romanovsky <leonro@nvidia.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org, Raed Salem <raeds@nvidia.com>,
	Huy Nguyen <huyn@nvidia.com>
Subject: [leon-rdma:xfrm-next 4/34] net/xfrm/xfrm_device.c:383:49: warning: '&&' within '||'
Date: Wed, 24 Aug 2022 04:59:58 +0800	[thread overview]
Message-ID: <202208240416.Q0XLEKCM-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git xfrm-next
head:   a3d3cb4010b4294c2c6a60d398dd417f335982f3
commit: d7b5afa45594beb1a60cba94c0e9e2b645c6a881 [4/34] xfrm: add TX datapath support for IPsec full offload mode
config: i386-randconfig-a013 (https://download.01.org/0day-ci/archive/20220824/202208240416.Q0XLEKCM-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git/commit/?id=d7b5afa45594beb1a60cba94c0e9e2b645c6a881
        git remote add leon-rdma https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git
        git fetch --no-tags leon-rdma xfrm-next
        git checkout d7b5afa45594beb1a60cba94c0e9e2b645c6a881
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash net/xfrm/

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

All warnings (new ones prefixed by >>):

>> net/xfrm/xfrm_device.c:383:49: warning: '&&' within '||' [-Wlogical-op-parentheses]
               (!dev || (dev == xfrm_dst_path(dst)->dev)) && !xdst->child->xfrm) {
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
   net/xfrm/xfrm_device.c:383:49: note: place parentheses around the '&&' expression to silence this warning
               (!dev || (dev == xfrm_dst_path(dst)->dev)) && !xdst->child->xfrm) {
                                                          ^
               (                                                               )
   1 warning generated.


vim +383 net/xfrm/xfrm_device.c

   371	
   372	bool xfrm_dev_offload_ok(struct sk_buff *skb, struct xfrm_state *x)
   373	{
   374		int mtu;
   375		struct dst_entry *dst = skb_dst(skb);
   376		struct xfrm_dst *xdst = (struct xfrm_dst *)dst;
   377		struct net_device *dev = x->xso.dev;
   378	
   379		if (!x->type_offload || x->encap)
   380			return false;
   381	
   382		if (x->xso.type == XFRM_DEV_OFFLOAD_FULL ||
 > 383		    (!dev || (dev == xfrm_dst_path(dst)->dev)) && !xdst->child->xfrm) {
   384			mtu = xfrm_state_mtu(x, xdst->child_mtu_cached);
   385			if (skb->len <= mtu)
   386				goto ok;
   387	
   388			if (skb_is_gso(skb) && skb_gso_validate_network_len(skb, mtu))
   389				goto ok;
   390		}
   391	
   392		return false;
   393	
   394	ok:
   395		if (dev && dev->xfrmdev_ops && dev->xfrmdev_ops->xdo_dev_offload_ok)
   396			return x->xso.dev->xfrmdev_ops->xdo_dev_offload_ok(skb, x);
   397	
   398		return true;
   399	}
   400	EXPORT_SYMBOL_GPL(xfrm_dev_offload_ok);
   401	

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

                 reply	other threads:[~2022-08-23 21:00 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=202208240416.Q0XLEKCM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=huyn@nvidia.com \
    --cc=kbuild-all@lists.01.org \
    --cc=leonro@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=raeds@nvidia.com \
    /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