* [PATCH] staging: unisys: visornic: remove useless memset
@ 2016-01-25 20:22 Hugo Camboulive
2016-01-26 19:44 ` Ben Romer
0 siblings, 1 reply; 2+ messages in thread
From: Hugo Camboulive @ 2016-01-25 20:22 UTC (permalink / raw)
To: benjamin.romer, david.kershner, gregkh, Timothy.Sell, nhorman
Cc: sparmaintainer, devel, linux-kernel, Hugo Camboulive
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: unisys: visornic: remove useless memset
2016-01-25 20:22 [PATCH] staging: unisys: visornic: remove useless memset Hugo Camboulive
@ 2016-01-26 19:44 ` Ben Romer
0 siblings, 0 replies; 2+ messages in thread
From: Ben Romer @ 2016-01-26 19:44 UTC (permalink / raw)
To: Hugo Camboulive, david.kershner, gregkh, Timothy.Sell, nhorman
Cc: sparmaintainer, devel, linux-kernel
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-26 19:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-25 20:22 [PATCH] staging: unisys: visornic: remove useless memset Hugo Camboulive
2016-01-26 19:44 ` Ben Romer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.