linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/4] media: Cleanup in_interrupt() usage
@ 2020-10-13 14:26 Thomas Gleixner
  2020-10-13 14:26 ` [patch 1/4] media: Bulk remove BUG_ON(in_interrupt()) Thomas Gleixner
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Thomas Gleixner @ 2020-10-13 14:26 UTC (permalink / raw)
  To: LKML
  Cc: Peter Zijlstra, Hans Verkuil, Laurent Pinchart,
	Mauro Carvalho Chehab, linux-media, linux-usb, Hans Verkuil

Folks,

in the discussion about preempt count consistency accross kernel
configurations:

 https://lore.kernel.org/r/20200914204209.256266093@linutronix.de/

it was concluded that the usage of in_interrupt() and related context
checks should be removed from non-core code.

The media subsystem has a few instances of in_interrupt() usage:

 1) BUG_ON(in_interrupt()

    BUG_ON() is considered the last resort and the usage there is clearly
    not in that category. It could be replaced by a
    lockdep_assert_preemption_enabled(), but all these usage sites invoke
    core functionality which will catch incorrect context already. So
    adding more there is not really useful

 2) Comments and printk()'s

    The comment is misleading and the checks in the printk()'s are
    pointless as the code can never be called from in_interrupt() as it
    contains GFP_KERNEL allocations.

I'm collecting related cleanups all over the tree, but feel free to route
them through the media tree as they have no dependencies. Let me know which
route you prefer.

Thanks,

	tglx
---
 common/saa7146/saa7146_fops.c |    2 --
 pci/bt8xx/bttv-risc.c         |    1 -
 pci/cx23885/cx23885-core.c    |    1 -
 pci/cx25821/cx25821-core.c    |    1 -
 platform/fsl-viu.c            |    2 --
 platform/omap3isp/ispccdc.c   |    5 ++---
 usb/au0828/au0828-video.c     |    5 ++---
 usb/cx231xx/cx231xx-core.c    |   10 ++++------
 usb/cx231xx/cx231xx-vbi.c     |    3 +--
 usb/tm6000/tm6000-video.c     |    2 --
 usb/zr364xx/zr364xx.c         |    2 --
 11 files changed, 9 insertions(+), 25 deletions(-)


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-10-17  6:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-13 14:26 [patch 0/4] media: Cleanup in_interrupt() usage Thomas Gleixner
2020-10-13 14:26 ` [patch 1/4] media: Bulk remove BUG_ON(in_interrupt()) Thomas Gleixner
2020-10-13 14:26 ` [patch 2/4] media: omap3isp: Remove misleading comment Thomas Gleixner
2020-10-13 18:20   ` Laurent Pinchart
2020-10-13 14:26 ` [patch 3/4] media: au0828: Consolidate dmesg output Thomas Gleixner
2020-10-13 14:26 ` [patch 4/4] media: cx231xx: " Thomas Gleixner
2020-10-14 14:36   ` kernel test robot
2020-10-14 15:21     ` Thomas Gleixner
2020-10-14 15:38   ` [patch V2 " Thomas Gleixner
2020-10-17  2:56   ` [patch " kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).