Lee Jones 30cc6aa09e scsi: 3w-xxxx: Remove snprintf() from sysfs call-backs and replace with sysfs_emit()
Since snprintf() has the documented, but still rather strange trait of
returning the length of the data that *would have been* written to the
array if space were available, rather than the arguably more useful
length of data *actually* written, it is usually considered wise to use
something else instead in order to avoid confusion.

In the case of sysfs call-backs, new wrappers exist that do just that.

Link: https://lwn.net/Articles/69419/
Link: https://github.com/KSPP/linux/issues/105
Cc: Adam Radford <aradford@gmail.com>
Cc: Joel Jacobson <linux@3ware.com>
Cc: de Melo <acme@conectiva.com.br>
Cc: Andre Hedrick <andre@suse.com>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20240111131732.1815560-4-lee@kernel.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2024-01-29 20:34:52 -05:00
..
2024-01-11 14:24:32 -08:00
2023-10-13 14:15:54 -04:00
2023-04-27 11:53:57 -07:00
2023-10-13 16:36:20 -04:00
2024-01-17 16:23:17 -08:00
2023-05-31 19:59:26 -04:00
2023-05-26 13:52:19 -07:00
2023-04-18 23:01:23 -04:00
2022-06-27 22:56:21 -04:00
2022-02-22 21:11:02 -05:00
2024-01-20 09:42:32 -08:00
2023-10-13 16:36:20 -04:00
2023-11-02 15:13:50 -10:00
2022-05-08 14:28:18 -04:00
2023-04-27 11:53:57 -07:00
2023-10-13 16:36:20 -04:00
2023-05-31 11:36:40 -04:00