Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Trevor Wu (吳文良)" <Trevor.Wu@mediatek.com>
To: "error27@gmail.com" <error27@gmail.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: Tue, 31 Jan 2023 02:26:39 +0000	[thread overview]
Message-ID: <8a28b741dc71c0cdd97564e2dcd6fba497484f91.camel@mediatek.com> (raw)
In-Reply-To: <Y9esl7VQ6qW9wnIC@kadam>

On Mon, 2023-01-30 at 14:40 +0300, Dan Carpenter wrote:
> 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
> 

Got it. I will prepare a patch and remove the dead code.

Thanks,
Trevor

      reply	other threads:[~2023-01-31  2:27 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
2023-01-31  2:26     ` Trevor Wu (吳文良) [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=8a28b741dc71c0cdd97564e2dcd6fba497484f91.camel@mediatek.com \
    --to=trevor.wu@mediatek.com \
    --cc=error27@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox