From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED5EAB67E; Wed, 8 Apr 2026 18:16:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775672201; cv=none; b=O6TaMalePJtl7hRvn19BAF8uz9djazjU5Z8RMshb1Aju0sBC+LK1mcysi6tE8lkohKDUzcl4yxkQQAelo3fG0XfvJtxXmppde1oeaaQiWrD5WpYe9dKWADRDFHuxayaTpW6eDOobABxyro3p+ncKYFIrhODUBBSXUigetuwIEwA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775672201; c=relaxed/simple; bh=YSDZL2GFYD56N5Cpmzd2pVdsCVnYxOQ+G++bi1Pu1Rk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AqPkRO6TXu4k8BJ0ZvxY5+NQCM+bisN5DHWmUAk3r55rwqi5KqZ+UUgbz8jD9ADzvN2Kr/ZD4vxYLUNy7PEu9TE65GvGx+EsLx6n7h7QdAN+IbJgBOnG/npQhpd/1/2/z9DvqpCPz9TYJvAU8fBjMR3Ug6YedFHJLT3EQ3MYvuI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=WMnbrpbb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="WMnbrpbb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8512BC19421; Wed, 8 Apr 2026 18:16:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1775672200; bh=YSDZL2GFYD56N5Cpmzd2pVdsCVnYxOQ+G++bi1Pu1Rk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WMnbrpbbPT97zTrfWc17Tz7auWcVdaqQF9KDwqa819J3gqign8P7mdE6Xiae7gFW8 UhRMA3YlThy2SdGxqIAulE9LQ7BF3SVac2A0Bw7zAt43rgz28C4w1vjbSOoUY06hye bp5PTVgi8QMDllg0N9pAqse5JE4Es51QEFaJb8cQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sanman Pradhan , Guenter Roeck , Sasha Levin Subject: [PATCH 6.1 196/312] hwmon: (occ) Fix missing newline in occ_show_extended() Date: Wed, 8 Apr 2026 20:01:53 +0200 Message-ID: <20260408175941.078693349@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260408175933.715315542@linuxfoundation.org> References: <20260408175933.715315542@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Sanman Pradhan [ Upstream commit 09773978879ecf71a7990fe9a28ce4eb92bce645 ] In occ_show_extended() case 0, when the EXTN_FLAG_SENSOR_ID flag is set, the sysfs_emit format string "%u" is missing the trailing newline that the sysfs ABI expects. The else branch correctly uses "%4phN\n", and all other show functions in this file include the trailing newline. Add the missing "\n" for consistency and correct sysfs output. Fixes: c10e753d43eb ("hwmon (occ): Add sensor types and versions") Signed-off-by: Sanman Pradhan Link: https://lore.kernel.org/r/20260326224510.294619-3-sanman.pradhan@hpe.com Signed-off-by: Guenter Roeck Signed-off-by: Sasha Levin --- drivers/hwmon/occ/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/occ/common.c b/drivers/hwmon/occ/common.c index 755926fa0bf7d..c6a78436e9bba 100644 --- a/drivers/hwmon/occ/common.c +++ b/drivers/hwmon/occ/common.c @@ -725,7 +725,7 @@ static ssize_t occ_show_extended(struct device *dev, switch (sattr->nr) { case 0: if (extn->flags & EXTN_FLAG_SENSOR_ID) { - rc = sysfs_emit(buf, "%u", + rc = sysfs_emit(buf, "%u\n", get_unaligned_be32(&extn->sensor_id)); } else { rc = sysfs_emit(buf, "%4phN\n", extn->name); -- 2.53.0