From: Luis Chamberlain <mcgrof@kernel.org>
To: Tom Rix <trix@redhat.com>
Cc: nathan@kernel.org, ndesaulniers@google.com,
linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH] module: remove use of uninitialized variable len
Date: Mon, 17 Apr 2023 16:32:19 -0700 [thread overview]
Message-ID: <ZD3XA/OBdHEhzX5q@bombadil.infradead.org> (raw)
In-Reply-To: <20230417230957.3221615-1-trix@redhat.com>
On Mon, Apr 17, 2023 at 07:09:57PM -0400, Tom Rix wrote:
> clang build reports
> kernel/module/stats.c:307:34: error: variable
> 'len' is uninitialized when used here [-Werror,-Wuninitialized]
> len = scnprintf(buf + 0, size - len,
> ^~~
> At the start of this sequence, neither the '+ 0', nor the '- len' are needed.
> So remove them and fix using 'len' uninitalized.
>
> Fixes: 0d4ab68ce983 ("module: add debug stats to help identify memory pressure")
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
Thanks, applied and pushed!
Luis
prev parent reply other threads:[~2023-04-17 23:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-17 23:09 [PATCH] module: remove use of uninitialized variable len Tom Rix
2023-04-17 23:32 ` Luis Chamberlain [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=ZD3XA/OBdHEhzX5q@bombadil.infradead.org \
--to=mcgrof@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=trix@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).