get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2221967,
    "url": "http://patchwork.ozlabs.org/api/patches/2221967/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/patch/20260410133739.1632-2-hechushiguitu666@gmail.com/",
    "project": {
        "id": 3,
        "url": "http://patchwork.ozlabs.org/api/projects/3/?format=api",
        "name": "Linux MTD development",
        "link_name": "linux-mtd",
        "list_id": "linux-mtd.lists.infradead.org",
        "list_email": "linux-mtd@lists.infradead.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260410133739.1632-2-hechushiguitu666@gmail.com>",
    "list_archive_url": null,
    "date": "2026-04-10T13:37:35",
    "name": "[2/2] mtd: mtdsuper: replace simple_strtoul with kstrtouint",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "f06cf22c8117b739cf684d8f5a780d80473ecbca",
    "submitter": {
        "id": 92759,
        "url": "http://patchwork.ozlabs.org/api/people/92759/?format=api",
        "name": "Haoyu Lu",
        "email": "hechushiguitu666@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-mtd/patch/20260410133739.1632-2-hechushiguitu666@gmail.com/mbox/",
    "series": [
        {
            "id": 499461,
            "url": "http://patchwork.ozlabs.org/api/series/499461/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-mtd/list/?series=499461",
            "date": "2026-04-10T13:37:34",
            "name": "[1/2] mtd: mtdoops: replace simple_strtoul with kstrtouint",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/499461/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2221967/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2221967/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=WtzYM/yt;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=Wh+VyatW;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=temperror (SPF Temporary Error: DNS Timeout)\n smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133;\n helo=bombadil.infradead.org;\n envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\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 4fsdDq4Sb7z20HT\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 23:38:28 +1000 (AEST)",
            "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wBC3t-0000000CKJP-2LXw;\n\tFri, 10 Apr 2026 13:38:17 +0000",
            "from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wBC3q-0000000CKIj-3s0e\n\tfor linux-mtd@lists.infradead.org;\n\tFri, 10 Apr 2026 13:38:16 +0000",
            "by mail-pj1-x1031.google.com with SMTP id\n 98e67ed59e1d1-35d8e548a05so2040600a91.1\n        for <linux-mtd@lists.infradead.org>;\n Fri, 10 Apr 2026 06:38:14 -0700 (PDT)",
            "from ZC-202510311500 ([123.139.41.116])\n        by smtp.gmail.com with ESMTPSA id\n 98e67ed59e1d1-35e4122314dsm3442353a91.6.2026.04.10.06.38.11\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Fri, 10 Apr 2026 06:38:13 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=UkBdZJI2Y2DCt4KrZ/Vq8uRtSf18/D8eLiolEDGJ+zw=; b=WtzYM/ytfgD4n+\n\tauc4trMc4r3D6rvzaj2Nfcx0fEq2Zaq4zvo1Z4tkdupSwkS2GKXJqiL0mheSRvtrbcBmm+ZHyDaEQ\n\t+fQcSv4shItcXMHudK0yGNDaXUH9SKNkogN/wpq3I9nwIe9zVTvD1sgvllF3zXTTB0pLct10pv5t9\n\tCkhmJmPqVyrPn6U3IKVWCqgooRwW83bsqffm8GWp5Wh6SYttXalLGccpgqxY6MPiTng3nUZlvSvCN\n\tK3O0ZV8AjTdmP7Dh/RkzkXGTqqECiFnleJHaFiV4sfYNy2EOA3Bh7K0p2bPNbim9POEMkEbR4JElT\n\tznSLLv4MGbvDHFVNnS+g==;",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=gmail.com; s=20251104; t=1775828294; x=1776433094;\n darn=lists.infradead.org;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n         :message-id:reply-to;\n        bh=uJlPJW8FpDciknW1ezsaq3xMTwniBfxMiXGcZYoSCWI=;\n        b=Wh+VyatWe7coc9XEHR/uI2e2LpFTlSGgNSwBIAhML42zq5U+9bnPV50RjR/Vm0u3T1\n         JpD2GMSMzW/L38Z+5BQcPVLN9U+MAkv90Ey42fDd9RYorhWzdGySgSt2vf/VKFbSi44/\n         HR/RvqDEgS8PqN+Q1Bt5AUbNHlkaMID8JafcDA8f/A7Tu+I4oyRs25fK8QPcAwT3/F6d\n         bsK60HytGW5C4HJWiXqV18C4rYwwe+/HM5hiW0adbbFvIE/HkshDfY2kDUj3x27Tosj1\n         SshAChTSPjY4SVstHFQEmhZSbdHO1+8xODRsoY3IIPWNALBhRlf1UAHHOlw3dFn/OhmZ\n         R73Q=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1775828294; x=1776433094;\n        h=content-transfer-encoding:mime-version:references:in-reply-to\n         :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=uJlPJW8FpDciknW1ezsaq3xMTwniBfxMiXGcZYoSCWI=;\n        b=SfSaEBubBa0p6uo1EyAJDo8TIRA0Ef1/tKB8DTxKrgsapRw6eyTwg5DegE4Q3PPw9f\n         ndIzVrWOYW7rYK3Xy7F0o373Vw+iZGR8QmgBwx+rSv7uPGUNC3/oa+OJUCCYTW4YWfCM\n         vxzIKVYVlcSEXQ5jiA0OKKlVE5pzwb8QrKeLSYX+KbkWNf9n6+pqkxqZBMLzYft/N6fz\n         4q0x8/YRE7K3kuPtEZRJi6NGs+12sCkcxwB3QjWnEjK5/7FyQ17SoMERcbwcoTy3mqwP\n         WmNxsQF9TBfexg2iFHHx29+w+A7ZN7Dzw/IZ8kIz2EvgllCsVsw9abyxOc3p5UBJdbXB\n         EdlQ==",
        "X-Gm-Message-State": "AOJu0YxA6lp+dgABfaaBnYm8UWLL5utJhocDCgO5+qCdEEvcHGZZ2Aod\n\tUIepLKi/puRbVdC22+Q4iBQ7hoiioA8PHXV0bReb+ZkUvYLAIq9F/+Gp",
        "X-Gm-Gg": "AeBDietRxp7JhMvGP+Ux03WZ1+rl1V3LsiyQL2TgJB93R+gdjHNZZnCpN5eCuboiPC0\n\t49V0PDPU2F+qCL3oxb6CiKrrLTeCNafBqan2BrTsk5MRE+4PgrKOhHux8XOzlevlNDFx3zlLFxx\n\tYdw5SH47GHp4Pa23TpK/FZxuXpqXr/QZP2R7tH2U2tXgvnpoyr4He/m/RhtqU8IOOpo4Ceksr48\n\t1p4YKGPJLs2jLcLkbRlPn2dF4PDeW+lFkW9tDob0aqIr/EGMR2SxNettQeFdXwF91jM8eO/XcNe\n\tfdQ9UbjNRzRjxsjqU3bGhaihUCUESWrRiT3u557WfRGWqhhTrfFpkXPO6F2ua3e2gl4kThxdBUl\n\tUiCxXWa3ezhwrht8dbEUvNzKToJ/DV6qo6E3zc2vU9gqv8gs1czROO0o23CCJg3WAubW5e5CRQP\n\tb8HGaVssOp4OrX+1LRNXpUAOqtdTzVGDReW04ZJC9UfTokwdvmWeVXVA==",
        "X-Received": "by 2002:a17:90b:38c8:b0:35d:a542:2dc4 with SMTP id\n 98e67ed59e1d1-35e42842cc9mr3680530a91.21.1775828294018;\n        Fri, 10 Apr 2026 06:38:14 -0700 (PDT)",
        "From": "Haoyu Lu <hechushiguitu666@gmail.com>",
        "To": "Miquel Raynal <miquel.raynal@bootlin.com>,\n\tRichard Weinberger <richard@nod.at>,\n\tVignesh Raghavendra <vigneshr@ti.com>",
        "Cc": "linux-mtd@lists.infradead.org,\n\tlinux-kernel@vger.kernel.org,\n\tHaoyu Lu <hechushiguitu666@gmail.com>",
        "Subject": "[PATCH 2/2] mtd: mtdsuper: replace simple_strtoul with kstrtouint",
        "Date": "Fri, 10 Apr 2026 21:37:35 +0800",
        "Message-ID": "<20260410133739.1632-2-hechushiguitu666@gmail.com>",
        "X-Mailer": "git-send-email 2.53.0.windows.1",
        "In-Reply-To": "<20260410133739.1632-1-hechushiguitu666@gmail.com>",
        "References": "<20260410133739.1632-1-hechushiguitu666@gmail.com>",
        "MIME-Version": "1.0",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20260410_063814_984548_64638C49 ",
        "X-CRM114-Status": "GOOD (  13.98  )",
        "X-Spam-Score": "-1.8 (-)",
        "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  Modernize string-to-number conversion in mtdsuper.c by\n replacing\n    simple_strtoul with kstrtouint. This change provides proper type safety\n for\n    MTD device numbers which are non-negative integers. Using kstrtouint\n avoids\n    unsigned long to int conversion and is more appropriate for device\n indices.\n    The debug output format specifier is updated to %u for unsigned int.\n Content analysis details:   (-1.8 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/, no\n                             trust\n                             [2607:f8b0:4864:20:0:0:0:1031 listed in]\n                             [list.dnswl.org]\n -0.0 SPF_PASS               SPF: sender matches SPF record\n  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record\n -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from\n                             envelope-from domain\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]\n  0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in\n                             digit\n                             [hechushiguitu666(at)gmail.com]\n  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail\n provider\n                             [hechushiguitu666(at)gmail.com]",
        "X-BeenThere": "linux-mtd@lists.infradead.org",
        "X-Mailman-Version": "2.1.34",
        "Precedence": "list",
        "List-Id": "Linux MTD discussion mailing list <linux-mtd.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/linux-mtd>,\n <mailto:linux-mtd-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/linux-mtd/>",
        "List-Post": "<mailto:linux-mtd@lists.infradead.org>",
        "List-Help": "<mailto:linux-mtd-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/linux-mtd>,\n <mailto:linux-mtd-request@lists.infradead.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "\"linux-mtd\" <linux-mtd-bounces@lists.infradead.org>",
        "Errors-To": "linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "Modernize string-to-number conversion in mtdsuper.c by replacing\nsimple_strtoul with kstrtouint. This change provides proper type safety\nfor MTD device numbers which are non-negative integers.\n\nUsing kstrtouint avoids unsigned long to int conversion and is more\nappropriate for device indices. The debug output format specifier is\nupdated to %u for unsigned int.\n\nSigned-off-by: Haoyu Lu <hechushiguitu666@gmail.com>\n---\n drivers/mtd/mtdsuper.c | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\n--\n2.53.0.windows.1",
    "diff": "diff --git a/drivers/mtd/mtdsuper.c b/drivers/mtd/mtdsuper.c\nindex b7e3763c47f0..c709ff7aa6b5 100644\n--- a/drivers/mtd/mtdsuper.c\n+++ b/drivers/mtd/mtdsuper.c\n@@ -132,12 +132,12 @@ int get_tree_mtd(struct fs_context *fc,\n\n \t\t} else if (isdigit(fc->source[3])) {\n \t\t\t/* mount by MTD device number name */\n-\t\t\tchar *endptr;\n+\t\t\tunsigned int mtdnr_val;\n\n-\t\t\tmtdnr = simple_strtoul(fc->source + 3, &endptr, 0);\n-\t\t\tif (!*endptr) {\n+\t\t\tif (kstrtouint(fc->source + 3, 0, &mtdnr_val) == 0) {\n+\t\t\t\tmtdnr = mtdnr_val;\n \t\t\t\t/* It was a valid number */\n-\t\t\t\tpr_debug(\"MTDSB: mtd%%d, mtdnr %d\\n\", mtdnr);\n+\t\t\t\tpr_debug(\"MTDSB: mtd%%d, mtdnr %u\\n\", mtdnr_val);\n \t\t\t\treturn mtd_get_sb_by_nr(fc, mtdnr, fill_super);\n \t\t\t}\n \t\t}\n",
    "prefixes": [
        "2/2"
    ]
}