lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 19 Apr 2013 02:52:29 -0700
From:	Joe Perches <joe@...ches.com>
To:	Gertjan van Wingerde <gwingerde@...il.com>
Cc:	Ivo van Doorn <IvDoorn@...il.com>,
	Helmut Schaa <helmut.schaa@...glemail.com>,
	"John W. Linville" <linville@...driver.com>,
	"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
	rt2x00 Users List <users@...x00.serialmonkey.com>,
	netdev <netdev@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH wireless-next] rt2x00: Use more current logging styles,
 shrink object size

On Fri, 2013-04-19 at 11:45 +0200, Gertjan van Wingerde wrote:
> Hi Joe,

Hello Gertjan.

> On Fri, Apr 19, 2013 at 10:33 AM, Joe Perches <joe@...ches.com> wrote:
> > Reduce object size ~2% using more current logging styles.
[]
> > +/* Utility printing macros */
> > +#define rt2x00_err(dev, fmt, ...)                                      \
> > +       wiphy_err((dev)->hw->wiphy, "%s: Error - " fmt,                 \
> > +                 __func__, ##__VA_ARGS__)
> > +#define rt2x00_warn(dev, fmt, ...)                                     \
> > +       wiphy_err((dev)->hw->wiphy, "%s: Warning - " fmt,               \
> > +                 __func__, ##__VA_ARGS__)
> 
> Shouldn't this use wiphy_warn instead of wiphy_err?
> 
> > +#define rt2x00_info(dev, fmt, ...)                                     \
> > +       wiphy_err((dev)->hw->wiphy, "%s: Info - " fmt,                  \
> > +                 __func__, ##__VA_ARGS__)
> 
> Shouldn't this use wiphy_info instead of wiphy_err?

Gah, of course you're right, copy/paste dumbness.

> > +#define rt2x00_eeprom_dbg(dev, fmt, ...)                               \
> > +       wiphy_dbg((dev)->hw->wiphy, "%s: %s - " fmt,                    \
> > +                 __func__, "EEPROM recovery", ##__VA_ARGS__)

> Why do you give the "EEPROM recovery" string as extra argument instead
> of embedding it in the format string, like you do in the rt2x00_dbg
> macro for the "Debug" string?

Trivial space reduction on x86/32.
It's just a few bytes.  It may not be
a savings at all for x86/64.

I'd actually prefer to remove all the
extra "INFO/ERR/WARNING" bits from the
messages as it's a simple duplication of
the KERN_<LEVEL> and I think not useful.

> Also, please put all rt2x00_<level> next to each other, instead of
> scattering them around with the "#define DEBUG" in between them.

I'll resubmit tomorrow.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ