From: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
To: Oded Gabbay <ogabbay@kernel.org>
Cc: Tomer Tayar <ttayar@habana.ai>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/2] habanalabs: use scnprintf() in print_device_in_use_info()
Date: Thu, 2 Mar 2023 11:25:29 +0100 [thread overview]
Message-ID: <20230302102529.GC3963532@linux.intel.com> (raw)
In-Reply-To: <20230302091517.14896-2-ogabbay@kernel.org>
On Thu, Mar 02, 2023 at 11:15:17AM +0200, Oded Gabbay wrote:
> From: Tomer Tayar <ttayar@habana.ai>
>
> compose_device_in_use_info() was added to handle the snprintf() return
> value in a single place.
> However, the buffer size in print_device_in_use_info() is set such that
> it would be enough for the max possible print, so
> compose_device_in_use_info() is not really needed.
> Moreover, scnprintf() can be used instead of snprintf(), to save the
> check if the return value larger than the given size.
>
> Cc: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
> Signed-off-by: Tomer Tayar <ttayar@habana.ai>
> Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
next prev parent reply other threads:[~2023-03-02 10:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-02 9:15 [PATCH 1/2] habanalabs: unify err log of hw-fini failure in dirty state Oded Gabbay
2023-03-02 9:15 ` [PATCH 2/2] habanalabs: use scnprintf() in print_device_in_use_info() Oded Gabbay
2023-03-02 10:25 ` Stanislaw Gruszka [this message]
2023-03-02 10:27 ` [PATCH 1/2] habanalabs: unify err log of hw-fini failure in dirty state Stanislaw Gruszka
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=20230302102529.GC3963532@linux.intel.com \
--to=stanislaw.gruszka@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=ogabbay@kernel.org \
--cc=ttayar@habana.ai \
/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