[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHQ1cqGns9s=5wKwP9syG28oRWB90QvaSHNTYX_p=LF2SBw00w@mail.gmail.com>
Date: Wed, 22 Jan 2014 08:58:07 -0800
From: Andrey Smirnov <andrew.smirnov@...il.com>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] ims-pcu: Add commands supported by the new version of
the FW
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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists