From: Thierry Reding <thierry.reding@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org,
Mikko Perttunen <mperttunen@nvidia.com>
Subject: [PATCH 03/10] drm/tegra: dsi: Use unsigned int for register offsets
Date: Tue, 15 Aug 2017 15:41:07 +0200 [thread overview]
Message-ID: <20170815134114.17547-3-thierry.reding@gmail.com> (raw)
In-Reply-To: <20170815134114.17547-1-thierry.reding@gmail.com>
From: Thierry Reding <treding@nvidia.com>
Register offsets are usually fairly small numbers, so an unsigned int is
more than enough to represent them.
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
drivers/gpu/drm/tegra/dsi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
index e4b5aedfdbd4..37a921cb676c 100644
--- a/drivers/gpu/drm/tegra/dsi.c
+++ b/drivers/gpu/drm/tegra/dsi.c
@@ -105,15 +105,15 @@ static struct tegra_dsi_state *tegra_dsi_get_state(struct tegra_dsi *dsi)
return to_dsi_state(dsi->output.connector.state);
}
-static inline u32 tegra_dsi_readl(struct tegra_dsi *dsi, unsigned long reg)
+static inline u32 tegra_dsi_readl(struct tegra_dsi *dsi, unsigned int offset)
{
- return readl(dsi->regs + (reg << 2));
+ return readl(dsi->regs + (offset << 2));
}
static inline void tegra_dsi_writel(struct tegra_dsi *dsi, u32 value,
- unsigned long reg)
+ unsigned int offset)
{
- writel(value, dsi->regs + (reg << 2));
+ writel(value, dsi->regs + (offset << 2));
}
static int tegra_dsi_show_regs(struct seq_file *s, void *data)
--
2.13.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-08-15 13:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-15 13:41 [PATCH 01/10] drm/tegra: dc: Use unsigned int for register offsets Thierry Reding
2017-08-15 13:41 ` [PATCH 02/10] drm/tegra: dpaux: " Thierry Reding
2017-08-15 13:41 ` Thierry Reding [this message]
2017-08-15 13:41 ` [PATCH 04/10] drm/tegra: hdmi: " Thierry Reding
[not found] ` <20170815134114.17547-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-08-15 13:41 ` [PATCH 05/10] drm/tegra: sor: " Thierry Reding
2017-08-15 13:41 ` [PATCH 06/10] drm/tegra: dc: Trace register accesses Thierry Reding
[not found] ` <20170815134114.17547-6-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-08-23 8:38 ` [v2] timers: Fix excessive granularity of new timers after a nohz idle jeffy
[not found] ` <599D3EF6.9030000-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-08-24 8:36 ` Thierry Reding
2017-08-15 13:41 ` [PATCH 07/10] drm/tegra: hdmi: Trace register accesses Thierry Reding
2017-08-15 13:41 ` [PATCH 08/10] drm/tegra: dsi: " Thierry Reding
2017-08-15 13:41 ` [PATCH 09/10] drm/tegra: dpaux: " Thierry Reding
2017-08-15 13:41 ` [PATCH 10/10] drm/tegra: sor: " 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=20170815134114.17547-3-thierry.reding@gmail.com \
--to=thierry.reding@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mperttunen@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.