mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Sebastian Reichel <sre@kernel.org>, Kees Cook <kees@kernel.org>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-hardening@vger.kernel.org
Subject: Re: [PATCH] power: supply: sysfs: Remove duplicate NUL termination
Date: Mon, 28 Apr 2025 01:27:25 +0200	[thread overview]
Message-ID: <174579644553.306236.1161318959919770313.b4-ty@collabora.com> (raw)
In-Reply-To: <20250416222740.work.569-kees@kernel.org>


On Wed, 16 Apr 2025 15:27:41 -0700, Kees Cook wrote:
> GCC 15's new -Wunterminated-string-initialization notices that one of
> the sysfs attr strings would lack the implicit trailing NUL byte during
> initialization:
> 
> drivers/power/supply/power_supply_sysfs.c:183:57: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (32 chars into 31 available) [-Wunterminated-string-initialization]
>   183 |         POWER_SUPPLY_ATTR(CHARGE_CONTROL_START_THRESHOLD),
>       |                                                         ^
> drivers/power/supply/power_supply_sysfs.c:36:23: note: in definition of macro '_POWER_SUPPLY_ATTR'
>    36 |         .attr_name = #_name "\0",               \
>       |                       ^~~~~
> drivers/power/supply/power_supply_sysfs.c:183:9: note: in expansion of macro 'POWER_SUPPLY_ATTR'
>   183 |         POWER_SUPPLY_ATTR(CHARGE_CONTROL_START_THRESHOLD),
>       |         ^~~~~~~~~~~~~~~~~
> 
> [...]

Applied, thanks!

[1/1] power: supply: sysfs: Remove duplicate NUL termination
      commit: 77f5bb150132bbbcd6bc37ffdc80c9e140e373a4

Best regards,
-- 
Sebastian Reichel <sebastian.reichel@collabora.com>


      reply	other threads:[~2025-04-27 23:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-16 22:27 Kees Cook
2025-04-27 23:27 ` Sebastian Reichel [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=174579644553.306236.1161318959919770313.b4-ty@collabora.com \
    --to=sebastian.reichel@collabora.com \
    --cc=kees@kernel.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=sre@kernel.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

all inboxes | Powered by JetHome®