From patchwork Tue Oct 13 14:26:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 287546 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C673C433DF for ; Tue, 13 Oct 2020 14:39:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ECF082485D for ; Tue, 13 Oct 2020 14:39:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="2ORlbvHK"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="BdtfAdjz" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730014AbgJMOjY (ORCPT ); Tue, 13 Oct 2020 10:39:24 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:52370 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729656AbgJMOjY (ORCPT ); Tue, 13 Oct 2020 10:39:24 -0400 Message-Id: <20201013142616.118697527@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1602599962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WYttoZQBVnlZi5CIrd2nl7FrtaNidcslV10mrzt6KO8=; b=2ORlbvHKKR7ZAqZuOj8rj/14hza1IdaFe/bNqRgEl8hlzSBgZBLDNRwN1NQ5J0ZtZ0u70K qiGCbjDUBGIuEqqO+HohqaxM2USAsyPEzQlyHlwLC4Tlag3oz1mv3S/jXW8vGyQ6UIxkyy iPGHqF65deDukz1KUZwP42l0H7W939cLU6g3zU9oQ8WeZ5FGzRRgfCmwji77WmxL+Sc1ws lbQzE0Vn+saniEGA/xjoKzqNunpBWlrltr2bPtSH7QzuVCIHaFi+eHfmTGBJ510GZapEoK bfzDapgU5bE1bwpVvdilBE0Vb78yKguynbbtYzKNW9sMAYoxAFkYouMvXmuKlw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1602599962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WYttoZQBVnlZi5CIrd2nl7FrtaNidcslV10mrzt6KO8=; b=BdtfAdjzrcIrQ1EVLKI5m7Ukon1T7gtMt66OfUEBNDCo8ClXSr7/lPmULdKFFtT9+Diku5 4HNAtPyRr+MkAHAw== Date: Tue, 13 Oct 2020 16:26:16 +0200 From: Thomas Gleixner To: LKML Cc: Peter Zijlstra , Hans Verkuil , Laurent Pinchart , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-usb@vger.kernel.org, Hans Verkuil Subject: [patch 0/4] media: Cleanup in_interrupt() usage MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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(-)