Re: [PATCH 12/14] [rndis_host] Add RNDIS physical medium checking into generic_rndis_bind()
From: David Brownell <hidden>
Date: 2008-01-27 16:29:53
Also in:
linux-wireless
On Friday 25 January 2008, Jussi Kivilinna wrote:
+ if(flags & FLAG_RNDIS_PHYM_WIRELESS &&
+ *phym != RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN) {
+ dev_err(&intf->dev, "driver requires wireless physical "
+ "medium, but device is not.\n");
+ retval = -ENODEV;
+ goto halt_fail_and_release;
+ }
+ if(flags & FLAG_RNDIS_PHYM_NOT_WIRELESS &&
+ *phym == RNDIS_PHYSICAL_MEDIUM_WIRELESS_LAN) {
+ dev_err(&intf->dev, "driver requires non-wireless physical "
+ "medium, but device is wireless.\n");
+ retval = -ENODEV;
Well, other than the obvious checkpatch.pl warnings waiting to trigger
("if" is not a function; put a space before the paren) and what I'd call
missing parens around the "flags & ...", those are *not* errors. No
wonder you thought this would cause too many messages!!
Just make those be dev_dbg() calls instead. The strongest message level
you can argue for there would be KERN_NOTICE, "normal but significant";
except it's not especially significant. Filtering by netif_msg_probe()
may be a good idea too; that's normally enabled in this framework.
- Dave
p.s. Before these get submitted, *all* of them need to pass "checkpatch.pl".
Ideally, "checkpatch.pl --strict" ...