Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2224943/?format=api
{ "id": 2224943, "url": "http://patchwork.ozlabs.org/api/patches/2224943/?format=api", "web_url": "http://patchwork.ozlabs.org/project/rtc-linux/patch/20260419223630.67644-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": "<20260419223630.67644-1-m32285159@gmail.com>", "list_archive_url": null, "date": "2026-04-19T22:36:30", "name": "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/20260419223630.67644-1-m32285159@gmail.com/mbox/", "series": [ { "id": 500531, "url": "http://patchwork.ozlabs.org/api/series/500531/?format=api", "web_url": "http://patchwork.ozlabs.org/project/rtc-linux/list/?series=500531", "date": "2026-04-19T22:36:30", "name": "rtc: ab8500: replace sprintf() with sysfs_emit()", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/500531/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2224943/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2224943/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-rtc+bounces-6380-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=g4UbyEPS;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-rtc+bounces-6380-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=\"g4UbyEPS\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.210.54", "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\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fzNlC6Tyvz1yGt\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 08:36:39 +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 79AF9300BD84\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 19 Apr 2026 22:36:35 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 7FCD82FB965;\n\tSun, 19 Apr 2026 22:36:34 +0000 (UTC)", "from mail-ot1-f54.google.com (mail-ot1-f54.google.com\n [209.85.210.54])\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 451F32DCBFC\n\tfor <linux-rtc@vger.kernel.org>; Sun, 19 Apr 2026 22:36:33 +0000 (UTC)", "by mail-ot1-f54.google.com with SMTP id\n 46e09a7af769-7dbcd61429cso1248853a34.2\n for <linux-rtc@vger.kernel.org>; Sun, 19 Apr 2026 15:36:33 -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 46e09a7af769-7dc975034f2sm6979077a34.4.2026.04.19.15.36.31\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 19 Apr 2026 15:36:31 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776638194; cv=none;\n b=eg0LgOA2wABCXi1/vuqkxrmekHD4xAK0a7wduEOnuATpaFIs5I8D6KzrGeNoORXXN5B3uQxM0BUBRsXqDZK7CVuunTLefODlJs5sl30GiiEBDYheZsknF71aYDiabNbVIh/E5o0IfeE4d0TZaE0ijc7c+PeIvMjO16ei1yMV6Hc=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776638194; c=relaxed/simple;\n\tbh=MbsHOnyZ9XH67VDYm0Yd55VReAFjYSdBLaEWWeRgBAM=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=knf3Zci4qGpAxIA3zyN7UPNwzNjXKlfH2K0YPkz+V7me+zmtpgd+DfJ3QgPJK0rU1jYL9lkuiooVqUZr/pmRO9jEvzArvHzuCiZA+jJ/xBnBIDZhf3jsI/Ss8S8tctEUT4wmqPjgriAdkiSyFhVMAYPB7aclEPzv6kzPWHO0m4E=", "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=g4UbyEPS; arc=none smtp.client-ip=209.85.210.54", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1776638192; x=1777242992;\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=FosC665WE8Cy1oOKr7vEfeLdTUyUScA7y3vdV3aiAok=;\n b=g4UbyEPSB/uMqZGM8XGCp9s3plz99if57VA+6OMstQdUjR804gWL16jMRW2yAqZJv0\n sFNrau4bqnPaozafRuGu8jNFJeB3Wu4uymE62//Eb21DlNwFpyIUrm852gCm8XV0+MpP\n V97cXB8WldXjyBGd1HSx6cpPtZ7Vsrol2ye4MvAJhnkkrLO0OnxR1C0dPSdlLYao3yty\n PONlgz/xaA2TAuZWnuKessJJgakjM9JK08LXQ/5oVQdvsMYlnbPqcQG90z3oc+MZ8Z+a\n 9LkGd2fFxun6IcuFODGVeElp6wvdT4bS2Koc+N09LkTq/bMy9+nrXTXm5m7+5S+Ipmlt\n R3WQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776638192; x=1777242992;\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=FosC665WE8Cy1oOKr7vEfeLdTUyUScA7y3vdV3aiAok=;\n b=WFiSgOWS1usub/IxOyhAgJu7VZf9N9SITFcvr1kr4iRQLiPP+DcmVl97Qeq66BXDlW\n IkLFRP4VCipZ2jy4SF5mmO0CnXRheBXA5R9TqTi+Rs7duGPwOI2TJNGT/Ipxjjfnksek\n QDH02JBWacqTHxk8H/qjP7IFLcox4nvkxlYYwEb7keTPODDBMJFMFL+209a6uUfcQMjG\n 7/dkwXTkdi8zzpZt7hrHWRlDZ2UziyOvpD59jJm7P+FnCbVgkmwF8fdRhJdB7WSm1Xod\n Yq6fBLzl8Urexo2/gvyctM/1kjK5xV8rMP5LzNhxoVrN0VY4Ly3hM1musFU5ex/chAAq\n BaVw==", "X-Forwarded-Encrypted": "i=1;\n AFNElJ8lI42GA+1aAbTCB0iS9V8voq7T0zAYZcsV1ATFcDFZ+QmHK+XkU3a0K9U+RBztrE2F51h5jZ6+UUw=@vger.kernel.org", "X-Gm-Message-State": "AOJu0Yz16O/c1aM5TYhK5hfjsMXqBZM+md3p42DEgp02M6eLdgcd8eps\n\t5lykqvf4Zjpg74GsR7gib0jLWJFoal2uIqlPLrjAXiqoPpX/Q1+ZhJa9vrFeLlgD", "X-Gm-Gg": "AeBDieufS2+G97nIrOjLwmkwLfWNLYStvk7wfX3D9g4w+8GeX2RI/gJnCZJzNuAlKrE\n\tkCL9brh8wtjWdqOm0Y5ZISUDJAh8PitZSXP6GNpk8goYb3LdcsV3LPaWeBYCfgrnzFK0kHM9hTT\n\t2KXRpxrqXtj2VzI8nrXHX3RY1LHcFw8CEVe7Wm/jiLm4cfMHnfuztZtxBhuQJ0r8a3D6wqD+HqB\n\tW+IcW2AWsa5TkYQLyJiVYBbsCduPYLi44cqFeVGAYhEJ/FZCWFdJvfAjN+8PH6yW5h6+03+zot7\n\tusm3a14qO03GNmWWu/bdAyf4ELKiujIF4WJE9lA7J6ldFe1nKmVC+24mNollB6I5+MVeVzjs6h7\n\tdhoMDaooKi03fJjxPrNFyiPAn73PZdTr4gLywrO/Srekzsz241SZvLn5UbXDFK0ifD7X6uYtWfq\n\tFYtksGhW8vh40YpFt2Irl5dg7LdG+jMrFg966YNOEaQcQ9E/gBTx1N4rK/n8WDwfhlv2H+", "X-Received": "by 2002:a05:6830:8d1:b0:7d7:5b78:ef31 with SMTP id\n 46e09a7af769-7dc94fdf204mr6753657a34.12.1776638192241;\n Sun, 19 Apr 2026 15:36:32 -0700 (PDT)", "From": "Maxwell Doose <m32285159@gmail.com>", "To": "linusw@kernel.org,\n\talexandre.belloni@bootlin.com", "Cc": "linux-arm-kernel@lists.infradead.org,\n\tlinux-rtc@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org", "Subject": "[PATCH] rtc: ab8500: replace sprintf() with sysfs_emit()", "Date": "Sun, 19 Apr 2026 17:36:30 -0500", "Message-ID": "<20260419223630.67644-1-m32285159@gmail.com>", "X-Mailer": "git-send-email 2.53.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\nSigned-off-by: Maxwell Doose <m32285159@gmail.com>\n---\n drivers/rtc/rtc-ab8500.c | 3 +--\n 1 file changed, 1 insertion(+), 2 deletions(-)", "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": [] }