Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1317229 > unrolled thread
| Started by | Hugo Camboulive <hugo.camboulive@gmail.com> |
|---|---|
| First post | 2016-01-25 20:30 +0100 |
| Last post | 2016-01-26 21:00 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] staging: unisys: visornic: remove useless memset Hugo Camboulive <hugo.camboulive@gmail.com> - 2016-01-25 20:30 +0100
Re: [PATCH] staging: unisys: visornic: remove useless memset Ben Romer <benjamin.romer@unisys.com> - 2016-01-26 21:00 +0100
| From | Hugo Camboulive <hugo.camboulive@gmail.com> |
|---|---|
| Date | 2016-01-25 20:30 +0100 |
| Subject | [PATCH] staging: unisys: visornic: remove useless memset |
| Message-ID | <qUUZQ-gp-11@gated-at.bofh.it> |
alloc_etherdev() calls alloc_netdev_mqs(), which
already uses kzalloc/vzalloc.
This clears a sparse warning :
drivers/staging/unisys/visornic/visornic_main.c:1366:15: warning: memset with byte count of 1460112
Signed-off-by: Hugo Camboulive <hugo.camboulive@gmail.com>
---
drivers/staging/unisys/visornic/visornic_main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/unisys/visornic/visornic_main.c b/drivers/staging/unisys/visornic/visornic_main.c
index 0519470..d894815 100644
--- a/drivers/staging/unisys/visornic/visornic_main.c
+++ b/drivers/staging/unisys/visornic/visornic_main.c
@@ -1363,7 +1363,6 @@ devdata_initialize(struct visornic_devdata *devdata, struct visor_device *dev)
{
if (!devdata)
return NULL;
- memset(devdata, '\0', sizeof(struct visornic_devdata));
devdata->dev = dev;
devdata->incarnation_id = get_jiffies_64();
return devdata;
--
2.7.0
[toc] | [next] | [standalone]
| From | Ben Romer <benjamin.romer@unisys.com> |
|---|---|
| Date | 2016-01-26 21:00 +0100 |
| Message-ID | <qVhWq-uq-1@gated-at.bofh.it> |
| In reply to | #1317229 |
On Mon, 2016-01-25 at 20:22 +0000, Hugo Camboulive wrote: > alloc_etherdev() calls alloc_netdev_mqs(), which > already uses kzalloc/vzalloc. > > This clears a sparse warning : > drivers/staging/unisys/visornic/visornic_main.c:1366:15: warning: > memset with byte count of 1460112 > > Signed-off-by: Hugo Camboulive <hugo.camboulive@gmail.com> Tested, works fine. :) Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web