All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Tony Jones <tonyj@suse.de>
Cc: Michal Suchanek <msuchanek@suse.de>, linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf hwmon_pmu: Fix uninitialized variable warning
Date: Thu, 23 Oct 2025 19:10:16 -0700	[thread overview]
Message-ID: <aPrgCDJ_HqSzq9V1@google.com> (raw)
In-Reply-To: <aPqoGTyM9nKSQYQ9@suse.de>

On Thu, Oct 23, 2025 at 03:11:37PM -0700, Tony Jones wrote:
> On Thu, Oct 23, 2025 at 02:50:43PM -0700, Namhyung Kim wrote:
> > Hello,
> > 
> > On Wed, Oct 22, 2025 at 12:38:35PM +0200, Michal Suchanek wrote:
> > > The line_len is only set on success. Check the return value instead.
> > 
> > Can you please share the actual warning messages from the compiler?
> > 
> > Thanks,
> > Namhyung
> 
> [snipped CC]
> 
> I believe it was the following (gcc13):
> 
> [   38s] util/hwmon_pmu.c: In function ‘perf_pmus__read_hwmon_pmus’:
> [   38s] util/hwmon_pmu.c:742:20: warning: ‘line_len’ may be used uninitialized [-Wmaybe-uninitialized]
> [   38s]   742 |                 if (line_len > 0 && line[line_len - 1] == '\n')
> [   38s]       |                    ^
> [   38s] util/hwmon_pmu.c:719:24: note: ‘line_len’ was declared here
> [   38s]   719 |                 size_t line_len;
> [   38s]  

Great, I'll add this to the commit log.

Thanks,
Namhyung


  reply	other threads:[~2025-10-24  2:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-22 10:38 [PATCH] perf hwmon_pmu: Fix uninitialized variable warning Michal Suchanek
2025-10-23 21:50 ` Namhyung Kim
2025-10-23 22:11   ` Tony Jones
2025-10-24  2:10     ` Namhyung Kim [this message]
2025-10-30  3:46 ` Namhyung Kim

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=aPrgCDJ_HqSzq9V1@google.com \
    --to=namhyung@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=msuchanek@suse.de \
    --cc=tonyj@suse.de \
    /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.