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:	Tue, 11 May 2010 11:18:54 -0700
From:	Jesse Barnes <jbarnes@...tuousgeek.org>
To:	unlisted-recipients:; (no To-header on input)
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, intel-gfx@...ts.freedesktop.org,
	Matthew Garrett <mjg59@...f.ucam.org>
Subject: Re: [PATCH 2/2] x86 platform driver: intelligent power sharing
 driver

On Tue, 11 May 2010 07:59:19 -0700
Jesse Barnes <jbarnes@...tuousgeek.org> wrote:

> On Mon, 10 May 2010 22:00:46 -0400
> Andrew Morton <akpm@...ux-foundation.org> wrote:
> > > +#define thm_readb(off) readb(ips->regmap + (off))
> > > +#define thm_readw(off) readw(ips->regmap + (off))
> > > +#define thm_readl(off) readl(ips->regmap + (off))
> > > +#define thm_readq(off) readq(ips->regmap + (off))
> > > +
> > > +#define thm_writeb(off, val) writeb((val), ips->regmap + (off))
> > > +#define thm_writew(off, val) writew((val), ips->regmap + (off))
> > > +#define thm_writel(off, val) writel((val), ips->regmap + (off))
> > 
> > ick.
> > 
> > static inline unsigned short thm_readw(struct ips_driver *ips, unsigned offset)
> > {
> > 	readw(ips->regmap + offset);
> > }
> > 
> > would be nicer.
> 
> Yes, it would.

No, I take that back, it just means more typing.  This idiom of
expecting a given variable to be declared for the IO routines to work
is pretty common in drivers, and saves a bunch of redundant "(ips,"
everywhere...

> > afacit these messages might come out at one-per-five-seconds max?
> > 
> > I bet the driver blows up and someone's logs get spammed ;)
> 
> Possibly. :)  I added these at the request of Pavel; I could make them
> just print one time though...

These should be dev_warn instead anyway.

Updated patch on its way.

-- 
Jesse Barnes, Intel Open Source Technology Center
--
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