[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081107213513.2f347fca@hyperion.delvare>
Date: Fri, 7 Nov 2008 21:35:13 +0100
From: Jean Delvare <khali@...ux-fr.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: "Darrick J. Wong" <djwong@...ibm.com>,
linux-kernel@...r.kernel.org, lm-sensors@...sensors.org
Subject: Re: [PATCH 4/5] adt7473: Check inputs from sysfs writes
On Fri, 7 Nov 2008 11:20:40 -0800, Andrew Morton wrote:
> On Fri, 07 Nov 2008 10:56:41 -0800
> "Darrick J. Wong" <djwong@...ibm.com> wrote:
>
> > +#define ROUND_DIV(x, divisor) (((x) + ((divisor) / 2)) / (divisor))
>
> It might make sense to rename this to ROUND_CLOSEST, fix the
> double-evaluation and whap it into kernel.h?
To be consistent with DIV_ROUND_UP, I'd rather name the new function
DIV_ROUND_CLOSEST. But other than that, yes I agree that making this an
inline function and moving it to kernel.h would be a good idea. Many
many hwmon drivers use this and people keep asking about this construct.
--
Jean Delvare
--
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