From: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name>
To: Fabio Estevam <festevam@gmail.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Timur Tabi <timur@tabi.org>,
Nicolin Chen <nicoleotsuka@gmail.com>,
Xiubo Li <Xiubo.Lee@gmail.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.de>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/6] ASoC: fsl_ssi: enable IPG clock during AC'97 reg access
Date: Thu, 30 Jul 2015 17:23:09 +0200 [thread overview]
Message-ID: <55BA415D.4080706@maciej.szmigiero.name> (raw)
In-Reply-To: <CAOMZO5DJhCXr0oxY7q4TKs0AVS4nW6tDq4EHSGQHOZwf95YWWw@mail.gmail.com>
Hi Fabio,
On 30.07.2015 17:20, Fabio Estevam wrote:
> Hi Maciej,
>
> On Thu, Jul 30, 2015 at 11:33 AM, Maciej S. Szmigiero
> <mail@maciej.szmigiero.name> wrote:
>
>> static unsigned short fsl_ssi_ac97_read(struct snd_ac97 *ac97,
>> @@ -1151,6 +1160,14 @@ static unsigned short fsl_ssi_ac97_read(struct snd_ac97 *ac97,
>> unsigned short val = -1;
>> u32 reg_val;
>> unsigned int lreg;
>> + int ret;
>> +
>> + ret = clk_prepare_enable(fsl_ac97_data->clk);
>> + if (ret) {
>> + pr_err("ac97 read clk_prepare_enable failed: %d\n",
>> + ret);
>> + return -1;
>
> return ret, please.
>
This function normal return value is an AC'97 register value,
so isn't more appropriate to return 0xffff in case of error
than linux error code?
Best regards,
Maciej Szmigiero
next prev parent reply other threads:[~2015-07-30 15:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-30 14:33 [PATCH 1/6] ASoC: fsl_ssi: enable IPG clock during AC'97 reg access Maciej S. Szmigiero
2015-07-30 15:20 ` Fabio Estevam
2015-07-30 15:23 ` Maciej S. Szmigiero [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-06-28 13:44 Maciej S. Szmigiero
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=55BA415D.4080706@maciej.szmigiero.name \
--to=mail@maciej.szmigiero.name \
--cc=Xiubo.Lee@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nicoleotsuka@gmail.com \
--cc=perex@perex.cz \
--cc=timur@tabi.org \
--cc=tiwai@suse.de \
/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