Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

firewire: core: use helper macro to compare against current jiffies

The pattern of calling either time_before64() or time_after64() with
get_jiffies_64() can be replaced with the corresponding helper macros.

Link: https://lore.kernel.org/r/20250915024232.851955-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>

+4 -5
+2 -2
drivers/firewire/core-card.c
··· 240 240 241 241 /* Delay for 2s after last reset per IEEE 1394 clause 8.2.1. */ 242 242 if (card->reset_jiffies != 0 && 243 - time_before64(get_jiffies_64(), card->reset_jiffies + secs_to_jiffies(2))) { 243 + time_is_after_jiffies64(card->reset_jiffies + secs_to_jiffies(2))) { 244 244 trace_bus_reset_postpone(card->index, card->generation, card->br_short); 245 245 246 246 if (!queue_delayed_work(fw_workqueue, &card->br_work, secs_to_jiffies(2))) ··· 308 308 irm_id = card->irm_node->node_id; 309 309 local_id = card->local_node->node_id; 310 310 311 - grace = time_after64(get_jiffies_64(), card->reset_jiffies + msecs_to_jiffies(125)); 311 + grace = time_is_before_jiffies64(card->reset_jiffies + msecs_to_jiffies(125)); 312 312 313 313 if ((is_next_generation(generation, card->bm_generation) && 314 314 !card->bm_abdicate) ||
+1 -1
drivers/firewire/core-cdev.c
··· 1324 1324 todo = r->todo; 1325 1325 // Allow 1000ms grace period for other reallocations. 1326 1326 if (todo == ISO_RES_ALLOC && 1327 - time_before64(get_jiffies_64(), client->device->card->reset_jiffies + secs_to_jiffies(1))) { 1327 + time_is_after_jiffies64(client->device->card->reset_jiffies + secs_to_jiffies(1))) { 1328 1328 schedule_iso_resource(r, msecs_to_jiffies(333)); 1329 1329 skip = true; 1330 1330 } else {
+1 -2
drivers/firewire/core-device.c
··· 855 855 { 856 856 struct fw_device *device = from_work(device, work, work.work); 857 857 858 - if (time_before64(get_jiffies_64(), 859 - device->card->reset_jiffies + SHUTDOWN_DELAY) 858 + if (time_is_after_jiffies64(device->card->reset_jiffies + SHUTDOWN_DELAY) 860 859 && !list_empty(&device->card->link)) { 861 860 fw_schedule_device_work(device, SHUTDOWN_DELAY); 862 861 return;