Skip to content

Commit

Permalink
scsi: myrs: Remove WARN_ON(in_interrupt())
Browse files Browse the repository at this point in the history
The in_interrupt() macro is ill-defined and does not provide what the name
suggests. The usage especially in driver code is deprecated and a tree-wide
effort to clean up and consolidate the (ab)usage of in_interrupt() and
related checks is happening.

In this case the check covers only parts of the contexts in which these
functions cannot be called. It fails to detect preemption or interrupt
disabled invocations.

As wait_for_completion() already contains a broad variety of checks (always
enabled or debug option dependent) which cover all invalid conditions
already, there is no point in having extra inconsistent warnings in
drivers.

Just remove it.

Link: https://lore.kernel.org/r/[email protected]
Cc: Hannes Reinecke <[email protected]>
Reviewed-by: Daniel Wagner <[email protected]>
Signed-off-by: Ahmed S. Darwish <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
  • Loading branch information
a-darwish authored and martinkpetersen committed Dec 1, 2020
1 parent 3bc08b9 commit ca68536
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/scsi/myrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ static void myrs_exec_cmd(struct myrs_hba *cs,
myrs_qcmd(cs, cmd_blk);
spin_unlock_irqrestore(&cs->queue_lock, flags);

WARN_ON(in_interrupt());
wait_for_completion(&complete);
}

Expand Down

0 comments on commit ca68536

Please sign in to comment.