mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Javi Merino <javi.merino@arm.com>
To: akpm@linux-foundation.org
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, emil.l.velikov@gmail.com,
	jepler@unpythonic.net, daniel@ffwll.ch,
	Javi Merino <javi.merino@arm.com>
Subject: [PATCH v2 0/4] Consolidate DIV_ROUND_CLOSEST_ULL()
Date: Tue, 24 Mar 2015 14:03:41 +0000	[thread overview]
Message-ID: <1427205825-5444-1-git-send-email-javi.merino@arm.com> (raw)

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

Changes since v1:
  - inlcude linux/kernel.h in drivers/gpu/drm/i915/intel_panel.c
    instead of drivers/gpu/drm/i915/intel_drv.h as Emil Velikov
    suggests
  - Avoid evaluating 'divisor' twice

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            |  3 ---
 drivers/gpu/drm/i915/intel_panel.c          |  1 +
 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                      | 12 ++++++++++++
 11 files changed, 24 insertions(+), 43 deletions(-)

-- 
1.9.1


             reply	other threads:[~2015-03-24 14:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-24 14:03 Javi Merino [this message]
2015-03-24 14:03 ` [PATCH v2 1/4] kernel.h: Implement DIV_ROUND_CLOSEST_ULL Javi Merino
2015-03-24 14:29   ` Jeff Epler
2015-03-24 14:03 ` [PATCH v2 2/4] clk: bcm/kona: use DIV_ROUND_CLOSEST_ULL() Javi Merino
2015-03-24 18:03   ` Alex Elder
2015-03-24 14:03 ` [PATCH v2 3/4] cpuidle: menu: " Javi Merino
2015-03-24 20:22   ` Rafael J. Wysocki
2015-03-25 11:40   ` Rafael J. Wysocki
2015-03-24 14:03 ` [PATCH v2 4/4] media: cxd2820r: " Javi Merino

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=1427205825-5444-1-git-send-email-javi.merino@arm.com \
    --to=javi.merino@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jepler@unpythonic.net \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®