diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2016-04-10 22:53:48 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-04-12 21:05:20 +1000 |
commit | 4f7bef7a9f69b1c6fe44b9f249b49056288475a4 (patch) | |
tree | 0789ac0d2dc087608f6e8f7b986f4087e08bc1cb /drivers/macintosh | |
parent | c796d1d97c3035cf54d4d5a9e75abd094db80e76 (diff) | |
download | linux-4f7bef7a9f69b1c6fe44b9f249b49056288475a4.tar.gz linux-4f7bef7a9f69b1c6fe44b9f249b49056288475a4.tar.bz2 linux-4f7bef7a9f69b1c6fe44b9f249b49056288475a4.zip |
drivers: macintosh: rack-meter: fix bogus memsets
Fix bogus memsets pointed out by sparse:
linux-v4.3/drivers/macintosh/rack-meter.c:157:15: warning: memset with byte count of 0
linux-v4.3/drivers/macintosh/rack-meter.c:158:15: warning: memset with byte count of 0
Probably "&" is mistyped "*"; use ARRAY_SIZE to make it more safe.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/macintosh')
-rw-r--r-- | drivers/macintosh/rack-meter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index ba7e330640fb..465c52219639 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c @@ -154,8 +154,8 @@ static void rackmeter_do_pause(struct rackmeter *rm, int pause) DBDMA_DO_STOP(rm->dma_regs); return; } - memset(rdma->buf1, 0, SAMPLE_COUNT & sizeof(u32)); - memset(rdma->buf2, 0, SAMPLE_COUNT & sizeof(u32)); + memset(rdma->buf1, 0, ARRAY_SIZE(rdma->buf1)); + memset(rdma->buf2, 0, ARRAY_SIZE(rdma->buf2)); rm->dma_buf_v->mark = 0; |