All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Drivers: Misc: fix warnings, unsigned long will never < 0
@ 2013-04-07  3:09 Chen Gang
  2013-04-07  3:26 ` Chen Gang
  2013-04-07  3:28 ` [PATCH v2] " Chen Gang
  0 siblings, 2 replies; 9+ messages in thread
From: Chen Gang @ 2013-04-07  3:09 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Greg KH,
	linux-kernel@vger.kernel.org >>
	"linux-kernel@vger.kernel.org"


  val is unsigned long which never < 0

Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 drivers/misc/tsl2550.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/misc/tsl2550.c b/drivers/misc/tsl2550.c
index 1e7bc0e..558dd20 100644
--- a/drivers/misc/tsl2550.c
+++ b/drivers/misc/tsl2550.c
@@ -204,7 +204,7 @@ static ssize_t tsl2550_store_power_state(struct device *dev,
 	unsigned long val = simple_strtoul(buf, NULL, 10);
 	int ret;
 
-	if (val < 0 || val > 1)
+	if (val > 1)
 		return -EINVAL;
 
 	mutex_lock(&data->update_lock);
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] Drivers: Misc: fix warnings, unsigned long will never < 0
  2013-04-07  3:09 [PATCH] Drivers: Misc: fix warnings, unsigned long will never < 0 Chen Gang
@ 2013-04-07  3:26 ` Chen Gang
  2013-04-07  3:28 ` [PATCH v2] " Chen Gang
  1 sibling, 0 replies; 9+ messages in thread
From: Chen Gang @ 2013-04-07  3:26 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Greg KH,
	linux-kernel@vger.kernel.org >>
	"linux-kernel@vger.kernel.org"


  also has another 'unsigned long val' warnings, I will send patch v2 to
merge them together.


On 2013年04月07日 11:09, Chen Gang wrote:
> 
>   val is unsigned long which never < 0
> 
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---
>  drivers/misc/tsl2550.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/misc/tsl2550.c b/drivers/misc/tsl2550.c
> index 1e7bc0e..558dd20 100644
> --- a/drivers/misc/tsl2550.c
> +++ b/drivers/misc/tsl2550.c
> @@ -204,7 +204,7 @@ static ssize_t tsl2550_store_power_state(struct device *dev,
>  	unsigned long val = simple_strtoul(buf, NULL, 10);
>  	int ret;
>  
> -	if (val < 0 || val > 1)
> +	if (val > 1)
>  		return -EINVAL;
>  
>  	mutex_lock(&data->update_lock);
> 


-- 
Chen Gang

Asianux Corporation

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] Drivers: Misc: fix warnings, unsigned long will never < 0
  2013-04-07  3:09 [PATCH] Drivers: Misc: fix warnings, unsigned long will never < 0 Chen Gang
  2013-04-07  3:26 ` Chen Gang
@ 2013-04-07  3:28 ` Chen Gang
  2013-05-08  2:24   ` Chen Gang
  1 sibling, 1 reply; 9+ messages in thread
From: Chen Gang @ 2013-04-07  3:28 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Greg KH,
	linux-kernel@vger.kernel.org >>
	"linux-kernel@vger.kernel.org"


  val is unsigned long which never < 0

Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 drivers/misc/tsl2550.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/tsl2550.c b/drivers/misc/tsl2550.c
index 1e7bc0e..5bf9448 100644
--- a/drivers/misc/tsl2550.c
+++ b/drivers/misc/tsl2550.c
@@ -204,7 +204,7 @@ static ssize_t tsl2550_store_power_state(struct device *dev,
 	unsigned long val = simple_strtoul(buf, NULL, 10);
 	int ret;
 
-	if (val < 0 || val > 1)
+	if (val > 1)
 		return -EINVAL;
 
 	mutex_lock(&data->update_lock);
@@ -236,7 +236,7 @@ static ssize_t tsl2550_store_operating_mode(struct device *dev,
 	unsigned long val = simple_strtoul(buf, NULL, 10);
 	int ret;
 
-	if (val < 0 || val > 1)
+	if (val > 1)
 		return -EINVAL;
 
 	if (data->power_state == 0)
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] Drivers: Misc: fix warnings, unsigned long will never < 0
  2013-04-07  3:28 ` [PATCH v2] " Chen Gang
@ 2013-05-08  2:24   ` Chen Gang
  2013-05-08  2:38     ` Greg KH
  0 siblings, 1 reply; 9+ messages in thread
From: Chen Gang @ 2013-05-08  2:24 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Greg KH,
	linux-kernel@vger.kernel.org >>
	"linux-kernel@vger.kernel.org"

Hello Maintainers:

Please help check, when you have time.

Thanks.

On 2013年04月07日 11:28, Chen Gang wrote:
> 
>   val is unsigned long which never < 0
> 
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---
>  drivers/misc/tsl2550.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/misc/tsl2550.c b/drivers/misc/tsl2550.c
> index 1e7bc0e..5bf9448 100644
> --- a/drivers/misc/tsl2550.c
> +++ b/drivers/misc/tsl2550.c
> @@ -204,7 +204,7 @@ static ssize_t tsl2550_store_power_state(struct device *dev,
>  	unsigned long val = simple_strtoul(buf, NULL, 10);
>  	int ret;
>  
> -	if (val < 0 || val > 1)
> +	if (val > 1)
>  		return -EINVAL;
>  
>  	mutex_lock(&data->update_lock);
> @@ -236,7 +236,7 @@ static ssize_t tsl2550_store_operating_mode(struct device *dev,
>  	unsigned long val = simple_strtoul(buf, NULL, 10);
>  	int ret;
>  
> -	if (val < 0 || val > 1)
> +	if (val > 1)
>  		return -EINVAL;
>  
>  	if (data->power_state == 0)
> 


-- 
Chen Gang

Asianux Corporation

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] Drivers: Misc: fix warnings, unsigned long will never < 0
  2013-05-08  2:24   ` Chen Gang
@ 2013-05-08  2:38     ` Greg KH
  2013-05-08  2:46       ` Li Zefan
  0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2013-05-08  2:38 UTC (permalink / raw)
  To: Chen Gang
  Cc: Arnd Bergmann,
	linux-kernel@vger.kernel.org >>
	"linux-kernel@vger.kernel.org"

On Wed, May 08, 2013 at 10:24:44AM +0800, Chen Gang wrote:
> Hello Maintainers:
> 
> Please help check, when you have time.
> 
> Thanks.
> 
> On 2013年04月07日 11:28, Chen Gang wrote:

<snip>

You sent a cleanup patch in the middle of the merge window, when we
can't take any patches at the moment due to other work, and expect a
review in less than 24 hours?

Please be realistic, I'll get to this eventually (i.e. next week at the
earliest.)

Patience is a virtue.

greg "someone owes me some virtue" k-h

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] Drivers: Misc: fix warnings, unsigned long will never < 0
  2013-05-08  2:38     ` Greg KH
@ 2013-05-08  2:46       ` Li Zefan
  2013-05-08  2:49         ` Chen Gang
  2013-05-08  2:54         ` Greg KH
  0 siblings, 2 replies; 9+ messages in thread
From: Li Zefan @ 2013-05-08  2:46 UTC (permalink / raw)
  To: Greg KH
  Cc: Chen Gang, Arnd Bergmann,
	linux-kernel@vger.kernel.org >>
	"linux-kernel@vger.kernel.org"

On 2013/5/8 10:38, Greg KH wrote:
> On Wed, May 08, 2013 at 10:24:44AM +0800, Chen Gang wrote:
>> Hello Maintainers:
>>
>> Please help check, when you have time.
>>
>> Thanks.
>>
>> On 2013年04月07日 11:28, Chen Gang wrote:
> 
> <snip>
> 
> You sent a cleanup patch in the middle of the merge window, when we
> can't take any patches at the moment due to other work, and expect a
> review in less than 24 hours?
> 

No, he sent the patch one month ago, so to be honest he's quite patient,
though he picked a wrong time to ping you. ;)

> Please be realistic, I'll get to this eventually (i.e. next week at the
> earliest.)
> 
> Patience is a virtue.
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] Drivers: Misc: fix warnings, unsigned long will never < 0
  2013-05-08  2:46       ` Li Zefan
@ 2013-05-08  2:49         ` Chen Gang
  2013-05-08  2:54         ` Greg KH
  1 sibling, 0 replies; 9+ messages in thread
From: Chen Gang @ 2013-05-08  2:49 UTC (permalink / raw)
  To: Li Zefan
  Cc: Greg KH, Arnd Bergmann,
	linux-kernel@vger.kernel.org >>
	"linux-kernel@vger.kernel.org"

On 2013年05月08日 10:46, Li Zefan wrote:
> On 2013/5/8 10:38, Greg KH wrote:
>> > On Wed, May 08, 2013 at 10:24:44AM +0800, Chen Gang wrote:
>>> >> Hello Maintainers:
>>> >>
>>> >> Please help check, when you have time.
>>> >>
>>> >> Thanks.
>>> >>
>>> >> On 2013年04月07日 11:28, Chen Gang wrote:
>> > 
>> > <snip>
>> > 
>> > You sent a cleanup patch in the middle of the merge window, when we
>> > can't take any patches at the moment due to other work, and expect a
>> > review in less than 24 hours?
>> > 
> No, he sent the patch one month ago, so to be honest he's quite patient,
> though he picked a wrong time to ping you. ;)
> 

That seems I need get 'rid' of all Chinese characters in mail, which can
lead another members misreading. ;)

Thanks.

-- 
Chen Gang

Asianux Corporation

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] Drivers: Misc: fix warnings, unsigned long will never < 0
  2013-05-08  2:46       ` Li Zefan
  2013-05-08  2:49         ` Chen Gang
@ 2013-05-08  2:54         ` Greg KH
  2013-05-08  3:27           ` Chen Gang
  1 sibling, 1 reply; 9+ messages in thread
From: Greg KH @ 2013-05-08  2:54 UTC (permalink / raw)
  To: Li Zefan
  Cc: Chen Gang, Arnd Bergmann,
	linux-kernel@vger.kernel.org >>
	"linux-kernel@vger.kernel.org"

On Wed, May 08, 2013 at 10:46:57AM +0800, Li Zefan wrote:
> On 2013/5/8 10:38, Greg KH wrote:
> > On Wed, May 08, 2013 at 10:24:44AM +0800, Chen Gang wrote:
> >> Hello Maintainers:
> >>
> >> Please help check, when you have time.
> >>
> >> Thanks.
> >>
> >> On 2013年04月07日 11:28, Chen Gang wrote:
> > 
> > <snip>
> > 
> > You sent a cleanup patch in the middle of the merge window, when we
> > can't take any patches at the moment due to other work, and expect a
> > review in less than 24 hours?
> > 
> 
> No, he sent the patch one month ago, so to be honest he's quite patient,
> though he picked a wrong time to ping you. ;)

Obviously, I don't even know what month this is :)

Chen, very sorry about that.  I'll look into it next week, it's probably
lost somewhere in my todo queue.

greg k-h

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] Drivers: Misc: fix warnings, unsigned long will never < 0
  2013-05-08  2:54         ` Greg KH
@ 2013-05-08  3:27           ` Chen Gang
  0 siblings, 0 replies; 9+ messages in thread
From: Chen Gang @ 2013-05-08  3:27 UTC (permalink / raw)
  To: Greg KH
  Cc: Li Zefan, Arnd Bergmann,
	linux-kernel@vger.kernel.org >>
	"linux-kernel@vger.kernel.org"

On Wed, May 08, 10:54, Greg KH wrote:
> On Wed, May 08, 2013 at 10:46:57AM +0800, Li Zefan wrote:
>> On 2013/5/8 10:38, Greg KH wrote:
>>> On Wed, May 08, 2013 at 10:24:44AM +0800, Chen Gang wrote:
>>>> Hello Maintainers:
>>>>
>>>> Please help check, when you have time.
>>>>
>>>> Thanks.
>>>>
>>>> On 2013年04月07日 11:28, Chen Gang wrote:
>>>
>>> <snip>
>>>
>>> You sent a cleanup patch in the middle of the merge window, when we
>>> can't take any patches at the moment due to other work, and expect a
>>> review in less than 24 hours?
>>>
>>
>> No, he sent the patch one month ago, so to be honest he's quite patient,
>> though he picked a wrong time to ping you. ;)
> 
> Obviously, I don't even know what month this is :)
> 

Next, I really need get rid of any Chinese characters in mail. :)


> Chen, very sorry about that.  I'll look into it next week, it's probably
> lost somewhere in my todo queue.
> 

Not mind, it is really only a cleanup patch, and also you are really
busy, so please look into it just when you have time.

And I should focus on continuing to find and make another patches and
should try to answer, analyse, and learn some a little deeper questions
(e.g. a question about get_tree() in kernel/audit_tree.c).


Thanks.

-- 
Chen Gang

Asianux Corporation

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-05-08  3:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-07  3:09 [PATCH] Drivers: Misc: fix warnings, unsigned long will never < 0 Chen Gang
2013-04-07  3:26 ` Chen Gang
2013-04-07  3:28 ` [PATCH v2] " Chen Gang
2013-05-08  2:24   ` Chen Gang
2013-05-08  2:38     ` Greg KH
2013-05-08  2:46       ` Li Zefan
2013-05-08  2:49         ` Chen Gang
2013-05-08  2:54         ` Greg KH
2013-05-08  3:27           ` Chen Gang

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.