[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <170294822166.2675590.301399188654325708.b4-ty@oracle.com>
Date: Mon, 18 Dec 2023 21:18:48 -0500
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: Hannes Reinecke <hare@...e.de>,
"James E.J. Bottomley" <jejb@...ux.ibm.com>,
Bart Van Assche <bvanassche@....org>,
Justin Stitt <justinstitt@...gle.com>
Cc: "Martin K . Petersen" <martin.petersen@...cle.com>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH v2] scsi: fcoe: use sysfs_match_string over fcoe_parse_mode
On Tue, 12 Dec 2023 23:19:06 +0000, 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 are equal, modulo trailing newline
> | * @s1: one string
> | * @s2: another string
> | *
> | * This routine returns true iff two strings are equal, treating both
> | * NUL and newline-then-NUL as equivalent string terminations. It's
> | * geared for use with sysfs input strings, which generally terminate
> | * with newlines but are compared against values without newlines.
> | */
> | bool sysfs_streq(const char *s1, const char *s2)
> | ...
>
> [...]
Applied to 6.8/scsi-queue, thanks!
[1/1] scsi: fcoe: use sysfs_match_string over fcoe_parse_mode
https://git.kernel.org/mkp/scsi/c/edc22a7c8688
--
Martin K. Petersen Oracle Linux Engineering
Powered by blists - more mailing lists