mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging:ccg: Fix missing brackets for sizeof (found by sparse).
@ 2012-08-08 20:14 Marek Belisko
  2012-08-08 20:22 ` Jesper Juhl
  0 siblings, 1 reply; 3+ messages in thread
From: Marek Belisko @ 2012-08-08 20:14 UTC (permalink / raw)
  To: gregkh; +Cc: andrzej.p, lockwood, devel, linux-kernel, Marek Belisko

Fix following:
WARNING: sizeof fsg should be sizeof(fsg)
+	memset(&fsg, 0, sizeof fsg);

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
 drivers/staging/ccg/ccg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ccg/ccg.c b/drivers/staging/ccg/ccg.c
index 6a7aab8..81ac6bb 100644
--- a/drivers/staging/ccg/ccg.c
+++ b/drivers/staging/ccg/ccg.c
@@ -728,7 +728,7 @@ static int mass_storage_function_init(struct ccg_usb_function *f,
 	struct fsg_common *common;
 	int err;
 
-	memset(&fsg, 0, sizeof fsg);
+	memset(&fsg, 0, sizeof(fsg));
 	fsg.nluns = 1;
 	fsg.luns[0].removable = 1;
 	fsg.vendor_name = iManufacturer;
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] staging:ccg: Fix missing brackets for sizeof (found by sparse).
  2012-08-08 20:14 [PATCH] staging:ccg: Fix missing brackets for sizeof (found by sparse) Marek Belisko
@ 2012-08-08 20:22 ` Jesper Juhl
  0 siblings, 0 replies; 3+ messages in thread
From: Jesper Juhl @ 2012-08-08 20:22 UTC (permalink / raw)
  To: Marek Belisko; +Cc: gregkh, andrzej.p, lockwood, devel, linux-kernel

On Wed, 8 Aug 2012, Marek Belisko wrote:

> Fix following:
> WARNING: sizeof fsg should be sizeof(fsg)
> +	memset(&fsg, 0, sizeof fsg);
> 
> Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
> ---
>  drivers/staging/ccg/ccg.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/ccg/ccg.c b/drivers/staging/ccg/ccg.c
> index 6a7aab8..81ac6bb 100644
> --- a/drivers/staging/ccg/ccg.c
> +++ b/drivers/staging/ccg/ccg.c
> @@ -728,7 +728,7 @@ static int mass_storage_function_init(struct ccg_usb_function *f,
>  	struct fsg_common *common;
>  	int err;
>  
> -	memset(&fsg, 0, sizeof fsg);
> +	memset(&fsg, 0, sizeof(fsg));
>  	fsg.nluns = 1;
>  	fsg.luns[0].removable = 1;
>  	fsg.vendor_name = iManufacturer;
> 
Looks good to me.

Reviewed-by: Jesper Juhl <jj@chaosbits.net>


-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] staging:ccg: Fix missing brackets for sizeof (found by sparse).
@ 2012-08-06 21:11 Marek Belisko
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Belisko @ 2012-08-06 21:11 UTC (permalink / raw)
  To: gregkh; +Cc: andrzej.p, lockwood, devel, linux-kernel, Marek Belisko

Fix following:
WARNING: sizeof fsg should be sizeof(fsg)
+	memset(&fsg, 0, sizeof fsg);

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
---
 drivers/staging/ccg/ccg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/ccg/ccg.c b/drivers/staging/ccg/ccg.c
index 6a7aab8..81ac6bb 100644
--- a/drivers/staging/ccg/ccg.c
+++ b/drivers/staging/ccg/ccg.c
@@ -728,7 +728,7 @@ static int mass_storage_function_init(struct ccg_usb_function *f,
 	struct fsg_common *common;
 	int err;
 
-	memset(&fsg, 0, sizeof fsg);
+	memset(&fsg, 0, sizeof(fsg));
 	fsg.nluns = 1;
 	fsg.luns[0].removable = 1;
 	fsg.vendor_name = iManufacturer;
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-08 20:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-08 20:14 [PATCH] staging:ccg: Fix missing brackets for sizeof (found by sparse) Marek Belisko
2012-08-08 20:22 ` Jesper Juhl
  -- strict thread matches above, loose matches on Subject: below --
2012-08-06 21:11 Marek Belisko

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®