All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] ims-pcu: Add commands supported by the new version of the FW
Date: Wed, 22 Jan 2014 08:58:07 -0800	[thread overview]
Message-ID: <CAHQ1cqGns9s=5wKwP9syG28oRWB90QvaSHNTYX_p=LF2SBw00w@mail.gmail.com> (raw)
In-Reply-To: <20140122164750.GA5080@core.coreip.homeip.net>

Sorry for the noise, had an old copy of the file in my out of the tree
build set-up when I was doing the testing. I will post updated version
shortly.

Thanks,

On Wed, Jan 22, 2014 at 8:47 AM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> On Wed, Jan 22, 2014 at 05:20:25AM -0800, Andrey Smirnov wrote:
>> +static int ims_pcu_write_ofn_config(struct ims_pcu *pcu, u8 addr, u8 data)
>> +{
>> +     u8 buffer[] = { addr, data };
>> +     int error;
>> +     u16 result;
>> +
>> +     error = ims_pcu_execute_command(pcu, OFN_SET_CONFIG,
>> +                                     &buffer, sizeof(buffer));
>> +     if (error)
>> +             return error;
>> +
>> +     result = (s16)get_unaligned_le16(pcu->cmd_buf + OFN_REG_RESULT_OFFSET);
>> +     if ((result < 0)
>
> I am fairly certain this does not even compile, but even if it did,
> result is declared u16 so even if you do the cast above the comparison
> will always be false.
>
> Thanks.
>
> --
> Dmitry

      reply	other threads:[~2014-01-22 16:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-22 13:20 [PATCH v3] ims-pcu: Add commands supported by the new version of the FW Andrey Smirnov
2014-01-22 16:47 ` Dmitry Torokhov
2014-01-22 16:58   ` Andrey Smirnov [this message]

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='CAHQ1cqGns9s=5wKwP9syG28oRWB90QvaSHNTYX_p=LF2SBw00w@mail.gmail.com' \
    --to=andrew.smirnov@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.