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]
Message-ID: <ZbmFRTW4IsfYT5hc@google.com>
Date: Tue, 30 Jan 2024 15:24:53 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: POPESCU Catalin <catalin.popescu@...ca-geosystems.com>
Cc: Kamel Bouhara <kamel.bouhara@...tlin.com>,
	Rob Herring <robh+dt@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Henrik Rydberg <rydberg@...math.org>,
	"linux-input@...r.kernel.org" <linux-input@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	Marco Felsch <m.felsch@...gutronix.de>,
	Jeff LaBundy <jeff@...undy.com>,
	"mark.satterthwaite@...chnetix.com" <mark.satterthwaite@...chnetix.com>,
	Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
	Gregory Clement <gregory.clement@...tlin.com>,
	GEO-CHHER-bsp-development <bsp-development.geo@...ca-geosystems.com>
Subject: Re: [PATCH v6 3/3] Input: Add TouchNetix axiom i2c touchscreen driver

On Tue, Jan 30, 2024 at 05:32:54PM +0000, POPESCU Catalin wrote:
> On 25.01.24 17:58, Kamel Bouhara wrote:

> > +               u16 offset = (usage_id * AXIOM_U31_BYTES_PER_USAGE);
> > +               u8 id = rx_data[offset + 0];
> > +               u8 start_page = rx_data[offset + 1];
> > +               u8 num_pages = rx_data[offset + 2];
> > +               u32 max_offset = ((rx_data[offset + 3] & AXIOM_PAGE_OFFSET_MASK) + 1) * 2;
> > +
> > +               if (!num_pages)
> > +                       usage_table[id].is_report = true;
> please add an else statement to set is_report to false.

Better written as:

		usage_table[id].is_report = num_pages == 0;

or

		usage_table[id].is_report = !num_pages;

Thanks.

-- 
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ