From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751250AbbCTLPO (ORCPT ); Fri, 20 Mar 2015 07:15:14 -0400 Received: from foss.arm.com ([217.140.101.70]:39818 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750852AbbCTLPL (ORCPT ); Fri, 20 Mar 2015 07:15:11 -0400 From: Javi Merino To: akpm@linux-foundation.org Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Javi Merino Subject: [PATCH 0/4] Consolidate DIV_ROUND_CLOSEST_ULL() Date: Fri, 20 Mar 2015 11:14:39 +0000 Message-Id: <1426850083-11049-1-git-send-email-javi.merino@arm.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The kernel has grown a number of different implementations of DIV_ROUND_CLOSEST_ULL(). That is, a macro that does the same as DIV_ROUND_CLOSEST() but with the first operand being an unsigned long long. That means that you have to do the division using do_div() instead of using the C division operator '/'. This series move the implementation in drivers/gpu/drm/i915/intel_drv.h to linux/kernel.h and then removes the other similar implementations of the same code in drivers/clk/bcm/clk-kona.h, drivers/cpuidle/governors/menu.c and drivers/media/dvb-frontends/cxd2820r_priv.h in favor of the one in kernel.h Javi Merino (4): kernel.h: Implement DIV_ROUND_CLOSEST_ULL clk: bcm/kona: use DIV_ROUND_CLOSEST_ULL() cpuidle: menu: use DIV_ROUND_CLOSEST_ULL() media: cxd2820r: use DIV_ROUND_CLOSEST_ULL() drivers/clk/bcm/clk-kona.c | 28 +++++++--------------------- drivers/clk/bcm/clk-kona.h | 1 - drivers/cpuidle/governors/menu.c | 8 +------- drivers/gpu/drm/i915/intel_drv.h | 4 +--- drivers/media/dvb-frontends/cxd2820r_c.c | 2 +- drivers/media/dvb-frontends/cxd2820r_core.c | 6 ------ drivers/media/dvb-frontends/cxd2820r_priv.h | 2 -- drivers/media/dvb-frontends/cxd2820r_t.c | 2 +- drivers/media/dvb-frontends/cxd2820r_t2.c | 2 +- include/linux/kernel.h | 11 +++++++++++ 10 files changed, 23 insertions(+), 43 deletions(-) -- 1.9.1