mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	David Cohen <david.a.cohen@intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v3 5/5] gpio-langwell: drop away explicit casting
Date: Wed, 22 May 2013 13:20:14 +0300	[thread overview]
Message-ID: <1369218014-28990-6-git-send-email-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <1369218014-28990-1-git-send-email-andriy.shevchenko@linux.intel.com>

Since the type of the reg_base member is void __iomem * we don't need to have
explicit casting in gpio_reg() and gpio_reg_2bit().

Update year in the copyright notice as well.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/gpio/gpio-langwell.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/gpio/gpio-langwell.c b/drivers/gpio/gpio-langwell.c
index 313d190..fec85ca 100644
--- a/drivers/gpio/gpio-langwell.c
+++ b/drivers/gpio/gpio-langwell.c
@@ -1,7 +1,7 @@
 /*
  * Moorestown platform Langwell chip GPIO driver
  *
- * Copyright (c) 2008 - 2009,  Intel Corporation.
+ * Copyright (c) 2008, 2009, 2013, Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -74,15 +74,13 @@ struct lnw_gpio {
 #define to_lnw_priv(chip)	container_of(chip, struct lnw_gpio, chip)
 
 static void __iomem *gpio_reg(struct gpio_chip *chip, unsigned offset,
-			enum GPIO_REG reg_type)
+			      enum GPIO_REG reg_type)
 {
 	struct lnw_gpio *lnw = to_lnw_priv(chip);
 	unsigned nreg = chip->ngpio / 32;
 	u8 reg = offset / 32;
-	void __iomem *ptr;
 
-	ptr = (void __iomem *)(lnw->reg_base + reg_type * nreg * 4 + reg * 4);
-	return ptr;
+	return lnw->reg_base + reg_type * nreg * 4 + reg * 4;
 }
 
 static void __iomem *gpio_reg_2bit(struct gpio_chip *chip, unsigned offset,
@@ -91,10 +89,8 @@ static void __iomem *gpio_reg_2bit(struct gpio_chip *chip, unsigned offset,
 	struct lnw_gpio *lnw = to_lnw_priv(chip);
 	unsigned nreg = chip->ngpio / 32;
 	u8 reg = offset / 16;
-	void __iomem *ptr;
 
-	ptr = (void __iomem *)(lnw->reg_base + reg_type * nreg * 4 + reg * 4);
-	return ptr;
+	return lnw->reg_base + reg_type * nreg * 4 + reg * 4;
 }
 
 static int lnw_gpio_request(struct gpio_chip *chip, unsigned offset)
-- 
1.8.2.rc0.22.gb3600c3


  parent reply	other threads:[~2013-05-22 10:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-22 10:20 [PATCH v3 0/5] gpio-langwell: bugfix and amendments Andy Shevchenko
2013-05-22 10:20 ` [PATCH v3 1/5] gpio-langwell: initialize lock before usage Andy Shevchenko
2013-05-30 17:20   ` Linus Walleij
2013-05-31 12:01   ` Linus Walleij
2013-05-31 14:03     ` Andy Shevchenko
2013-05-22 10:20 ` [PATCH v3 2/5] gpio-langwell: do not use direct access to iomapped memory Andy Shevchenko
2013-05-30 17:21   ` Linus Walleij
2013-05-22 10:20 ` [PATCH v3 3/5] gpio-langwell: use managed functions pcim_* and devm_* Andy Shevchenko
2013-05-22 11:06   ` Mika Westerberg
2013-05-30 17:25   ` Linus Walleij
2013-05-31  7:57     ` Andy Shevchenko
2013-05-22 10:20 ` [PATCH v3 4/5] gpio-langwell: amend error messages Andy Shevchenko
2013-05-30 17:27   ` Linus Walleij
2013-05-22 10:20 ` Andy Shevchenko [this message]
2013-05-22 11:07   ` [PATCH v3 5/5] gpio-langwell: drop away explicit casting Mika Westerberg
2013-05-30 17:28   ` Linus Walleij
2013-05-22 16:28 ` [PATCH v3 0/5] gpio-langwell: bugfix and amendments David Cohen
2013-05-28  8:05   ` Andy Shevchenko
2013-05-30 17:30     ` Linus Walleij

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=1369218014-28990-6-git-send-email-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=david.a.cohen@intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    /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

Powered by JetHome