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

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

 



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@xxxxxx>
[...]

MBR, Sergey





[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