get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2219641,
    "url": "http://patchwork.ozlabs.org/api/1.0/patches/2219641/?format=api",
    "project": {
        "id": 3,
        "url": "http://patchwork.ozlabs.org/api/1.0/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
    },
    "msgid": "<20260403-winbond-v6-18-rc1-spi-nor-swp-v4-17-833dab5e7288@bootlin.com>",
    "date": "2026-04-03T16:09:35",
    "name": "[v4,17/27] mtd: spi-nor: debugfs: Add locking support",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "bad803b772bbb49f69fa2ae4da46033acb647339",
    "submitter": {
        "id": 73368,
        "url": "http://patchwork.ozlabs.org/api/1.0/people/73368/?format=api",
        "name": "Miquel Raynal",
        "email": "miquel.raynal@bootlin.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-mtd/patch/20260403-winbond-v6-18-rc1-spi-nor-swp-v4-17-833dab5e7288@bootlin.com/mbox/",
    "series": [
        {
            "id": 498652,
            "url": "http://patchwork.ozlabs.org/api/1.0/series/498652/?format=api",
            "date": "2026-04-03T16:09:18",
            "name": "mtd: spi-nor: Enhance software protection",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/498652/mbox/"
        }
    ],
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2219641/checks/",
    "tags": {},
    "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=v6OwKwGS;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256\n header.s=dkim header.b=zMM4hbm8;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; 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 4fnNx66XlVz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 04 Apr 2026 03:10:34 +1100 (AEDT)",
            "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1w8h6J-00000002Hag-0cP3;\n\tFri, 03 Apr 2026 16:10:27 +0000",
            "from smtpout-03.galae.net ([185.246.85.4])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1w8h6B-00000002HOF-3kpW\n\tfor linux-mtd@lists.infradead.org;\n\tFri, 03 Apr 2026 16:10:25 +0000",
            "from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233])\n\tby smtpout-03.galae.net (Postfix) with ESMTPS id 254484E428D7;\n\tFri,  3 Apr 2026 16:10:18 +0000 (UTC)",
            "from mail.galae.net (mail.galae.net [212.83.136.155])\n\tby smtpout-01.galae.net (Postfix) with ESMTPS id EF749603C1;\n\tFri,  3 Apr 2026 16:10:17 +0000 (UTC)",
            "from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon)\n with ESMTPSA id 32B7810450109;\n\tFri,  3 Apr 2026 18:10:15 +0200 (CEST)"
        ],
        "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:Cc:To:In-Reply-To:References:Message-Id\n\t:MIME-Version:Subject:Date: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=TvvI05UTRSjV6IXa9AfjBVPjhcsLT1YTrdkWJxAIbzg=; b=v6OwKwGSdYHkcZ\n\tbz8QXwBlS4Ol9OLo5w4wKo19wUzjYnqxRQZmTGA1Tk1refANr+DdYhtwXGaPUyCBZUNMfQceIy1FA\n\tjLNhyuNCv8M3RNEQm89fj7LVa+X4dYTFi/xQG/MI02vdfFqak6cNj0AH7P9b3IxqYaB+xovzAeS+H\n\tFcKCApOa5jdTH0WsJ8skJ5Nk3mtnK6ef3aBnzanNf/IgACPvSoan8V+Q0crZOJTUEXr0R9Q+/oOBG\n\tg9D2Uw4yIX87vYp9K1cNTjHDZ4K325AMmyQ2Ii5alaOTTAKTQfrYPMGk4HJD3E3XKP88bqYRt8TDG\n\tHiKeq7yJhzIzOA7S1LAQ==;",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim;\n\tt=1775232617; h=from:subject:date:message-id:to:cc:mime-version:content-type:\n\t content-transfer-encoding:in-reply-to:references;\n\tbh=BTfD2i7QceyxCGKPOQo667FcG7sbtAJLIKE74Vn9+eQ=;\n\tb=zMM4hbm8g/TT9sNB1p3va8+BxJfTg1OaTe1CGq8hJU9ZRigsEF50tT2TfUkv3KR1W9iyrD\n\tOkZVDbn5wIwynP9CQ1T9Nd9SJhhVbHESsr/yKFODj+ra+TcmaANGueyK6roJJslB8j6p4c\n\tE0ZNs9cPGf5ajeQrGUd0ixX4oPaDOgYy71+c9afkcbc/00JRUJu/ydStcK/ni+6K+z5VDr\n\tRPj/FwXYYjPuOdrBvh/42v8OlUoyE2mqHim8aCkK1B5Q8eqwrI7JBR4YfnmRk/cstbrnNW\n\tHYL+d3SJqJy33GV+/xf/o8loSFlvFOM+AYI/Kfi1rBxEy03Ajs3FnUWxZkwEqA=="
        ],
        "From": "Miquel Raynal <miquel.raynal@bootlin.com>",
        "Date": "Fri, 03 Apr 2026 18:09:35 +0200",
        "Subject": "[PATCH v4 17/27] mtd: spi-nor: debugfs: Add locking support",
        "MIME-Version": "1.0",
        "Message-Id": "\n <20260403-winbond-v6-18-rc1-spi-nor-swp-v4-17-833dab5e7288@bootlin.com>",
        "References": "\n <20260403-winbond-v6-18-rc1-spi-nor-swp-v4-0-833dab5e7288@bootlin.com>",
        "In-Reply-To": "\n <20260403-winbond-v6-18-rc1-spi-nor-swp-v4-0-833dab5e7288@bootlin.com>",
        "To": "Pratyush Yadav <pratyush@kernel.org>, Michael Walle <mwalle@kernel.org>,\n Takahiro Kuwano <takahiro.kuwano@infineon.com>,\n Richard Weinberger <richard@nod.at>, Vignesh Raghavendra <vigneshr@ti.com>,\n Jonathan Corbet <corbet@lwn.net>",
        "Cc": "Sean Anderson <sean.anderson@linux.dev>,\n Thomas Petazzoni <thomas.petazzoni@bootlin.com>,\n Steam Lin <STLin2@winbond.com>, linux-mtd@lists.infradead.org,\n linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,\n Miquel Raynal <miquel.raynal@bootlin.com>",
        "X-Mailer": "b4 0.14.3",
        "X-Last-TLS-Session-Version": "TLSv1.3",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20260403_091020_156612_4EFDC755 ",
        "X-CRM114-Status": "GOOD (  19.92  )",
        "X-Spam-Score": "-2.1 (--)",
        "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:  The ioctl output may be counter intuitive in some cases.\n Asking\n    for a \"locked status\" over a region that is only partially locked will\n return\n    \"unlocked\" whereas in practice maybe the biggest part is a [...]\n Content analysis details:   (-2.1 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record\n -0.0 SPF_PASS               SPF: sender matches SPF record\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from\n                             envelope-from domain\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\n  0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n                              Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                             [185.246.85.4 listed in sa-accredit.habeas.com]\n  0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The\n                             query to Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                           [185.246.85.4 listed in\n sa-trusted.bondedsender.org]\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]\n  0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n                              Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                             [185.246.85.4 listed in bl.score.senderscore.com]\n  0.0 LOTS_OF_MONEY          Huge... sums of money",
        "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": "The ioctl output may be counter intuitive in some cases. Asking for a\n\"locked status\" over a region that is only partially locked will return\n\"unlocked\" whereas in practice maybe the biggest part is actually\nlocked.\n\nKnowing what is the real software locking state through debugfs would be\nvery convenient for development/debugging purposes, hence this proposal\nfor adding an extra block at the end of the file: a \"locked sectors\"\narray which lists every section, if it is locked or not, showing both\nthe address ranges and the sizes in numbers of blocks.\n\nHere is an example of output, what is after the \"sector map\" is new.\n\n$ cat /sys/kernel/debug/spi-nor/spi0.0/params\nname\t\t(null)\nid\t\tef a0 20 00 00 00\nsize\t\t64.0 MiB\nwrite size\t1\npage size\t256\naddress nbytes\t4\nflags\t\tHAS_SR_TB | 4B_OPCODES | HAS_4BAIT | HAS_LOCK | HAS_16BIT_SR | HAS_SR_TB_BIT6 | HAS_4BIT_BP | SOFT_RESET | NO_WP\n\nopcodes\n read\t\t0xec\n  dummy cycles\t6\n erase\t\t0xdc\n program\t0x34\n 8D extension\tnone\n\nprotocols\n read\t\t1S-4S-4S\n write\t\t1S-1S-4S\n register\t1S-1S-1S\n\nerase commands\n 21 (4.00 KiB) [1]\n dc (64.0 KiB) [3]\n c7 (64.0 MiB)\n\nsector map\n region (in hex)   | erase mask | overlaid\n ------------------+------------+---------\n 00000000-03ffffff |     [   3] | no\n\nlocked sectors\n region (in hex)   | status   | #blocks\n ------------------+----------+--------\n 00000000-03ffffff | unlocked | 1024\n\nSigned-off-by: Miquel Raynal <miquel.raynal@bootlin.com>\n---\nHere are below more examples of output with various situations. The full\noutput of the \"params\" content has been manually removed to only show\nwhat has been added and how it behaves.\n\n$ flash_lock -l /dev/mtd0 0x3f00000 16\n$ cat /sys/kernel/debug/spi-nor/spi0.0/params\nlocked sectors\n region (in hex)   | status   | #blocks\n ------------------+----------+--------\n 00000000-03efffff | unlocked | 1008\n 03f00000-03ffffff |   locked | 16\n$\n$ flash_lock -u /dev/mtd0 0x3f00000 8\n$ cat /sys/kernel/debug/spi-nor/spi0.0/params\nlocked sectors\n region (in hex)   | status   | #blocks\n ------------------+----------+--------\n 00000000-03f7ffff | unlocked | 1016\n 03f80000-03ffffff |   locked | 8\n$\n$ flash_lock -u /dev/mtd0\n$ cat /sys/kernel/debug/spi-nor/spi0.0/params\nlocked sectors\n region (in hex)   | status   | #blocks\n ------------------+----------+--------\n 00000000-03ffffff | unlocked | 1024\n$\n$ flash_lock -l /dev/mtd0\n$ cat /sys/kernel/debug/spi-nor/spi0.0/params\nlocked sectors\n region (in hex)   | status   | #blocks\n ------------------+----------+--------\n 00000000-03ffffff |   locked | 1024\n$\n$ flash_lock -u /dev/mtd0 0x20000 1022\n$ cat /sys/kernel/debug/spi-nor/spi0.0/params\nlocked sectors\n region (in hex)   | status   | #blocks\n ------------------+----------+--------\n 00000000-0001ffff |   locked | 2\n 00020000-03ffffff | unlocked | 1022\n---\n drivers/mtd/spi-nor/core.h    |  5 +++++\n drivers/mtd/spi-nor/debugfs.c | 27 +++++++++++++++++++++++++++\n drivers/mtd/spi-nor/swp.c     | 16 ++++++++++++----\n 3 files changed, 44 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/drivers/mtd/spi-nor/core.h b/drivers/mtd/spi-nor/core.h\nindex 091eb934abe4..8717a0ad90f0 100644\n--- a/drivers/mtd/spi-nor/core.h\n+++ b/drivers/mtd/spi-nor/core.h\n@@ -673,6 +673,7 @@ int spi_nor_post_bfpt_fixups(struct spi_nor *nor,\n \t\t\t     const struct sfdp_bfpt *bfpt);\n \n void spi_nor_init_default_locking_ops(struct spi_nor *nor);\n+bool spi_nor_has_default_locking_ops(struct spi_nor *nor);\n void spi_nor_try_unlock_all(struct spi_nor *nor);\n void spi_nor_cache_sr_lock_bits(struct spi_nor *nor, u8 *sr);\n void spi_nor_set_mtd_locking_ops(struct spi_nor *nor);\n@@ -707,6 +708,10 @@ static inline bool spi_nor_needs_sfdp(const struct spi_nor *nor)\n \treturn !nor->info->size;\n }\n \n+u64 spi_nor_get_min_prot_length_sr(struct spi_nor *nor);\n+void spi_nor_get_locked_range_sr(struct spi_nor *nor, const u8 *sr, loff_t *ofs, u64 *len);\n+bool spi_nor_is_locked_sr(struct spi_nor *nor, loff_t ofs, u64 len, const u8 *sr);\n+\n #ifdef CONFIG_DEBUG_FS\n void spi_nor_debugfs_register(struct spi_nor *nor);\n void spi_nor_debugfs_shutdown(void);\ndiff --git a/drivers/mtd/spi-nor/debugfs.c b/drivers/mtd/spi-nor/debugfs.c\nindex d0191eb9f879..298ce3d9e905 100644\n--- a/drivers/mtd/spi-nor/debugfs.c\n+++ b/drivers/mtd/spi-nor/debugfs.c\n@@ -1,6 +1,7 @@\n // SPDX-License-Identifier: GPL-2.0\n \n #include <linux/debugfs.h>\n+#include <linux/math64.h>\n #include <linux/mtd/spi-nor.h>\n #include <linux/spi/spi.h>\n #include <linux/spi/spi-mem.h>\n@@ -77,10 +78,12 @@ static void spi_nor_print_flags(struct seq_file *s, unsigned long flags,\n static int spi_nor_params_show(struct seq_file *s, void *data)\n {\n \tstruct spi_nor *nor = s->private;\n+\tunsigned int min_prot_len = spi_nor_get_min_prot_length_sr(nor);\n \tstruct spi_nor_flash_parameter *params = nor->params;\n \tstruct spi_nor_erase_map *erase_map = &params->erase_map;\n \tstruct spi_nor_erase_region *region = erase_map->regions;\n \tconst struct flash_info *info = nor->info;\n+\tloff_t lock_start, lock_length;\n \tchar buf[16], *str;\n \tunsigned int i;\n \n@@ -159,6 +162,30 @@ static int spi_nor_params_show(struct seq_file *s, void *data)\n \t\t\t   region[i].overlaid ? \"yes\" : \"no\");\n \t}\n \n+\tif (!spi_nor_has_default_locking_ops(nor))\n+\t\treturn 0;\n+\n+\tseq_puts(s, \"\\nlocked sectors\\n\");\n+\tseq_puts(s, \" region (in hex)   | status   | #blocks\\n\");\n+\tseq_puts(s, \" ------------------+----------+--------\\n\");\n+\n+\tspi_nor_get_locked_range_sr(nor, nor->dfs_sr_cache, &lock_start, &lock_length);\n+\tif (!lock_length || lock_length == params->size) {\n+\t\tseq_printf(s, \" %08llx-%08llx | %s | %llu\\n\", 0ULL, params->size - 1,\n+\t\t\t   lock_length ? \"  locked\" : \"unlocked\",\n+\t\t\t   div_u64(params->size, min_prot_len));\n+\t} else if (!lock_start) {\n+\t\tseq_printf(s, \" %08llx-%08llx | %s | %llu\\n\", 0ULL, lock_length - 1,\n+\t\t\t   \"  locked\", div_u64(lock_length, min_prot_len));\n+\t\tseq_printf(s, \" %08llx-%08llx | %s | %llu\\n\", lock_length, params->size - 1,\n+\t\t\t   \"unlocked\", div_u64(params->size - lock_length, min_prot_len));\n+\t} else {\n+\t\tseq_printf(s, \" %08llx-%08llx | %s | %llu\\n\", 0ULL, lock_start - 1,\n+\t\t\t   \"unlocked\", div_u64(lock_start, min_prot_len));\n+\t\tseq_printf(s, \" %08llx-%08llx | %s | %llu\\n\", lock_start, params->size - 1,\n+\t\t\t   \"  locked\", div_u64(lock_length, min_prot_len));\n+\t}\n+\n \treturn 0;\n }\n DEFINE_SHOW_ATTRIBUTE(spi_nor_params);\ndiff --git a/drivers/mtd/spi-nor/swp.c b/drivers/mtd/spi-nor/swp.c\nindex 7a6c2b8ef921..d75ed83eb787 100644\n--- a/drivers/mtd/spi-nor/swp.c\n+++ b/drivers/mtd/spi-nor/swp.c\n@@ -32,7 +32,7 @@ static u8 spi_nor_get_sr_tb_mask(struct spi_nor *nor)\n \t\treturn SR_TB_BIT5;\n }\n \n-static u64 spi_nor_get_min_prot_length_sr(struct spi_nor *nor)\n+u64 spi_nor_get_min_prot_length_sr(struct spi_nor *nor)\n {\n \tunsigned int bp_slots, bp_slots_needed;\n \t/*\n@@ -53,8 +53,8 @@ static u64 spi_nor_get_min_prot_length_sr(struct spi_nor *nor)\n \t\treturn sector_size;\n }\n \n-static void spi_nor_get_locked_range_sr(struct spi_nor *nor, const u8 *sr, loff_t *ofs,\n-\t\t\t\t\tu64 *len)\n+void spi_nor_get_locked_range_sr(struct spi_nor *nor, const u8 *sr, loff_t *ofs,\n+\t\t\t\t u64 *len)\n {\n \tu64 min_prot_len;\n \tu8 bp_mask = spi_nor_get_sr_bp_mask(nor);\n@@ -112,7 +112,7 @@ static bool spi_nor_check_lock_status_sr(struct spi_nor *nor, loff_t ofs,\n \t\treturn (ofs >= lock_offs_max) || (offs_max <= lock_offs);\n }\n \n-static bool spi_nor_is_locked_sr(struct spi_nor *nor, loff_t ofs, u64 len, const u8 *sr)\n+bool spi_nor_is_locked_sr(struct spi_nor *nor, loff_t ofs, u64 len, const u8 *sr)\n {\n \treturn spi_nor_check_lock_status_sr(nor, ofs, len, sr, true);\n }\n@@ -410,6 +410,9 @@ static int spi_nor_sr_is_locked(struct spi_nor *nor, loff_t ofs, u64 len)\n  * -is_locked(): Checks if the region is *fully* locked, returns false otherwise.\n  *               This feeback may be misleading because users may get an \"unlocked\"\n  *               status even though a subpart of the region is effectively locked.\n+ *\n+ * If in doubt during development, check-out the debugfs output which tries to\n+ * be more user friendly.\n  */\n static const struct spi_nor_locking_ops spi_nor_sr_locking_ops = {\n \t.lock = spi_nor_sr_lock,\n@@ -422,6 +425,11 @@ void spi_nor_init_default_locking_ops(struct spi_nor *nor)\n \tnor->params->locking_ops = &spi_nor_sr_locking_ops;\n }\n \n+bool spi_nor_has_default_locking_ops(struct spi_nor *nor)\n+{\n+\treturn nor->params->locking_ops == &spi_nor_sr_locking_ops;\n+}\n+\n static int spi_nor_lock(struct mtd_info *mtd, loff_t ofs, u64 len)\n {\n \tstruct spi_nor *nor = mtd_to_spi_nor(mtd);\n",
    "prefixes": [
        "v4",
        "17/27"
    ]
}