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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081107112731.cec03a04.akpm@linux-foundation.org>
Date:	Fri, 7 Nov 2008 11:27:31 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Harvey Harrison <harvey.harrison@...il.com>
Cc:	djwong@...ibm.com, khali@...ux-fr.org,
	linux-kernel@...r.kernel.org, lm-sensors@...sensors.org
Subject: Re: [PATCH 1/5] adt7462: New hwmon driver

On Fri, 07 Nov 2008 11:04:51 -0800
Harvey Harrison <harvey.harrison@...il.com> wrote:

> On Fri, 2008-11-07 at 10:56 -0800, Darrick J. Wong wrote:
> > New driver to play with.  As Jean mentioned a couple of years ago,
> > this
> > chip is a beast with odd combinations of 8 fans, 4 temperatures, and 
> > 13 voltage sensors.  This driver has been tested on an IntelliStation
> > Z30.
> > 
> > Signed-off-by: Darrick J. Wong <djwong@...ibm.com>
> > ---
> > +#define MASK_AND_SHIFT(value, prefix)	\
> > +	(((value) & prefix##_MASK) >> prefix##_SHIFT)
> > +
> 
> I'm not sure, but doesn't this exist somewhere in the common kernel
> headers.

No, core kernel doesn't have a macro which requires that the caller
previously defined foo_MASK and foo_SHIFT.  Only drivers are allowed to
get away with such fugliness ;)

> > +#define ROUND_DIV(x, divisor)  (((x) + ((divisor) / 2)) / (divisor))
> 
> DIV_ROUND_UP ?

That's different.  This one should be called ROUND_CLOSEST or something
like that.

--
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