Search Linux Wireless

Re: [PATCH 3/3] staging: wilc1000: return error code direclty in host_int_wait_msg_queue_idle

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

 



Dear Greg

Please ignore this patch.

Thanks
Chaehyun Lim

On Mon, Oct 5, 2015 at 11:48 AM, Chaehyun Lim <chaehyun.lim@xxxxxxxxx> wrote:
> On Mon, Oct 5, 2015 at 11:41 AM, Julian Calaby <julian.calaby@xxxxxxxxx> wrote:
>> Hi Chaehyun,
>>
>> On Mon, Oct 5, 2015 at 1:07 PM, Chaehyun Lim <chaehyun.lim@xxxxxxxxx> wrote:
>>> There is no need to pass the error code to the variable 'result'.
>>> Just return the error directly when error occurs.
>>> Return 0 at the end of this function when error is not happened.
>>
>> We can't do this.
>>
>>> Suggested-by: Julian Calaby <julian.calaby@xxxxxxxxx>
>>> Signed-off-by: Chaehyun Lim <chaehyun.lim@xxxxxxxxx>
>>> ---
>>>  drivers/staging/wilc1000/host_interface.c | 6 +++---
>>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c
>>> index b1aa7dd..427fbaa 100644
>>> --- a/drivers/staging/wilc1000/host_interface.c
>>> +++ b/drivers/staging/wilc1000/host_interface.c
>>> @@ -5343,7 +5343,7 @@ int host_int_set_mac_chnl_num(tstrWILC_WFIDrv *wfi_drv, u8 channel)
>>>
>>>  int host_int_wait_msg_queue_idle(void)
>>>  {
>>> -       int result = 0;
>>> +       int result;
>>>
>>>         struct host_if_msg msg;
>>>
>>> @@ -5354,13 +5354,13 @@ int host_int_wait_msg_queue_idle(void)
>>>         result = wilc_mq_send(&gMsgQHostIF, &msg, sizeof(struct host_if_msg));
>>>         if (result) {
>>>                 PRINT_ER("wilc mq send fail\n");
>>> -               result = -EINVAL;
>>> +               return -EINVAL;
>>
>> Returning here means that we don't call down:
>>
>>>         }
>>>
>>>         /* wait untill MSG Q is empty */
>>>         down(&hWaitResponse);
>>
>> here.
>>
>> Sorry for the confusion.
>>
>> Thanks,
>>
>
> Thank you for your comment. I also did not see what you're indicating.
>
> regards
> Chaehyun Lim
>> --
>> Julian Calaby
>>
>> Email: julian.calaby@xxxxxxxxx
>> Profile: http://www.google.com/profiles/julian.calaby/
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux