linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eddie James <eajames@linux.ibm.com>
To: Wolfram Sang <wsa@kernel.org>
Cc: linux-input@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-aspeed@lists.ozlabs.org,
	linux-i2c@vger.kernel.org, joel@jms.id.au, andrew@aj.id.au,
	benh@kernel.crashing.org, brendanhiggins@google.com,
	dmitry.torokhov@gmail.com, robh+dt@kernel.org
Subject: Re: [PATCH 2/5] input: misc: Add IBM Operation Panel driver
Date: Wed, 2 Sep 2020 10:47:18 -0500	[thread overview]
Message-ID: <796de8d4-6771-a8da-ea93-6e7e08aa93b0@linux.ibm.com> (raw)
In-Reply-To: <20200901061108.GB1148@ninjato>


On 9/1/20 1:11 AM, Wolfram Sang wrote:
>> +	switch (event) {
>> +	case I2C_SLAVE_STOP:
>> +		command_size = panel->idx;
>> +		fallthrough;
>> +	case I2C_SLAVE_WRITE_REQUESTED:
>> +		panel->idx = 0;
>> +		break;
>> +	case I2C_SLAVE_WRITE_RECEIVED:
>> +		if (panel->idx < sizeof(panel->command))
>> +			panel->command[panel->idx++] = *val;
>> +		else
>> +			dev_dbg(&panel->input->dev, "command truncated\n");
> Just double checking: Do you really want to process truncated commands?
> Since you detect the state here, you could also choose to reject such
> commands?


Yes I suppose not. It could still be a valid command with extra bytes, 
but unlikely, so probably better not to handle it.


Thanks,

Eddie


>

  reply	other threads:[~2020-09-02 15:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20 16:11 [PATCH 0/5] input: misc: Add IBM Operation Panel driver Eddie James
2020-08-20 16:11 ` [PATCH 1/5] dt-bindings: input: Add documentation for IBM Operation Panel Eddie James
2020-09-01  6:01   ` Joel Stanley
2020-09-08 20:37   ` Rob Herring
2020-08-20 16:11 ` [PATCH 2/5] input: misc: Add IBM Operation Panel driver Eddie James
2020-09-01  5:58   ` Joel Stanley
2020-09-01  6:11   ` Wolfram Sang
2020-09-02 15:47     ` Eddie James [this message]
2020-08-20 16:11 ` [PATCH 3/5] i2c: aspeed: Mask IRQ status to relevant bits Eddie James
2020-08-21  5:54   ` Wolfram Sang
2020-08-25  6:38   ` Joel Stanley
2020-08-25 19:47     ` Eddie James
2020-08-25 20:05       ` Tao Ren
2020-08-26  1:59         ` Ryan Chen
2020-08-20 16:11 ` [PATCH 4/5] ARM: dts: Aspeed: Tacoma: Add IBM Operation Panel I2C device Eddie James
2020-09-01  6:00   ` Joel Stanley
2020-09-01  6:11     ` Wolfram Sang
2020-08-20 16:11 ` [PATCH 5/5] ARM: dts: Aspeed: Rainier: " Eddie James
2020-09-01  6:01   ` Joel Stanley

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=796de8d4-6771-a8da-ea93-6e7e08aa93b0@linux.ibm.com \
    --to=eajames@linux.ibm.com \
    --cc=andrew@aj.id.au \
    --cc=benh@kernel.crashing.org \
    --cc=brendanhiggins@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=joel@jms.id.au \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=wsa@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).