mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-23 01:40:30 +00:00
drivers: macintosh: rack-meter: really fix bogus memsets
We should zero an array using sizeof instead of number of elements.
Fixes the following compiler (GCC 7.3.0) warnings:
drivers/macintosh/rack-meter.c: In function 'rackmeter_do_pause':
drivers/macintosh/rack-meter.c:157:2: warning: 'memset' used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
drivers/macintosh/rack-meter.c:158:2: warning: 'memset' used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
Fixes: 4f7bef7a9f
("drivers: macintosh: rack-meter: fix bogus memsets")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
0bfdf59890
commit
e283655b5a
@ -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, ARRAY_SIZE(rdma->buf1));
|
||||
memset(rdma->buf2, 0, ARRAY_SIZE(rdma->buf2));
|
||||
memset(rdma->buf1, 0, sizeof(rdma->buf1));
|
||||
memset(rdma->buf2, 0, sizeof(rdma->buf2));
|
||||
|
||||
rm->dma_buf_v->mark = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user