From: "Rob Herring (Arm)" <robh@kernel.org>
To: Sergey Shtylyov <s.shtylyov@omp.ru>
Cc: devicetree@vger.kernel.org, Saravana Kannan <saravanak@google.com>
Subject: Re: [PATCH] of: module: remove strlen() call in of_modalias()
Date: Wed, 16 Oct 2024 12:12:03 -0500 [thread overview]
Message-ID: <172909799906.1907345.10114705155151894989.robh@kernel.org> (raw)
In-Reply-To: <471418be-5d2f-4d14-bd9e-9e8f0526241f@omp.ru>
On Tue, 15 Oct 2024 23:15:04 +0300, 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
> space...
>
> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
>
> ---
> The patch is against the dt/next branch of Rob Herring's linux.git repo...
>
> drivers/of/module.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
Fixed the typo and applied, thanks!
Rob
prev parent reply other threads:[~2024-10-16 17:12 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
2024-10-16 17:12 ` Rob Herring (Arm) [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=172909799906.1907345.10114705155151894989.robh@kernel.org \
--to=robh@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=s.shtylyov@omp.ru \
--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