get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2196248/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2196248,
    "url": "http://patchwork.ozlabs.org/api/patches/2196248/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260213092958.864411-4-tzungbi@kernel.org/",
    "project": {
        "id": 42,
        "url": "http://patchwork.ozlabs.org/api/projects/42/?format=api",
        "name": "Linux GPIO development",
        "link_name": "linux-gpio",
        "list_id": "linux-gpio.vger.kernel.org",
        "list_email": "linux-gpio@vger.kernel.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260213092958.864411-4-tzungbi@kernel.org>",
    "list_archive_url": null,
    "date": "2026-02-13T09:29:50",
    "name": "[v3,03/11] gpio: sysfs: Remove redundant check for struct gpio_chip",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "531894d3dfd564e3b954abe320a26fdd584688c9",
    "submitter": {
        "id": 83557,
        "url": "http://patchwork.ozlabs.org/api/people/83557/?format=api",
        "name": "Tzung-Bi Shih",
        "email": "tzungbi@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-gpio/patch/20260213092958.864411-4-tzungbi@kernel.org/mbox/",
    "series": [
        {
            "id": 492068,
            "url": "http://patchwork.ozlabs.org/api/series/492068/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-gpio/list/?series=492068",
            "date": "2026-02-13T09:29:47",
            "name": "gpio: Adopt revocable mechanism for UAF prevention",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/492068/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2196248/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2196248/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-gpio+bounces-31660-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-gpio@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=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=SMIo1mj8;\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-gpio+bounces-31660-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"SMIo1mj8\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"
        ],
        "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 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fC6Qc6jFSz1xvQ\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 13 Feb 2026 20:32:40 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id BC6653107F1B\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 13 Feb 2026 09:31:12 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 8725E325706;\n\tFri, 13 Feb 2026 09:31:12 +0000 (UTC)",
            "from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 49C452D9EC5;\n\tFri, 13 Feb 2026 09:31:11 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 01B40C16AAE;\n\tFri, 13 Feb 2026 09:31:08 +0000 (UTC)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1770975072; cv=none;\n b=pN5pS29fs+4n33gIrjd6O+4GW2Mo90WEHhgRQ+Q/ANxuP4bAKFxNKU2OYIP2U3sHCppydFr7M+Q3Pwy9damNUaW4klu17q5xtURAHoDpzB4UrXvQo2E4AkPKi/qq2Fk/TK8TgKVbkz01EyN/gkZsbrn9kQKQWxQUeyjWLatQb+0=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1770975072; c=relaxed/simple;\n\tbh=4lmvZJ5YXxkra6JcPmvMDUqSNsmp29GAkCIdsIEWkuY=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=s8roDDZPNtsq+obwI/3kFj2Zp3NHWkxPxNSRb8hOe34oy8mdO4k429tSxVoGhGrW9U5hkcd0/KZjwIV7O4xc4zWMwcN3XztsR4DYDOS1aix3Dsalg/R7naClPcG3VDx4GWq/Uhp2pZo6hl02R+yO1PzW9/bSp7vJa8ml75Mdh94=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=SMIo1mj8; arc=none smtp.client-ip=10.30.226.201",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1770975071;\n\tbh=4lmvZJ5YXxkra6JcPmvMDUqSNsmp29GAkCIdsIEWkuY=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=SMIo1mj82G6ZnNlKvnBix9OuoB6aqLPuw2r1mfW1Lp77VtUZaBPmEe9QMjwsAdOjE\n\t x0Uv53q0HLxoPV1BFcRSoVllV2VlYl0aJ4YEEv1YGPHvNb08Z1W753mCte1fY1D/xZ\n\t AEmR+PHTsXvJeckQu3sAlkxAdgdOoa0hlJVpQqy7V5fWYdSMWeN4pnI+Mh4W0R4vUZ\n\t TQHzkwIHSSjpAkniDPQRtH44mbzg6Q+HWEtZZlS0uWL0+iaLc6bJFg6te4z054HOGS\n\t Supv+oceFGs8qKUGM1ktNNocrDUHr0JlunVw+vJ9Vqu8a0GrFiYLv39HROq/2w4/Yy\n\t MpzsVQxPRsrcA==",
        "From": "Tzung-Bi Shih <tzungbi@kernel.org>",
        "To": "Bartosz Golaszewski <brgl@kernel.org>,\n\tLinus Walleij <linusw@kernel.org>",
        "Cc": "Greg Kroah-Hartman <gregkh@linuxfoundation.org>,\n\t\"Rafael J. Wysocki\" <rafael@kernel.org>,\n\tDanilo Krummrich <dakr@kernel.org>,\n\tJonathan Corbet <corbet@lwn.net>,\n\tShuah Khan <shuah@kernel.org>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tWolfram Sang <wsa+renesas@sang-engineering.com>,\n\tJason Gunthorpe <jgg@nvidia.com>,\n\tJohan Hovold <johan@kernel.org>,\n\t\"Paul E . McKenney\" <paulmck@kernel.org>,\n\tDan Williams <dan.j.williams@intel.com>,\n\tchrome-platform@lists.linux.dev,\n\ttzungbi@kernel.org,\n\tlinux-gpio@vger.kernel.org,\n\tlinux-kselftest@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org",
        "Subject": "[PATCH v3 03/11] gpio: sysfs: Remove redundant check for struct\n gpio_chip",
        "Date": "Fri, 13 Feb 2026 09:29:50 +0000",
        "Message-ID": "<20260213092958.864411-4-tzungbi@kernel.org>",
        "X-Mailer": "git-send-email 2.53.0.310.g728cabbaf7-goog",
        "In-Reply-To": "<20260213092958.864411-1-tzungbi@kernel.org>",
        "References": "<20260213092958.864411-1-tzungbi@kernel.org>",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-gpio@vger.kernel.org",
        "List-Id": "<linux-gpio.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-gpio+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-gpio+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "gpiochip_sysfs_unregister() is only called by gpiochip_remove() where\nthe struct gpio_chip is ensured.\n\nRemove the redundant check.\n\nSigned-off-by: Tzung-Bi Shih <tzungbi@kernel.org>\n---\nv3:\n- Pass struct gpio_chip * only.\n\nv2: https://lore.kernel.org/all/20260203061059.975605-4-tzungbi@kernel.org\n- No changes.\n\nv1: https://lore.kernel.org/all/20260116081036.352286-9-tzungbi@kernel.org\n\n drivers/gpio/gpiolib-sysfs.c | 10 ++--------\n drivers/gpio/gpiolib-sysfs.h |  4 ++--\n drivers/gpio/gpiolib.c       |  2 +-\n 3 files changed, 5 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c\nindex cd553acf3055..97e269f30945 100644\n--- a/drivers/gpio/gpiolib-sysfs.c\n+++ b/drivers/gpio/gpiolib-sysfs.c\n@@ -1048,11 +1048,11 @@ int gpiochip_sysfs_register(struct gpio_device *gdev)\n \treturn 0;\n }\n \n-void gpiochip_sysfs_unregister(struct gpio_device *gdev)\n+void gpiochip_sysfs_unregister(struct gpio_chip *chip)\n {\n+\tstruct gpio_device *gdev = chip->gpiodev;\n \tstruct gpiodev_data *data;\n \tstruct gpio_desc *desc;\n-\tstruct gpio_chip *chip;\n \n \tscoped_guard(mutex, &sysfs_lock) {\n \t\tdata = gdev_get_data(gdev);\n@@ -1066,12 +1066,6 @@ void gpiochip_sysfs_unregister(struct gpio_device *gdev)\n \t\tkfree(data);\n \t}\n \n-\tguard(srcu)(&gdev->srcu);\n-\n-\tchip = srcu_dereference(gdev->chip, &gdev->srcu);\n-\tif (!chip)\n-\t\treturn;\n-\n \t/* unregister gpiod class devices owned by sysfs */\n \tfor_each_gpio_desc_with_flag(chip, desc, GPIOD_FLAG_SYSFS) {\n \t\tgpiod_unexport(desc);\ndiff --git a/drivers/gpio/gpiolib-sysfs.h b/drivers/gpio/gpiolib-sysfs.h\nindex b794b396d6a5..9ee2f9dd268f 100644\n--- a/drivers/gpio/gpiolib-sysfs.h\n+++ b/drivers/gpio/gpiolib-sysfs.h\n@@ -8,7 +8,7 @@ struct gpio_device;\n #ifdef CONFIG_GPIO_SYSFS\n \n int gpiochip_sysfs_register(struct gpio_device *gdev);\n-void gpiochip_sysfs_unregister(struct gpio_device *gdev);\n+void gpiochip_sysfs_unregister(struct gpio_chip *chip);\n \n #else\n \n@@ -17,7 +17,7 @@ static inline int gpiochip_sysfs_register(struct gpio_device *gdev)\n \treturn 0;\n }\n \n-static inline void gpiochip_sysfs_unregister(struct gpio_device *gdev)\n+static inline void gpiochip_sysfs_unregister(struct gpio_chip *chip)\n {\n }\n \ndiff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c\nindex 1a3fd7600835..3ff57b1e51bf 100644\n--- a/drivers/gpio/gpiolib.c\n+++ b/drivers/gpio/gpiolib.c\n@@ -1286,7 +1286,7 @@ void gpiochip_remove(struct gpio_chip *gc)\n \tstruct gpio_device *gdev = gc->gpiodev;\n \n \t/* FIXME: should the legacy sysfs handling be moved to gpio_device? */\n-\tgpiochip_sysfs_unregister(gdev);\n+\tgpiochip_sysfs_unregister(gc);\n \tgpiochip_free_hogs(gc);\n \tgpiochip_free_remaining_irqs(gc);\n \n",
    "prefixes": [
        "v3",
        "03/11"
    ]
}