From patchwork Mon Dec 27 15:27:43 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Sterba X-Patchwork-Id: 434281 X-Patchwork-Delegate: jikos@jikos.cz Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBRKCV95025997 for ; Mon, 27 Dec 2010 20:16:44 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754075Ab0L0P2I (ORCPT ); Mon, 27 Dec 2010 10:28:08 -0500 Received: from cantor.suse.de ([195.135.220.2]:50842 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754056Ab0L0P2H (ORCPT ); Mon, 27 Dec 2010 10:28:07 -0500 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.suse.de (Postfix) with ESMTP id EC65D93717; Mon, 27 Dec 2010 16:28:03 +0100 (CET) Received: by ds.suse.cz (Postfix, from userid 10065) id C5D2A74760; Mon, 27 Dec 2010 16:28:02 +0100 (CET) From: David Sterba To: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org, David Sterba , =?UTF-8?q?Bruno=20Pr=C3=A9mont?= , Jiri Kosina Subject: [PATCH 1/3] HID: picolcd: fix misuse of logical operation in place of bitop Date: Mon, 27 Dec 2010 16:27:43 +0100 Message-Id: <1293463663-21198-1-git-send-email-dsterba@suse.cz> X-Mailer: git-send-email 1.7.3.4.578.g6068a MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 27 Dec 2010 20:16:44 +0000 (UTC) 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;