linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ameen Ali <ameenali023@gmail.com>
To: dan.j.williams@intel.com, vinod.koul@intel.com
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ameen Ali <ameenali023@gmail.com>
Subject: [PATCH 11/11] iop-adma.c:1129: possible bad parameter in memset
Date: Fri, 13 Mar 2015 16:55:14 +0200	[thread overview]
Message-ID: <1426258514-6001-1-git-send-email-ameenali023@gmail.com> (raw)

The 2nd memset() argument '286331153' doesn't fit into an 'unsigned char'.

Signed-off-by : <AmeenAli023@gmail.com>
---
 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


             reply	other threads:[~2015-03-13 15:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-13 14:55 Ameen Ali [this message]
2015-03-16 17:02 ` [PATCH 11/11] iop-adma.c:1129: possible bad parameter in memset Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1426258514-6001-1-git-send-email-ameenali023@gmail.com \
    --to=ameenali023@gmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).