Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1649014 > unrolled thread
| Started by | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| First post | 2017-05-24 02:10 +0200 |
| Last post | 2017-05-24 19:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 6/8] firmware: vpd: do not clear statically allocated data Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-05-24 02:10 +0200
Re: [PATCH 6/8] firmware: vpd: do not clear statically allocated data Guenter Roeck <groeck@google.com> - 2017-05-24 19:20 +0200
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Date | 2017-05-24 02:10 +0200 |
| Subject | [PATCH 6/8] firmware: vpd: do not clear statically allocated data |
| Message-ID | <tKs2e-2wM-15@gated-at.bofh.it> |
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@gmail.com> --- 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
[toc] | [next] | [standalone]
| From | Guenter Roeck <groeck@google.com> |
|---|---|
| Date | 2017-05-24 19:20 +0200 |
| Message-ID | <tKI70-5bS-15@gated-at.bofh.it> |
| In reply to | #1649014 |
On Tue, May 23, 2017 at 5:07 PM, Dmitry Torokhov <dmitry.torokhov@gmail.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@gmail.com> Reviewed-by: Guenter Roeck <groeck@chromium.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 >
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web