Re: [PATCH] drivers: staging: ft1000: ft1000-usb: initialize 'status' with STATUS_SUCCESS in request_code_segment()

2013-12-03 Thread Chen Gang

Oh, another member has already fixed it (found earlier than me), and
integrated it into next-20131203 tree, so this patch is obsoleted.

The related git commit is "8aced95 staging: ft1000: fix use of
potentially uninitialized variable"

Thanks.

On 11/27/2013 05:27 PM, Chen Gang wrote:
> On 11/27/2013 05:18 PM, Josh Triplett wrote:
>> On Wed, Nov 27, 2013 at 11:01:18AM +0800, Chen Gang wrote:
>>> If "!bool_case", it returns unexpected value instead of STATUS_SUCCESS,
>>> so need fix it, the related warning (with allmodconfig under hexagon):
>>>
>>> CC [M]  drivers/staging/ft1000/ft1000-usb/ft1000_download.o
>>>   drivers/staging/ft1000/ft1000-usb/ft1000_download.c: In function 
>>> 'request_code_segment':
>>>   drivers/staging/ft1000/ft1000-usb/ft1000_download.c:581:6: warning: 
>>> 'status' may be used uninitialized in this function [-Wuninitialized]
>>>
>>>
>>> Signed-off-by: Chen Gang 
>>
>> Reviewed-by: Josh Triplett 
>>
> 
> Thanks.  :-)
> 
>>>  .../staging/ft1000/ft1000-usb/ft1000_download.c|2 +-
>>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c 
>>> b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
>>> index 68ded17..15f3062 100644
>>> --- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
>>> +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
>>> @@ -578,7 +578,7 @@ static int request_code_segment(struct ft1000_usb 
>>> *ft1000dev, u16 **s_file,
>>>  u8 **c_file, const u8 *endpoint, bool boot_case)
>>>  {
>>> long word_length;
>>> -   int status;
>>> +   int status = STATUS_SUCCESS;
>>>  
>>> /*DEBUG("FT1000:REQUEST_CODE_SEGMENT\n");i*/
>>> word_length = get_request_value(ft1000dev);
>>> -- 
>>> 1.7.7.6
> 
> 


-- 
Chen Gang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] drivers: staging: ft1000: ft1000-usb: initialize 'status' with STATUS_SUCCESS in request_code_segment()

2013-12-03 Thread Chen Gang

Oh, another member has already fixed it (found earlier than me), and
integrated it into next-20131203 tree, so this patch is obsoleted.

The related git commit is 8aced95 staging: ft1000: fix use of
potentially uninitialized variable

Thanks.

On 11/27/2013 05:27 PM, Chen Gang wrote:
 On 11/27/2013 05:18 PM, Josh Triplett wrote:
 On Wed, Nov 27, 2013 at 11:01:18AM +0800, Chen Gang wrote:
 If !bool_case, it returns unexpected value instead of STATUS_SUCCESS,
 so need fix it, the related warning (with allmodconfig under hexagon):

 CC [M]  drivers/staging/ft1000/ft1000-usb/ft1000_download.o
   drivers/staging/ft1000/ft1000-usb/ft1000_download.c: In function 
 'request_code_segment':
   drivers/staging/ft1000/ft1000-usb/ft1000_download.c:581:6: warning: 
 'status' may be used uninitialized in this function [-Wuninitialized]


 Signed-off-by: Chen Gang gang.chen.5...@gmail.com

 Reviewed-by: Josh Triplett j...@joshtriplett.org

 
 Thanks.  :-)
 
  .../staging/ft1000/ft1000-usb/ft1000_download.c|2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

 diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c 
 b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
 index 68ded17..15f3062 100644
 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
 +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
 @@ -578,7 +578,7 @@ static int request_code_segment(struct ft1000_usb 
 *ft1000dev, u16 **s_file,
  u8 **c_file, const u8 *endpoint, bool boot_case)
  {
 long word_length;
 -   int status;
 +   int status = STATUS_SUCCESS;
  
 /*DEBUG(FT1000:REQUEST_CODE_SEGMENT\n);i*/
 word_length = get_request_value(ft1000dev);
 -- 
 1.7.7.6
 
 


-- 
Chen Gang
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] drivers: staging: ft1000: ft1000-usb: initialize 'status' with STATUS_SUCCESS in request_code_segment()

2013-11-27 Thread Chen Gang
On 11/27/2013 05:18 PM, Josh Triplett wrote:
> On Wed, Nov 27, 2013 at 11:01:18AM +0800, Chen Gang wrote:
>> If "!bool_case", it returns unexpected value instead of STATUS_SUCCESS,
>> so need fix it, the related warning (with allmodconfig under hexagon):
>>
>> CC [M]  drivers/staging/ft1000/ft1000-usb/ft1000_download.o
>>   drivers/staging/ft1000/ft1000-usb/ft1000_download.c: In function 
>> 'request_code_segment':
>>   drivers/staging/ft1000/ft1000-usb/ft1000_download.c:581:6: warning: 
>> 'status' may be used uninitialized in this function [-Wuninitialized]
>>
>>
>> Signed-off-by: Chen Gang 
> 
> Reviewed-by: Josh Triplett 
> 

Thanks.  :-)

>>  .../staging/ft1000/ft1000-usb/ft1000_download.c|2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c 
>> b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
>> index 68ded17..15f3062 100644
>> --- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
>> +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
>> @@ -578,7 +578,7 @@ static int request_code_segment(struct ft1000_usb 
>> *ft1000dev, u16 **s_file,
>>   u8 **c_file, const u8 *endpoint, bool boot_case)
>>  {
>>  long word_length;
>> -int status;
>> +int status = STATUS_SUCCESS;
>>  
>>  /*DEBUG("FT1000:REQUEST_CODE_SEGMENT\n");i*/
>>  word_length = get_request_value(ft1000dev);
>> -- 
>> 1.7.7.6


-- 
Chen Gang
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] drivers: staging: ft1000: ft1000-usb: initialize 'status' with STATUS_SUCCESS in request_code_segment()

2013-11-27 Thread Josh Triplett
On Wed, Nov 27, 2013 at 11:01:18AM +0800, Chen Gang wrote:
> If "!bool_case", it returns unexpected value instead of STATUS_SUCCESS,
> so need fix it, the related warning (with allmodconfig under hexagon):
> 
> CC [M]  drivers/staging/ft1000/ft1000-usb/ft1000_download.o
>   drivers/staging/ft1000/ft1000-usb/ft1000_download.c: In function 
> 'request_code_segment':
>   drivers/staging/ft1000/ft1000-usb/ft1000_download.c:581:6: warning: 
> 'status' may be used uninitialized in this function [-Wuninitialized]
> 
> 
> Signed-off-by: Chen Gang 

Reviewed-by: Josh Triplett 

>  .../staging/ft1000/ft1000-usb/ft1000_download.c|2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c 
> b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
> index 68ded17..15f3062 100644
> --- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
> +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
> @@ -578,7 +578,7 @@ static int request_code_segment(struct ft1000_usb 
> *ft1000dev, u16 **s_file,
>u8 **c_file, const u8 *endpoint, bool boot_case)
>  {
>   long word_length;
> - int status;
> + int status = STATUS_SUCCESS;
>  
>   /*DEBUG("FT1000:REQUEST_CODE_SEGMENT\n");i*/
>   word_length = get_request_value(ft1000dev);
> -- 
> 1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] drivers: staging: ft1000: ft1000-usb: initialize 'status' with STATUS_SUCCESS in request_code_segment()

2013-11-27 Thread Josh Triplett
On Wed, Nov 27, 2013 at 11:01:18AM +0800, Chen Gang wrote:
 If !bool_case, it returns unexpected value instead of STATUS_SUCCESS,
 so need fix it, the related warning (with allmodconfig under hexagon):
 
 CC [M]  drivers/staging/ft1000/ft1000-usb/ft1000_download.o
   drivers/staging/ft1000/ft1000-usb/ft1000_download.c: In function 
 'request_code_segment':
   drivers/staging/ft1000/ft1000-usb/ft1000_download.c:581:6: warning: 
 'status' may be used uninitialized in this function [-Wuninitialized]
 
 
 Signed-off-by: Chen Gang gang.chen.5...@gmail.com

Reviewed-by: Josh Triplett j...@joshtriplett.org

  .../staging/ft1000/ft1000-usb/ft1000_download.c|2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c 
 b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
 index 68ded17..15f3062 100644
 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
 +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
 @@ -578,7 +578,7 @@ static int request_code_segment(struct ft1000_usb 
 *ft1000dev, u16 **s_file,
u8 **c_file, const u8 *endpoint, bool boot_case)
  {
   long word_length;
 - int status;
 + int status = STATUS_SUCCESS;
  
   /*DEBUG(FT1000:REQUEST_CODE_SEGMENT\n);i*/
   word_length = get_request_value(ft1000dev);
 -- 
 1.7.7.6
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] drivers: staging: ft1000: ft1000-usb: initialize 'status' with STATUS_SUCCESS in request_code_segment()

2013-11-27 Thread Chen Gang
On 11/27/2013 05:18 PM, Josh Triplett wrote:
 On Wed, Nov 27, 2013 at 11:01:18AM +0800, Chen Gang wrote:
 If !bool_case, it returns unexpected value instead of STATUS_SUCCESS,
 so need fix it, the related warning (with allmodconfig under hexagon):

 CC [M]  drivers/staging/ft1000/ft1000-usb/ft1000_download.o
   drivers/staging/ft1000/ft1000-usb/ft1000_download.c: In function 
 'request_code_segment':
   drivers/staging/ft1000/ft1000-usb/ft1000_download.c:581:6: warning: 
 'status' may be used uninitialized in this function [-Wuninitialized]


 Signed-off-by: Chen Gang gang.chen.5...@gmail.com
 
 Reviewed-by: Josh Triplett j...@joshtriplett.org
 

Thanks.  :-)

  .../staging/ft1000/ft1000-usb/ft1000_download.c|2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

 diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c 
 b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
 index 68ded17..15f3062 100644
 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
 +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
 @@ -578,7 +578,7 @@ static int request_code_segment(struct ft1000_usb 
 *ft1000dev, u16 **s_file,
   u8 **c_file, const u8 *endpoint, bool boot_case)
  {
  long word_length;
 -int status;
 +int status = STATUS_SUCCESS;
  
  /*DEBUG(FT1000:REQUEST_CODE_SEGMENT\n);i*/
  word_length = get_request_value(ft1000dev);
 -- 
 1.7.7.6


-- 
Chen Gang
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] drivers: staging: ft1000: ft1000-usb: initialize 'status' with STATUS_SUCCESS in request_code_segment()

2013-11-26 Thread Chen Gang
If "!bool_case", it returns unexpected value instead of STATUS_SUCCESS,
so need fix it, the related warning (with allmodconfig under hexagon):

CC [M]  drivers/staging/ft1000/ft1000-usb/ft1000_download.o
  drivers/staging/ft1000/ft1000-usb/ft1000_download.c: In function 
'request_code_segment':
  drivers/staging/ft1000/ft1000-usb/ft1000_download.c:581:6: warning: 'status' 
may be used uninitialized in this function [-Wuninitialized]


Signed-off-by: Chen Gang 
---
 .../staging/ft1000/ft1000-usb/ft1000_download.c|2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c 
b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
index 68ded17..15f3062 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
@@ -578,7 +578,7 @@ static int request_code_segment(struct ft1000_usb 
*ft1000dev, u16 **s_file,
 u8 **c_file, const u8 *endpoint, bool boot_case)
 {
long word_length;
-   int status;
+   int status = STATUS_SUCCESS;
 
/*DEBUG("FT1000:REQUEST_CODE_SEGMENT\n");i*/
word_length = get_request_value(ft1000dev);
-- 
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] drivers: staging: ft1000: ft1000-usb: initialize 'status' with STATUS_SUCCESS in request_code_segment()

2013-11-26 Thread Chen Gang
If !bool_case, it returns unexpected value instead of STATUS_SUCCESS,
so need fix it, the related warning (with allmodconfig under hexagon):

CC [M]  drivers/staging/ft1000/ft1000-usb/ft1000_download.o
  drivers/staging/ft1000/ft1000-usb/ft1000_download.c: In function 
'request_code_segment':
  drivers/staging/ft1000/ft1000-usb/ft1000_download.c:581:6: warning: 'status' 
may be used uninitialized in this function [-Wuninitialized]


Signed-off-by: Chen Gang gang.chen.5...@gmail.com
---
 .../staging/ft1000/ft1000-usb/ft1000_download.c|2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c 
b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
index 68ded17..15f3062 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
@@ -578,7 +578,7 @@ static int request_code_segment(struct ft1000_usb 
*ft1000dev, u16 **s_file,
 u8 **c_file, const u8 *endpoint, bool boot_case)
 {
long word_length;
-   int status;
+   int status = STATUS_SUCCESS;
 
/*DEBUG(FT1000:REQUEST_CODE_SEGMENT\n);i*/
word_length = get_request_value(ft1000dev);
-- 
1.7.7.6
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/