diff options
| author | Miquel Raynal <miquel.raynal@bootlin.com> | 2026-05-26 16:56:39 +0200 |
|---|---|---|
| committer | Pratyush Yadav <pratyush@kernel.org> | 2026-05-26 17:21:04 +0200 |
| commit | c672673c4b7b82d21537cd5aa32b98f48c20a2b2 (patch) | |
| tree | 102f0842713da8041b048328475eed007403b2c1 /scripts/patch-kernel | |
| parent | 290e83833688b4df0da746af4c5fb87dbed2834a (diff) | |
mtd: spi-nor: swp: Simplify checking the locked/unlocked range
In both the locking/unlocking steps, at the end we verify whether we do
not lock/unlock more than requested (in which case an error must be
returned).
While being possible to do that with very simple mask comparisons, it
does not scale when adding extra locking features such as the CMP
possibility. In order to make these checks slightly easier to read and
more future proof, use existing helpers to read the (future) status
register, extract the covered range, and compare it with very usual
algebric comparisons.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Pratyush Yadav <pratyush@kernel.org>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions
