Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, linux-usb@vger.kernel.org,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: [patch 0/4] media: Cleanup in_interrupt() usage
Date: Tue, 13 Oct 2020 16:26:16 +0200
Message-ID: <20201013142616.118697527@linutronix.de> (raw)

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(-)


             reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-13 14:26 Thomas Gleixner [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201013142616.118697527@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=hverkuil@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git