Skip to contentSkip to conversation

micro-project proposal -- WARN_ON -> WARN_ON_ONCE under drivers/net/wireless

DISCUSSION John W. Linville 2 participants 2 messages Jan 30, 2012

lore
Share & tools
lore
#0 lore raw

Anyone looking for a little "janitorial" project to do under the drivers/net/wireless tree?

find drivers/net/wireless/ -type f -exec grep -H WARN_ON {} \; | \
grep -v WARN_ON_ONCE | wc -l
653

That looks like an awful lot of "WARN_ON" calls. Do all of them really need to SPAM the log files every single time they are hit? Couldn't a lot of them be WARN_ON_ONCE instead?

Patches welcome...

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
#1 lore raw
Quoted 7 lines · John W. Linville

Anyone looking for a little "janitorial" project to do under the drivers/net/wireless tree?

find drivers/net/wireless/ -type f -exec grep -H WARN_ON {} \; | \
grep -v WARN_ON_ONCE | wc -l
653

Quoted 7 lines

That looks like an awful lot of "WARN_ON" calls. Do all of them really need to SPAM the log files every single time they are hit? Couldn't a lot of them be WARN_ON_ONCE instead?

Patches welcome...

John

$ grep -rP --include=*.[ch] "\bWARN_ON\s*\(" drivers/net/wireless | \
  wc -l
280

There are also:

$ grep -rP --include=*.[ch] "\bWARN_ON\s*\(" drivers/net/wireless | \
  grep "define"
drivers/net/wireless/b43legacy/b43legacy.h:# define B43legacy_WARN_ON(x)	WARN_ON(x)
drivers/net/wireless/b43/b43.h:# define B43_WARN_ON(x)	WARN_ON(x)

Any reason anyone can think of this
shouldn't be a sed conversion?