mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@amd64.org>
To: <linux-edac@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>,
	Borislav Petkov <borislav.petkov@amd.com>
Subject: [PATCH 8/8] amd64_edac: Fix decode_syndrome types
Date: Tue,  1 Mar 2011 16:26:56 +0100	[thread overview]
Message-ID: <1298993216-19434-9-git-send-email-bp@amd64.org> (raw)
In-Reply-To: <1298993216-19434-1-git-send-email-bp@amd64.org>

From: Borislav Petkov <borislav.petkov@amd.com>

Those should all be unsigned.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
---
 drivers/edac/amd64_edac.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index cc4f887..0be30e9 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -1700,15 +1700,15 @@ static u16 x8_vectors[] = {
 	0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x8000,
 };
 
-static int decode_syndrome(u16 syndrome, u16 *vectors, int num_vecs,
-			   int v_dim)
+static int decode_syndrome(u16 syndrome, u16 *vectors, unsigned num_vecs,
+			   unsigned v_dim)
 {
 	unsigned int i, err_sym;
 
 	for (err_sym = 0; err_sym < num_vecs / v_dim; err_sym++) {
 		u16 s = syndrome;
-		int v_idx =  err_sym * v_dim;
-		int v_end = (err_sym + 1) * v_dim;
+		unsigned v_idx =  err_sym * v_dim;
+		unsigned v_end = (err_sym + 1) * v_dim;
 
 		/* walk over all 16 bits of the syndrome */
 		for (i = 1; i < (1U << 16); i <<= 1) {
-- 
1.7.4.rc2


      parent reply	other threads:[~2011-03-01 15:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-01 15:26 [PATCH 0/8] amd64_edac: Small fixlets Borislav Petkov
2011-03-01 15:26 ` [PATCH 1/8] amd64_edac: Drop redundant declarations Borislav Petkov
2011-03-01 15:26 ` [PATCH 2/8] amd64_edac: Fix node id signedness Borislav Petkov
2011-03-01 15:26 ` [PATCH 3/8] amd64_edac: Fix DRAM base macros Borislav Petkov
2011-03-01 15:26 ` [PATCH 4/8] amd64_edac: Fix PCI config addressing types Borislav Petkov
2011-03-01 15:26 ` [PATCH 5/8] amd64_edac: Drop local variable Borislav Petkov
2011-03-01 15:26 ` [PATCH 6/8] amd64_edac: Fix ranges signedness Borislav Petkov
2011-03-01 15:26 ` [PATCH 7/8] amd64_edac: Fix DCT argument type Borislav Petkov
2011-03-01 15:26 ` Borislav Petkov [this message]

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=1298993216-19434-9-git-send-email-bp@amd64.org \
    --to=bp@amd64.org \
    --cc=borislav.petkov@amd.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®