Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1939089ybb; Thu, 2 Apr 2020 10:04:10 -0700 (PDT) X-Google-Smtp-Source: APiQypKIlVvXBzmvvh/LyV/Yw/FKO9kt39lR8rsTZQYo9dTW8mw1QyIPiR2xsJZf5fDoBtUAts0y X-Received: by 2002:aca:450a:: with SMTP id s10mr2918613oia.25.1585847050458; Thu, 02 Apr 2020 10:04:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585847050; cv=none; d=google.com; s=arc-20160816; b=T1WpDIs6HRlDwpJlITOcFTPJbcEUVS8XG05+DDZWlkLPmiRHnUxddo/vB9G8PH+DOC 7rWSNedPol+u1qWIKS9cmWSVNZdX7ZPCyxTlxiotoTLP3leQSYyQPi3Ts8+xDp9mzF/J Nln/haMMvZzewB5WCzebPZ76QIUZeFotDSW5E2CqU55E6EcoWvrlSkDoR0/Ia5zBq5Ch B3AMJoNEX+xLQdc9nk4D9MUiiXOPgswdsFPIQKI2wXmts7f8w/8yfE6MaPUwTUeTa/yq UqglyOFGF6snje1M6F1nGgyGIf0rtTrSTwc9kHYfwTZIyj45oxR5L1aIGHiEU0NU/l1G uRpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=Nek31YI78KU/YSsKH5TU6MqIXmvYGRxRapLS2Au2+G4=; b=q5rfhwqYqjJTweiKcNhtVTUDxsBDd5Kb1aZqf2TWhtJWqzchaRGCp8qRrl9FluGQVr 3gzCXtdGXcanLfG6iYdnmEl2r98C/ziWKpuIDU9Le+EJRcvegCqkKBFwkThN01Jf+C41 ng/RZ3bngl0rqfxkiBQzy2yL19fpD7+EPM9Mcf4GHwY6ukkp6+1SjhfynO13r2OAGlYw fk+QAC1RC5jo8QauCewtTY/ehrPQYEIQzgDaaNj71pWSTeCTy41WQEo/bmt90t80K6YF Z7ZnFIWcR6VZ4u/zatbK/qOJ6TrPUm6jWF7Hv5oiNHGbN+Z5DlF4eopup9sE5aX569pp FpaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h25si2459196ooa.9.2020.04.02.10.03.50; Thu, 02 Apr 2020 10:04:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388136AbgDBQbi (ORCPT + 99 others); Thu, 2 Apr 2020 12:31:38 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:44666 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732569AbgDBQbi (ORCPT ); Thu, 2 Apr 2020 12:31:38 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 0D2C6297DC3 Message-ID: <530189e1af69fb04168cf1237aa2990895e471dd.camel@collabora.com> Subject: Re: [PATCH 1/3] rkisp1: Get rid of unused variable warning From: Ezequiel Garcia To: Robin Murphy , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Hans Verkuil , kernel@collabora.com Date: Thu, 02 Apr 2020 13:31:27 -0300 In-Reply-To: References: <20200401213721.24173-1-ezequiel@collabora.com> <20200401213721.24173-2-ezequiel@collabora.com> Organization: Collabora Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.0-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-04-02 at 10:47 +0100, Robin Murphy wrote: > On 2020-04-01 10:37 pm, Ezequiel Garcia wrote: > > If CONFIG_OF is not selected, the compiler will complain: > > > > drivers/staging/media/rkisp1/rkisp1-dev.c: In function ‘rkisp1_probe’: > > drivers/staging/media/rkisp1/rkisp1-dev.c:457:22: warning: unused variable ‘node’ [-Wunused-variable] > > 457 | struct device_node *node = pdev->dev.of_node; > > > > Rework the code slightly and make the compiler happy. > > > > Signed-off-by: Ezequiel Garcia > > --- > > drivers/staging/media/rkisp1/rkisp1-dev.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/drivers/staging/media/rkisp1/rkisp1-dev.c b/drivers/staging/media/rkisp1/rkisp1-dev.c > > index b1b3c058e957..5e7e797aad71 100644 > > --- a/drivers/staging/media/rkisp1/rkisp1-dev.c > > +++ b/drivers/staging/media/rkisp1/rkisp1-dev.c > > @@ -454,7 +454,6 @@ static void rkisp1_debug_init(struct rkisp1_device *rkisp1) > > > > static int rkisp1_probe(struct platform_device *pdev) > > { > > - struct device_node *node = pdev->dev.of_node; > > const struct rkisp1_match_data *clk_data; > > const struct of_device_id *match; > > struct device *dev = &pdev->dev; > > @@ -463,7 +462,7 @@ static int rkisp1_probe(struct platform_device *pdev) > > unsigned int i; > > int ret, irq; > > > > - match = of_match_node(rkisp1_of_match, node); > > + match = of_match_node(rkisp1_of_match, pdev->dev.of_node); > > FWIW you could clean up "match" too by using of_device_get_match_data(). > Ah, that's nicer. Thanks, Ezequiel