From patchwork Tue Oct 13 14:26:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 287545 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=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED autolearn=unavailable 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 0B96FC43467 for ; Tue, 13 Oct 2020 14:39:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AC5D724859 for ; Tue, 13 Oct 2020 14:39:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="EGkAmJQI"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="SBBf6DeI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387658AbgJMOjc (ORCPT ); Tue, 13 Oct 2020 10:39:32 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:52386 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729832AbgJMOjZ (ORCPT ); Tue, 13 Oct 2020 10:39:25 -0400 Message-Id: <20201013143731.563049429@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1602599963; 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: references:references; bh=Kt7syLlkwliIK4Vw2o2WQSVVoFIsSjJ4Z19KFu4kzkY=; b=EGkAmJQIMjH8XEWyTcEPAbG6aoAfIAwTXpvd5xmhzfh00kwI7+yYrNqumjQrgoSafxJ2Xn lZAU5lPizhgU63I4kr+C2QhdZx4Rqo+ztrG6xbmGgNQl7gAvZ7o0B3CxaoRPx9o3eZZmqS /+mJ23UQYYqYRZp1Yz+8AafcxV/GKCXTDBY8g0MSvJpem+TyKTKZuP5r8jgzPBWmXNfaCi sZDddc75xhJGv6IkLuxNbOVSVIJQ1xUMff2DY/BdfrNzW8OoS2aDX1W32n+vRT0IcKjt5H brMjUm3awCanQZd7XPn51wDFoZKUcUIlt8dH4WrlZU8E6yCeaeMT/IMth1vw7w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1602599963; 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: references:references; bh=Kt7syLlkwliIK4Vw2o2WQSVVoFIsSjJ4Z19KFu4kzkY=; b=SBBf6DeIAvBVI1JTWw3BsxbVXtBYgteaT4Fxdz36fh4VCqjiNSXAUeXO+efsnGpbD4nzh3 bi6OYsY4XC0YV6AQ== Date: Tue, 13 Oct 2020 16:26:17 +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 1/4] media: Bulk remove BUG_ON(in_interrupt()) References: <20201013142616.118697527@linutronix.de> MIME-Version: 1.0 Content-transfer-encoding: 8-bit Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org None of these BUG_ON()'s is justified. BUG_ON() should only be used when there is really no way to survive. If at all these could be replaced by lockdep_assert_preemption_enabled() to cover all invalid caller context and not just those covered by in_interrupt(). But all functions which are invoked from those places contain already debug mechanisms to catch wrong context, so having these extra checks is not having any advantage. Signed-off-by: Thomas Gleixner Cc: Hans Verkuil Cc: Laurent Pinchart Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Cc: linux-usb@vger.kernel.org diff --git a/drivers/media/common/saa7146/saa7146_fops.c b/drivers/media/common/saa7146/saa7146_fops.c index d6531874faa6..e936c56b0378 100644 --- a/drivers/media/common/saa7146/saa7146_fops.c +++ b/drivers/media/common/saa7146/saa7146_fops.c @@ -55,8 +55,6 @@ void saa7146_dma_free(struct saa7146_dev *dev,struct videobuf_queue *q, struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); DEB_EE("dev:%p, buf:%p\n", dev, buf); - BUG_ON(in_interrupt()); - videobuf_waiton(q, &buf->vb, 0, 0); videobuf_dma_unmap(q->dev, dma); videobuf_dma_free(dma); diff --git a/drivers/media/pci/bt8xx/bttv-risc.c b/drivers/media/pci/bt8xx/bttv-risc.c index 4af72826b006..32fa4a7fe76f 100644 --- a/drivers/media/pci/bt8xx/bttv-risc.c +++ b/drivers/media/pci/bt8xx/bttv-risc.c @@ -572,7 +572,6 @@ bttv_dma_free(struct videobuf_queue *q,struct bttv *btv, struct bttv_buffer *buf { struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); - BUG_ON(in_interrupt()); videobuf_waiton(q, &buf->vb, 0, 0); videobuf_dma_unmap(q->dev, dma); videobuf_dma_free(dma); diff --git a/drivers/media/pci/cx23885/cx23885-core.c b/drivers/media/pci/cx23885/cx23885-core.c index 4b0c53f61fb7..16eb4ab0e73e 100644 --- a/drivers/media/pci/cx23885/cx23885-core.c +++ b/drivers/media/pci/cx23885/cx23885-core.c @@ -1322,7 +1322,6 @@ void cx23885_free_buffer(struct cx23885_dev *dev, struct cx23885_buffer *buf) { struct cx23885_riscmem *risc = &buf->risc; - BUG_ON(in_interrupt()); pci_free_consistent(dev->pci, risc->size, risc->cpu, risc->dma); } diff --git a/drivers/media/pci/cx25821/cx25821-core.c b/drivers/media/pci/cx25821/cx25821-core.c index 55018d9e439f..6f8ffab8840f 100644 --- a/drivers/media/pci/cx25821/cx25821-core.c +++ b/drivers/media/pci/cx25821/cx25821-core.c @@ -1198,7 +1198,6 @@ EXPORT_SYMBOL(cx25821_risc_databuffer_audio); void cx25821_free_buffer(struct cx25821_dev *dev, struct cx25821_buffer *buf) { - BUG_ON(in_interrupt()); if (WARN_ON(buf->risc.size == 0)) return; pci_free_consistent(dev->pci, diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c index 84633a3b8475..e0c51cd779b8 100644 --- a/drivers/media/platform/fsl-viu.c +++ b/drivers/media/platform/fsl-viu.c @@ -381,8 +381,6 @@ static void free_buffer(struct videobuf_queue *vq, struct viu_buf *buf) struct videobuf_buffer *vb = &buf->vb; void *vaddr = NULL; - BUG_ON(in_interrupt()); - videobuf_waiton(vq, &buf->vb, 0, 0); if (vq->int_ops && vq->int_ops->vaddr) diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c index bfba06ea60e9..9b44462c5332 100644 --- a/drivers/media/usb/tm6000/tm6000-video.c +++ b/drivers/media/usb/tm6000/tm6000-video.c @@ -692,8 +692,6 @@ static void free_buffer(struct videobuf_queue *vq, struct tm6000_buffer *buf) struct tm6000_core *dev = fh->dev; unsigned long flags; - BUG_ON(in_interrupt()); - /* We used to wait for the buffer to finish here, but this didn't work because, as we were keeping the state as VIDEOBUF_QUEUED, videobuf_queue_cancel marked it as finished for us. diff --git a/drivers/media/usb/zr364xx/zr364xx.c b/drivers/media/usb/zr364xx/zr364xx.c index 8c670934d920..83221c0b6e6d 100644 --- a/drivers/media/usb/zr364xx/zr364xx.c +++ b/drivers/media/usb/zr364xx/zr364xx.c @@ -357,8 +357,6 @@ static void free_buffer(struct videobuf_queue *vq, struct zr364xx_buffer *buf) { _DBG("%s\n", __func__); - BUG_ON(in_interrupt()); - videobuf_vmalloc_free(&buf->vb); buf->vb.state = VIDEOBUF_NEEDS_INIT; } From patchwork Tue Oct 13 14:26:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 287544 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=-6.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 BE7A1C433E7 for ; Tue, 13 Oct 2020 14:39:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5FFF22486D for ; Tue, 13 Oct 2020 14:39:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="E0Diahv1"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="9ZtFqq8w" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730118AbgJMOja (ORCPT ); Tue, 13 Oct 2020 10:39:30 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:52400 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729656AbgJMOj0 (ORCPT ); Tue, 13 Oct 2020 10:39:26 -0400 Message-Id: <20201013143731.704783731@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1602599964; 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: references:references; bh=a1AkYZbMaX1Ip/6DiYMtAdKuae5XYIyVZnWdexQvoAI=; b=E0Diahv1lXwkaiuX7osORu/gGHy+OH+vrt2WfUnNkb/EZ4N/z3Jyb1B/xliYIpJlR67qSP SYFY/RSiw/7yODuTjOh68qHTkIf/l+ZdfLt8wAxTop/p1bUv4ivyCLV4gfOlk5jO1tMGgs lost/0xfuj1w8ujbNgM+QPQFz3GzsIKU8jNtpQMrSjNj+9fPF0qq0p1d0oN+l5vZjnoi/s +dMP5sRzydTxi6wp+ZHsADHWBcK4AazZjfyKxD2+ffmI1JrVQ+YDwOcFnpb290TCLxcgRV Q7ftcXPaxT8A7oWjA/1wIgs3PAOX1krKqniP44gZd5+L30JO27g+6+1aUvemJg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1602599964; 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: references:references; bh=a1AkYZbMaX1Ip/6DiYMtAdKuae5XYIyVZnWdexQvoAI=; b=9ZtFqq8wRih8Z7DchJqH8jYtRdOVzPS8eoB3lEj+pAREQYoG3MiBkveu0h9MR0bJiqk2Wb jZerbbemLqBG+ODQ== Date: Tue, 13 Oct 2020 16:26:18 +0200 From: Thomas Gleixner To: LKML Cc: Peter Zijlstra , Mauro Carvalho Chehab , Laurent Pinchart , linux-media@vger.kernel.org, Hans Verkuil , linux-usb@vger.kernel.org, Hans Verkuil Subject: [patch 2/4] media: omap3isp: Remove misleading comment References: <20201013142616.118697527@linutronix.de> MIME-Version: 1.0 Content-transfer-encoding: 8-bit Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org in_interrupt() covers hard and soft interrupt servicing and bottom half disabled contexts, which is semantically ill defined. The comment for __ccdc_lsc_configure() "Context: in_interrupt()" is therefore as useful as "Context: unknown'. Remove it. Signed-off-by: Thomas Gleixner Cc: Mauro Carvalho Chehab Cc: Laurent Pinchart Cc: linux-media@vger.kernel.org Reviewed-by: Laurent Pinchart --- drivers/media/platform/omap3isp/ispccdc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/drivers/media/platform/omap3isp/ispccdc.c +++ b/drivers/media/platform/omap3isp/ispccdc.c @@ -299,11 +299,10 @@ static int ccdc_lsc_busy(struct isp_ccdc ISPCCDC_LSC_BUSY; } -/* __ccdc_lsc_configure - Apply a new configuration to the LSC engine +/* + * __ccdc_lsc_configure - Apply a new configuration to the LSC engine * @ccdc: Pointer to ISP CCDC device * @req: New configuration request - * - * context: in_interrupt() */ static int __ccdc_lsc_configure(struct isp_ccdc_device *ccdc, struct ispccdc_lsc_config_req *req) From patchwork Tue Oct 13 14:26:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 269870 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=-6.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 79C11C43467 for ; Tue, 13 Oct 2020 14:39:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2AC5F24867 for ; Tue, 13 Oct 2020 14:39:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="E8JNBJ4v"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="YrjAhCjF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730174AbgJMOjb (ORCPT ); Tue, 13 Oct 2020 10:39:31 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:52410 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730075AbgJMOj1 (ORCPT ); Tue, 13 Oct 2020 10:39:27 -0400 Message-Id: <20201013143731.859749817@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1602599965; 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: references:references; bh=HbKaPIGycRqaOzLEdRLNBqBq8/efplDiFnYYkQ1e0mQ=; b=E8JNBJ4vUwDEYCdHMsfPowMSaseHnVbGEW0LYPQZbvWVX8lHxLhnE1tI/RVm4xd6zeEkFr iasw68fm+bN32PBzCrXpFuBShoFSNxcbvVDiRrHFyhXfDx9muEvyy1gK4bytCKarYxs/y2 BCZEQblMPYeHOERWAZ5ZyWmpkViRCaFsb4zVXbDhd0mhh/QKONu41tf6ntT2e0JWaL1Dxb uTot1jEgFCRG+oYpml38BgNAmAByCFSKFwt/vpUVk/MQ+olDNCywrz29NiVVGdc/2S0/8M g0Sum2dY32xofzdilysVp0ZvaDeLaTpBmOJvFQARkAT6nx7vtkQD0s35dZpPNQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1602599965; 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: references:references; bh=HbKaPIGycRqaOzLEdRLNBqBq8/efplDiFnYYkQ1e0mQ=; b=YrjAhCjFWe1WsH7m8GEx76K4ptmEC2qC95qAKZfu7nyceO8HSzmUS3935fAz8Uq2DLefv1 ThH0UAegqrRQI0Aw== Date: Tue, 13 Oct 2020 16:26:19 +0200 From: Thomas Gleixner To: LKML Cc: Peter Zijlstra , Hans Verkuil , Mauro Carvalho Chehab , linux-media@vger.kernel.org, Hans Verkuil , Laurent Pinchart , linux-usb@vger.kernel.org Subject: [patch 3/4] media: au0828: Consolidate dmesg output References: <20201013142616.118697527@linutronix.de> MIME-Version: 1.0 Content-transfer-encoding: 8-bit Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The memory allocations in au0828_init_isoc() happen all in task context with GFP_KERNEL. Therefore a printk() trying to deduce whether this is called from task or interrupt context is pretty useless. Convert it to au0828_isocdbg() as the other one in that function and for completeness sake add one for the URB allocation as well. Signed-off-by: Thomas Gleixner Cc: Hans Verkuil Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org --- drivers/media/usb/au0828/au0828-video.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/drivers/media/usb/au0828/au0828-video.c +++ b/drivers/media/usb/au0828/au0828-video.c @@ -231,6 +231,7 @@ static int au0828_init_isoc(struct au082 for (i = 0; i < dev->isoc_ctl.num_bufs; i++) { urb = usb_alloc_urb(max_packets, GFP_KERNEL); if (!urb) { + au0828_isocdbg("cannot allocate URB\n"); au0828_uninit_isoc(dev); return -ENOMEM; } @@ -239,9 +240,7 @@ static int au0828_init_isoc(struct au082 dev->isoc_ctl.transfer_buffer[i] = usb_alloc_coherent(dev->usbdev, sb_size, GFP_KERNEL, &urb->transfer_dma); if (!dev->isoc_ctl.transfer_buffer[i]) { - printk("unable to allocate %i bytes for transfer buffer %i%s\n", - sb_size, i, - in_interrupt() ? " while in int" : ""); + au0828_isocdbg("cannot allocate transfer buffer\n"); au0828_uninit_isoc(dev); return -ENOMEM; } From patchwork Tue Oct 13 14:26:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 269871 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=-6.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 468A7C43457 for ; Tue, 13 Oct 2020 14:39:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA5A924842 for ; Tue, 13 Oct 2020 14:39:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Nr6vvhnk"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="6iz62w3z" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730159AbgJMOjb (ORCPT ); Tue, 13 Oct 2020 10:39:31 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:52432 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730076AbgJMOj3 (ORCPT ); Tue, 13 Oct 2020 10:39:29 -0400 Message-Id: <20201013143731.974452990@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1602599967; 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: references:references; bh=a+PI7nT40Q7VihMNU5RIN+OWBiwkSEbdS5+PZ5WYDjY=; b=Nr6vvhnkEXLDckX4GNYZxOxh99r2Ef2t2NnWvCtRSm6KHuO/8knJExArD88REMOg+evCkt wiCnxtq/NWHg/Niy/IFaxXgPjSgwyXiIvLlGN/pQ6GMa7riw64gOhYESIGo4PIqhbk5CXQ SKOlEtqxGjRakl5nSmLkuIOaNLfrwwV2iZ/XWwwserVLbAI43oo2xxQUdOV8uuhJrClsm8 IIB81VXyW4Kpv0Oo3i3tzU/K2IRygljT6Z114stwS3q8TDSJCbxHhiGevnCSDQubmmOElD WEjtf26z84BdLv3u7gUDN4Ba2a3CmVOkoCPpu4fNQtpKK6oeuLIhhG0++5CjeQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1602599967; 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: references:references; bh=a+PI7nT40Q7VihMNU5RIN+OWBiwkSEbdS5+PZ5WYDjY=; b=6iz62w3zOMhjhLhLouDT42w/sk3OVOqtOnWEB4VeNQcrQn2g9ITQsSZV4huioyrsMYnJNw a6tbMnCjWIbCRQAA== Date: Tue, 13 Oct 2020 16:26:20 +0200 From: Thomas Gleixner To: LKML Cc: Peter Zijlstra , Mauro Carvalho Chehab , Hans Verkuil , linux-media@vger.kernel.org, Hans Verkuil , Laurent Pinchart , linux-usb@vger.kernel.org Subject: [patch 4/4] media: cx231xx: Consolidate dmesg output References: <20201013142616.118697527@linutronix.de> MIME-Version: 1.0 Content-transfer-encoding: 8-bit Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The memory allocations in cx231xx_init_*() happen all in task context with GFP_KERNEL. Therefore a dev_err() trying to deduce whether this is called from task or interrupt context is pretty useless. Remove these historical leftovers. Signed-off-by: Thomas Gleixner Cc: Mauro Carvalho Chehab Cc: Hans Verkuil Cc: linux-media@vger.kernel.org Reported-by: kernel test robot Reported-by: kernel test robot --- drivers/media/usb/cx231xx/cx231xx-core.c | 10 ++++------ drivers/media/usb/cx231xx/cx231xx-vbi.c | 3 +-- 2 files changed, 5 insertions(+), 8 deletions(-) --- a/drivers/media/usb/cx231xx/cx231xx-core.c +++ b/drivers/media/usb/cx231xx/cx231xx-core.c @@ -1061,9 +1061,8 @@ int cx231xx_init_isoc(struct cx231xx *de &urb->transfer_dma); if (!dev->video_mode.isoc_ctl.transfer_buffer[i]) { dev_err(dev->dev, - "unable to allocate %i bytes for transfer buffer %i%s\n", - sb_size, i, - in_interrupt() ? " while in int" : ""); + "unable to allocate %i bytes for transfer buffer %i\n", + sb_size, i); cx231xx_uninit_isoc(dev); return -ENOMEM; } @@ -1197,9 +1196,8 @@ int cx231xx_init_bulk(struct cx231xx *de &urb->transfer_dma); if (!dev->video_mode.bulk_ctl.transfer_buffer[i]) { dev_err(dev->dev, - "unable to allocate %i bytes for transfer buffer %i%s\n", - sb_size, i, - in_interrupt() ? " while in int" : ""); + "unable to allocate %i bytes for transfer buffer %i\n", + sb_size, i); cx231xx_uninit_bulk(dev); return -ENOMEM; } --- a/drivers/media/usb/cx231xx/cx231xx-vbi.c +++ b/drivers/media/usb/cx231xx/cx231xx-vbi.c @@ -409,8 +409,7 @@ int cx231xx_init_vbi_isoc(struct cx231xx if (!dev->vbi_mode.bulk_ctl.transfer_buffer[i]) { dev_err(dev->dev, "unable to allocate %i bytes for transfer buffer %i%s\n", - sb_size, i, - in_interrupt() ? " while in int" : ""); + sb_size, i); cx231xx_uninit_vbi_isoc(dev); return -ENOMEM; }