get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2227837,
    "url": "http://patchwork.ozlabs.org/api/patches/2227837/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-ide/patch/20260424103830.2616828-1-johan@kernel.org/",
    "project": {
        "id": 13,
        "url": "http://patchwork.ozlabs.org/api/projects/13/?format=api",
        "name": "Linux IDE development",
        "link_name": "linux-ide",
        "list_id": "linux-ide.vger.kernel.org",
        "list_email": "linux-ide@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260424103830.2616828-1-johan@kernel.org>",
    "list_archive_url": null,
    "date": "2026-04-24T10:38:30",
    "name": "ata: pata_parport: switch to dynamic root device",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "8415eb24db7105c1356e38e51f5480125c3c6722",
    "submitter": {
        "id": 64666,
        "url": "http://patchwork.ozlabs.org/api/people/64666/?format=api",
        "name": "Johan Hovold",
        "email": "johan@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-ide/patch/20260424103830.2616828-1-johan@kernel.org/mbox/",
    "series": [
        {
            "id": 501342,
            "url": "http://patchwork.ozlabs.org/api/series/501342/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-ide/list/?series=501342",
            "date": "2026-04-24T10:38:30",
            "name": "ata: pata_parport: switch to dynamic root device",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501342/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2227837/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2227837/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-ide+bounces-5525-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-ide@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=jak0U6Ny;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=linux-ide+bounces-5525-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=\"jak0U6Ny\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"
        ],
        "Received": [
            "from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])\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 4g28Zh2f23z1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 20:38:52 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 9249B301624A\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 10:38:38 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id C6EA438655C;\n\tFri, 24 Apr 2026 10:38:37 +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 A457A3246FE;\n\tFri, 24 Apr 2026 10:38:37 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 76B42C19425;\n\tFri, 24 Apr 2026 10:38:37 +0000 (UTC)",
            "from johan by xi.lan with local (Exim 4.98.2)\n\t(envelope-from <johan@kernel.org>)\n\tid 1wGDvf-0000000Ayl5-1DjU;\n\tFri, 24 Apr 2026 12:38:35 +0200"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1777027117; cv=none;\n b=Pp9SYj7TTkH9L2g/o+2Qw0J1N84b4w0WZjBwWpo03GeuNnnbe+Russ9f2jppDx+341FxpTeiHCs76egtDc6LWrcCFKl1AbHDw7hPZkcd3Idd4Y8IXWc6sgy2YJiz0VUR13yIb16nYfdlrKzWGmkBWY8sVOn3OPPNDxLKUngzO1I=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1777027117; c=relaxed/simple;\n\tbh=GH07ZywBc/puIudYXCSDjjs+0laQLGuUD7SZCd8Xd5g=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=cGCaEksENNhMcQraaeEjr4vs+Xffxe/1GTPOlABGF7fqz6gbiRdEo5iH6azSrxaShMvwMMx38qAdMvAIcx3VgWn8xojwugBZ6S9b+edV1gE6NSHXpJoya6+y5LK9NewguhDM4BAp/JZ1PjA4c1hvDhNCZCUQLcJuGP0Q2xOEJJ0=",
        "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=jak0U6Ny; 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=1777027117;\n\tbh=GH07ZywBc/puIudYXCSDjjs+0laQLGuUD7SZCd8Xd5g=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=jak0U6Ny6Uo02DGaMVQlE4MhTK7T65hvi2mWUb3/kQtF+F4KwQe/mL5cTobd13YY6\n\t 9qIF+Vi+u8/MFrWQFbKSGppg1/WXhJhYAafg+7JKzaE3OieCACsGRxn8Y6oyvOFNBk\n\t 8s94cEivdh00xgH0sc/lRmfI01BcfxGzP0Q5ubTspsaAb8l30/+kWCifJx1hZBcKE4\n\t VnXZlQ86CywD+3asrjQLMAeKoSHQVZSu+x/7cRuZGo43IGMaDGJxrS09V1L68PR28H\n\t tR29Nnb6sE+en9udoR/9z5xx8Pwsae3auTeKD7aOsF5L2V1Zxkhf/WVVGBU8L8TbuA\n\t RztcZS448xPag==",
        "From": "Johan Hovold <johan@kernel.org>",
        "To": "Damien Le Moal <dlemoal@kernel.org>,\n\tNiklas Cassel <cassel@kernel.org>",
        "Cc": "linux-ide@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org,\n\tJohan Hovold <johan@kernel.org>",
        "Subject": "[PATCH] ata: pata_parport: switch to dynamic root device",
        "Date": "Fri, 24 Apr 2026 12:38:30 +0200",
        "Message-ID": "<20260424103830.2616828-1-johan@kernel.org>",
        "X-Mailer": "git-send-email 2.53.0",
        "Precedence": "bulk",
        "X-Mailing-List": "linux-ide@vger.kernel.org",
        "List-Id": "<linux-ide.vger.kernel.org>",
        "List-Subscribe": "<mailto:linux-ide+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:linux-ide+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "Driver core expects devices to be dynamically allocated and will, for\nexample, complain loudly when no release function has been provided.\n\nUse root_device_register() to allocate and register the root device\ninstead of open coding using a static device.\n\nNote that this also fixes a reference leak in the unlikely event that\ndevice_register() ever fails.\n\nSigned-off-by: Johan Hovold <johan@kernel.org>\n---\n drivers/ata/pata_parport/pata_parport.c | 21 +++++++--------------\n 1 file changed, 7 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c\nindex a5b959891cb7..40baeac594a9 100644\n--- a/drivers/ata/pata_parport/pata_parport.c\n+++ b/drivers/ata/pata_parport/pata_parport.c\n@@ -459,19 +459,11 @@ static void pata_parport_dev_release(struct device *dev)\n \tkfree(pi);\n }\n \n-static void pata_parport_bus_release(struct device *dev)\n-{\n-\t/* nothing to do here but required to avoid warning on device removal */\n-}\n-\n static const struct bus_type pata_parport_bus_type = {\n \t.name = DRV_NAME,\n };\n \n-static struct device pata_parport_bus = {\n-\t.init_name = DRV_NAME,\n-\t.release = pata_parport_bus_release,\n-};\n+static struct device *pata_parport_bus;\n \n static const struct scsi_host_template pata_parport_sht = {\n \tPATA_PARPORT_SHT(\"pata_parport\")\n@@ -518,7 +510,7 @@ static struct pi_adapter *pi_init_one(struct parport *parport,\n \t}\n \n \t/* set up pi->dev before pi_probe_unit() so it can use dev_printk() */\n-\tpi->dev.parent = &pata_parport_bus;\n+\tpi->dev.parent = pata_parport_bus;\n \tpi->dev.bus = &pata_parport_bus_type;\n \tpi->dev.driver = &pr->driver;\n \tpi->dev.release = pata_parport_dev_release;\n@@ -780,8 +772,9 @@ static __init int pata_parport_init(void)\n \t\treturn error;\n \t}\n \n-\terror = device_register(&pata_parport_bus);\n-\tif (error) {\n+\tpata_parport_bus = root_device_register(DRV_NAME);\n+\tif (IS_ERR(pata_parport_bus)) {\n+\t\terror = PTR_ERR(pata_parport_bus);\n \t\tpr_err(\"failed to register pata_parport bus, error: %d\\n\", error);\n \t\tgoto out_unregister_bus;\n \t}\n@@ -811,7 +804,7 @@ static __init int pata_parport_init(void)\n out_remove_new:\n \tbus_remove_file(&pata_parport_bus_type, &bus_attr_new_device);\n out_unregister_dev:\n-\tdevice_unregister(&pata_parport_bus);\n+\troot_device_unregister(pata_parport_bus);\n out_unregister_bus:\n \tbus_unregister(&pata_parport_bus_type);\n \treturn error;\n@@ -822,7 +815,7 @@ static __exit void pata_parport_exit(void)\n \tparport_unregister_driver(&pata_parport_driver);\n \tbus_remove_file(&pata_parport_bus_type, &bus_attr_new_device);\n \tbus_remove_file(&pata_parport_bus_type, &bus_attr_delete_device);\n-\tdevice_unregister(&pata_parport_bus);\n+\troot_device_unregister(pata_parport_bus);\n \tbus_unregister(&pata_parport_bus_type);\n }\n \n",
    "prefixes": []
}