lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 05 Apr 2011 18:01:36 +0200
From:	"Michal Nazarewicz" <mina86@...a86.com>
To:	gregkh@...e.de, "Roger Quadros" <roger.quadros@...ia.com>
Cc:	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/5] usb: gadget: f_mass_storage: remove unnecessary
 initialization

On Tue, 05 Apr 2011 17:36:42 +0200, Roger Quadros wrote:
> memset sets the entire data structure to zero, so no need to
> zero initialize its field again.
>
> Signed-off-by: Roger Quadros <roger.quadros@...ia.com>
> ---
>  drivers/usb/gadget/f_mass_storage.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/usb/gadget/f_mass_storage.c  
> b/drivers/usb/gadget/f_mass_storage.c
> index 60b4df9..d3c00e6 100644
> --- a/drivers/usb/gadget/f_mass_storage.c
> +++ b/drivers/usb/gadget/f_mass_storage.c
> @@ -2775,7 +2775,6 @@ static struct fsg_common *fsg_common_init(struct  
> fsg_common *common,
>  		common->free_storage_on_release = 1;
>  	} else {
>  		memset(common, 0, sizeof *common);
> -		common->free_storage_on_release = 0;
>  	}
> 	common->ops = cfg->ops;

Yes, that's correct, but *I* would still leave that for the sake of
symmetry.

-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michal "mina86" Nazarewicz    (o o)
ooo +-----<email/xmpp: mnazarewicz@...gle.com>-----ooO--(_)--Ooo--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ