From: Wolfram Sang <wsa@the-dreams.de>
To: linux-pwm@vger.kernel.org
Cc: Wolfram Sang <wsa@sang-engineering.com>,
Thierry Reding <thierry.reding@gmail.com>
Subject: [PATCH 2/2] pwm: tiehrpwm: inline accessor functions
Date: Wed, 2 Apr 2014 13:56:22 +0200 [thread overview]
Message-ID: <1396439802-6813-2-git-send-email-wsa@the-dreams.de> (raw)
In-Reply-To: <1396439802-6813-1-git-send-email-wsa@the-dreams.de>
From: Wolfram Sang <wsa@sang-engineering.com>
These elementary functions should be inlined for fastest access. Also
fixes this warning as a side-effect (when no PM_SLEEP is selected):
drivers/pwm/pwm-tiehrpwm.c:141:12: warning: 'ehrpwm_read' defined but not used [-Wunused-function]
Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
---
drivers/pwm/pwm-tiehrpwm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c
index b2544296430a..232a4be11e67 100644
--- a/drivers/pwm/pwm-tiehrpwm.c
+++ b/drivers/pwm/pwm-tiehrpwm.c
@@ -138,12 +138,12 @@ static inline struct ehrpwm_pwm_chip *to_ehrpwm_pwm_chip(struct pwm_chip *chip)
return container_of(chip, struct ehrpwm_pwm_chip, chip);
}
-static u16 ehrpwm_read(void __iomem *base, int offset)
+static inline u16 ehrpwm_read(void __iomem *base, int offset)
{
return readw(base + offset);
}
-static void ehrpwm_write(void __iomem *base, int offset, unsigned int val)
+static inline void ehrpwm_write(void __iomem *base, int offset, unsigned int val)
{
writew(val & 0xFFFF, base + offset);
}
--
1.9.0
next prev parent reply other threads:[~2014-04-02 11:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 11:56 [PATCH 1/2] pwm: tiehrpwm: don't build PM related functions when not needed Wolfram Sang
2014-04-02 11:56 ` Wolfram Sang [this message]
2014-05-21 10:01 ` Thierry Reding
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=1396439802-6813-2-git-send-email-wsa@the-dreams.de \
--to=wsa@the-dreams.de \
--cc=linux-pwm@vger.kernel.org \
--cc=thierry.reding@gmail.com \
--cc=wsa@sang-engineering.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;
as well as URLs for NNTP newsgroup(s).