Patchworkβ Fix a bitmask in it87spi_probe.

login
register
about
Submitter Joshua Roys
Date 2010-08-29 15:07:39
Message ID <AANLkTik9p83f6Pr1yvMJ6bihU+4OfH-aPdyMhqFimipp@mail.gmail.com>
Download mbox | patch
Permalink /patch/1808/
State Not Applicable, archived
Headers show

Comments

Joshua Roys - 2010-08-29 15:07:39
Hello,

I think the first shift should be a 0 since the one below it is 1,
then 2, then 3, etc.

Signed-off-by: Joshua Roys <roysjosh@gmail.com>

Thanks,

Josh
From 3ae3e68527b84bb2de0fed0629824e9f7c08a885 Mon Sep 17 00:00:00 2001
From: Joshua Roys <roysjosh@gmail.com>
Date: Sun, 29 Aug 2010 11:00:39 -0400
Subject: [PATCH] Fix a bitmask in it87spi_probe.

Signed-off-by: Joshua Roys <roysjosh@gmail.com>
---
 it87spi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Uwe Hermann - 2010-09-13 18:36:50
On Sun, Aug 29, 2010 at 11:07:39AM -0400, Joshua Roys wrote:
> Hello,
> 
> I think the first shift should be a 0 since the one below it is 1,
> then 2, then 3, etc.

As per IRC discussion, the code is correct (though a bit confusing),
the patch is not needed.

 
Uwe.

Patch

diff --git a/it87spi.c b/it87spi.c
index ed6bae5..496c321 100644
--- a/it87spi.c
+++ b/it87spi.c
@@ -116,7 +116,7 @@  static uint16_t it87spi_probe(uint16_t port)
 		return 1;
 	}
 	msg_pdbg("Serial flash segment 0x%08x-0x%08x %sabled\n",
-		 0xFFFE0000, 0xFFFFFFFF, (tmp & 1 << 1) ? "en" : "dis");
+		 0xFFFE0000, 0xFFFFFFFF, (tmp & 1 << 0) ? "en" : "dis");
 	msg_pdbg("Serial flash segment 0x%08x-0x%08x %sabled\n",
 		 0x000E0000, 0x000FFFFF, (tmp & 1 << 1) ? "en" : "dis");
 	msg_pdbg("Serial flash segment 0x%08x-0x%08x %sabled\n",