From: kernel test robot <lkp@intel.com>
To: Felix Fietkau <nbd@nbd.name>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Pablo Neira Ayuso <pablo@netfilter.org>
Subject: drivers/net/ethernet/mediatek/mtk_ppe_offload.c:89:19: sparse: sparse: cast to restricted __be32
Date: Sun, 5 Dec 2021 11:24:56 +0800 [thread overview]
Message-ID: <202112051143.BEmnOe4O-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 23b55d673d7527b093cd97b7c217c82e70cd1af0
commit: 502e84e2382d92654a2ecbc52cdbdb5a11cdcec7 net: ethernet: mtk_eth_soc: add flow offloading support
date: 9 months ago
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20211205/202112051143.BEmnOe4O-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.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-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=502e84e2382d92654a2ecbc52cdbdb5a11cdcec7
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 502e84e2382d92654a2ecbc52cdbdb5a11cdcec7
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=arm SHELL=/bin/bash drivers/dma/ drivers/gpu/drm/msm/ drivers/gpu/drm/tegra/ drivers/interconnect/qcom/ drivers/net/ethernet/mediatek/ drivers/net/vmxnet3/ drivers/net/wireless/mediatek/mt76/mt7915/ drivers/remoteproc/ drivers/scsi/bnx2fc/ drivers/scsi/lpfc/ drivers/staging/ fs/proc/
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 >>)
>> drivers/net/ethernet/mediatek/mtk_ppe_offload.c:89:19: sparse: sparse: cast to restricted __be32
>> drivers/net/ethernet/mediatek/mtk_ppe_offload.c:93:41: sparse: sparse: restricted __be32 degrades to integer
drivers/net/ethernet/mediatek/mtk_ppe_offload.c:46:10: sparse: sparse: Initializer entry defined twice
drivers/net/ethernet/mediatek/mtk_ppe_offload.c:47:10: sparse: also defined here
vim +89 drivers/net/ethernet/mediatek/mtk_ppe_offload.c
83
84
85 static int
86 mtk_flow_mangle_ports(const struct flow_action_entry *act,
87 struct mtk_flow_data *data)
88 {
> 89 u32 val = ntohl(act->mangle.val);
90
91 switch (act->mangle.offset) {
92 case 0:
> 93 if (act->mangle.mask == ~htonl(0xffff))
94 data->dst_port = cpu_to_be16(val);
95 else
96 data->src_port = cpu_to_be16(val >> 16);
97 break;
98 case 2:
99 data->dst_port = cpu_to_be16(val);
100 break;
101 default:
102 return -EINVAL;
103 }
104
105 return 0;
106 }
107
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
next reply other threads:[~2021-12-05 3:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-05 3:24 kernel test robot [this message]
2021-12-12 13:19 drivers/net/ethernet/mediatek/mtk_ppe_offload.c:89:19: sparse: sparse: cast to restricted __be32 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=202112051143.BEmnOe4O-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nbd@nbd.name \
--cc=pablo@netfilter.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).