From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: <devicetree@vger.kernel.org>,
Saravana Kannan <saravanak@google.com>,
Rob Herring <robh@kernel.org>
Subject: Re: [PATCH] of: module: remove strlen() call in of_modalias()
Date: Tue, 15 Oct 2024 23:18:25 +0300 [thread overview]
Message-ID: <5b0ad893-60c1-422a-a935-4d4aa266214b@omp.ru> (raw)
In-Reply-To: <471418be-5d2f-4d14-bd9e-9e8f0526241f@omp.ru>
On 10/15/24 11:15 PM, Sergey Shtylyov wrote:
> In of_modalias(), there's no dire need to call strlen() (and then add 1
> to its result to account for the 'C' char preceding the compat string).
> Replace that strlen() with snprintf() (currently below it) -- this way,
> we always try to print the compat string but then only advance the str
> and len parameters iff the comapt string fit into the remaining buffer
Oops, compat! :-)
> space...
>
> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
[...]
MBR, Sergey
next prev parent reply other threads:[~2024-10-15 20:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 20:15 [PATCH] of: module: remove strlen() call in of_modalias() Sergey Shtylyov
2024-10-15 20:18 ` Sergey Shtylyov [this message]
2024-10-16 17:12 ` Rob Herring (Arm)
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=5b0ad893-60c1-422a-a935-4d4aa266214b@omp.ru \
--to=s.shtylyov@omp.ru \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=saravanak@google.com \
/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