From: Marek Behun <marek.behun@nic.cz>
To: Colin King <colin.king@canonical.com>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] bus: moxtet: fix unsigned comparison to less than zero
Date: Sat, 17 Aug 2019 02:04:34 +0200 [thread overview]
Message-ID: <20190817020434.4ef2dc5f@nic.cz> (raw)
In-Reply-To: <20190816224106.11583-1-colin.king@canonical.com>
On Fri, 16 Aug 2019 23:41:06 +0100
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently the size_t variable res is being checked for
> an error failure however the unsigned variable is never
> less than zero so this test is always false. Fix this by
> making variable res ssize_t
>
> Addresses-Coverity: ("Unsigned compared against 0")
> Fixes: 5bc7f990cd98 ("bus: Add support for Moxtet bus")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/bus/moxtet.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bus/moxtet.c b/drivers/bus/moxtet.c
> index 1ee4570e7e17..288a9e4c6c7b 100644
> --- a/drivers/bus/moxtet.c
> +++ b/drivers/bus/moxtet.c
> @@ -514,7 +514,7 @@ static ssize_t output_write(struct file *file, const char __user *buf,
> struct moxtet *moxtet = file->private_data;
> u8 bin[TURRIS_MOX_MAX_MODULES];
> u8 hex[sizeof(bin) * 2 + 1];
> - size_t res;
> + ssize_t res;
> loff_t dummy = 0;
> int err, i;
>
Hi Colin,
thanks. Should I just Ack this, or do I need to send patch to the
developer who commited my patches?
Thanks.
Marek
next prev parent reply other threads:[~2019-08-17 0:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-16 22:41 [PATCH][next] bus: moxtet: fix unsigned comparison to less than zero Colin King
2019-08-17 0:04 ` Marek Behun [this message]
2019-08-17 8:25 ` 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=20190817020434.4ef2dc5f@nic.cz \
--to=marek.behun@nic.cz \
--cc=colin.king@canonical.com \
--cc=kernel-janitors@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