From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Andrey Smirnov <andrew.smirnov@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:47:50 -0800 [thread overview]
Message-ID: <20140122164750.GA5080@core.coreip.homeip.net> (raw)
In-Reply-To: <1390396825-10255-1-git-send-email-andrew.smirnov@gmail.com>
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
next prev parent reply other threads:[~2014-01-22 16:47 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 [this message]
2014-01-22 16:58 ` Andrey Smirnov
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=20140122164750.GA5080@core.coreip.homeip.net \
--to=dmitry.torokhov@gmail.com \
--cc=andrew.smirnov@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 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).