Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752142AbdGBP60 (ORCPT ); Sun, 2 Jul 2017 11:58:26 -0400 Received: from mga02.intel.com ([134.134.136.20]:7036 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751950AbdGBP6K (ORCPT ); Sun, 2 Jul 2017 11:58:10 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,298,1496127600"; d="scan'208";a="121487811" Date: Sun, 2 Jul 2017 23:57:48 +0800 From: kbuild test robot To: Julian Scheel Cc: kbuild-all@01.org, Greg Kroah-Hartman , Jonathan Corbet , Felipe Balbi , Julian Scheel , Ruslan Bilovol , Peter Chen , Sekhar Nori , Thierry Reding , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH] usb: gadget: f_uac*: fix noderef.cocci warnings Message-ID: <20170702155748.GA10229@lkp-wsm-ep2> References: <201707022355.28IQ2IhO%fengguang.wu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170630100036.10547-3-julian@jusst.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: fengguang.wu@intel.com X-SA-Exim-Scanned: No (on bee); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 868 Lines: 26 drivers/usb/gadget/legacy/audio.c:231:23-29: ERROR: application of sizeof to pointer sizeof when applied to a pointer typed expression gives the size of the pointer Generated by: scripts/coccinelle/misc/noderef.cocci Fixes: f95cee9b299f ("usb: gadget: f_uac*: Reduce code duplication") CC: Julian Scheel Signed-off-by: Fengguang Wu --- audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/gadget/legacy/audio.c +++ b/drivers/usb/gadget/legacy/audio.c @@ -228,7 +228,7 @@ static int audio_bind(struct usb_composi #endif #if !defined(CONFIG_GADGET_UAC1) || !defined(CONFIG_GADGET_UAC1_LEGACY) - memset(uac_opts, 0x0, sizeof(uac_opts)); + memset(uac_opts, 0x0, sizeof(*uac_opts)); uac_opts->p_chmask = p_chmask; uac_opts->p_srate[0] = p_srate; uac_opts->p_srate_active = p_srate;