From: Timur Tabi <ttabi@nvidia.com>
To: "dakr@redhat.com" <dakr@redhat.com>
Cc: "airlied@redhat.com" <airlied@redhat.com>,
"nouveau@lists.freedesktop.org" <nouveau@lists.freedesktop.org>,
"lyude@redhat.com" <lyude@redhat.com>,
Ben Skeggs <bskeggs@nvidia.com>
Subject: Re: [PATCH] [v7] nouveau: add command-line GSP-RM registry support
Date: Thu, 25 Apr 2024 16:38:19 +0000 [thread overview]
Message-ID: <913052ca6c0988db1bab293cfae38529251b4594.camel@nvidia.com> (raw)
In-Reply-To: <162ef3c0-1d7b-4220-a21f-b0008657f8a5@redhat.com>
On Thu, 2024-04-25 at 15:22 +0200, Danilo Krummrich wrote:
> > + size_t length;
> > +
> > + /* Remove any whitespace from the parameter string */
> > + length = strip(p, " \t\n");
>
> With that, I see the following warning compiling this patch.
>
> warning: variable ‘length’ set but not used [-Wunused-but-set-variable]
>
> Did you intend to use the length for anything?
No, and I could have sworn I fixed that before sending out v7. I think I
originally intended 'length' to determine when I finished parsing the
string.
> Also, looking at the warning made me aware of 'p' potentially being NULL.
>
> If you agree, I can fix the warning and add the corresponding NULL check
> when
> applying the patch.
Yes, that would be great. You can just delete 'length'. The NULL check for
'p' should call clean_registry() before returning -ENOMEM.
Thanks for catching this.
next prev parent reply other threads:[~2024-04-25 16:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 21:53 [PATCH] [v7] nouveau: add command-line GSP-RM registry support Timur Tabi
2024-04-18 15:57 ` Danilo Krummrich
2024-04-25 13:22 ` Danilo Krummrich
2024-04-25 16:38 ` Timur Tabi [this message]
2024-04-26 16:08 ` Danilo Krummrich
2024-04-30 13:06 ` Lucas De Marchi
2024-04-30 13:15 ` Danilo Krummrich
[not found] ` <c5ff8d3e-ecfc-4970-86c0-540b75b4be2e@ti.com>
2024-04-29 12:40 ` Timur Tabi
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=913052ca6c0988db1bab293cfae38529251b4594.camel@nvidia.com \
--to=ttabi@nvidia.com \
--cc=airlied@redhat.com \
--cc=bskeggs@nvidia.com \
--cc=dakr@redhat.com \
--cc=lyude@redhat.com \
--cc=nouveau@lists.freedesktop.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;
as well as URLs for NNTP newsgroup(s).