Re: [PATCH] of: module: remove strlen() call in of_modalias()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
> 
> ---
> 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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux