diff options
| author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2025-09-19 08:54:43 +0900 |
|---|---|---|
| committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2025-09-19 08:58:34 +0900 |
| commit | 182edc05b087f58245d5481e2d4adb231a45a903 (patch) | |
| tree | 3b738df643c9ec756fb638d763a9a6171ae4bdb1 | |
| parent | e6d2338b6f3e522872f3a14fcc5e5de2f58bf23b (diff) | |
firewire: core: remove useless generation check
Two functions, fw_core_handle_bus_reset() and bm_work(), are serialized
by a commit 3d91fd440cc7 ("firewire: core: disable bus management work
temporarily during updating topology"). Therefore the generation member
of fw_card is immutable in bm_work().
This commit removes useless generation check in bm_work().
Link: https://lore.kernel.org/r/20250918235448.129705-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
| -rw-r--r-- | drivers/firewire/core-card.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/firewire/core-card.c b/drivers/firewire/core-card.c index 4fcd5ce4b2ce..ef00125fb01a 100644 --- a/drivers/firewire/core-card.c +++ b/drivers/firewire/core-card.c @@ -362,14 +362,12 @@ static void bm_work(struct work_struct *work) if (rcode == RCODE_COMPLETE) { int bm_id = be32_to_cpu(data[0]); - if (generation == card->generation) { - // Used by cdev layer for "struct fw_cdev_event_bus_reset". - scoped_guard(spinlock, &card->lock) { - if (bm_id != BUS_MANAGER_ID_NOT_REGISTERED) - card->bm_node_id = 0xffc0 & bm_id; - else - card->bm_node_id = local_id; - } + // Used by cdev layer for "struct fw_cdev_event_bus_reset". + scoped_guard(spinlock, &card->lock) { + if (bm_id != BUS_MANAGER_ID_NOT_REGISTERED) + card->bm_node_id = 0xffc0 & bm_id; + else + card->bm_node_id = local_id; } if (bm_id != BUS_MANAGER_ID_NOT_REGISTERED) { |
