From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>
Subject: [PATCH 7/8] ASoC: fsi: Add pr_err for noticing unsupported access
Date: Mon, 12 Jul 2010 14:56:25 +0900 (JST) [thread overview]
Message-ID: <w3phbk5dz07.wl%kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <w3pr5j9dz2s.wl%kuninori.morimoto.gx@renesas.com>
This patch didn't use dev_err,
because it is difficult to get struct device here.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
sound/soc/sh/fsi.c | 24 ++++++++++++++++++------
1 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
index 1693be4..e551ca4 100644
--- a/sound/soc/sh/fsi.c
+++ b/sound/soc/sh/fsi.c
@@ -161,24 +161,30 @@ static void __fsi_reg_mask_set(u32 reg, u32 mask, u32 data)
static void fsi_reg_write(struct fsi_priv *fsi, u32 reg, u32 data)
{
- if (reg > REG_END)
+ if (reg > REG_END) {
+ pr_err("fsi: register access err (%s)\n", __func__);
return;
+ }
__fsi_reg_write((u32)(fsi->base + reg), data);
}
static u32 fsi_reg_read(struct fsi_priv *fsi, u32 reg)
{
- if (reg > REG_END)
+ if (reg > REG_END) {
+ pr_err("fsi: register access err (%s)\n", __func__);
return 0;
+ }
return __fsi_reg_read((u32)(fsi->base + reg));
}
static void fsi_reg_mask_set(struct fsi_priv *fsi, u32 reg, u32 mask, u32 data)
{
- if (reg > REG_END)
+ if (reg > REG_END) {
+ pr_err("fsi: register access err (%s)\n", __func__);
return;
+ }
__fsi_reg_mask_set((u32)(fsi->base + reg), mask, data);
}
@@ -188,8 +194,10 @@ static void fsi_master_write(struct fsi_master *master, u32 reg, u32 data)
unsigned long flags;
if ((reg < MREG_START) ||
- (reg > MREG_END))
+ (reg > MREG_END)) {
+ pr_err("fsi: register access err (%s)\n", __func__);
return;
+ }
spin_lock_irqsave(&master->lock, flags);
__fsi_reg_write((u32)(master->base + reg), data);
@@ -202,8 +210,10 @@ static u32 fsi_master_read(struct fsi_master *master, u32 reg)
unsigned long flags;
if ((reg < MREG_START) ||
- (reg > MREG_END))
+ (reg > MREG_END)) {
+ pr_err("fsi: register access err (%s)\n", __func__);
return 0;
+ }
spin_lock_irqsave(&master->lock, flags);
ret = __fsi_reg_read((u32)(master->base + reg));
@@ -218,8 +228,10 @@ static void fsi_master_mask_set(struct fsi_master *master,
unsigned long flags;
if ((reg < MREG_START) ||
- (reg > MREG_END))
+ (reg > MREG_END)) {
+ pr_err("fsi: register access err (%s)\n", __func__);
return;
+ }
spin_lock_irqsave(&master->lock, flags);
__fsi_reg_mask_set((u32)(master->base + reg), mask, data);
--
1.7.0.4
next prev parent reply other threads:[~2010-07-12 5:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-12 5:54 [PATCH 0/8] ASoC: fsi: fixup patches Kuninori Morimoto
2010-07-12 5:55 ` [PATCH 1/8] ASoC: fsi: modify format area definition on flags Kuninori Morimoto
2010-07-12 8:54 ` Mark Brown
2010-07-13 1:22 ` Kuninori Morimoto
2010-07-13 8:55 ` Mark Brown
2010-07-13 9:08 ` Kuninori Morimoto
2010-07-12 5:56 ` [PATCH 2/8] ASoC: fsi: fixup clock inversion operation Kuninori Morimoto, Kuninori Morimoto
2010-07-12 5:56 ` [PATCH 3/8] ASoC: fsi: remove un-used variable on fsi_dai_startup Kuninori Morimoto, Kuninori Morimoto
2010-07-12 5:56 ` [PATCH 4/8] ASoC: fsi: remove noisy CR_FMT macro Kuninori Morimoto, Kuninori Morimoto
2010-07-12 5:56 ` [PATCH 5/8] ASoC: fsi: modify wrong value setting order of TDM Kuninori Morimoto, Kuninori Morimoto
2010-07-12 9:00 ` Mark Brown
2010-07-12 5:56 ` [PATCH 6/8] ASoC: fsi: Change struct fsi_regs to fsi_core Kuninori Morimoto, Kuninori Morimoto
2010-07-12 5:56 ` Kuninori Morimoto, Kuninori Morimoto [this message]
2010-07-12 5:56 ` [PATCH 8/8] ASoC: fsi: Fixup for master mode Kuninori Morimoto
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=w3phbk5dz07.wl%kuninori.morimoto.gx@renesas.com \
--to=kuninori.morimoto.gx@renesas.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.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).