All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: David Binderman <dcb314@hotmail.com>
Cc: "myungjoo.ham@samsung.com" <myungjoo.ham@samsung.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: linux-4.2-rc6/drivers/extcon/extcon.c: 3 * bad tests ?
Date: Mon, 10 Aug 2015 10:12:05 +0900	[thread overview]
Message-ID: <55C7FA65.1090007@samsung.com> (raw)
In-Reply-To: <DUB128-W141DC86E1C28C2DE0214539C710@phx.gbl>

Hi David,

I knew this issue. So, I'll send following patch[1] to solve it for Linux 4.3
[1] http://git.kernel.org/cgit/linux/kernel/git/chanwoo/extcon.git/commit/?h=extcon-next&id=4e491fe7920cb84dd0a2ea79800173ab1802fa22

Thanks,
Chanwoo Choi

On 08/10/2015 06:30 AM, David Binderman wrote:
> Hello there,
> 
> 1.
> 
> [linux-4.2-rc6/drivers/extcon/extcon.c:153]: (style) Checking if unsigned variable 'id' is less than zero.
> 
> Source code is
> 
>     id = find_cable_id_by_name(edev, name);
>     if (id < 0)
> 
> but
> 
>    unsigned int id;
> 
> Suggest sanity check return value from find_cable_id_by_name
> *before* assigning it into an unsigned variable.
> 
> 2.
> 
> [linux-4.2-rc6/drivers/extcon/extcon.c:384]: (style) Checking if unsigned variable 'id' is less than zero.
> 
> Duplicate.
> 
> 3.
> 
> [linux-4.2-rc6/drivers/extcon/extcon.c:432]: (style) Checking if unsigned variable 'id' is less than zero.
> 
> Another duplicate.
> 
> 
> Regards
> 
> David Binderman
>  		 	   		  
> 


      reply	other threads:[~2015-08-10  1:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-09 21:30 linux-4.2-rc6/drivers/extcon/extcon.c: 3 * bad tests ? David Binderman
2015-08-10  1:12 ` Chanwoo Choi [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=55C7FA65.1090007@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=dcb314@hotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    /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.