All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Arnd Bergmann <arnd@arndb.de>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Lu Baolu <baolu.lu@linux.intel.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: xhci: fix incorrect memset()
Date: Mon, 11 Dec 2017 14:59:13 +0200	[thread overview]
Message-ID: <70603a0e-15dd-8970-54c9-4f1ac1d005e2@linux.intel.com> (raw)
In-Reply-To: <20171211112806.3415781-1-arnd@arndb.de>

On 11.12.2017 13:27, Arnd Bergmann wrote:
> gcc-8 warnings about the new driver using a memset with a bogus length:
> 
> drivers/usb/host/xhci-dbgcap.c: In function 'xhci_dbc_eps_exit':
> drivers/usb/host/xhci-dbgcap.c:369:2: error: 'memset' used with length equal to number of elements without multiplication by element size [-Werror=memset-elt-size]
> 
> It looks like the author meant to use sizeof() rather than ARRAY_SIZE()
> here, so use that.
> 
> Fixes: dfba2174dc42 ("usb: xhci: Add DbC support in xHCI driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

Another patch to fix the same thing was sent earlier as a follow up to the original series.
https://marc.info/?l=linux-usb&m=151298133524873&w=2

But your patch includes the Fixes line with the commit id, which is nice.

Both fix the problem, It doesn't matter for me which one gets applied

Thanks
-Mathias

WARNING: multiple messages have this Message-ID (diff)
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Arnd Bergmann <arnd@arndb.de>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Lu Baolu <baolu.lu@linux.intel.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: usb: xhci: fix incorrect memset()
Date: Mon, 11 Dec 2017 14:59:13 +0200	[thread overview]
Message-ID: <70603a0e-15dd-8970-54c9-4f1ac1d005e2@linux.intel.com> (raw)

On 11.12.2017 13:27, Arnd Bergmann wrote:
> gcc-8 warnings about the new driver using a memset with a bogus length:
> 
> drivers/usb/host/xhci-dbgcap.c: In function 'xhci_dbc_eps_exit':
> drivers/usb/host/xhci-dbgcap.c:369:2: error: 'memset' used with length equal to number of elements without multiplication by element size [-Werror=memset-elt-size]
> 
> It looks like the author meant to use sizeof() rather than ARRAY_SIZE()
> here, so use that.
> 
> Fixes: dfba2174dc42 ("usb: xhci: Add DbC support in xHCI driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

Another patch to fix the same thing was sent earlier as a follow up to the original series.
https://marc.info/?l=linux-usb&m=151298133524873&w=2

But your patch includes the Fixes line with the commit id, which is nice.

Both fix the problem, It doesn't matter for me which one gets applied

Thanks
-Mathias
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2017-12-11 12:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-11 11:27 [PATCH] usb: xhci: fix incorrect memset() Arnd Bergmann
2017-12-11 11:27 ` Arnd Bergmann
2017-12-11 12:59 ` Mathias Nyman [this message]
2017-12-11 12:59   ` Mathias Nyman
2017-12-11 17:01   ` [PATCH] " Greg Kroah-Hartman
2017-12-11 17:01     ` Greg Kroah-Hartman
2017-12-11 17:05     ` [PATCH] " Arnd Bergmann
2017-12-11 17:05       ` Arnd Bergmann
2017-12-12 10:47       ` [PATCH] " Mathias Nyman
2017-12-12 10:47         ` Mathias Nyman

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=70603a0e-15dd-8970-54c9-4f1ac1d005e2@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=baolu.lu@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.