From: Alex Elder <elder@ieee.org>
To: Thorsten Blum <thorsten.blum@linux.dev>
Cc: Viresh Kumar <vireshk@kernel.org>,
Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: greybus: Remove unnecessary NUL-termination checks
Date: Tue, 1 Apr 2025 14:55:14 -0500 [thread overview]
Message-ID: <bd773190-1cdd-4faf-be39-ea042d6e8124@ieee.org> (raw)
In-Reply-To: <9288204E-F6B7-4C9D-AADB-511A845A2624@linux.dev>
On 4/1/25 2:51 PM, Thorsten Blum wrote:
> On 1. Apr 2025, at 01:31, Alex Elder wrote:
>> On 3/31/25 1:39 PM, Thorsten Blum wrote:
>>> @@ -125,16 +125,6 @@ static int fw_mgmt_interface_fw_version_operation(struct fw_mgmt *fw_mgmt,
>>> strscpy_pad(fw_info->firmware_tag, response.firmware_tag);
>>> - /*
>>> - * The firmware-tag should be NULL terminated, otherwise throw error but
>>> - * don't fail.
>>> - */
>>> - if (fw_info->firmware_tag[GB_FIRMWARE_TAG_MAX_SIZE - 1] != '\0') {
>>> - dev_err(fw_mgmt->parent,
>>> - "fw-version: firmware-tag is not NULL terminated\n");
>>> - fw_info->firmware_tag[GB_FIRMWARE_TAG_MAX_SIZE - 1] = '\0';
>>> - }
>>
>> Interesting this didn't return an error, while others below did.
>
> Should I keep it that way when checking for a truncated firmware tag or
> should this also fail like the others?
>
> Thanks,
> Thorsten
>
I don't know the answer right now, and I don't have time at
the moment to investigate. Just keep that logic the way it
is, and make your other fix.
-Alex
prev parent reply other threads:[~2025-04-01 19:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-31 18:39 Thorsten Blum
2025-03-31 23:31 ` Alex Elder
2025-04-01 19:51 ` Thorsten Blum
2025-04-01 19:55 ` Alex Elder [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=bd773190-1cdd-4faf-be39-ea042d6e8124@ieee.org \
--to=elder@ieee.org \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=thorsten.blum@linux.dev \
--cc=vireshk@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®