mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Malcolm Priestley <tvboxspy@gmail.com>
To: Joe Perches <joe@perches.com>, Emrys Bayliss <emrys@paradise.net.nz>
Cc: forest@alittletooquiet.net, gregkh@linuxfoundation.org,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: vt6656: Checkpatch fix: else after break or return
Date: Sun, 11 Jan 2015 21:30:04 +0000	[thread overview]
Message-ID: <54B2EB5C.50508@gmail.com> (raw)
In-Reply-To: <1420994540.3690.2.camel@perches.com>



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@paradise.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.


  reply	other threads:[~2015-01-11 21:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-11 16:19 Emrys Bayliss
2015-01-11 16:42 ` Joe Perches
2015-01-11 21:30   ` Malcolm Priestley [this message]
2015-01-11 23:38     ` Emrys Bayliss
2015-01-13 17:03 Emrys Bayliss
2015-01-13 17:12 ` Joe Perches
2015-01-13 17:14 ` Greg KH
2015-01-13 17:15 ` Emrys Bayliss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54B2EB5C.50508@gmail.com \
    --to=tvboxspy@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=emrys@paradise.net.nz \
    --cc=forest@alittletooquiet.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome