[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170702155748.GA10229@lkp-wsm-ep2>
Date: Sun, 2 Jul 2017 23:57:48 +0800
From: kbuild test robot <lkp@...el.com>
To: Julian Scheel <julian@...st.de>
Cc: kbuild-all@...org, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jonathan Corbet <corbet@....net>,
Felipe Balbi <balbi@...nel.org>,
Julian Scheel <julian@...st.de>,
Ruslan Bilovol <ruslan.bilovol@...il.com>,
Peter Chen <peter.chen@....com>, Sekhar Nori <nsekhar@...com>,
Thierry Reding <thierry.reding@...il.com>,
linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: [PATCH] usb: gadget: f_uac*: fix noderef.cocci warnings
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 <julian@...st.de>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---
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;
Powered by blists - more mailing lists