Netdev Archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: kernel test robot <lkp@intel.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	 Paolo Abeni <pabeni@redhat.com>,
	oe-kbuild-all@lists.linux.dev, netdev@vger.kernel.org,
	 eric.dumazet@gmail.com,
	Steve Glendinning <steve.glendinning@shawell.net>,
	 UNGLinuxDriver@microchip.com
Subject: Re: [PATCH v2 net-next] net: usb: smsc95xx: stop lying about skb->truesize
Date: Thu, 9 May 2024 10:25:18 +0200	[thread overview]
Message-ID: <CANn89iJvTqGtSzyPFXTzomcG=ThyFC-jVcjcE9jBE0Tpd26C9g@mail.gmail.com> (raw)
In-Reply-To: <202405091310.KvncIecx-lkp@intel.com>

On Thu, May 9, 2024 at 8:01 AM kernel test robot <lkp@intel.com> wrote:
>
> Hi Eric,
>
> kernel test robot noticed the following build warnings:
>
> [auto build test WARNING on net-next/main]
>
> url:    https://github.com/intel-lab-lkp/linux/commits/Eric-Dumazet/net-usb-smsc95xx-stop-lying-about-skb-truesize/20240508-155316
> base:   net-next/main
> patch link:    https://lore.kernel.org/r/20240508075159.1646031-1-edumazet%40google.com
> patch subject: [PATCH v2 net-next] net: usb: smsc95xx: stop lying about skb->truesize
> config: arc-randconfig-r132-20240509 (https://download.01.org/0day-ci/archive/20240509/202405091310.KvncIecx-lkp@intel.com/config)
> compiler: arceb-elf-gcc (GCC) 13.2.0
> reproduce: (https://download.01.org/0day-ci/archive/20240509/202405091310.KvncIecx-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/202405091310.KvncIecx-lkp@intel.com/
>
> sparse warnings: (new ones prefixed by >>)
> >> drivers/net/usb/smsc95xx.c:1815:19: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __wsum [usertype] csum @@     got unsigned short x @@
>    drivers/net/usb/smsc95xx.c:1815:19: sparse:     expected restricted __wsum [usertype] csum
>    drivers/net/usb/smsc95xx.c:1815:19: sparse:     got unsigned short x
>    drivers/net/usb/smsc95xx.c: note: in included file (through include/net/checksum.h, include/linux/skbuff.h, include/net/net_namespace.h, ...):
>    arch/arc/include/asm/checksum.h:27:26: sparse: sparse: restricted __wsum degrades to integer
>    arch/arc/include/asm/checksum.h:27:36: sparse: sparse: restricted __wsum degrades to integer
>    arch/arc/include/asm/checksum.h:29:11: sparse: sparse: bad assignment (-=) to restricted __wsum
>    arch/arc/include/asm/checksum.h:30:16: sparse: sparse: restricted __wsum degrades to integer
>    arch/arc/include/asm/checksum.h:30:18: sparse: sparse: incorrect type in return expression (different base types) @@     expected restricted __sum16 @@     got unsigned int @@
>    arch/arc/include/asm/checksum.h:30:18: sparse:     expected restricted __sum16
>    arch/arc/include/asm/checksum.h:30:18: sparse:     got unsigned int
>
> vim +1815 drivers/net/usb/smsc95xx.c
>
>   1810
>   1811  static void smsc95xx_rx_csum_offload(struct sk_buff *skb)
>   1812  {
>   1813          u16 *csum_ptr = (u16 *)(skb_tail_pointer(skb) - 2);
>   1814
> > 1815          skb->csum = get_unaligned(csum_ptr);
>   1816          skb->ip_summed = CHECKSUM_COMPLETE;
>   1817          skb_trim(skb, skb->len - 2); /* remove csum */
>   1818  }
>   1819
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki


Please note this is not a new warning. Prior to my change we had :

drivers/net/usb/smsc95xx.c:1813:19: warning: incorrect type in
assignment (different base types)
drivers/net/usb/smsc95xx.c:1813:19:    expected restricted __wsum
[usertype] csum
drivers/net/usb/smsc95xx.c:1813:19:    got unsigned short [usertype]

I will submit a v3, to _also_ fix the sparse warning.

      reply	other threads:[~2024-05-09  8:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-08  7:51 [PATCH v2 net-next] net: usb: smsc95xx: stop lying about skb->truesize Eric Dumazet
2024-05-09  6:00 ` kernel test robot
2024-05-09  8:25   ` Eric Dumazet [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='CANn89iJvTqGtSzyPFXTzomcG=ThyFC-jVcjcE9jBE0Tpd26C9g@mail.gmail.com' \
    --to=edumazet@google.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=kuba@kernel.org \
    --cc=lkp@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=steve.glendinning@shawell.net \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).