Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752707AbYKGUfe (ORCPT ); Fri, 7 Nov 2008 15:35:34 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750953AbYKGUf0 (ORCPT ); Fri, 7 Nov 2008 15:35:26 -0500 Received: from zone0.gcu-squad.org ([212.85.147.21]:19436 "EHLO services.gcu-squad.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750903AbYKGUfZ (ORCPT ); Fri, 7 Nov 2008 15:35:25 -0500 Date: Fri, 7 Nov 2008 21:35:13 +0100 From: Jean Delvare To: Andrew Morton Cc: "Darrick J. Wong" , linux-kernel@vger.kernel.org, lm-sensors@lm-sensors.org Subject: Re: [PATCH 4/5] adt7473: Check inputs from sysfs writes Message-ID: <20081107213513.2f347fca@hyperion.delvare> In-Reply-To: <20081107112040.0154e093.akpm@linux-foundation.org> References: <20081107185621.13022.61885.stgit@elm3a70.beaverton.ibm.com> <20081107185641.13022.70557.stgit@elm3a70.beaverton.ibm.com> <20081107112040.0154e093.akpm@linux-foundation.org> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.9; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 876 Lines: 21 On Fri, 7 Nov 2008 11:20:40 -0800, Andrew Morton wrote: > On Fri, 07 Nov 2008 10:56:41 -0800 > "Darrick J. Wong" 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/