lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 22 Sep 2009 08:06:22 -0700
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	"Hennerich, Michael" <Michael.Hennerich@...log.com>
Cc:	Jiri Kosina <jkosina@...e.cz>, Mike Frysinger <vapier@...too.org>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	uclinux-dist-devel@...ckfin.uclinux.org,
	Bryan Wu <cooloney@...nel.org>
Subject: Re: [PATCH] input/keyboard: new driver for ADP5520 MFD PMICs

On Tue, Sep 22, 2009 at 08:53:19AM +0100, Hennerich, Michael wrote:
> 
> >From: Jiri Kosina
> >Sent: Tuesday, September 22, 2009 9:33 AM
> >
> >On Mon, 21 Sep 2009, Dmitry Torokhov wrote:
> >
> >> > +	if (event & KP_INT) {
> >> > +		adp5520_read(dev->master, KP_INT_STAT_1, &reg_val_low);
> >> > +		adp5520_read(dev->master, KP_INT_STAT_2, &reg_val_high);
> >> > +
> >> > +		keymask = (reg_val_high << 8) | reg_val_low;
> >> > +		/* Read twice to clear */
> >> > +		adp5520_read(dev->master, KP_INT_STAT_1, &reg_val_low);
> >> > +		adp5520_read(dev->master, KP_INT_STAT_2, &reg_val_high);
> >> > +		keymask |= (reg_val_high << 8) | reg_val_low;
> >> > +		adp5520_keys_report_event(dev, keymask, 1);
> >> > +	}
> >> > +
> >> > +	if (event & KR_INT) {
> >>
> >> Why do you check the same condition twice?
> >
> >It actually doesn't seem to be the same condition (KP_INT vs. KR_INT), but
> >it's difficult to say, as these constants are apparently added in some
> >other patch I have no idea about.
> 
> KP Key-Press versus Key-Release 
> 

Yeah, my bad... However the constants could be made more distinct.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ