mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 07:47:50 +00:00
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>
This commit is contained in:
@@ -240,7 +240,7 @@ static void br_work(struct work_struct *work)
|
||||
|
||||
/* Delay for 2s after last reset per IEEE 1394 clause 8.2.1. */
|
||||
if (card->reset_jiffies != 0 &&
|
||||
time_before64(get_jiffies_64(), card->reset_jiffies + secs_to_jiffies(2))) {
|
||||
time_is_after_jiffies64(card->reset_jiffies + secs_to_jiffies(2))) {
|
||||
trace_bus_reset_postpone(card->index, card->generation, card->br_short);
|
||||
|
||||
if (!queue_delayed_work(fw_workqueue, &card->br_work, secs_to_jiffies(2)))
|
||||
@@ -308,7 +308,7 @@ static void bm_work(struct work_struct *work)
|
||||
irm_id = card->irm_node->node_id;
|
||||
local_id = card->local_node->node_id;
|
||||
|
||||
grace = time_after64(get_jiffies_64(), card->reset_jiffies + msecs_to_jiffies(125));
|
||||
grace = time_is_before_jiffies64(card->reset_jiffies + msecs_to_jiffies(125));
|
||||
|
||||
if ((is_next_generation(generation, card->bm_generation) &&
|
||||
!card->bm_abdicate) ||
|
||||
|
||||
@@ -1324,7 +1324,7 @@ static void iso_resource_work(struct work_struct *work)
|
||||
todo = r->todo;
|
||||
// Allow 1000ms grace period for other reallocations.
|
||||
if (todo == ISO_RES_ALLOC &&
|
||||
time_before64(get_jiffies_64(), client->device->card->reset_jiffies + secs_to_jiffies(1))) {
|
||||
time_is_after_jiffies64(client->device->card->reset_jiffies + secs_to_jiffies(1))) {
|
||||
schedule_iso_resource(r, msecs_to_jiffies(333));
|
||||
skip = true;
|
||||
} else {
|
||||
|
||||
@@ -855,8 +855,7 @@ static void fw_device_shutdown(struct work_struct *work)
|
||||
{
|
||||
struct fw_device *device = from_work(device, work, work.work);
|
||||
|
||||
if (time_before64(get_jiffies_64(),
|
||||
device->card->reset_jiffies + SHUTDOWN_DELAY)
|
||||
if (time_is_after_jiffies64(device->card->reset_jiffies + SHUTDOWN_DELAY)
|
||||
&& !list_empty(&device->card->link)) {
|
||||
fw_schedule_device_work(device, SHUTDOWN_DELAY);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user