linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: "Mario Limonciello (AMD)" <superm1@kernel.org>,
	"mario.limonciello@amd.com" <mario.limonciello@amd.com>,
	"nbd@nbd.name" <nbd@nbd.name>,
	"lorenzo@kernel.org" <lorenzo@kernel.org>,
	"ryder.lee@mediatek.com" <ryder.lee@mediatek.com>,
	"shayne.chen@mediatek.com" <shayne.chen@mediatek.com>,
	"sean.wang@mediatek.com" <sean.wang@mediatek.com>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"angelogioacchino.delregno@collabora.com"
	<angelogioacchino.delregno@collabora.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>
Subject: RE: [PATCH] wifi: mt76: Strip whitespace from build ddate
Date: Fri, 21 Nov 2025 06:01:50 +0000	[thread overview]
Message-ID: <a29d737be885490586c30be6262835c8@realtek.com> (raw)
In-Reply-To: <20251120155829.3494747-1-superm1@kernel.org>

Mario Limonciello (AMD) <superm1@kernel.org> wrote:
> @@ -3124,8 +3125,11 @@ int mt76_connac2_load_patch(struct mt76_dev *dev, const char *fw_name)
>         }
> 
>         hdr = (const void *)fw->data;
> +       strscpy(build_date, hdr->build_date, sizeof(build_date));
> +       build_date[16] = '\0';

As comment of strscpy(), NULL terminator always presents.

 * Copy the source string @src, or as much of it as fits, into the
 * destination @dst buffer. The behavior is undefined if the string
 * buffers overlap. The destination @dst buffer is always NUL terminated,
 * unless it's zero-sized.

> +       strim(build_date);
>         dev_info(dev->dev, "HW/SW Version: 0x%x, Build Time: %.16s\n",
> -                be32_to_cpu(hdr->hw_sw_ver), hdr->build_date);
> +                be32_to_cpu(hdr->hw_sw_ver), build_date);
> 
>         for (i = 0; i < be32_to_cpu(hdr->desc.n_region); i++) {
>                 struct mt76_connac2_patch_sec *sec;
> --
> 2.43.0
> 



      reply	other threads:[~2025-12-13  2:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-20 15:58 [PATCH] wifi: mt76: Strip whitespace from build ddate Mario Limonciello (AMD)
2025-11-21  6:01 ` Ping-Ke Shih [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=a29d737be885490586c30be6262835c8@realtek.com \
    --to=pkshih@realtek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@nbd.name \
    --cc=ryder.lee@mediatek.com \
    --cc=sean.wang@mediatek.com \
    --cc=shayne.chen@mediatek.com \
    --cc=superm1@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;
as well as URLs for NNTP newsgroup(s).