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: 11835983 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 934E9ACC2 for ; Tue, 13 Oct 2020 18:11:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4EB592486F 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; }