* [PATCH] swim3: Set .owner = THIS_MODULE in floppy_fops
@ 2026-12-03 17:14 Ian Rogers
0 siblings, 0 replies; only message in thread
From: Ian Rogers @ 2026-12-03 17:14 UTC (permalink / raw)
To: Jens Axboe
Cc: Madhavan Srinivasan, Michael Ellerman, Finn Thain,
Nathan Chancellor, linux-block, linuxppc-dev, llvm, linux-kernel,
Ian Rogers
bdev_open() calls try_module_get(disk->fops->owner) and bdev_release()
calls module_put(disk->fops->owner). swim3 can be built as a module
(CONFIG_MAC_FLOPPY), though it currently lacks a module_exit() handler.
Set .owner = THIS_MODULE in floppy_fops for consistency with other
block_device_operations definitions and to prepare for annotating
struct block_device_operations::owner with Clang's
require_explicit_initialization attribute.
Signed-off-by: Ian Rogers <irogers@google.com>
---
Note: Found using Clang's require_explicit_initialization attribute;
an AI coding assistant helped audit call sites, verify Fixes commits,
and draft the changelog.
drivers/block/swim3.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index a03de4c4d35f..898a5e642c80 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -1068,6 +1068,7 @@ static int floppy_revalidate(struct gendisk *disk)
}
static const struct block_device_operations floppy_fops = {
+ .owner = THIS_MODULE,
.open = floppy_unlocked_open,
.release = floppy_release,
.ioctl = floppy_ioctl,
base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
--
2.56.1.839.g22a8290db9-goog
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-12-03 17:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 17:14 [PATCH] swim3: Set .owner = THIS_MODULE in floppy_fops Ian Rogers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox