Re: [PATCH 11/11] iop-adma.c:1129: possible bad parameter in memset

From: Vinod Koul
Date: Mon Mar 16 2015 - 13:06:47 EST


On Fri, Mar 13, 2015 at 04:55:14PM +0200, Ameen Ali wrote:
> The 2nd memset() argument '286331153' doesn't fit into an 'unsigned char'.
care to explain hpow it is fixed...

>
> Signed-off-by : <AmeenAli023@xxxxxxxxx>
This is not proper, see Documentation/SubmittingPatches

> ---
> drivers/dma/iop-adma.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c
> index 263d9f6..78382b0 100644
> --- a/drivers/dma/iop-adma.c
> +++ b/drivers/dma/iop-adma.c
> @@ -1126,7 +1126,7 @@ iop_adma_pq_zero_sum_self_test(struct iop_adma_device *device)
> /* Fill in src buffers */
> for (i = 0; i < IOP_ADMA_NUM_SRC_TEST; i++) {
> pq_sw[i] = page_address(pq[i]);
> - memset(pq_sw[i], 0x11111111 * (1<<i), PAGE_SIZE);
> + memset(pq_sw[i], 0x11111111 & (1<<i), PAGE_SIZE);
> }
> pq_sw[i] = page_address(pq[i]);
> pq_sw[i+1] = page_address(pq[i+1]);
> --
> 2.1.0
>

--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/