[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABXOdTf28cMWYP2hQNoZQ47YwQh4Byia3B6VGipKgQx=s0WvHA@mail.gmail.com>
Date: Wed, 24 May 2017 10:19:08 -0700
From: Guenter Roeck <groeck@...gle.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Wei-Ning Huang <wnhuang@...gle.com>,
Julius Werner <jwerner@...omium.org>,
Guenter Roeck <groeck@...omium.org>,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 6/8] firmware: vpd: do not clear statically allocated data
On Tue, May 23, 2017 at 5:07 PM, Dmitry Torokhov
<dmitry.torokhov@...il.com> wrote:
> ro_vpd and rw_vpd are static module-scope variables that are guaranteed
> to be initialized with zeroes, there is no need for explicit memset().
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
Reviewed-by: Guenter Roeck <groeck@...omium.org>
> ---
> drivers/firmware/google/vpd.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/firmware/google/vpd.c b/drivers/firmware/google/vpd.c
> index 3463b8037ed8..78945729388e 100644
> --- a/drivers/firmware/google/vpd.c
> +++ b/drivers/firmware/google/vpd.c
> @@ -317,9 +317,6 @@ static int __init vpd_platform_init(void)
> if (!vpd_kobj)
> return -ENOMEM;
>
> - memset(&ro_vpd, 0, sizeof(ro_vpd));
> - memset(&rw_vpd, 0, sizeof(rw_vpd));
> -
> platform_driver_register(&vpd_driver);
>
> return 0;
> --
> 2.13.0.219.gdb65acc882-goog
>
Powered by blists - more mailing lists