From: Sameer Pujar <spujar@nvidia.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [bug report] ASoC: tegra: Add Tegra210 based OPE driver
Date: Tue, 14 Jun 2022 09:47:21 +0530 [thread overview]
Message-ID: <8553b100-efd6-cd6f-f57b-671fe830a577@nvidia.com> (raw)
In-Reply-To: <YqdFcPETMQGZm9AK@kili>
On 13-06-2022 19:40, Dan Carpenter wrote:
> Hello Sameer Pujar,
>
> The patch 7358a803c778: "ASoC: tegra: Add Tegra210 based OPE driver"
> from Jun 3, 2022, leads to the following Smatch static checker
> warning:
>
> sound/soc/tegra/tegra210_mbdrc.c:778 tegra210_mbdrc_hw_params()
> warn: bitwise AND condition is false here
>
> sound/soc/tegra/tegra210_mbdrc.c
> 769 int tegra210_mbdrc_hw_params(struct snd_soc_component *cmpnt)
> 770 {
> 771 struct tegra210_ope *ope = snd_soc_component_get_drvdata(cmpnt);
> 772 const struct tegra210_mbdrc_config *conf = &mbdrc_init_config;
> 773 u32 val = 0;
> 774 unsigned int i;
> 775
> 776 regmap_read(ope->mbdrc_regmap, TEGRA210_MBDRC_CFG, &val);
> 777
> --> 778 if (val & TEGRA210_MBDRC_CFG_MBDRC_MODE_BYPASS)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> TEGRA210_MBDRC_CFG_MBDRC_MODE_BYPASS is zero so this can't be true.
>
> #define TEGRA210_MBDRC_CFG_MBDRC_MODE_BYPASS (0 << TEGRA210_MBDRC_CFG_MBDRC_MODE_SHIFT)
>
> The common false positive with this warning is that the macro is
> something which depends on the .config and in that case I just add it
> to the list in smatch_data/kernel.unconstant_macros. But in this case
> the macro is just always zero... Is there a plan to make it
> configurable or something?
Thanks Dan for reporting this. The device is actually configurable. I
will provide a patch to fix above condition.
next prev parent reply other threads:[~2022-06-14 4:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-13 14:10 [bug report] ASoC: tegra: Add Tegra210 based OPE driver Dan Carpenter
2022-06-14 4:17 ` Sameer Pujar [this message]
2022-06-14 6:09 ` Dan Carpenter
2022-06-15 4:46 ` Sameer Pujar
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=8553b100-efd6-cd6f-f57b-671fe830a577@nvidia.com \
--to=spujar@nvidia.com \
--cc=alsa-devel@alsa-project.org \
--cc=dan.carpenter@oracle.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