From: "Péter Ujfalusi" <peter.ujfalusi@gmail.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
alsa-devel@alsa-project.org
Cc: tiwai@suse.de, broonie@kernel.org, linux-kernel@vger.kernel.org,
Jarkko Nikula <jarkko.nikula@bitmer.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
"open list:OMAP AUDIO SUPPORT" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 15/17] ASoC: ti: omap-mcsp: remove duplicate test
Date: Mon, 29 Mar 2021 08:56:03 +0300 [thread overview]
Message-ID: <38488f20-a155-607d-464e-9461e50bc765@gmail.com> (raw)
In-Reply-To: <20210326215927.936377-16-pierre-louis.bossart@linux.intel.com>
Hi Pierre,
On 3/26/21 11:59 PM, Pierre-Louis Bossart wrote:
> cppcheck warning:
>
> sound/soc/ti/omap-mcbsp.c:379:11: style: The if condition is the same
> as the previous if condition [duplicateCondition]
>
> if (mcbsp->irq) {
> ^
> sound/soc/ti/omap-mcbsp.c:376:11: note: First condition
> if (mcbsp->irq)
> ^
> sound/soc/ti/omap-mcbsp.c:379:11: note: Second condition
> if (mcbsp->irq) {
> ^
>
> Keeping two separate tests was probably intentional for clarity, but
> since this generates warnings we might as well make cppcheck happy so
> that we have fewer warnings.
There might be other historical reasons why it ended up like this but
merging them does not make it less cleaner.
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> ---
> sound/soc/ti/omap-mcbsp.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/sound/soc/ti/omap-mcbsp.c b/sound/soc/ti/omap-mcbsp.c
> index 6025b30bbe77..db47981768c5 100644
> --- a/sound/soc/ti/omap-mcbsp.c
> +++ b/sound/soc/ti/omap-mcbsp.c
> @@ -373,10 +373,9 @@ static void omap_mcbsp_free(struct omap_mcbsp *mcbsp)
> MCBSP_WRITE(mcbsp, WAKEUPEN, 0);
>
> /* Disable interrupt requests */
> - if (mcbsp->irq)
> + if (mcbsp->irq) {
> MCBSP_WRITE(mcbsp, IRQEN, 0);
>
> - if (mcbsp->irq) {
> free_irq(mcbsp->irq, (void *)mcbsp);
> } else {
> free_irq(mcbsp->rx_irq, (void *)mcbsp);
>
--
Péter
prev parent reply other threads:[~2021-03-29 5:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210326215927.936377-1-pierre-louis.bossart@linux.intel.com>
2021-03-26 21:59 ` [PATCH 14/17] ASoC: ti: omap-abe-twl6040: remove useless assignment Pierre-Louis Bossart
2021-03-29 5:52 ` Péter Ujfalusi
2021-03-26 21:59 ` [PATCH 15/17] ASoC: ti: omap-mcsp: remove duplicate test Pierre-Louis Bossart
2021-03-29 5:56 ` Péter Ujfalusi [this message]
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=38488f20-a155-607d-464e-9461e50bc765@gmail.com \
--to=peter.ujfalusi@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=jarkko.nikula@bitmer.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tiwai@suse.com \
--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;
as well as URLs for NNTP newsgroup(s).