lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54B2EB5C.50508@gmail.com>
Date:	Sun, 11 Jan 2015 21:30:04 +0000
From:	Malcolm Priestley <tvboxspy@...il.com>
To:	Joe Perches <joe@...ches.com>,
	Emrys Bayliss <emrys@...adise.net.nz>
CC:	forest@...ttletooquiet.net, gregkh@...uxfoundation.org,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: vt6656: Checkpatch fix: else after break or
 return



On 11/01/15 16:42, Joe Perches wrote:
> On Mon, 2015-01-12 at 03:19 +1100, Emrys Bayliss wrote:
>> This patch fixes the following checkpatch.pl error:
>> rxtx.c:588: WARNING: else is not generally useful after a break or return
>>
>> Signed-off-by: Emrys Bayliss <emrys@...adise.net.nz>
>> ---
>>   drivers/staging/vt6656/rxtx.c | 6 +-----
>>   1 file changed, 1 insertion(+), 5 deletions(-)
>>
>> diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
>> index ea5140a..cc34704 100644
>> --- a/drivers/staging/vt6656/rxtx.c
>> +++ b/drivers/staging/vt6656/rxtx.c
>> @@ -553,8 +553,6 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
>>   			cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTS);
>>
>>   		memcpy(buf->data.ra, priv->current_net_addr, ETH_ALEN);
>> -
>> -		return vnt_rxtx_datahead_g_fb(tx_context, &buf->data_head);
>>   	} else {
>>   		struct vnt_cts *buf = &head->cts_g;
>>   		/* Get SignalField,ServiceField,Length */
>> @@ -571,11 +569,9 @@ static u16 vnt_fill_cts_head(struct vnt_usb_send_context *tx_context,
>>   			cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_CTS);
>>
>>   		memcpy(buf->data.ra, priv->current_net_addr, ETH_ALEN);
>> -
>> -		return vnt_rxtx_datahead_g(tx_context, &buf->data_head);
>>   	}
>>
>> -	return 0;
>> +	return vnt_rxtx_datahead_g_fb(tx_context, &buf->data_head);
>>   }
>>
>>   static u16 vnt_rxtx_rts(struct vnt_usb_send_context *tx_context,
>
> This is not the same code.
> Does this even compile?
>
> For the second block, you've changed
> return <foo>_g(...) to <foo>_g_fb(...).
>
Yes, this is wrong and will cause CTS to fail.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ