[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1436460234-61425-3-git-send-email-andriy.shevchenko@linux.intel.com>
Date: Thu, 9 Jul 2015 19:43:50 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: linux-kernel@...r.kernel.org, Sascha Hauer <kernel@...gutronix.de>,
Peter De Schrijver <pdeschrijver@...dia.com>,
Tero Kristo <t-kristo@...com>,
Stephen Boyd <sboyd@...eaurora.org>,
Russell King <linux@....linux.org.uk>,
Dinh Nguyen <dinguyen@...nsource.altera.com>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: [PATCH v4 2/6] clk: mmp: switch to GENMASK()
Convert the code to use GENMASK() helper instead of custom approach.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
drivers/clk/mmp/clk-mix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/mmp/clk-mix.c b/drivers/clk/mmp/clk-mix.c
index de6a873..3aad9c8 100644
--- a/drivers/clk/mmp/clk-mix.c
+++ b/drivers/clk/mmp/clk-mix.c
@@ -26,7 +26,7 @@
static unsigned int _get_maxdiv(struct mmp_clk_mix *mix)
{
- unsigned int div_mask = (1 << mix->reg_info.width_div) - 1;
+ unsigned int div_mask = GENMASK(mix->reg_info.width_div - 1, 0);
unsigned int maxdiv = 0;
struct clk_div_table *clkt;
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists