From: Emrys Bayliss <emrys@paradise.net.nz>
To: Malcolm Priestley <tvboxspy@gmail.com>, Joe Perches <joe@perches.com>
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: Mon, 12 Jan 2015 10:38:34 +1100 [thread overview]
Message-ID: <54B3097A.6020302@paradise.net.nz> (raw)
In-Reply-To: <54B2EB5C.50508@gmail.com>
This is a bungle please disregard it.
I will send it again with a 'ret' variable if that's okay (one that
has been properly proofed and compiles).
My apologies. Sorry for completely wasting your time by not
checking properly.
On 01/12/2015 08:30 AM, Malcolm Priestley wrote:
>
>
> 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.
>
>
next prev parent reply other threads:[~2015-01-11 23:40 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
2015-01-11 23:38 ` Emrys Bayliss [this message]
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=54B3097A.6020302@paradise.net.nz \
--to=emrys@paradise.net.nz \
--cc=devel@driverdev.osuosl.org \
--cc=forest@alittletooquiet.net \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tvboxspy@gmail.com \
/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
all inboxes | Powered by JetHome®