From: Dan Carpenter <error27@gmail.com>
To: "Trevor Wu (吳文良)" <Trevor.Wu@mediatek.com>
Cc: "linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>
Subject: Re: [bug report] ASoC: mediatek: mt8188: support etdm in platform driver
Date: Mon, 30 Jan 2023 14:40:07 +0300 [thread overview]
Message-ID: <Y9esl7VQ6qW9wnIC@kadam> (raw)
In-Reply-To: <8260fa7da639c118ec6757e6d3e25320924dcbca.camel@mediatek.com>
On Mon, Jan 30, 2023 at 09:25:52AM +0000, Trevor Wu (吳文良) wrote:
> Hi Dan,
>
> Thank you for catching that.
> I didn't notice that snprintf() never returns a negative value in
> kernel code.
> It is possible that I misunderstood the coverity error message, but I
> can't find the original coverity scan result.
>
> If I just remove the dead code, coverity will report some errors in the
> future.
> As a result, I prefer to keep the line and add another check "ret >=
> sizeof(prop)", so that we can avoid the problem reported by coverity
> and Smatch.
Generally, when static checkers print nonsense warnings you should just
ignore them instead of adding dead code so I would encourage to delete
the dead code even though Coverity complains. Fix what is broken
instead of just working around it.
regards,
dan carpenter
next prev parent reply other threads:[~2023-01-30 11:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 12:13 [bug report] ASoC: mediatek: mt8188: support etdm in platform driver Dan Carpenter
2023-01-30 9:25 ` Trevor Wu (吳文良)
2023-01-30 11:40 ` Dan Carpenter [this message]
2023-01-31 2:26 ` Trevor Wu (吳文良)
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=Y9esl7VQ6qW9wnIC@kadam \
--to=error27@gmail.com \
--cc=Trevor.Wu@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
/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.