From: Timur Tabi <ttabi@nvidia.com>
To: "christophe.jaillet@wanadoo.fr" <christophe.jaillet@wanadoo.fr>,
"philip.li@intel.com" <philip.li@intel.com>,
"simona@ffwll.ch" <simona@ffwll.ch>,
"lyude@redhat.com" <lyude@redhat.com>,
"pierre.morrow@free.fr" <pierre.morrow@free.fr>,
"airlied@gmail.com" <airlied@gmail.com>,
"jacob.e.keller@intel.com" <jacob.e.keller@intel.com>,
"dakr@kernel.org" <dakr@kernel.org>,
Ben Skeggs <bskeggs@nvidia.com>
Cc: "dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"nouveau@lists.freedesktop.org" <nouveau@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/nouveau/bl: Use kasprintf for interface name
Date: Wed, 4 Jun 2025 22:01:35 +0000 [thread overview]
Message-ID: <704b69a6af32e0d89a6d88051c12f29fdadfa638.camel@nvidia.com> (raw)
In-Reply-To: <20250604-jk-nouveua-drm-bl-snprintf-fix-v1-1-79b1593ad664@intel.com>
On Wed, 2025-06-04 at 14:03 -0700, Jacob Keller wrote:
> This could also be fixed by simply increasing BL_NAME_SIZE to 24, making it
> large enough to fit any size integer into its format string, or by checking
> the return value of snprintf.
I think this would be a better approach. backlist_name[24] is still small enough to fit on the
stack with ease, and it would eliminate the alloc/free churn. kasprintf() should be reserved for
long-term or larger allocations, IMHO.
next prev parent reply other threads:[~2025-06-04 22:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-04 21:03 Jacob Keller
2025-06-04 22:01 ` Timur Tabi [this message]
2025-06-04 22:16 ` Jacob Keller
2025-06-04 22:40 ` Timur Tabi
2025-06-04 22:46 ` Jacob Keller
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=704b69a6af32e0d89a6d88051c12f29fdadfa638.camel@nvidia.com \
--to=ttabi@nvidia.com \
--cc=airlied@gmail.com \
--cc=bskeggs@nvidia.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jacob.e.keller@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=nouveau@lists.freedesktop.org \
--cc=philip.li@intel.com \
--cc=pierre.morrow@free.fr \
--cc=simona@ffwll.ch \
/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®