From: Javi Merino <javi.merino@arm.com>
To: akpm@linux-foundation.org
Cc: hannes@cmpxchg.org, kbuild-all@01.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Javi Merino <javi.merino@arm.com>,
Peter Rosin <peda@axentia.se>, Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] ASoC: pcm512x: use DIV_ROUND_CLOSEST_ULL() from kernel.h
Date: Wed, 25 Mar 2015 11:29:44 +0000 [thread overview]
Message-ID: <1427282984-29296-1-git-send-email-javi.merino@arm.com> (raw)
In-Reply-To: <201503250933.dBZIxVT3%fengguang.wu@intel.com>
Now that the kernel provides DIV_ROUND_CLOSEST_ULL(), drop the internal
implementation and use the kernel one.
Cc: Peter Rosin <peda@axentia.se>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Javi Merino <javi.merino@arm.com>
---
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 <linux/init.h>
#include <linux/module.h>
#include <linux/clk.h>
+#include <linux/kernel.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
@@ -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
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-03-25 11:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-25 1:38 [mmotm:master 326/458] sound/soc/codecs/pcm512x.c:34:0: warning: "DIV_ROUND_CLOSEST_ULL" redefined kbuild test robot
2015-03-25 11:29 ` Javi Merino [this message]
2015-03-25 16:20 ` [PATCH] ASoC: pcm512x: use DIV_ROUND_CLOSEST_ULL() from kernel.h Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1427282984-29296-1-git-send-email-javi.merino@arm.com \
--to=javi.merino@arm.com \
--cc=akpm@linux-foundation.org \
--cc=broonie@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=kbuild-all@01.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=peda@axentia.se \
--cc=perex@perex.cz \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox