From: walter harms <wharms@bfs.de>
To: linux-kernel@vger.kernel.org
Cc: Colin King <colin.king@canonical.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8192u: fix indentation issue
Date: Thu, 14 Nov 2019 11:33:10 +0100 [thread overview]
Message-ID: <5DCD2D66.2050206@bfs.de> (raw)
In-Reply-To: <20191114095430.132120-1-colin.king@canonical.com>
Am 14.11.2019 10:54, schrieb Colin King:
> From: Colin Ian King <colin.king@canonical.com>
>
> There is a block of statements that are indented
> too deeply, remove the extraneous tabs.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/staging/rtl8192u/r819xU_cmdpkt.c | 25 ++++++++++++------------
> 1 file changed, 13 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/staging/rtl8192u/r819xU_cmdpkt.c b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
> index e064f43fd8b6..bc98cdaf61ec 100644
> --- a/drivers/staging/rtl8192u/r819xU_cmdpkt.c
> +++ b/drivers/staging/rtl8192u/r819xU_cmdpkt.c
> @@ -169,19 +169,20 @@ static void cmdpkt_beacontimerinterrupt_819xusb(struct net_device *dev)
> {
> struct r8192_priv *priv = ieee80211_priv(dev);
> u16 tx_rate;
> - /* 87B have to S/W beacon for DTM encryption_cmn. */
> - if (priv->ieee80211->current_network.mode == IEEE_A ||
> - priv->ieee80211->current_network.mode == IEEE_N_5G ||
> - (priv->ieee80211->current_network.mode == IEEE_N_24G &&
> - (!priv->ieee80211->pHTInfo->bCurSuppCCK))) {
> - tx_rate = 60;
> - DMESG("send beacon frame tx rate is 6Mbpm\n");
> - } else {
> - tx_rate = 10;
> - DMESG("send beacon frame tx rate is 1Mbpm\n");
> - }
>
> - rtl819xusb_beacon_tx(dev, tx_rate); /* HW Beacon */
> + /* 87B have to S/W beacon for DTM encryption_cmn. */
> + if (priv->ieee80211->current_network.mode == IEEE_A ||
> + priv->ieee80211->current_network.mode == IEEE_N_5G ||
> + (priv->ieee80211->current_network.mode == IEEE_N_24G &&
> + (!priv->ieee80211->pHTInfo->bCurSuppCCK))) {
> + tx_rate = 60;
> + DMESG("send beacon frame tx rate is 6Mbpm\n");
> + } else {
> + tx_rate = 10;
> + DMESG("send beacon frame tx rate is 1Mbpm\n");
> + }
> +
> + rtl819xusb_beacon_tx(dev, tx_rate); /* HW Beacon */
> }
>
> /*-----------------------------------------------------------------------------
this is hard to read in the first place.
Maybe using switch() here is better to read (untested example below).
switch(priv->ieee80211->current_network.mode) {
case IEEE_A:
case IEEE_N_5G:
tx_rate = 60;
break;
IEEE_N_24G:
if ( !priv->ieee80211->pHTInfo->bCurSuppCCK )
tx_rate = 60;
// fall truh
default:
tx_rate = 10;
}
if (txrate == 60 )
DMESG("send beacon frame tx rate is 6Mbpm\n");
else if (txrate == 10 )
DMESG("send beacon frame tx rate is 1Mbpm\n");
JM2C
re,
wh
next prev parent reply other threads:[~2019-11-14 10:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-14 9:54 [PATCH] staging: rtl8192u: fix indentation issue Colin King
2019-11-14 10:33 ` walter harms [this message]
2019-11-16 6:45 ` Joe Perches
2019-11-16 6:51 ` Joe Perches
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=5DCD2D66.2050206@bfs.de \
--to=wharms@bfs.de \
--cc=colin.king@canonical.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).