From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752630AbbCYLad (ORCPT ); Wed, 25 Mar 2015 07:30:33 -0400 Received: from foss.arm.com ([217.140.101.70]:50491 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752192AbbCYLa1 (ORCPT ); Wed, 25 Mar 2015 07:30:27 -0400 From: Javi Merino To: akpm@linux-foundation.org Cc: hannes@cmpxchg.org, kbuild-all@01.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Javi Merino , Peter Rosin , Mark Brown , Liam Girdwood , Jaroslav Kysela , Takashi Iwai Subject: [PATCH] ASoC: pcm512x: use DIV_ROUND_CLOSEST_ULL() from kernel.h Date: Wed, 25 Mar 2015 11:29:44 +0000 Message-Id: <1427282984-29296-1-git-send-email-javi.merino@arm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <201503250933.dBZIxVT3%fengguang.wu@intel.com> References: <201503250933.dBZIxVT3%fengguang.wu@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that the kernel provides DIV_ROUND_CLOSEST_ULL(), drop the internal implementation and use the kernel one. Cc: Peter Rosin Cc: Mark Brown Cc: Liam Girdwood Cc: Jaroslav Kysela Cc: Takashi Iwai Reported-by: kbuild test robot Signed-off-by: Javi Merino --- Patches in the -mm tree now provide a DIV_ROUND_CLOSEST_ULL() implementation in kernel.h[0]. If I understand it correctly, this patch should go via the -mm tree as well with appropriate Acks from the maintainers. [0] http://ozlabs.org/~akpm/mmots/broken-out/kernelh-implement-div_round_closest_ull.patch sound/soc/codecs/pcm512x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/codecs/pcm512x.c b/sound/soc/codecs/pcm512x.c index 9974f201a08f..a3dad00b5afc 100644 --- a/sound/soc/codecs/pcm512x.c +++ b/sound/soc/codecs/pcm512x.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -31,8 +32,6 @@ #define DIV_ROUND_DOWN_ULL(ll, d) \ ({ unsigned long long _tmp = (ll); do_div(_tmp, d); _tmp; }) -#define DIV_ROUND_CLOSEST_ULL(ll, d) \ - ({ unsigned long long _tmp = (ll)+(d)/2; do_div(_tmp, d); _tmp; }) #define PCM512x_NUM_SUPPLIES 3 static const char * const pcm512x_supply_names[PCM512x_NUM_SUPPLIES] = { -- 1.9.1