get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2218339,
    "url": "http://patchwork.ozlabs.org/api/patches/2218339/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260401023048.4182452-1-18255117159@163.com/",
    "project": {
        "id": 28,
        "url": "http://patchwork.ozlabs.org/api/projects/28/?format=api",
        "name": "Linux PCI development",
        "link_name": "linux-pci",
        "list_id": "linux-pci.vger.kernel.org",
        "list_email": "linux-pci@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260401023048.4182452-1-18255117159@163.com>",
    "list_archive_url": null,
    "date": "2026-04-01T02:30:48",
    "name": "PCI: dwc: Fix type mismatch for kstrtou32_from_user return value",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "e47c7126612a835f06b97719c7640730497de603",
    "submitter": {
        "id": 89937,
        "url": "http://patchwork.ozlabs.org/api/people/89937/?format=api",
        "name": "Hans Zhang",
        "email": "18255117159@163.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260401023048.4182452-1-18255117159@163.com/mbox/",
    "series": [
        {
            "id": 498268,
            "url": "http://patchwork.ozlabs.org/api/series/498268/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=498268",
            "date": "2026-04-01T02:30:48",
            "name": "PCI: dwc: Fix type mismatch for kstrtou32_from_user return value",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498268/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218339/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218339/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-51635-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-pci@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=163.com header.i=@163.com header.a=rsa-sha256\n header.s=s110527 header.b=lhJQtSk3;\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-pci+bounces-51635-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=163.com header.i=@163.com\n header.b=\"lhJQtSk3\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=220.197.31.2",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=163.com",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=163.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 4flq426bsVz1yCp\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 13:41:06 +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 08F283066BFE\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  1 Apr 2026 02:31:26 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id EA74535F5FA;\n\tWed,  1 Apr 2026 02:31:23 +0000 (UTC)",
            "from m16.mail.163.com (m16.mail.163.com [220.197.31.2])\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 5EB14359A6C;\n\tWed,  1 Apr 2026 02:31:11 +0000 (UTC)",
            "from Precision-7960.. (unknown [])\n\tby gzga-smtp-mtada-g0-4 (Coremail) with SMTP id\n _____wA36OZZg8xpxfdkCg--.32151S2;\n\tWed, 01 Apr 2026 10:30:50 +0800 (CST)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775010683; cv=none;\n b=rtKqJTjhHSeProgRZEAtd4MH0tUPYNfZdoIhf6wDvq5+sYOwhBvBLCK9+ZFerXbR5zTYP4kGMw0TXbIxAFwfqhfSVsKCEAVFrpE4XD6VQtFFOaOOpwwwsoYWwopfUavYJiaYJ2BhthvovbPPGaBw8yBjGwF3nTXo8pDGsxAiMrc=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775010683; c=relaxed/simple;\n\tbh=jhj6OALAW/j0S9U6dZ34SrH2T2P3LLykjrR1LMlE1dw=;\n\th=From:To:Cc:Subject:Date:Message-Id:MIME-Version;\n b=WkvkmiXJyjfL7HA1Iwm94dAtZs3uoGbpP4o0fhXpcCZ7C6NpDzrYKui1/2Fr/i9PtNopRWsSls4RKAKyEu0w/JIIY1OlVuNqJ5S3jLWQrkcgh+mVYrOJXSF06kDBbhcdmbm0Rsm81UxQ6LdNKxQWARVtQfLDKoECcVtYsItz15U=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=163.com;\n spf=pass smtp.mailfrom=163.com;\n dkim=pass (1024-bit key) header.d=163.com header.i=@163.com\n header.b=lhJQtSk3; arc=none smtp.client-ip=220.197.31.2",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;\n\ts=s110527; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=MY\n\tHPlhgTLcl6zJ4QtPRY8XxdvLYMofLuhFyrxcXVLoY=; b=lhJQtSk3heZIAUac4r\n\tCE3Hz6h0gK6fei8sktwBZcLtQZX8DEku9fi0APkHozyrFRGxYpH5oviRuJHy7Vus\n\tJqNk8F2cv4wVtZQsNoUo+p3lUyjOGB8gfSR3Yx3IWXIX16lg1UgdLzlj1lWU14PJ\n\tECREAttzIrsiVKsutIFmsPNLw=",
        "From": "Hans Zhang <18255117159@163.com>",
        "To": "lpieralisi@kernel.org,\n\tjingoohan1@gmail.com,\n\tmani@kernel.org,\n\tkwilczynski@kernel.org,\n\tbhelgaas@google.com",
        "Cc": "robh@kernel.org,\n\tlinux-pci@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tHans Zhang <18255117159@163.com>",
        "Subject": "[PATCH] PCI: dwc: Fix type mismatch for kstrtou32_from_user return\n value",
        "Date": "Wed,  1 Apr 2026 10:30:48 +0800",
        "Message-Id": "<20260401023048.4182452-1-18255117159@163.com>",
        "X-Mailer": "git-send-email 2.34.1",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-pci@vger.kernel.org",
        "List-Id": "<linux-pci.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-pci+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-pci+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-CM-TRANSID": "_____wA36OZZg8xpxfdkCg--.32151S2",
        "X-Coremail-Antispam": "1Uf129KBjvJXoW7KryxWryxuF4xCw13Xry5Jwb_yoW8trWxpa\n\tyrCryYyF4rtr13WF98AayDZa4fA397ur98G39Fkw1I9w17KrWav34rKas0yFyfGrW0yr1D\n\tKa1Fg3s09FnrJrUanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2\n\t9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0piJ73kUUUUU=",
        "X-CM-SenderInfo": "rpryjkyvrrlimvzbiqqrwthudrp/xtbCxBuEKGnMg1tc5QAA33"
    },
    "content": "kstrtou32_from_user() returns int, but the return value was stored in\na u32 variable 'val', risking sign loss. Use a dedicated int variable\nto correctly handle the return code.\n\nSigned-off-by: Hans Zhang <18255117159@163.com>\n---\n .../controller/dwc/pcie-designware-debugfs.c  | 21 +++++++++++--------\n 1 file changed, 12 insertions(+), 9 deletions(-)\n\n\nbase-commit: 9147566d801602c9e7fc7f85e989735735bf38ba",
    "diff": "diff --git a/drivers/pci/controller/dwc/pcie-designware-debugfs.c b/drivers/pci/controller/dwc/pcie-designware-debugfs.c\nindex 0d1340c9b364..9461be074490 100644\n--- a/drivers/pci/controller/dwc/pcie-designware-debugfs.c\n+++ b/drivers/pci/controller/dwc/pcie-designware-debugfs.c\n@@ -208,10 +208,11 @@ static ssize_t lane_detect_write(struct file *file, const char __user *buf,\n \tstruct dw_pcie *pci = file->private_data;\n \tstruct dwc_pcie_rasdes_info *rinfo = pci->debugfs->rasdes_info;\n \tu32 lane, val;\n+\tint ret;\n \n-\tval = kstrtou32_from_user(buf, count, 0, &lane);\n-\tif (val)\n-\t\treturn val;\n+\tret = kstrtou32_from_user(buf, count, 0, &lane);\n+\tif (ret)\n+\t\treturn ret;\n \n \tval = dw_pcie_readl_dbi(pci, rinfo->ras_cap_offset + SD_STATUS_L1LANE_REG);\n \tval &= ~(LANE_SELECT);\n@@ -347,10 +348,11 @@ static ssize_t counter_enable_write(struct file *file, const char __user *buf,\n \tstruct dw_pcie *pci = pdata->pci;\n \tstruct dwc_pcie_rasdes_info *rinfo = pci->debugfs->rasdes_info;\n \tu32 val, enable;\n+\tint ret;\n \n-\tval = kstrtou32_from_user(buf, count, 0, &enable);\n-\tif (val)\n-\t\treturn val;\n+\tret = kstrtou32_from_user(buf, count, 0, &enable);\n+\tif (ret)\n+\t\treturn ret;\n \n \tmutex_lock(&rinfo->reg_event_lock);\n \tset_event_number(pdata, pci, rinfo);\n@@ -408,10 +410,11 @@ static ssize_t counter_lane_write(struct file *file, const char __user *buf,\n \tstruct dw_pcie *pci = pdata->pci;\n \tstruct dwc_pcie_rasdes_info *rinfo = pci->debugfs->rasdes_info;\n \tu32 val, lane;\n+\tint ret;\n \n-\tval = kstrtou32_from_user(buf, count, 0, &lane);\n-\tif (val)\n-\t\treturn val;\n+\tret = kstrtou32_from_user(buf, count, 0, &lane);\n+\tif (ret)\n+\t\treturn ret;\n \n \tmutex_lock(&rinfo->reg_event_lock);\n \tset_event_number(pdata, pci, rinfo);\n",
    "prefixes": []
}