All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Travis Davies <travisdavies.linuxkernel@gmail.com>
Cc: Larry.Finger@lwfinger.net, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/staging/rtl8188eu remove 5GHZ specific code
Date: Wed, 29 Nov 2017 09:42:01 +0000	[thread overview]
Message-ID: <20171129094201.GB7597@kroah.com> (raw)
In-Reply-To: <1511929927.23129.16.camel@gmail.com>

On Tue, Nov 28, 2017 at 08:32:07PM -0800, Travis Davies wrote:
> [PATCH] drivers/staging/rtl8188eu remove 5GHZ specific code

That is up in the subject line, no need to put it in the body.

> My first patch.

No need for that in the changelog :)

> This based from linux-next tree.

Nor that :)

> Removes code valid only for 5 HGz, as per the TODO, and also some formating issues.

But this line isn't formatted properly :(

> If this device is only supported for sub 5GHZ hardware than this
> change should not harm its intended audience. The caller 
> of Hal_GetChnlGroup88E() does not check for false.

Were you able to test this?

> Signed-off-by: Travis Davies <travisdavies.linuxkernel@gmail.com>
> 
> 
> diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
> index 3673f57..28c31e3 100644
> --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
> +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
> @@ -387,59 +387,22 @@ static void Hal_ReadPowerValueFromPROM_8188E(struct txpowerinfo24g *pwrInfo24G,
>         }
>  }
>  
> -static u8 Hal_GetChnlGroup88E(u8 chnl, u8 *pGroup)
> -{
> -       u8 bIn24G = true;
> -
> -       if (chnl <= 14) {
> -               bIn24G = true;
> -
> -               if (chnl < 3)                   /*  Channel 1-2 */
> -                       *pGroup = 0;
> -               else if (chnl < 6)              /*  Channel 3-5 */
> -                       *pGroup = 1;
> -               else     if (chnl < 9)          /*  Channel 6-8 */
> -                       *pGroup = 2;
> -               else if (chnl < 12)             /*  Channel 9-11 */
> -                       *pGroup = 3;
> -               else if (chnl < 14)             /*  Channel 12-13 */
> -                       *pGroup = 4;
> -               else if (chnl = 14)            /*  Channel 14 */
> -                       *pGroup = 5;
> -       } else {
> -
> -               /* probably, this branch is suitable only for 5 GHz */
> -
> -               bIn24G = false;
> -
> -               if (chnl <= 40)
> -                       *pGroup = 0;
> -               else if (chnl <= 48)
> -                       *pGroup = 1;
> -               else     if (chnl <= 56)
> -                       *pGroup = 2;
> -               else if (chnl <= 64)
> -                       *pGroup = 3;
> -               else if (chnl <= 104)
> -                       *pGroup = 4;
> -               else if (chnl <= 112)
> -                       *pGroup = 5;
> -               else if (chnl <= 120)
> -                       *pGroup = 5;
> -               else if (chnl <= 128)
> -                       *pGroup = 6;
> -               else if (chnl <= 136)
> -                       *pGroup = 7;
> -               else if (chnl <= 144)
> -                       *pGroup = 8;
> -               else if (chnl <= 153)
> -                       *pGroup = 9;
> -               else if (chnl <= 161)
> -                       *pGroup = 10;
> -               else if (chnl <= 177)
> -                       *pGroup = 11;
> -       }
> -       return bIn24G;
> +static u8 Hal_GetChnlGroup88E(u8 chnl, u8 *pGroup) {
> +
> +        if (chnl < 3)                  /*  Channel 1-2 */
> +               *pGroup = 0;

No tabs?

Please always run scripts/checkpatch.pl on your patches.

thanks,

greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <gregkh@linuxfoundation.org>
To: Travis Davies <travisdavies.linuxkernel@gmail.com>
Cc: Larry.Finger@lwfinger.net, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/staging/rtl8188eu remove 5GHZ specific code
Date: Wed, 29 Nov 2017 10:42:01 +0100	[thread overview]
Message-ID: <20171129094201.GB7597@kroah.com> (raw)
In-Reply-To: <1511929927.23129.16.camel@gmail.com>

On Tue, Nov 28, 2017 at 08:32:07PM -0800, Travis Davies wrote:
> [PATCH] drivers/staging/rtl8188eu remove 5GHZ specific code

That is up in the subject line, no need to put it in the body.

> My first patch.

No need for that in the changelog :)

> This based from linux-next tree.

Nor that :)

> Removes code valid only for 5 HGz, as per the TODO, and also some formating issues.

But this line isn't formatted properly :(

> If this device is only supported for sub 5GHZ hardware than this
> change should not harm its intended audience. The caller 
> of Hal_GetChnlGroup88E() does not check for false.

Were you able to test this?

> Signed-off-by: Travis Davies <travisdavies.linuxkernel@gmail.com>
> 
> 
> diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
> index 3673f57..28c31e3 100644
> --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
> +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
> @@ -387,59 +387,22 @@ static void Hal_ReadPowerValueFromPROM_8188E(struct txpowerinfo24g *pwrInfo24G,
>         }
>  }
>  
> -static u8 Hal_GetChnlGroup88E(u8 chnl, u8 *pGroup)
> -{
> -       u8 bIn24G = true;
> -
> -       if (chnl <= 14) {
> -               bIn24G = true;
> -
> -               if (chnl < 3)                   /*  Channel 1-2 */
> -                       *pGroup = 0;
> -               else if (chnl < 6)              /*  Channel 3-5 */
> -                       *pGroup = 1;
> -               else     if (chnl < 9)          /*  Channel 6-8 */
> -                       *pGroup = 2;
> -               else if (chnl < 12)             /*  Channel 9-11 */
> -                       *pGroup = 3;
> -               else if (chnl < 14)             /*  Channel 12-13 */
> -                       *pGroup = 4;
> -               else if (chnl == 14)            /*  Channel 14 */
> -                       *pGroup = 5;
> -       } else {
> -
> -               /* probably, this branch is suitable only for 5 GHz */
> -
> -               bIn24G = false;
> -
> -               if (chnl <= 40)
> -                       *pGroup = 0;
> -               else if (chnl <= 48)
> -                       *pGroup = 1;
> -               else     if (chnl <= 56)
> -                       *pGroup = 2;
> -               else if (chnl <= 64)
> -                       *pGroup = 3;
> -               else if (chnl <= 104)
> -                       *pGroup = 4;
> -               else if (chnl <= 112)
> -                       *pGroup = 5;
> -               else if (chnl <= 120)
> -                       *pGroup = 5;
> -               else if (chnl <= 128)
> -                       *pGroup = 6;
> -               else if (chnl <= 136)
> -                       *pGroup = 7;
> -               else if (chnl <= 144)
> -                       *pGroup = 8;
> -               else if (chnl <= 153)
> -                       *pGroup = 9;
> -               else if (chnl <= 161)
> -                       *pGroup = 10;
> -               else if (chnl <= 177)
> -                       *pGroup = 11;
> -       }
> -       return bIn24G;
> +static u8 Hal_GetChnlGroup88E(u8 chnl, u8 *pGroup) {
> +
> +        if (chnl < 3)                  /*  Channel 1-2 */
> +               *pGroup = 0;

No tabs?

Please always run scripts/checkpatch.pl on your patches.

thanks,

greg k-h

  parent reply	other threads:[~2017-11-29  9:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-29  4:32 [PATCH] drivers/staging/rtl8188eu remove 5GHZ specific code Travis Davies
2017-11-29  4:32 ` Travis Davies
2017-11-29  8:15 ` walter harms
2017-11-29  9:42 ` Greg KH [this message]
2017-11-29  9:42   ` Greg KH

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=20171129094201.GB7597@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Larry.Finger@lwfinger.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=travisdavies.linuxkernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.