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 475E21DED63 for ; Mon, 5 Jan 2026 13:27:22 +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=1767619644; cv=none; b=QICyFGq2xy+naEpjQeMwaoIx6a4WfW6Ukb+UosIUPVTJQHpc4M8qedXQteSh+D0nkVIbaOEQFF17xzvuVZVQb4Y/q2EHOo4MbPvXJ7+iEMDoiog0hsNhz00249lJW1pxPamLuwazk5UpO8I9/U8ZQ6njOtUodIzD7pXS9PIWjbg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767619644; c=relaxed/simple; bh=OZk3OLuvXGpp3DffXZpJguXjubI5M6A7erf2Cmqrq+I=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=UMUX9A2UDNA46dZm7JHdbzjsmOtAKjTmVa4QBD1RYiyKWxO0Q2YpHcltx79FPkayj1xnqMSYzn4GR4fyeRnZrF0Vjdxru0etmKgU2EGY2lP2U2V5ifAx0xw32yhRalqSOm4WDHvnUv2H9SKqVI+I5I2TLe1C932vK7Rolo2cXew= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wY1DMXsv; 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="wY1DMXsv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60296C116D0; Mon, 5 Jan 2026 13:27:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767619642; bh=OZk3OLuvXGpp3DffXZpJguXjubI5M6A7erf2Cmqrq+I=; h=Subject:To:Cc:From:Date:From; b=wY1DMXsvKRRjyVqZNoUeU55u31Dsz87dHiCesL3zXMsd4+aFZzuiHXiNqXN6cv1ys Os59VBdJIKsrkiD+w4qHklqAcRpqf+5PwmX82kSmJg54naIXpnMUzw33EOh4msWrtF HutPUJRIqdQozmBgs4fDTJH3LpaUDZMYwTBuLmyw= Subject: WTF: patch "[PATCH] drm: nouveau: Replace sprintf() with sysfs_emit()" was seriously submitted to be applied to the 6.18-stable tree? To: madhurkumar004@gmail.com,lyude@redhat.com,stable@vger.kernel.org Cc: From: Date: Mon, 05 Jan 2026 14:27:19 +0100 Message-ID: <2026010519-labored-arming-4030@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below was submitted to be applied to the 6.18-stable tree. I fail to see how this patch meets the stable kernel rules as found at Documentation/process/stable-kernel-rules.rst. I could be totally wrong, and if so, please respond to and let me know why this patch should be applied. Otherwise, it is now dropped from my patch queues, never to be seen again. thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 979e2ec58de2b600955b8290d1df549e33d67347 Mon Sep 17 00:00:00 2001 From: Madhur Kumar Date: Fri, 5 Dec 2025 14:48:04 +0530 Subject: [PATCH] drm: nouveau: Replace sprintf() with sysfs_emit() Replace sprintf() calls with sysfs_emit() to follow current kernel coding standards. sysfs_emit() is the preferred method for formatting sysfs output as it provides better bounds checking and is more secure. Signed-off-by: Madhur Kumar Reviewed-by: Lyude Paul Signed-off-by: Lyude Paul Link: https://patch.msgid.link/20251205091804.317801-1-madhurkumar004@gmail.com Fixes: 11b7d895216f ("drm/nouveau/pm: manual pwm fanspeed management for nv40+ boards") Cc: # v3.3+ diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c index 5c07a9ee8b77..34effe6d86ad 100644 --- a/drivers/gpu/drm/nouveau/nouveau_hwmon.c +++ b/drivers/gpu/drm/nouveau/nouveau_hwmon.c @@ -125,7 +125,7 @@ nouveau_hwmon_get_pwm1_max(struct device *d, if (ret < 0) return ret; - return sprintf(buf, "%i\n", ret); + return sysfs_emit(buf, "%i\n", ret); } static ssize_t @@ -141,7 +141,7 @@ nouveau_hwmon_get_pwm1_min(struct device *d, if (ret < 0) return ret; - return sprintf(buf, "%i\n", ret); + return sysfs_emit(buf, "%i\n", ret); } static ssize_t