mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: jiping huang <huangjiping95@qq.com>,
	davem@davemloft.net, dsahern@kernel.org, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com
Cc: oe-kbuild-all@lists.linux.dev, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, jiping huang <huangjiping95@qq.com>
Subject: Re: [PATCH] net: Remove a local variable with the same name as the parameter.
Date: Tue, 27 Aug 2024 03:41:55 +0800	[thread overview]
Message-ID: <202408270307.mdO3OvJy-lkp@intel.com> (raw)
In-Reply-To: <tencent_155F5603C098FE823F48F8918122C3783107@qq.com>

Hi jiping,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]
[also build test ERROR on net/main linus/master v6.11-rc5 next-20240826]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/jiping-huang/net-Remove-a-local-variable-with-the-same-name-as-the-parameter/20240826-165617
base:   net-next/main
patch link:    https://lore.kernel.org/r/tencent_155F5603C098FE823F48F8918122C3783107%40qq.com
patch subject: [PATCH] net: Remove a local variable with the same name as the parameter.
config: openrisc-defconfig (https://download.01.org/0day-ci/archive/20240827/202408270307.mdO3OvJy-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240827/202408270307.mdO3OvJy-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408270307.mdO3OvJy-lkp@intel.com/

All errors (new ones prefixed by >>):

   net/ipv4/fib_semantics.c: In function 'fib_dump_info':
>> net/ipv4/fib_semantics.c:1832:57: error: passing argument 4 of 'fib_nexthop_info' from incompatible pointer type [-Wincompatible-pointer-types]
    1832 |                 if (fib_nexthop_info(skb, nhc, AF_INET, &rtm->rtm_flags, false) < 0)
         |                                                         ^~~~~~~~~~~~~~~
         |                                                         |
         |                                                         unsigned int *
   net/ipv4/fib_semantics.c:1635:51: note: expected 'unsigned char *' but argument is of type 'unsigned int *'
    1635 |                      u8 rt_family, unsigned char *flags, bool skip_oif)
         |                                    ~~~~~~~~~~~~~~~^~~~~


vim +/fib_nexthop_info +1832 net/ipv4/fib_semantics.c

  1777	
  1778	int fib_dump_info(struct sk_buff *skb, u32 portid, u32 seq, int event,
  1779			  const struct fib_rt_info *fri, unsigned int flags)
  1780	{
  1781		unsigned int nhs = fib_info_num_path(fri->fi);
  1782		struct fib_info *fi = fri->fi;
  1783		u32 tb_id = fri->tb_id;
  1784		struct nlmsghdr *nlh;
  1785		struct rtmsg *rtm;
  1786	
  1787		nlh = nlmsg_put(skb, portid, seq, event, sizeof(*rtm), flags);
  1788		if (!nlh)
  1789			return -EMSGSIZE;
  1790	
  1791		rtm = nlmsg_data(nlh);
  1792		rtm->rtm_family = AF_INET;
  1793		rtm->rtm_dst_len = fri->dst_len;
  1794		rtm->rtm_src_len = 0;
  1795		rtm->rtm_tos = inet_dscp_to_dsfield(fri->dscp);
  1796		if (tb_id < 256)
  1797			rtm->rtm_table = tb_id;
  1798		else
  1799			rtm->rtm_table = RT_TABLE_COMPAT;
  1800		if (nla_put_u32(skb, RTA_TABLE, tb_id))
  1801			goto nla_put_failure;
  1802		rtm->rtm_type = fri->type;
  1803		rtm->rtm_flags = fi->fib_flags;
  1804		rtm->rtm_scope = fi->fib_scope;
  1805		rtm->rtm_protocol = fi->fib_protocol;
  1806	
  1807		if (rtm->rtm_dst_len &&
  1808		    nla_put_in_addr(skb, RTA_DST, fri->dst))
  1809			goto nla_put_failure;
  1810		if (fi->fib_priority &&
  1811		    nla_put_u32(skb, RTA_PRIORITY, fi->fib_priority))
  1812			goto nla_put_failure;
  1813		if (rtnetlink_put_metrics(skb, fi->fib_metrics->metrics) < 0)
  1814			goto nla_put_failure;
  1815	
  1816		if (fi->fib_prefsrc &&
  1817		    nla_put_in_addr(skb, RTA_PREFSRC, fi->fib_prefsrc))
  1818			goto nla_put_failure;
  1819	
  1820		if (fi->nh) {
  1821			if (nla_put_u32(skb, RTA_NH_ID, fi->nh->id))
  1822				goto nla_put_failure;
  1823			if (nexthop_is_blackhole(fi->nh))
  1824				rtm->rtm_type = RTN_BLACKHOLE;
  1825			if (!READ_ONCE(fi->fib_net->ipv4.sysctl_nexthop_compat_mode))
  1826				goto offload;
  1827		}
  1828	
  1829		if (nhs == 1) {
  1830			const struct fib_nh_common *nhc = fib_info_nhc(fi, 0);
  1831	
> 1832			if (fib_nexthop_info(skb, nhc, AF_INET, &rtm->rtm_flags, false) < 0)
  1833				goto nla_put_failure;
  1834	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      parent reply	other threads:[~2024-08-26 19:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26  7:35 jiping huang
2024-08-26  8:30 ` Eric Dumazet
2024-08-26 19:41 ` kernel test robot [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=202408270307.mdO3OvJy-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=huangjiping95@qq.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.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

all inboxes | Powered by JetHome®