linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Reordering for better readability and consistency [EDT]
@ 2015-05-25  7:37 Rahul Jain
  2015-05-25  7:59 ` Rafał Miłecki
  2015-05-25  8:14 ` Joe Perches
  0 siblings, 2 replies; 3+ messages in thread
From: Rahul Jain @ 2015-05-25  7:37 UTC (permalink / raw)
  To: johannes.berg, linux-wireless

RVAtRkVEQzc3MURGNEZGNDhBOTgyOUNCODUyNTRFMjlGRDMKCmhlbGxvIFdpcmVsZXNzIENvbW11
bml0eSwKClBsZWFzZSBmaW5kIHBhdGNoIGZvciByZXZpZXcuCgpGcm9tIDMyOGZiOWQxYjc3Mjc4
OGZjNTFlN2Y5YmIyMWU1N2ExZDkxYjAxODggTW9uIFNlcCAxNyAwMDowMDowMCAyMDAxCkZyb206
IFJhaHVsIEphaW4gPHJhaHVsLmphaW5Ac2Ftc3VuZy5jb20+CkRhdGU6IE1vbiwgMjUgTWF5IDIw
MTUgMTI6MDI6MTIgKzA1MzAKU3ViamVjdDogW1BBVENIXSBSZW9yZGVyaW5nIGZvciBiZXR0ZXIg
cmVhZGFiaWxpdHkgYW5kIGNvbnNpc3RlbmN5CgoKU2lnbmVkLW9mZi1ieTogUmFodWwgSmFpbiA8
cmFodWwuamFpbkBzYW1zdW5nLmNvbT4KLS0tCiBuZXQvd2lyZWxlc3MvdXRpbC5jIHwgICAgNSAr
LS0tLQogMSBmaWxlIGNoYW5nZWQsIDEgaW5zZXJ0aW9uKCspLCA0IGRlbGV0aW9ucygtKQoKZGlm
ZiAtLWdpdCBhL25ldC93aXJlbGVzcy91dGlsLmMgYi9uZXQvd2lyZWxlc3MvdXRpbC5jCmluZGV4
IDcwMDUxYWIuLmNmYzg3ZDQgMTAwNjQ0Ci0tLSBhL25ldC93aXJlbGVzcy91dGlsLmMKKysrIGIv
bmV0L3dpcmVsZXNzL3V0aWwuYwpAQCAtMTM0MCwxMCArMTM0MCw3IEBAIGJvb2wgaWVlZTgwMjEx
X29wZXJhdGluZ19jbGFzc190b19iYW5kKHU4IG9wZXJhdGluZ19jbGFzcywKIAljYXNlIDEyOCAu
Li4gMTMwOgogCQkqYmFuZCA9IElFRUU4MDIxMV9CQU5EXzVHSFo7CiAJCXJldHVybiB0cnVlOwot
CWNhc2UgODE6Ci0JY2FzZSA4MjoKLQljYXNlIDgzOgotCWNhc2UgODQ6CisJY2FzZSA4MSAuLi4g
ODQ6CiAJCSpiYW5kID0gSUVFRTgwMjExX0JBTkRfMkdIWjsKIAkJcmV0dXJuIHRydWU7CiAJY2Fz
ZSAxODA6Ci0tIAoxLjcuOS41CgoKCgpUaGFua3MKLVJhaHVsIEphaW4g



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Reordering for better readability and consistency [EDT]
  2015-05-25  7:37 [PATCH] Reordering for better readability and consistency [EDT] Rahul Jain
@ 2015-05-25  7:59 ` Rafał Miłecki
  2015-05-25  8:14 ` Joe Perches
  1 sibling, 0 replies; 3+ messages in thread
From: Rafał Miłecki @ 2015-05-25  7:59 UTC (permalink / raw)
  To: rahul.jain; +Cc: johannes.berg, linux-wireless

On 25 May 2015 at 09:37, Rahul Jain <rahul.jain@samsung.com> wrote:
> hello Wireless Community,

Hi :)


> Please find patch for review.
>
> From 328fb9d1b772788fc51e7f9bb21e57a1d91b0188 Mon Sep 17 00:00:00 2001
> From: Rahul Jain <rahul.jain@samsung.com>
> Date: Mon, 25 May 2015 12:02:12 +0530
> Subject: [PATCH] Reordering for better readability and consistency

You should prefix your patch subject. It's usually the easiest to
check git history to see what kind of prefix is usually used for the
code you edit, like:
git log net/wireless/util.c


> @@ -1340,10 +1340,7 @@ bool ieee80211_operating_class_to_band(u8 operating_class,
>         case 128 ... 130:
>                 *band = IEEE80211_BAND_5GHZ;
>                 return true;
> -       case 81:
> -       case 82:
> -       case 83:
> -       case 84:
> +       case 81 ... 84:
>                 *band = IEEE80211_BAND_2GHZ;
>                 return true;
>         case 180:

I guess there could be some better word than "Reordering" for this
change. I don't think you really reordered anything ;)

-- 
Rafał

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Reordering for better readability and consistency [EDT]
  2015-05-25  7:37 [PATCH] Reordering for better readability and consistency [EDT] Rahul Jain
  2015-05-25  7:59 ` Rafał Miłecki
@ 2015-05-25  8:14 ` Joe Perches
  1 sibling, 0 replies; 3+ messages in thread
From: Joe Perches @ 2015-05-25  8:14 UTC (permalink / raw)
  To: rahul.jain; +Cc: johannes.berg, linux-wireless

On Mon, 2015-05-25 at 07:37 +0000, Rahul Jain wrote:
> diff --git a/net/wireless/util.c b/net/wireless/util.c
[]
> @@ -1340,10 +1340,7 @@ bool ieee80211_operating_class_to_band(u8 operating_class,
>  	case 128 ... 130:
>  		*band = IEEE80211_BAND_5GHZ;
>  		return true;
> -	case 81:
> -	case 82:
> -	case 83:
> -	case 84:
> +	case 81 ... 84:
>  		*band = IEEE80211_BAND_2GHZ;
>  		return true;
>  	case 180:

While I don't find this particularly more readable,
I would probably find it more readable in numeric
ascending order and the case moved above BAND_5GHZ.

Also, this function seems to be used only once in
net/mac80211/spectmgmt.c  Maybe it should be static
in that file and not EXPORT_SYMBOL.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-05-25  8:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-25  7:37 [PATCH] Reordering for better readability and consistency [EDT] Rahul Jain
2015-05-25  7:59 ` Rafał Miłecki
2015-05-25  8:14 ` Joe Perches

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).