From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752875AbdLKM4q (ORCPT ); Mon, 11 Dec 2017 07:56:46 -0500 Received: from mga09.intel.com ([134.134.136.24]:49056 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750836AbdLKM4n (ORCPT ); Mon, 11 Dec 2017 07:56:43 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,391,1508828400"; d="scan'208";a="10901298" Subject: Re: [PATCH] usb: xhci: fix incorrect memset() To: Arnd Bergmann , Mathias Nyman , Greg Kroah-Hartman Cc: Lu Baolu , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org References: <20171211112806.3415781-1-arnd@arndb.de> From: Mathias Nyman Message-ID: <70603a0e-15dd-8970-54c9-4f1ac1d005e2@linux.intel.com> Date: Mon, 11 Dec 2017 14:59:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171211112806.3415781-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- 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