On Tue, 12 Dec 2023 23:19:06 +, Justin Stitt wrote:
> Instead of copying @buf into a new buffer and carefully managing its
> newline/null-terminating status, we can just use sysfs_match_string()
> as it uses sysfs_streq() internally which handles newline/null-term:
>
> | /**
> | * sysfs_st
Justin,
> Instead of copying @buf into a new buffer and carefully managing its
> newline/null-terminating status, we can just use sysfs_match_string()
> as it uses sysfs_streq() internally which handles newline/null-term:
Applied to 6.8/scsi-staging, thanks!
--
Martin K. Petersen Oracle
On 12/13/23 00:19, Justin Stitt wrote:
Instead of copying @buf into a new buffer and carefully managing its
newline/null-terminating status, we can just use sysfs_match_string()
as it uses sysfs_streq() internally which handles newline/null-term:
| /**
| * sysfs_streq - return true if strings
On Tue, Dec 12, 2023 at 11:19:06PM +, Justin Stitt wrote:
> Instead of copying @buf into a new buffer and carefully managing its
> newline/null-terminating status, we can just use sysfs_match_string()
> as it uses sysfs_streq() internally which handles newline/null-term:
>
> | /**
> | * sys
Instead of copying @buf into a new buffer and carefully managing its
newline/null-terminating status, we can just use sysfs_match_string()
as it uses sysfs_streq() internally which handles newline/null-term:
| /**
| * sysfs_streq - return true if strings are equal, modulo trailing newline
| *