Re: [PATCH V2 08/12] staging: wilc1000: use int instead of int8_t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Oct 2, 2015 at 5:02 PM, Arend van Spriel <arend@xxxxxxxxxxxx> wrote:
> On 10/02/2015 09:41 AM, Chaehyun Lim wrote:
>>
>> This patch replaces int8_t with int.
>> The int8_t should be int. It's used as an index into an array
>> or -1 for not found.
>
>
> Please consider using bool instead. See my previous emails.

Thank you for your comment.

As said by dan, return value is used for array index in
add_network_to_shadow function.
so it cannot simply changed by bool.

Thanks
Chaehyun Lim

>
> Regards,
> Arend
>
>
>> Suggested-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
>> Signed-off-by: Chaehyun Lim <chaehyun.lim@xxxxxxxxx>
>> ---
>> V2: replaces s8 with int suggested by dan.
>>
>>   drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
>> b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
>> index d781003..3c8c2e1 100644
>> --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
>> +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
>> @@ -263,9 +263,9 @@ static void clear_duringIP(unsigned long arg)
>>         g_obtainingIP = false;
>>   }
>>
>> -int8_t is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, void
>> *pUserVoid)
>> +int is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, void
>> *pUserVoid)
>>   {
>> -       int8_t state = -1;
>> +       int state = -1;
>>         int i;
>>
>>         if (u32LastScannedNtwrksCountShadow == 0) {
>> @@ -288,7 +288,7 @@ int8_t is_network_in_shadow(tstrNetworkInfo
>> *pstrNetworkInfo, void *pUserVoid)
>>
>>   void add_network_to_shadow(tstrNetworkInfo *pstrNetworkInfo, void
>> *pUserVoid, void *pJoinParams)
>>   {
>> -       int8_t ap_found = is_network_in_shadow(pstrNetworkInfo,
>> pUserVoid);
>> +       int ap_found = is_network_in_shadow(pstrNetworkInfo, pUserVoid);
>>         u32 ap_index = 0;
>>         u8 rssi_index = 0;
>>
>>
>
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux