Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2232203/?format=api
{ "id": 2232203, "url": "http://patchwork.ozlabs.org/api/patches/2232203/?format=api", "web_url": "http://patchwork.ozlabs.org/project/rtc-linux/patch/20260503201236.29685-1-m32285159@gmail.com/", "project": { "id": 9, "url": "http://patchwork.ozlabs.org/api/projects/9/?format=api", "name": "Linux RTC development", "link_name": "rtc-linux", "list_id": "linux-rtc.vger.kernel.org", "list_email": "linux-rtc@vger.kernel.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260503201236.29685-1-m32285159@gmail.com>", "list_archive_url": null, "date": "2026-05-03T20:12:36", "name": "[RESEND] rtc: ab8500: replace sprintf() with sysfs_emit()", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "1065d12257a1a7d847c1af9828c49ea1a3073f22", "submitter": { "id": 93193, "url": "http://patchwork.ozlabs.org/api/people/93193/?format=api", "name": "Maxwell Doose", "email": "m32285159@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/rtc-linux/patch/20260503201236.29685-1-m32285159@gmail.com/mbox/", "series": [ { "id": 502586, "url": "http://patchwork.ozlabs.org/api/series/502586/?format=api", "web_url": "http://patchwork.ozlabs.org/project/rtc-linux/list/?series=502586", "date": "2026-05-03T20:12:36", "name": "[RESEND] rtc: ab8500: replace sprintf() with sysfs_emit()", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/502586/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2232203/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2232203/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-rtc+bounces-6459-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-rtc@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=MOpC/qF6;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-rtc+bounces-6459-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"MOpC/qF6\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.161.49", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com" ], "Received": [ "from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g7wtg5mZVz1yJ0\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 04 May 2026 06:12:43 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 8AD1A300617F\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 3 May 2026 20:12:41 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 00465387378;\n\tSun, 3 May 2026 20:12:41 +0000 (UTC)", "from mail-oo1-f49.google.com (mail-oo1-f49.google.com\n [209.85.161.49])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id A10AA26F476\n\tfor <linux-rtc@vger.kernel.org>; Sun, 3 May 2026 20:12:39 +0000 (UTC)", "by mail-oo1-f49.google.com with SMTP id\n 006d021491bc7-682fce74c06so3073223eaf.3\n for <linux-rtc@vger.kernel.org>; Sun, 03 May 2026 13:12:39 -0700 (PDT)", "from linuxescape.lan (23-88-128-2.fttp.usinternet.com.\n [23.88.128.2])\n by smtp.gmail.com with ESMTPSA id\n 006d021491bc7-6968947934esm5194328eaf.8.2026.05.03.13.12.37\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 03 May 2026 13:12:38 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777839160; cv=none;\n b=KMFQEbGnI0BVYCYw0vSJrYjWctY13o8nfx+99HXJezIQZ5gB1uu0OOrrL6PZc5y21VA1fdNkrMKvFYQffinktYZJyaDM/vJXnOP49bfIzO8DxxBx4QLIHNC/62m6UzQFPsaFoe9zLp7MWfxw1kUmvSZZu67FFVkiTGHXTp2Sqds=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777839160; c=relaxed/simple;\n\tbh=rtrhar0vhABpDRekh8JqIicW/Rn0iSfrma3TyS52bL4=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=how405FGpF20ZvswnPA+cvtgv/aMRB/ADOlETgYwsUURgK6gY9MbAglEAdAT/Dlm0zsoooiBahwmJWi8KC65IaqOg0CysauDK7si8kZxEaZrmkwL+Vpdyzpt4Ty9ed2/WvIdTA+PWKeSwHEZD3AfGwgjiFRHv42aABzihyVq7pM=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=MOpC/qF6; arc=none smtp.client-ip=209.85.161.49", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1777839158; x=1778443958;\n darn=vger.kernel.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=RbGHm08BxGQD7aCQOyLWw7aVLNNFoqSYxYwfTxucUlU=;\n b=MOpC/qF6iIFji1TeBUEZmOBBp56bV0lXdvBb0oUm4nFDGK5n5+rQbwGnJAWPiuhGal\n 0PsaojAn9YMV6WI5bO37sQuvZh4K7E1F80cnwhfGSzNN+0Rv12QOpIlcKJGpunQio9Hr\n 1ppSNiTdzCs2kgNlvp33Wq04kOLWYftaS1n1yW+is2IEZN2usW8VB1qsMQTeryUwyEVL\n YPDUN+IQr875eqwHajB6WEUtmvoPZx8cTenMXfvBGFBE4tC8B/tzrIxzen1Lju708ySs\n WbHtmRYNvsOU77TM59XsPT1twFhDo545dDaQDQ3xhQ4UZ07tqoKy9fG5qod6RmhY4sJ0\n AQJA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777839158; x=1778443958;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=RbGHm08BxGQD7aCQOyLWw7aVLNNFoqSYxYwfTxucUlU=;\n b=KmPrhzktGVWK9I6pGSAd0ZzOIyGUnjHUuE702KA7rNwLkSVEhFedig+dj0Ny5ygnFh\n OehMl1u0hCX0W8KclLod+XemjyJLzRWiI4hgDI0heEASc3+hAZBgwcqDLrDFliScIulF\n x1oDbARZp7pWMwdk7TqskHMox+szkhngXfy+W0JE55rzO07I8XkSul0Qcvi8v3mfMwk/\n Yoc3q6uNsc3kDev9beB1BpCRLtZRojiLl4I/v/BuRpbly0Qghp6vE2Mxngf/ex1CQOt+\n 4uN0TIrZMEocaXGJ2vH2DI4zE87ia1Ep1YQVgk2aAD2EkhaoRFnVSVuIBUqlid6/bD07\n pP/g==", "X-Forwarded-Encrypted": "i=1;\n AFNElJ8DBi7mRKOUNQ+i0gbnIfTxt0XTZbnkwrwxlrrKkWyDMcrO6f+BXqv1QDC9MQIq4MVnKT/wHKlVGWo=@vger.kernel.org", "X-Gm-Message-State": "AOJu0Ywc9mh0JqbuMTQyrklm0zRsKIsLkskqa0LuiYBPA5dHVeVqxhyr\n\tWrhALo8XamnxB+yMLKq7RGbKgqzgR2D8Zh4N5oQIIKsudQIcLbl8zoYa", "X-Gm-Gg": "AeBDiesb2K1fehssJHl844fiMn4QVuD7DhmKRz7k3WqyBhPUQxPDKrws6i3+E8B9+yo\n\t+WNl1ggKO1Znop2HL/M7cZTcvkXyT6Z0DsFWzTBVK/QUWm60vEDfsV7+6oyIydCF3TDSZI+xiVl\n\tBuUUXu0JewNC+RdbB8Vy8wp3xsSnQ7XpAZkcEQmjeFfS61NuInlm8bUZ41D/d0S3A7WJKyHW6X6\n\tWbk7GDNRqUbs4cO8CV7HJTnzqP7fy9pF/6V+owz+OYJJ1PEmjeowv8+vw1cfnB3vA86IvgA/PF/\n\tmfxYOzhGtOQEJHerYottlx3XPy2bd7CMmGnW5o1ediVSuyXa+ZYB4kYb5Y5SvVzP8i6zUh7598n\n\tf1L4nwlHZR3EJKor+W20RBTOegIc44G2PAXZGJo9oyIIBCKSzO7/vs/qisruVvKj0+3CU0Aqgjv\n\trUxVGTTrtPVptZlsJ+Cmw1ZcrSvsoyC5SQM6OydPCFHvR7kmC2D1WjrBlqw9eWuOHz/Oxc", "X-Received": "by 2002:a4a:e90b:0:b0:68a:af54:cb61 with SMTP id\n 006d021491bc7-69697e1852cmr3063891eaf.60.1777839158605;\n Sun, 03 May 2026 13:12:38 -0700 (PDT)", "From": "Maxwell Doose <m32285159@gmail.com>", "To": "linusw@kernel.org,\n\talexandre.belloni@bootlin.com", "Cc": "linux-arm-kernel@lists.infradead.org (moderated list:ARM/NOMADIK/Ux500\n ARCHITECTURES),\n\tlinux-rtc@vger.kernel.org (open list:REAL TIME CLOCK (RTC) SUBSYSTEM),\n\tlinux-kernel@vger.kernel.org (open list)", "Subject": "[PATCH RESEND] rtc: ab8500: replace sprintf() with sysfs_emit()", "Date": "Sun, 3 May 2026 15:12:36 -0500", "Message-ID": "<20260503201236.29685-1-m32285159@gmail.com>", "X-Mailer": "git-send-email 2.54.0", "Precedence": "bulk", "X-Mailing-List": "linux-rtc@vger.kernel.org", "List-Id": "<linux-rtc.vger.kernel.org>", "List-Subscribe": "<mailto:linux-rtc+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-rtc+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit" }, "content": "This patch replaces sprintf() with sysfs_emit() to ensure proper\nbounds checking. It also simplifies the return logic by directly\nreturning the error after logging, instead of logging, calling\nsprintf(), then returning.\n\nReviewed-by: Linus Walleij <linusw@kernel.org>\nSigned-off-by: Maxwell Doose <m32285159@gmail.com>\n---\n note 1: original patch can be found here:\n https://lore.kernel.org/linux-rtc/CAD++jLkQD_ZSFPGrx4uL+ezrR1Ai2ddUF9_PpesDG+AEwiDrag@mail.gmail.com/T/#t\n\n note 2: I rebased this on to v7.1-rc1 to make sure there wouldn't be\n any merge conflicts.\n\n drivers/rtc/rtc-ab8500.c | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)\n\n\nbase-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731", "diff": "diff --git a/drivers/rtc/rtc-ab8500.c b/drivers/rtc/rtc-ab8500.c\nindex ed2b6b8bb3bf..c6147837f957 100644\n--- a/drivers/rtc/rtc-ab8500.c\n+++ b/drivers/rtc/rtc-ab8500.c\n@@ -284,11 +284,10 @@ static ssize_t ab8500_sysfs_show_rtc_calibration(struct device *dev,\n \tretval = ab8500_rtc_get_calibration(dev, &calibration);\n \tif (retval < 0) {\n \t\tdev_err(dev, \"Failed to read RTC calibration attribute\\n\");\n-\t\tsprintf(buf, \"0\\n\");\n \t\treturn retval;\n \t}\n \n-\treturn sprintf(buf, \"%d\\n\", calibration);\n+\treturn sysfs_emit(buf, \"%d\\n\", calibration);\n }\n \n static DEVICE_ATTR(rtc_calibration, S_IRUGO | S_IWUSR,\n", "prefixes": [ "RESEND" ] }