Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp423030pxb; Thu, 21 Oct 2021 02:12:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTVjSmcFzZRjThGEC+mEZ4kCjo2VdV9zJ3sjvwl7xFQYYzth1uwR+LBWI5mnD9qyVh9ei9 X-Received: by 2002:a17:907:e88:: with SMTP id ho8mr5592927ejc.359.1634807536797; Thu, 21 Oct 2021 02:12:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634807536; cv=none; d=google.com; s=arc-20160816; b=skXgVHKREJHkzyS9UsQ2dhjY4g1RrDXTdDe+yYernqzkguQGnKeqBj394X0tN8OVm/ SR4++SMtq0JtBJPexg19//ZqPXY8Gf2IMYf4HAhjD5XrH0GGcI8PlSh3KpcvDVxQHtpg 7iHPlCQ3vPSg6rc9/vzT5+8TFeuBFIilewEUMylI5kVI0D3rOwNLD9iW+CgtdDJgAuhI Ei+wrDH/41qE5qN/ZPMI0l/vD/Md6JmXk2PwNlUEjmUxelhpVF+IyMcvewwYDGL0ZlVG TzOSFYPRYevOdMjDcEZ6Igswa1Kuo8YxGZtjcBFQ+LWSutcAX+t4c1cW8ZkNMVCdO1ZF +Iog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=SPBSd1sSjEUbeIBFgQhxREnU9h2aKFWvnzlB5SFz/L0=; b=AXOv3rCtFV/OdKK3yhqgc7k/bpQBWUiOIDcGNGThB+aV56DKSqNcfQPer2cbyHjOjm LVNhcFGo2aw1NEHCjT2GC9vBlXZXDDPANvEv4ZGNQjlsYE1W2rccpvtZgi8bH2AHp10y 5EfYza8COC662hMkzrvZc7n2BkdAPJ2rYvc0aKvqQHlBXYOpQkXDXphBGnSLbcOCD1+z h6gDgk/2VxAuHQ4I6DRWNFZIuxynj4XtkoQKliit19YWtHzBL8CwcjKVoaEK01e3XBwj ezUiIz9qZyrSQMgOnVsoJ3ne1kOBBDd+7D3Liy0pCdaAKZOg58HxGYgtp2Nn+nPjlsYy PT8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=YNAPTcfN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r11si8544927edd.198.2021.10.21.02.11.52; Thu, 21 Oct 2021 02:12:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=YNAPTcfN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231502AbhJUJLH (ORCPT + 99 others); Thu, 21 Oct 2021 05:11:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231153AbhJUJLF (ORCPT ); Thu, 21 Oct 2021 05:11:05 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85D5EC06161C; Thu, 21 Oct 2021 02:08:49 -0700 (PDT) Received: from pendragon.ideasonboard.com (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2376A2BA; Thu, 21 Oct 2021 11:08:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1634807326; bh=1R6z7yIisJy0tgOfsaD+O62w7W2Ho8F1w+hStl7uzrg=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=YNAPTcfNR2J+82uNeXYvZHAGeNBD5FoZBGBv6M15A/fOyxo3LDkXjYu+PVSRgnTBk vXxsqIyFCUIETwvthk5YPEPohRz+jIIXPb29K3d00N2TWb12Ikt8ajPClROhcKVBXV 4Iavf6AvkSWquBGCNhLVgYjOF+6ZxTEdRdB5sjQs= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20211021030938.51884-1-tangbin@cmss.chinamobile.com> Subject: Re: [PATCH] media: rcar_fdp1: Fix the correct variable assignments From: Kieran Bingham Cc: Mauro Carvalho Chehab , Linux Media Mailing List , Linux-Renesas , Linux Kernel Mailing List To: Geert Uytterhoeven , Tang Bin Date: Thu, 21 Oct 2021 10:08:43 +0100 Message-ID: <163480732348.2663858.5189176300885425535@Monstersaurus> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Tang, Quoting Geert Uytterhoeven (2021-10-21 08:59:18) > Hi Tang, >=20 > Thanks for your patch! >=20 > On Thu, Oct 21, 2021 at 5:10 AM Tang Bin w= rote: > > In the function fdp1_probe(), when get irq failed, the > > function platform_get_irq() log an error message, so > > remove redundant message here. And the variable type > > of "ret" is int, the "fdp1->irq" is unsigned int, when > > irq failed, this place maybe wrong, thus fix it. >=20 > The second issue is not actually present, as the error check > operates on ret, not fdp1->irq? Agreed, the error print is redundant.=20 In fact it would have erroneously print on ret=3D-EPROBE_DEFER cases too, so it's not just redundant, but inaccurate too. I don't think the assignment of fdp1->irq =3D ret at the same time is an issue, because if ret < 0, fdp1->irq wouldn't ever get read, as the call returns. But .. I have no objection to setting it after instead. > > Signed-off-by: Tang Bin >=20 > > --- a/drivers/media/platform/rcar_fdp1.c > > +++ b/drivers/media/platform/rcar_fdp1.c > > @@ -2289,11 +2289,10 @@ static int fdp1_probe(struct platform_device *p= dev) > > return PTR_ERR(fdp1->regs); > > > > /* Interrupt service routine registration */ > > - fdp1->irq =3D ret =3D platform_get_irq(pdev, 0); > > - if (ret < 0) { > > - dev_err(&pdev->dev, "cannot find IRQ\n"); > > + ret =3D platform_get_irq(pdev, 0); > > + if (ret < 0) > > return ret; > > - } > > + fdp1->irq =3D ret; > > > > ret =3D devm_request_irq(&pdev->dev, fdp1->irq, fdp1_irq_handle= r, 0, > > dev_name(&pdev->dev), fdp1); >=20 > Anyway, the code is correct, so: > Reviewed-by: Geert Uytterhoeven Perhaps with the commit message updated/simplified, but either way: Reviewed-by: Kieran Bingham >=20 > Gr{oetje,eeting}s, >=20 > Geert >=20 > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m6= 8k.org >=20 > In personal conversations with technical people, I call myself a hacker. = But > when I'm talking to journalists I just say "programmer" or something like= that. > -- Linus Torvalds