Received: by 2002:a89:288:0:b0:1f7:eeee:6653 with SMTP id j8csp58805lqh; Mon, 6 May 2024 11:09:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXr3SenVYzwmQIdUtfptdjsgZcQLXUOLMFDlOwe+n1pGbxZefzMck2TKoEdgJQghMM9KNaX+sDaEGafFcl8hQ2l6PA2JYIu7K8U11NBTg== X-Google-Smtp-Source: AGHT+IF55Nnf5I0+mMQw4N1Pb/+X2s5UTdmouBikQinpCpq9SGAErHiplcF9kF+8a6kDBam7g47N X-Received: by 2002:a05:6359:4caa:b0:18d:8c13:b83d with SMTP id kk42-20020a0563594caa00b0018d8c13b83dmr14270012rwc.0.1715018965743; Mon, 06 May 2024 11:09:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715018965; cv=pass; d=google.com; s=arc-20160816; b=WkFcHteegOBlv4IBa0fJyYk3tvgQiNDUvnDJMrBYB0e19wFp19lqjUgc7awtrKA808 IYJpRZRgYfAQke3xAX18qI1IbRC/tuy8iRvx18fB26uV4W5cpY2gobQblwPtlUxhTzVK 3bP13BzrR3civQ0uicIV3KHR4238Xg44Hv3Uy94a+3PflDy+PjIqHC52xUOijP81g5n5 yMmyqOO/RwG2iWLmmPmzS3r/2f6+cFABuW/sgIb31oK6LZjHMR93wv3r7meA655dX8OK TEUWVCTlNUDG8iRmW04J4INXJVqyxUSjLq9i8/IdZxPyFPsYudxO9jDUplrtIr9P6Z7V I6EA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tiOJ2gMSbwrkMBQ+sdSsarN33w4+btgLe6hZyQTYLQY=; fh=aI7HXplajwh9PHGog/YD/WLsw0Yjp3/63MYIgCPOFoc=; b=Sb2eFSMiL+v8EtT6j/9YJcSUIRxYPiEWvROKCkWblFDSJ4p7hRvToxVFctRoxboavi ZEjOINq2qIhEp4mcc5Wqvs3+cG2hn92IuwcvA1alKA9gV/xRZC1y96IeNZA+Fv5Hn7mP 5GHvOgP0D/B8QmLTN1cYD06mrfjdwmaKXvzC4CQFPYy2+7nCWg6unioL1KiKlmV3CheE GDsnNfxZzdESqn8+vqvdBEOM+fcuhUCz7rw8lfjdn8dAr5OF4+3L+YVC8A8at/JoAKlP 7EhtPKF7VC7/Y4UO6bqosjxNycQtRwfn5k9AD1Bea4AHq58YRRSVzZFeo1Hiymgp3rGX 2bIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=fLYxhcll; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-170274-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170274-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id o23-20020a637317000000b00622981aad60si4339343pgc.465.2024.05.06.11.09.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 11:09:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-170274-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=fLYxhcll; arc=pass (i=1 spf=pass spfdomain=ideasonboard.com dkim=pass dkdomain=ideasonboard.com); spf=pass (google.com: domain of linux-kernel+bounces-170274-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-170274-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 00B0FB2418F for ; Mon, 6 May 2024 18:04:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C647C158DAA; Mon, 6 May 2024 18:03:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="fLYxhcll" Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB34C158842; Mon, 6 May 2024 18:03:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715018601; cv=none; b=KIxGE1D5tQI5UWmzCuwrb7Mcet5uicJp5Jxg33aPZyUwpfbmVFQmRwvDcvx6xMWpFdZljeJgKFAjMLWhBD1x1+15pLuEBU7Fgy3ANCX1iaiXY8a13lfepawPdkd7G1V3VYdQwmdJaiSAfSYB883SpYYtvjVqhJFRqnyX8KpqeZI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715018601; c=relaxed/simple; bh=izYV5SnkwV0c12Eig2SIdtAJCjR1JfpIAddbJoY1rEE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fJKWl1e2GWs3XyEKLoaUFiuMyFmB6Pla3Fa9+q3PLoLZAApjEnmu+p7z74OqycUiNGk96Q9AJ42DUTPeX1jO4cfsIACvttXazGpCbh46MeVtMS8AnKqjRknOr1fSp1xCgr8E7fZjfET6RmQBSY2Mp9iI7pcAYMrK23dTGb1m5Ck= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=fLYxhcll; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Received: from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi [81.175.209.231]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 1DEED114D; Mon, 6 May 2024 20:03:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1715018596; bh=izYV5SnkwV0c12Eig2SIdtAJCjR1JfpIAddbJoY1rEE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fLYxhcllt+tsU6Hbx1ND6r1mkY4esOdUEFQ8SUHAlIqXmeIxbbwqcd1hlBkR5FmwN 06QKLdkTCJn6BwtG77HUICWSRVrDveEEpdaslQ8ne/mYgilpkv7x8isjJ1yvBrC7Ou k44bCttXioMUSO9+lSrVDHMhvoxBNfy22Y+AUQB0= Date: Mon, 6 May 2024 21:03:09 +0300 From: Laurent Pinchart To: Ricardo Ribalda Cc: Mauro Carvalho Chehab , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , linux-media@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hans Verkuil Subject: Re: [PATCH 3/3] media: bcm2835-unicam: Do not replace IRQ retcode during probe Message-ID: <20240506180309.GG29108@pendragon.ideasonboard.com> References: <20240430-fix-broad-v1-0-cf3b81bf97ff@chromium.org> <20240430-fix-broad-v1-3-cf3b81bf97ff@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240430-fix-broad-v1-3-cf3b81bf97ff@chromium.org> Hi Ricardo, Thank you for the patch. On Tue, Apr 30, 2024 at 07:51:28AM +0000, Ricardo Ribalda wrote: > Use the error code generated by platform_get_irq() and > devm_request_irq() as the error code of probe(). > > It will give a more accurate reason of why it failed. > > Signed-off-by: Ricardo Ribalda > --- > drivers/media/platform/broadcom/bcm2835-unicam.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c > index b2b23d24da19..0b2729bf4a36 100644 > --- a/drivers/media/platform/broadcom/bcm2835-unicam.c > +++ b/drivers/media/platform/broadcom/bcm2835-unicam.c > @@ -2660,17 +2660,13 @@ static int unicam_probe(struct platform_device *pdev) > } > > ret = platform_get_irq(pdev, 0); > - if (ret < 0) { > - if (ret != -EPROBE_DEFER) > - ret = -EINVAL; > + if (ret < 0) > goto err_unicam_put; > - } I think you can squash the whole patch with 1/3. > > ret = devm_request_irq(&pdev->dev, ret, unicam_isr, 0, > "unicam_capture0", unicam); > if (ret) { > dev_err(&pdev->dev, "Unable to request interrupt\n"); > - ret = -EINVAL; > goto err_unicam_put; > } > -- Regards, Laurent Pinchart