public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: POPESCU Catalin <catalin.popescu@leica-geosystems.com>
Cc: Kamel Bouhara <kamel.bouhara@bootlin.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Henrik Rydberg <rydberg@bitmath.org>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Marco Felsch <m.felsch@pengutronix.de>,
	Jeff LaBundy <jeff@labundy.com>,
	"mark.satterthwaite@touchnetix.com"
	<mark.satterthwaite@touchnetix.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Gregory Clement <gregory.clement@bootlin.com>,
	GEO-CHHER-bsp-development
	<bsp-development.geo@leica-geosystems.com>
Subject: Re: [PATCH v6 3/3] Input: Add TouchNetix axiom i2c touchscreen driver
Date: Tue, 30 Jan 2024 15:24:53 -0800	[thread overview]
Message-ID: <ZbmFRTW4IsfYT5hc@google.com> (raw)
In-Reply-To: <b466d75c-944f-4c45-80f3-993b1fe40d7a@leica-geosystems.com>

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

  reply	other threads:[~2024-01-30 23:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-25 16:58 [PATCH v6 0/3] Input: Add TouchNetix axiom touchscreen driver Kamel Bouhara
2024-01-25 16:58 ` [PATCH v6 1/3] dt-bindings: vendor-prefixes: Add TouchNetix AS Kamel Bouhara
2024-01-25 16:58 ` [PATCH v6 2/3] dt-bindings: input: Add TouchNetix axiom touchscreen Kamel Bouhara
2024-01-26 11:46   ` Krzysztof Kozlowski
2024-01-30 22:28     ` Rob Herring
2024-01-31  7:28       ` Krzysztof Kozlowski
2024-01-31  9:06         ` Kamel Bouhara
2024-01-31 10:59           ` Krzysztof Kozlowski
2024-01-25 16:58 ` [PATCH v6 3/3] Input: Add TouchNetix axiom i2c touchscreen driver Kamel Bouhara
2024-01-30 17:32   ` POPESCU Catalin
2024-01-30 23:24     ` Dmitry Torokhov [this message]
2024-01-31 10:33     ` Kamel Bouhara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZbmFRTW4IsfYT5hc@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=bsp-development.geo@leica-geosystems.com \
    --cc=catalin.popescu@leica-geosystems.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregory.clement@bootlin.com \
    --cc=jeff@labundy.com \
    --cc=kamel.bouhara@bootlin.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.felsch@pengutronix.de \
    --cc=mark.satterthwaite@touchnetix.com \
    --cc=robh+dt@kernel.org \
    --cc=rydberg@bitmath.org \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox