]> git.baikalelectronics.ru Git - kernel.git/commit
net: mlx5: Replace in_irq() usage
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 27 Oct 2020 22:54:43 +0000 (23:54 +0100)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 5 Nov 2020 20:09:31 +0000 (12:09 -0800)
commit7672d784758c149fb99469461706feb5307de1d3
treec8179456ccde637c7092e5c686bc3c3264911007
parenta0f554abfffef035b0d3586f0e856f3027ecb5a2
net: mlx5: Replace in_irq() usage

mlx5_eq_async_int() uses in_irq() to decide whether eq::lock needs to be
acquired and released with spin_[un]lock() or the irq saving/restoring
variants.

The usage of in_*() in drivers is phased out and Linus clearly requested
that code which changes behaviour depending on context should either be
seperated or the context be conveyed in an argument passed by the caller,
which usually knows the context.

mlx5_eq_async_int() knows the context via the action argument already so
using it for the lock variant decision is a straight forward replacement
for in_irq().

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/eq.c