linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ferruh Yigit <fery@cypress.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Javier Martinez Canillas <javier@dowhile0.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	"linux-input@vger.kernel.org" <linux-input@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Input: cyttsp4 - SPI driver for Cypress TMA4XX touchscreen devices
Date: Tue, 9 Jul 2013 10:12:00 +0300	[thread overview]
Message-ID: <51DBB7C0.4010106@cypress.com> (raw)
In-Reply-To: <CAMuHMdXS=35MVinOPNRKi=bAzVpqvL-QEm+QsciO1Xe-BYzc4Q@mail.gmail.com>

On 07/07/2013 10:15 PM, Geert Uytterhoeven wrote:
> On Fri, Jul 5, 2013 at 1:51 AM, Linux Kernel Mailing List
> <linux-kernel@vger.kernel.org> wrote:
>> +++ b/drivers/input/touchscreen/cyttsp4_spi.c
>
>> +static int cyttsp_spi_xfer(struct device *dev, u8 *xfer_buf,
>> +                          u8 op, u8 reg, u8 *buf, int length)
>> +{
>
>> +       if (reg > 255)
>
> As "reg" is "u8", this is never true:
>
> drivers/input/touchscreen/cyttsp4_spi.c: In function ‘cyttsp_spi_xfer’:
> drivers/input/touchscreen/cyttsp4_spi.c:66: warning: comparison is
> always false due to limited range of data type
>
>> +               wr_buf[0] = op + CY_SPI_A8_BIT;
>> +       else
>> +               wr_buf[0] = op;
>
> Can the if-clause and the first branch just be removed, or is there a real bug
> involved (e.g. wrong type for "reg")?

Yes there was a bug here, and already sent a patch for this, please
check https://patchwork.kernel.org/patch/2820561/

thanks,
ferruh


This message and any attachments may contain Cypress (or its subsidiaries) confidential information. If it has been received in error, please advise the sender and immediately delete this message.

  reply	other threads:[~2013-07-09  7:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20130704235117.733726609A1@gitolite.kernel.org>
2013-07-07 19:15 ` Input: cyttsp4 - SPI driver for Cypress TMA4XX touchscreen devices Geert Uytterhoeven
2013-07-09  7:12   ` Ferruh Yigit [this message]
2013-07-02 21:47 Dan Carpenter
2013-07-03 13:24 ` Ferruh Yigit
2013-07-03 13:52   ` Dan Carpenter

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=51DBB7C0.4010106@cypress.com \
    --to=fery@cypress.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=geert@linux-m68k.org \
    --cc=javier@dowhile0.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.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).