mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Lars Poeschel <poeschel@lemonage.de>
Cc: kbuild-all@lists.01.org, Lars Poeschel <poeschel@lemonage.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Allison Randal <allison@lohutok.net>,
	Kate Stewart <kstewart@linuxfoundation.org>,
	Steve Winslow <swinslow@gmail.com>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:NFC SUBSYSTEM" <netdev@vger.kernel.org>,
	Johan Hovold <johan@kernel.org>,
	Claudiu Beznea <Claudiu.Beznea@microchip.com>,
	David Miller <davem@davemloft.net>
Subject: Re: [PATCH v10 5/7] nfc: pn533: add UART phy driver
Date: Tue, 29 Oct 2019 01:21:56 +0800	[thread overview]
Message-ID: <201910290150.Mhd8u8Ot%lkp@intel.com> (raw)
In-Reply-To: <20191025142521.22695-6-poeschel@lemonage.de>

Hi Lars,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.4-rc5 next-20191028]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Lars-Poeschel/nfc-pn533-add-uart-phy-driver/20191028-222313
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 0365fb6baeb1ebefbbdad9e3f48bab9b3ccb8df3
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

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


sparse warnings: (new ones prefixed by >>)

>> drivers/nfc/pn533/uart.c:174:35: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [usertype] frame_len @@    got resunsigned short [usertype] frame_len @@
>> drivers/nfc/pn533/uart.c:174:35: sparse:    expected unsigned short [usertype] frame_len
>> drivers/nfc/pn533/uart.c:174:35: sparse:    got restricted __be16 [usertype] datalen

vim +174 drivers/nfc/pn533/uart.c

   133	
   134	/*
   135	 * scans the buffer if it contains a pn532 frame. It is not checked if the
   136	 * frame is really valid. This is later done with pn533_rx_frame_is_valid.
   137	 * This is useful for malformed or errornous transmitted frames. Adjusts the
   138	 * bufferposition where the frame starts, since pn533_recv_frame expects a
   139	 * well formed frame.
   140	 */
   141	static int pn532_uart_rx_is_frame(struct sk_buff *skb)
   142	{
   143		struct pn533_std_frame *std;
   144		struct pn533_ext_frame *ext;
   145		u16 frame_len;
   146		int i;
   147	
   148		for (i = 0; i + PN533_STD_FRAME_ACK_SIZE <= skb->len; i++) {
   149			std = (struct pn533_std_frame *)&skb->data[i];
   150			/* search start code */
   151			if (std->start_frame != cpu_to_be16(PN533_STD_FRAME_SOF))
   152				continue;
   153	
   154			/* frame type */
   155			switch (std->datalen) {
   156			case PN533_FRAME_DATALEN_ACK:
   157				if (std->datalen_checksum == 0xff) {
   158					skb_pull(skb, i);
   159					return 1;
   160				}
   161	
   162				break;
   163			case PN533_FRAME_DATALEN_ERROR:
   164				if ((std->datalen_checksum == 0xff) &&
   165						(skb->len >=
   166						 PN533_STD_ERROR_FRAME_SIZE)) {
   167					skb_pull(skb, i);
   168					return 1;
   169				}
   170	
   171				break;
   172			case PN533_FRAME_DATALEN_EXTENDED:
   173				ext = (struct pn533_ext_frame *)&skb->data[i];
 > 174				frame_len = ext->datalen;
   175				if (skb->len >= frame_len +
   176						sizeof(struct pn533_ext_frame) +
   177						2 /* CKS + Postamble */) {
   178					skb_pull(skb, i);
   179					return 1;
   180				}
   181	
   182				break;
   183			default: /* normal information frame */
   184				frame_len = std->datalen;
   185				if (skb->len >= frame_len +
   186						sizeof(struct pn533_std_frame) +
   187						2 /* CKS + Postamble */) {
   188					skb_pull(skb, i);
   189					return 1;
   190				}
   191	
   192				break;
   193			}
   194		}
   195	
   196		return 0;
   197	}
   198	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

  reply	other threads:[~2019-10-28 17:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25 14:25 [PATCH v10 0/7] nfc: pn533: add uart " Lars Poeschel
2019-10-25 14:25 ` [PATCH v10 1/7] nfc: pn533: i2c: "pn532" as dt compatible string Lars Poeschel
2019-10-25 14:25 ` [PATCH v10 2/7] nfc: pn532: Add uart phy docs and rename it Lars Poeschel
2019-10-25 14:25 ` [PATCH v10 3/7] nfc: pn533: Add dev_up/dev_down hooks to phy_ops Lars Poeschel
2019-10-25 14:25 ` [PATCH v10 4/7] nfc: pn533: Split pn533 init & nfc_register Lars Poeschel
2019-10-25 14:25 ` [PATCH v10 5/7] nfc: pn533: add UART phy driver Lars Poeschel
2019-10-28 17:21   ` kbuild test robot [this message]
2019-10-25 14:25 ` [PATCH v10 6/7] nfc: pn533: Add autopoll capability Lars Poeschel
2019-10-25 14:25 ` [PATCH v10 7/7] nfc: pn532_uart: Make use of pn532 autopoll Lars Poeschel

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=201910290150.Mhd8u8Ot%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Claudiu.Beznea@microchip.com \
    --cc=allison@lohutok.net \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=poeschel@lemonage.de \
    --cc=swinslow@gmail.com \
    --cc=tglx@linutronix.de \
    /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®