All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ocb: use correct "MHz" instead of "MHZ"
@ 2015-10-12  7:35 Ola Olsson
  2015-10-13  9:14 ` Johannes Berg
  0 siblings, 1 reply; 7+ messages in thread
From: Ola Olsson @ 2015-10-12  7:35 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Ola Olsson, Ola Olsson

Fixes the last typos of MHZ to MHz

Signed-off-by: Ola Olsson <ola.olsson@sonymobile.com>
---
 ocb.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ocb.c b/ocb.c
index fc48ecf..c60591c 100644
--- a/ocb.c
+++ b/ocb.c
@@ -18,9 +18,9 @@ static int join_ocb(struct nl80211_state *state,
 		const char *name;
 		unsigned int width;
 	} *chanmode_selected, chanmode[] = {
-		{ .name = "5MHZ",
+		{ .name = "5MHz",
 		  .width = NL80211_CHAN_WIDTH_5	},
-		{ .name = "10MHZ",
+		{ .name = "10MHz",
 		  .width = NL80211_CHAN_WIDTH_10 },
 	};
 
@@ -59,7 +59,7 @@ static int join_ocb(struct nl80211_state *state,
 nla_put_failure:
 	return -ENOBUFS;
 }
-COMMAND(ocb, join, "<freq in MHz> <5MHZ|10MHZ>",
+COMMAND(ocb, join, "<freq in MHz> <5MHz|10MHz>",
 	NL80211_CMD_JOIN_OCB, 0, CIB_NETDEV, join_ocb,
 	"Join the OCB mode network.");
 
-- 
1.7.9.5


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

* Re: [PATCH] ocb: use correct "MHz" instead of "MHZ"
  2015-10-12  7:35 [PATCH] ocb: use correct "MHz" instead of "MHZ" Ola Olsson
@ 2015-10-13  9:14 ` Johannes Berg
  2015-10-13 22:42   ` Ola Olsson
  0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2015-10-13  9:14 UTC (permalink / raw)
  To: Ola Olsson; +Cc: linux-wireless, Ola Olsson

Hi Ola,

Thanks for all the patches - I just applied this and three others.

Note that I've reworded the subject for some - I prefer the subject to
state in active voice what the change is doing - i.e. be something you
read before the actual change, rather than afterwards. I'd appreciate
if you could do the same for future patches.

Thanks,
johannes

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

* Re: [PATCH] ocb: use correct "MHz" instead of "MHZ"
  2015-10-13  9:14 ` Johannes Berg
@ 2015-10-13 22:42   ` Ola Olsson
  2015-10-14  6:52     ` Johannes Berg
  0 siblings, 1 reply; 7+ messages in thread
From: Ola Olsson @ 2015-10-13 22:42 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Ola Olsson

Absolutely, I will do that.

May I ask if you are interested in patches that removes the compiler
warnings on Android? I have cloned the iw git under the external
folder in the android tree and everything compiles fine with "mm" but
there are a lot of warnings. Most warnings are unused-parameter and
sign-compare but also missing-field-initializers.
None of them are critical but it is way easier to introduce new ones
if the screen is full of them already.The patches are ready in case
you are interested.


/Ola

On Tue, Oct 13, 2015 at 11:14 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> Hi Ola,
>
> Thanks for all the patches - I just applied this and three others.
>
> Note that I've reworded the subject for some - I prefer the subject to
> state in active voice what the change is doing - i.e. be something you
> read before the actual change, rather than afterwards. I'd appreciate
> if you could do the same for future patches.
>
> Thanks,
> johannes

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

* Re: [PATCH] ocb: use correct "MHz" instead of "MHZ"
  2015-10-13 22:42   ` Ola Olsson
@ 2015-10-14  6:52     ` Johannes Berg
  2015-10-14  7:36       ` Ola Olsson
  0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2015-10-14  6:52 UTC (permalink / raw)
  To: Ola Olsson; +Cc: linux-wireless, Ola Olsson

Hi,

> May I ask if you are interested in patches that removes the compiler
> warnings on Android? I have cloned the iw git under the external
> folder in the android tree and everything compiles fine with "mm" but
> there are a lot of warnings. Most warnings are unused-parameter and
> sign-compare but also missing-field-initializers.

Hm. I think -Wunused-parameter I'd prefer not to fix, since that
usually ends up with something like

int my_callback_function(void *ignored)
{
	ignored = ignored;

	...
}

or something like that?

-Wsign-compare seems somewhat useful, I've just gone through that and
fixed it up.

I don't see anything with -Wmissing-field-initializers.


johannes

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

* Re: [PATCH] ocb: use correct "MHz" instead of "MHZ"
  2015-10-14  6:52     ` Johannes Berg
@ 2015-10-14  7:36       ` Ola Olsson
  2015-10-14  8:00         ` Johannes Berg
  0 siblings, 1 reply; 7+ messages in thread
From: Ola Olsson @ 2015-10-14  7:36 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Ola Olsson

> Hm. I think -Wunused-parameter I'd prefer not to fix, since that
> usually ends up with something like
>
> int my_callback_function(void *ignored)
> {
>         ignored = ignored;
>
>         ...
> }
>
> or something like that?

Correct. I have done a macro to utilize the gcc "__attribute__
((unused))" and I fully understand that it is not an elegant solution.
I don't want to convince you about merging it since I wouldn't do it
myself. :)

> I don't see anything with -Wmissing-field-initializers.

Hmm. I'll try to find out why I get these warnings. Mostly, it is
about changing "{}" -> "{0}" on stack allocated objects.
This is what I get when compiling at 0ee571d57b8b631658d1a35ad9a906610d6145d3

$ mm -B -j8 2>&1 | grep -i missing-field
external/iw/scan.c:1863:3: warning: missing initializer for field
'type' of 'struct nla_policy' [-Wmissing-field-initializers]
external/iw/scan.c:1866:3: warning: missing initializer for field
'type' of 'struct nla_policy' [-Wmissing-field-initializers]
external/iw/scan.c:1871:3: warning: missing initializer for field
'type' of 'struct nla_policy' [-Wmissing-field-initializers]
external/iw/connect.c:80:9: warning: missing initializer for field
'ts' of 'struct print_event_args' [-Wmissing-field-initializers]
external/iw/link.c:32:3: warning: missing initializer for field 'type'
of 'struct nla_policy' [-Wmissing-field-initializers]
external/iw/link.c:35:3: warning: missing initializer for field 'type'
of 'struct nla_policy' [-Wmissing-field-initializers]
external/iw/bitrate.c:95:9: warning: missing initializer for field
'mcs' of 'struct nl80211_txrate_vht' [-Wmissing-field-initializers]
external/iw/bitrate.c:96:9: warning: missing initializer for field
'mcs' of 'struct nl80211_txrate_vht' [-Wmissing-field-initializers]
external/iw/wowlan.c:110:11: warning: missing initializer for field
'start' of 'struct nl80211_wowlan_tcp_data_seq'
[-Wmissing-field-initializers]

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

* Re: [PATCH] ocb: use correct "MHz" instead of "MHZ"
  2015-10-14  7:36       ` Ola Olsson
@ 2015-10-14  8:00         ` Johannes Berg
  2015-10-14  9:05           ` Ola Olsson
  0 siblings, 1 reply; 7+ messages in thread
From: Johannes Berg @ 2015-10-14  8:00 UTC (permalink / raw)
  To: Ola Olsson; +Cc: linux-wireless, Ola Olsson

On Wed, 2015-10-14 at 09:36 +0200, Ola Olsson wrote:

> Correct. I have done a macro to utilize the gcc "__attribute__
> ((unused))" and I fully understand that it is not an elegant 
> solution.
> I don't want to convince you about merging it since I wouldn't do it
> myself. :)

Yeah, ouch, I don't really want that. Perhaps you can add -Wno-unused
-parameters to your Android makefile.

> > I don't see anything with -Wmissing-field-initializers.
> 
> Hmm. I'll try to find out why I get these warnings. Mostly, it is
> about changing "{}" -> "{0}" on stack allocated objects.
> This is what I get when compiling at 
> 0ee571d57b8b631658d1a35ad9a906610d6145d3
> 
> $ mm -B -j8 2>&1 | grep -i missing-field
> external/iw/scan.c:1863:3: warning: missing initializer for field
> 'type' of 'struct nla_policy' [-Wmissing-field-initializers]
> 

Yeah, ok, so technically IIRC ={0} is the standard way of doing this in
C, but everything seems to accept ={} as a natural extension of ={.x=y}
I guess? Not sure I want to fix it - doesn't really seem worth much.

johannes

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

* Re: [PATCH] ocb: use correct "MHz" instead of "MHZ"
  2015-10-14  8:00         ` Johannes Berg
@ 2015-10-14  9:05           ` Ola Olsson
  0 siblings, 0 replies; 7+ messages in thread
From: Ola Olsson @ 2015-10-14  9:05 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Ola Olsson

> Yeah, ouch, I don't really want that. Perhaps you can add -Wno-unused
> -parameters to your Android makefile.

Worked like a charm (though I had to remove 's' in parameters). Thanks!

>
> I guess? Not sure I want to fix it - doesn't really seem worth much.
>
That's ok!

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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-12  7:35 [PATCH] ocb: use correct "MHz" instead of "MHZ" Ola Olsson
2015-10-13  9:14 ` Johannes Berg
2015-10-13 22:42   ` Ola Olsson
2015-10-14  6:52     ` Johannes Berg
2015-10-14  7:36       ` Ola Olsson
2015-10-14  8:00         ` Johannes Berg
2015-10-14  9:05           ` Ola Olsson

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.