Re: [PATCH 1/3] HID: picolcd: fix misuse of logical operation in place of bitop

Previous thread: [GIT PULL] nommu updates for 2.6.37-rc8 by Paul Mundt on Monday, December 27, 2010 - 7:20 am. (1 message)

Next thread: [PATCH 0/7] perf: offcore and load latency monitoring patches by Lin Ming on Monday, December 27, 2010 - 8:35 am. (1 message)
From: David Sterba
Date: Monday, December 27, 2010 - 8:27 am

CC: Bruno Prémont <bonbons@linux-vserver.org>
CC: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: David Sterba <dsterba@suse.cz>
---
 drivers/hid/hid-picolcd.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/hid-picolcd.c b/drivers/hid/hid-picolcd.c
index bc2e077..0aff3cd 100644
--- a/drivers/hid/hid-picolcd.c
+++ b/drivers/hid/hid-picolcd.c
@@ -1544,7 +1544,7 @@ static ssize_t picolcd_debug_eeprom_read(struct file *f, char __user *u,
 
 	/* prepare buffer with info about what we want to read (addr & len) */
 	raw_data[0] = *off & 0xff;
-	raw_data[1] = (*off >> 8) && 0xff;
+	raw_data[1] = (*off >> 8) & 0xff;
 	raw_data[2] = s < 20 ? s : 20;
 	if (*off + raw_data[2] > 0xff)
 		raw_data[2] = 0x100 - *off;
@@ -1583,7 +1583,7 @@ static ssize_t picolcd_debug_eeprom_write(struct file *f, const char __user *u,
 
 	memset(raw_data, 0, sizeof(raw_data));
 	raw_data[0] = *off & 0xff;
-	raw_data[1] = (*off >> 8) && 0xff;
+	raw_data[1] = (*off >> 8) & 0xff;
 	raw_data[2] = s < 20 ? s : 20;
 	if (*off + raw_data[2] > 0xff)
 		raw_data[2] = 0x100 - *off;
-- 
1.7.3.4.578.g6068a

--

From: David Sterba
Date: Monday, December 27, 2010 - 8:33 am

^^^
sorry, I forgot to give --no-numbered to format-patch, this is just one patch,

dave
--

From: Jiri Kosina
Date: Monday, December 27, 2010 - 8:39 am

Applied, thank you.

-- 
Jiri Kosina
SUSE Labs, Novell Inc.
--

From: Bruno Prémont
Date: Monday, December 27, 2010 - 2:47 pm

Thanks for spotting,

Acked-by: Bruno Prémont <bonbons@linux-vserver.org>

--

Previous thread: [GIT PULL] nommu updates for 2.6.37-rc8 by Paul Mundt on Monday, December 27, 2010 - 7:20 am. (1 message)

Next thread: [PATCH 0/7] perf: offcore and load latency monitoring patches by Lin Ming on Monday, December 27, 2010 - 8:35 am. (1 message)