Re: [PATCH 2/2] habanalabs: use scnprintf() in print_device_in_use_info()

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

 



On Thu, Mar 02, 2023 at 11:15:17AM +0200, Oded Gabbay wrote:
> From: Tomer Tayar <ttayar@xxxxxxxxx>
> 
> 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@xxxxxxxxxxxxxxx>
> Signed-off-by: Tomer Tayar <ttayar@xxxxxxxxx>
> Reviewed-by: Oded Gabbay <ogabbay@xxxxxxxxxx>
> Signed-off-by: Oded Gabbay <ogabbay@xxxxxxxxxx>

Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@xxxxxxxxxxxxxxx>



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux