From: Jakob Koschel <jakobkoschel@gmail.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Vaibhav Agarwal <vaibhav.sr@gmail.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
Mark Greer <mgreer@animalcreek.com>,
Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mike Rapport <rppt@kernel.org>,
Brian Johannesmeyer <bjohannesmeyer@gmail.com>,
Cristiano Giuffrida <c.giuffrida@vu.nl>,
"Bos, H.J." <h.j.bos@vu.nl>
Subject: Re: [PATCH] staging: greybus: codecs: fix type confusion with dedicated list iterator variable
Date: Mon, 21 Mar 2022 10:06:13 +0100 [thread overview]
Message-ID: <23587784-B0EB-4FDD-B5BC-DC1B16404DA7@gmail.com> (raw)
In-Reply-To: <20220321084844.GG3293@kadam>
> On 21. Mar 2022, at 09:48, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> The subject says that it fixes a bug but it does not.
Thank you for your review!
I don't agree that this doesn't fix a bug:
> + }
> }
> if (!data) {
> - dev_err(dai->dev, "%s:%s DATA connection missing\n",
> - dai->name, module->name);
Using 'module' when data == NULL is *guaranteed* to be a type confused
bogus pointer. It fundamentally can never be correct.
If I should still change the wording please let me know.
> + dev_err(dai->dev, "%s DATA connection missing\n",
> + dai->name);
> mutex_unlock(&codec->lock);
> return -ENODEV;
> }
>
> On Sat, Mar 19, 2022 at 09:20:58PM +0100, Jakob Koschel wrote:
>> If the list does not exit early then data == NULL and 'module' does not
>> point to a valid list element.
>> Using 'module' in such a case is not valid and was therefore removed.
>
> This paragraph is confusing jumble words. Just say: "This code is fine".
>
>>
>> In preparation to limit the scope of the list iterator to the list
>> traversal loop, use a dedicated pointer pointing to the found element [1].
>
> This paragraph is the information we need. Just add something like
> "This patch has no effect on runtime".
As mentioned above, this code effects runtime (in one out of the two cases).
>
> regards,
> dan carpenter
Thanks,
Jakob
next prev parent reply other threads:[~2022-03-21 9:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-19 20:20 [PATCH] staging: greybus: codecs: fix type confusion with dedicated list iterator variable Jakob Koschel
2022-03-21 8:48 ` Dan Carpenter
2022-03-21 9:06 ` Jakob Koschel [this message]
2022-03-21 9:21 ` Dan Carpenter
2022-03-21 9:27 ` Jakob Koschel
2022-03-21 12:18 ` [greybus-dev] " Alex Elder
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=23587784-B0EB-4FDD-B5BC-DC1B16404DA7@gmail.com \
--to=jakobkoschel@gmail.com \
--cc=bjohannesmeyer@gmail.com \
--cc=c.giuffrida@vu.nl \
--cc=dan.carpenter@oracle.com \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=h.j.bos@vu.nl \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mgreer@animalcreek.com \
--cc=rppt@kernel.org \
--cc=vaibhav.sr@gmail.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