public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] atheros: force endian checks on atheros wireless drivers
@ 2011-12-20 19:18 Luis R. Rodriguez
  2011-12-21 11:10 ` Luciano Coelho
  0 siblings, 1 reply; 4+ messages in thread
From: Luis R. Rodriguez @ 2011-12-20 19:18 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Luis R. Rodriguez, Kalle Valo

From: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>

Please NACK nasty patches.

Cc: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
---
 drivers/net/wireless/ath/Makefile |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/Makefile b/drivers/net/wireless/ath/Makefile
index d121469..d716b74 100644
--- a/drivers/net/wireless/ath/Makefile
+++ b/drivers/net/wireless/ath/Makefile
@@ -11,3 +11,4 @@ ath-objs :=	main.o \
 		key.o
 
 ath-$(CONFIG_ATH_DEBUG) += debug.o
+ccflags-y += -D__CHECK_ENDIAN__
-- 
1.7.4.15.g7811d


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

* Re: [PATCH] atheros: force endian checks on atheros wireless drivers
  2011-12-20 19:18 [PATCH] atheros: force endian checks on atheros wireless drivers Luis R. Rodriguez
@ 2011-12-21 11:10 ` Luciano Coelho
  2011-12-21 15:14   ` Johannes Berg
  0 siblings, 1 reply; 4+ messages in thread
From: Luciano Coelho @ 2011-12-21 11:10 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linville, linux-wireless, Kalle Valo

On Tue, 2011-12-20 at 11:18 -0800, Luis R. Rodriguez wrote: 
> From: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
> 
> Please NACK nasty patches.
> 
> Cc: Kalle Valo <kvalo@qca.qualcomm.com>
> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
> ---
>  drivers/net/wireless/ath/Makefile |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/Makefile b/drivers/net/wireless/ath/Makefile
> index d121469..d716b74 100644
> --- a/drivers/net/wireless/ath/Makefile
> +++ b/drivers/net/wireless/ath/Makefile
> @@ -11,3 +11,4 @@ ath-objs :=	main.o \
>  		key.o
>  
>  ath-$(CONFIG_ATH_DEBUG) += debug.o
> +ccflags-y += -D__CHECK_ENDIAN__

Doesn't this force everyone who compiles the modules (even
non-developers) to have sparse installed? Is it really what we want?

If that's the case, shouldn't we do this in a higher level, maybe
enforce sparse check for everything? Of course the number of warnings
would explode, but we could at least do it for all the wireless code in
a first phase?

-- 
Cheers,
Luca.


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

* Re: [PATCH] atheros: force endian checks on atheros wireless drivers
  2011-12-21 11:10 ` Luciano Coelho
@ 2011-12-21 15:14   ` Johannes Berg
  2011-12-21 15:26     ` Luciano Coelho
  0 siblings, 1 reply; 4+ messages in thread
From: Johannes Berg @ 2011-12-21 15:14 UTC (permalink / raw)
  To: Luciano Coelho; +Cc: Luis R. Rodriguez, linville, linux-wireless, Kalle Valo

On Wed, 2011-12-21 at 13:10 +0200, Luciano Coelho wrote:

> >  ath-$(CONFIG_ATH_DEBUG) += debug.o
> > +ccflags-y += -D__CHECK_ENDIAN__
> 
> Doesn't this force everyone who compiles the modules (even
> non-developers) to have sparse installed? Is it really what we want?

No. It just forces everyone who does use sparse to also use it for
endian checks. I do the same in all code I maintain, take a look :-)

johannes


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

* Re: [PATCH] atheros: force endian checks on atheros wireless drivers
  2011-12-21 15:14   ` Johannes Berg
@ 2011-12-21 15:26     ` Luciano Coelho
  0 siblings, 0 replies; 4+ messages in thread
From: Luciano Coelho @ 2011-12-21 15:26 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Luis R. Rodriguez, linville, linux-wireless, Kalle Valo, arik

On Wed, 2011-12-21 at 16:14 +0100, Johannes Berg wrote: 
> On Wed, 2011-12-21 at 13:10 +0200, Luciano Coelho wrote:
> 
> > >  ath-$(CONFIG_ATH_DEBUG) += debug.o
> > > +ccflags-y += -D__CHECK_ENDIAN__
> > 
> > Doesn't this force everyone who compiles the modules (even
> > non-developers) to have sparse installed? Is it really what we want?
> 
> No. It just forces everyone who does use sparse to also use it for
> endian checks. I do the same in all code I maintain, take a look :-)

Ah, I get it now.  sparse will only run if C=[12] is passed in the make
command.

I'll probably add the same in wl12xx.

It would be nice to have a way to enforce developers to run sparse.
Maybe public humiliation works, but it's not the most efficient way. :)

-- 
Cheers,
Luca.


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

end of thread, other threads:[~2011-12-21 15:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-20 19:18 [PATCH] atheros: force endian checks on atheros wireless drivers Luis R. Rodriguez
2011-12-21 11:10 ` Luciano Coelho
2011-12-21 15:14   ` Johannes Berg
2011-12-21 15:26     ` Luciano Coelho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox