get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2198036,
    "url": "http://patchwork.ozlabs.org/api/1.0/patches/2198036/?format=api",
    "project": {
        "id": 13,
        "url": "http://patchwork.ozlabs.org/api/1.0/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
    },
    "msgid": "<20260219062312.1030867-5-dlemoal@kernel.org>",
    "date": "2026-02-19T06:23:11",
    "name": "[4/5] ata: libata-scsi: make ata_scsi_simulate() static",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "56379a0735b8b836a3bd178d126b853a4c98eff3",
    "submitter": {
        "id": 86188,
        "url": "http://patchwork.ozlabs.org/api/1.0/people/86188/?format=api",
        "name": "Damien Le Moal",
        "email": "dlemoal@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-ide/patch/20260219062312.1030867-5-dlemoal@kernel.org/mbox/",
    "series": [
        {
            "id": 492640,
            "url": "http://patchwork.ozlabs.org/api/1.0/series/492640/?format=api",
            "date": "2026-02-19T06:23:07",
            "name": "libata cleanups",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/492640/mbox/"
        }
    ],
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2198036/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <linux-ide+bounces-5019-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=JNnUWX83;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-ide+bounces-5019-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=\"JNnUWX83\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201"
        ],
        "Received": [
            "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::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 4fGk3N3VThz23j9\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 19 Feb 2026 17:28:32 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 130E93010273\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 19 Feb 2026 06:28:30 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id D22102F3C0A;\n\tThu, 19 Feb 2026 06:28:29 +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 AFD89285CB3\n\tfor <linux-ide@vger.kernel.org>; Thu, 19 Feb 2026 06:28:29 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id 3768EC19424;\n\tThu, 19 Feb 2026 06:28:29 +0000 (UTC)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1771482509; cv=none;\n b=ihwTvLBZDTsV2hTPCCZJ2rwdhzYEILRpQ7AP85o6EiVFztCqgmzAe/77LPjYa9WQ4mhoZFclijJbR/xNgiOYMfADAH+97aJghIz3XP7UJjmCQpp7z4cCJgY3YF9+YYEpmE1gbnU35ljsUGSbRFpL/WxSRHpMpPufcFOU3Fu0WnM=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1771482509; c=relaxed/simple;\n\tbh=9DyxsG/ZP5zr4YB2rzVbbFXKZaKNfglesOtQAad4LQg=;\n\th=From:To:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=F9HgQlP96q/Jwv6vXp9BIS4E4fiBQCAkSRkPqgV02h+fDQM4LJxzsc799/NuKs8p4oEciUbTVIU0gpKt3fLCIWvOeCMT6fRiU1tnEUUr1e55DWV98ZV4ZRUcZLN7lAclUOMfO3WvgimB3d7sPOEIjWgu8+RUcw3XilMYmA1W9q0=",
        "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=JNnUWX83; 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=1771482509;\n\tbh=9DyxsG/ZP5zr4YB2rzVbbFXKZaKNfglesOtQAad4LQg=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=JNnUWX83Bo/OZXLpEfROd8YpS+ywmDAbej4pOp33KDUoPnb8Pu3Nk/NyF5YR35XjM\n\t ljuzRAxFS1ADc4r6x6GByhO7PuA7XYAdwxCKaZ+pVK61tTlW33CHUgeAyyEPq11MVB\n\t TTaQkkgRA0tdyFPaZmq558pcQI6CboEExZdn1b3Me7ov5EwbjJr5lU+9159YBYJb1J\n\t sftVsyOqt7R9mq1d1fYJpPesWwrXvaJ3FqHXQNctY5EP5jNGLXTN/5ImJgLgC9hBTz\n\t ofgcO16+vvNNfA9vI1ualCKDGV7b4mAmCSes7apLIBXQz2F8iBjUiF5ChMTFwkv1Q2\n\t Vw6gpBaxB3wgg==",
        "From": "Damien Le Moal <dlemoal@kernel.org>",
        "To": "linux-ide@vger.kernel.org,\n\tNiklas Cassel <cassel@kernel.org>",
        "Subject": "[PATCH 4/5] ata: libata-scsi: make ata_scsi_simulate() static",
        "Date": "Thu, 19 Feb 2026 15:23:11 +0900",
        "Message-ID": "<20260219062312.1030867-5-dlemoal@kernel.org>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260219062312.1030867-1-dlemoal@kernel.org>",
        "References": "<20260219062312.1030867-1-dlemoal@kernel.org>",
        "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": "ata_scsi_simulate() is called only from libata-scsi.c. Move this\nfunction definition as a static function before its call in\n__ata_scsi_queuecmd() and remove its declaration from\ninclude/linux/libata.h.\n\nNo functional changes.\n\nSigned-off-by: Damien Le Moal <dlemoal@kernel.org>\n---\n drivers/ata/libata-scsi.c | 147 +++++++++++++++++++-------------------\n include/linux/libata.h    |   1 -\n 2 files changed, 73 insertions(+), 75 deletions(-)",
    "diff": "diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c\nindex 41918e21d0f8..ad628b398fc3 100644\n--- a/drivers/ata/libata-scsi.c\n+++ b/drivers/ata/libata-scsi.c\n@@ -4420,6 +4420,79 @@ static inline ata_xlat_func_t ata_get_xlat_func(struct ata_device *dev, u8 cmd)\n \treturn NULL;\n }\n \n+/**\n+ *\tata_scsi_simulate - simulate SCSI command on ATA device\n+ *\t@dev: the target device\n+ *\t@cmd: SCSI command being sent to device.\n+ *\n+ *\tInterprets and directly executes a select list of SCSI commands\n+ *\tthat can be handled internally.\n+ *\n+ *\tLOCKING:\n+ *\tspin_lock_irqsave(host lock)\n+ */\n+static void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd)\n+{\n+\tconst u8 *scsicmd = cmd->cmnd;\n+\tu8 tmp8;\n+\n+\tswitch (scsicmd[0]) {\n+\tcase INQUIRY:\n+\t\tata_scsi_rbuf_fill(dev, cmd, ata_scsiop_inquiry);\n+\t\tbreak;\n+\n+\tcase MODE_SENSE:\n+\tcase MODE_SENSE_10:\n+\t\tata_scsi_rbuf_fill(dev, cmd, ata_scsiop_mode_sense);\n+\t\tbreak;\n+\n+\tcase READ_CAPACITY:\n+\tcase SERVICE_ACTION_IN_16:\n+\t\tata_scsi_rbuf_fill(dev, cmd, ata_scsiop_read_cap);\n+\t\tbreak;\n+\n+\tcase REPORT_LUNS:\n+\t\tata_scsi_rbuf_fill(dev, cmd, ata_scsiop_report_luns);\n+\t\tbreak;\n+\n+\tcase REQUEST_SENSE:\n+\t\tata_scsi_set_sense(dev, cmd, 0, 0, 0);\n+\t\tbreak;\n+\n+\t/* if we reach this, then writeback caching is disabled,\n+\t * turning this into a no-op.\n+\t */\n+\tcase SYNCHRONIZE_CACHE:\n+\tcase SYNCHRONIZE_CACHE_16:\n+\t\tfallthrough;\n+\n+\t/* no-op's, complete with success */\n+\tcase REZERO_UNIT:\n+\tcase SEEK_6:\n+\tcase SEEK_10:\n+\tcase TEST_UNIT_READY:\n+\t\tbreak;\n+\n+\tcase SEND_DIAGNOSTIC:\n+\t\ttmp8 = scsicmd[1] & ~(1 << 3);\n+\t\tif (tmp8 != 0x4 || scsicmd[3] || scsicmd[4])\n+\t\t\tata_scsi_set_invalid_field(dev, cmd, 1, 0xff);\n+\t\tbreak;\n+\n+\tcase MAINTENANCE_IN:\n+\t\tata_scsi_rbuf_fill(dev, cmd, ata_scsiop_maint_in);\n+\t\tbreak;\n+\n+\t/* all other commands */\n+\tdefault:\n+\t\tata_scsi_set_sense(dev, cmd, ILLEGAL_REQUEST, 0x20, 0x0);\n+\t\t/* \"Invalid command operation code\" */\n+\t\tbreak;\n+\t}\n+\n+\tscsi_done(cmd);\n+}\n+\n enum scsi_qc_status __ata_scsi_queuecmd(struct scsi_cmnd *scmd,\n \t\t\t\t\tstruct ata_device *dev)\n {\n@@ -4522,80 +4595,6 @@ enum scsi_qc_status ata_scsi_queuecmd(struct Scsi_Host *shost,\n }\n EXPORT_SYMBOL_GPL(ata_scsi_queuecmd);\n \n-/**\n- *\tata_scsi_simulate - simulate SCSI command on ATA device\n- *\t@dev: the target device\n- *\t@cmd: SCSI command being sent to device.\n- *\n- *\tInterprets and directly executes a select list of SCSI commands\n- *\tthat can be handled internally.\n- *\n- *\tLOCKING:\n- *\tspin_lock_irqsave(host lock)\n- */\n-\n-void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd)\n-{\n-\tconst u8 *scsicmd = cmd->cmnd;\n-\tu8 tmp8;\n-\n-\tswitch(scsicmd[0]) {\n-\tcase INQUIRY:\n-\t\tata_scsi_rbuf_fill(dev, cmd, ata_scsiop_inquiry);\n-\t\tbreak;\n-\n-\tcase MODE_SENSE:\n-\tcase MODE_SENSE_10:\n-\t\tata_scsi_rbuf_fill(dev, cmd, ata_scsiop_mode_sense);\n-\t\tbreak;\n-\n-\tcase READ_CAPACITY:\n-\tcase SERVICE_ACTION_IN_16:\n-\t\tata_scsi_rbuf_fill(dev, cmd, ata_scsiop_read_cap);\n-\t\tbreak;\n-\n-\tcase REPORT_LUNS:\n-\t\tata_scsi_rbuf_fill(dev, cmd, ata_scsiop_report_luns);\n-\t\tbreak;\n-\n-\tcase REQUEST_SENSE:\n-\t\tata_scsi_set_sense(dev, cmd, 0, 0, 0);\n-\t\tbreak;\n-\n-\t/* if we reach this, then writeback caching is disabled,\n-\t * turning this into a no-op.\n-\t */\n-\tcase SYNCHRONIZE_CACHE:\n-\tcase SYNCHRONIZE_CACHE_16:\n-\t\tfallthrough;\n-\n-\t/* no-op's, complete with success */\n-\tcase REZERO_UNIT:\n-\tcase SEEK_6:\n-\tcase SEEK_10:\n-\tcase TEST_UNIT_READY:\n-\t\tbreak;\n-\n-\tcase SEND_DIAGNOSTIC:\n-\t\ttmp8 = scsicmd[1] & ~(1 << 3);\n-\t\tif (tmp8 != 0x4 || scsicmd[3] || scsicmd[4])\n-\t\t\tata_scsi_set_invalid_field(dev, cmd, 1, 0xff);\n-\t\tbreak;\n-\n-\tcase MAINTENANCE_IN:\n-\t\tata_scsi_rbuf_fill(dev, cmd, ata_scsiop_maint_in);\n-\t\tbreak;\n-\n-\t/* all other commands */\n-\tdefault:\n-\t\tata_scsi_set_sense(dev, cmd, ILLEGAL_REQUEST, 0x20, 0x0);\n-\t\t/* \"Invalid command operation code\" */\n-\t\tbreak;\n-\t}\n-\n-\tscsi_done(cmd);\n-}\n-\n int ata_scsi_add_hosts(struct ata_host *host, const struct scsi_host_template *sht)\n {\n \tint i, rc;\ndiff --git a/include/linux/libata.h b/include/linux/libata.h\nindex 00346ce3af5e..db87c99e4189 100644\n--- a/include/linux/libata.h\n+++ b/include/linux/libata.h\n@@ -1205,7 +1205,6 @@ extern unsigned int ata_do_dev_read_id(struct ata_device *dev,\n \t\t\t\t       struct ata_taskfile *tf, __le16 *id);\n extern void ata_qc_complete(struct ata_queued_cmd *qc);\n extern u64 ata_qc_get_active(struct ata_port *ap);\n-extern void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd);\n extern int ata_std_bios_param(struct scsi_device *sdev,\n \t\t\t      struct gendisk *unused,\n \t\t\t      sector_t capacity, int geom[]);\n",
    "prefixes": [
        "4/5"
    ]
}