Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1779614ybb; Thu, 2 Apr 2020 07:15:05 -0700 (PDT) X-Google-Smtp-Source: APiQypL9bKfm3Eewm1ZaotCQUacPiAApCdB0CYeeJxHDJPZ+7ujxCg64QoI9BH2ywdOV/8O0pmqz X-Received: by 2002:a05:6830:12c4:: with SMTP id a4mr2298436otq.305.1585836905524; Thu, 02 Apr 2020 07:15:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585836905; cv=none; d=google.com; s=arc-20160816; b=t5gXuXkHK1uovts5GEROUCNXryV+Zn0KmSie6z5LCgK/AxJzQQRqP8RyPWFGs/cG2s QptBjE8xkVMnysGwEJ4fdjGYNZuXneiLjwjYtI1tiIYNNhUTfxjldVXM4Qha/MB1MuB4 QFhN2KFo0rPhYrZZNm75PVhiCZQbADT5Cl9FB6ZKTCcCyxXzjV2CYTEh4j8yc2SFtHHw AD5h4ZDw90f1HAsAD+vfna5qPzb4PuYqw6Mg2vebfr5w2oav+gdynzisS0wnxpcGCs81 L/ZMTD9hH10z++8H3cIZ17lY4nNi0adbPH2UcBvsKAEcyf9WMAwKfLrS70hUhWOmy1zv YaWw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=9DTi7O15PDldso/jCa1fL0gwY3h5VbMNAxu0maQEmkU=; b=u/bGdOIQ0ce4pWTNmfaf+1dmO0rovjWiExfZM8tnc+q1PQsfzRp7z/QCOlihJDhVXQ A+DPRotdVzmN5DmXqEm2zaG/oCSq+bWP4TrUX/G1W/jZfpzQDPklGw3FcgQzFmCmgToB wsz/bunyLNw8wnPqxafDBprFC6+PlKrjOiwTbgFzRgRorjQahb1cAZadncI/Yc+7+pin cwX2q8e1c2HjvxbgamalS4GKhfsBDNY9FgSlDBMBguAmmbJtnMUyuwHckkpRniEkwvLN wcaeDd4NdvQE23dd/Xbhn4DpCidMXeMEHhhg/RAE7BX8c/isoVppDppu/2g4kwBW3YSC 8tzQ== 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 i8si2737770otj.252.2020.04.02.07.14.52; Thu, 02 Apr 2020 07:15:05 -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 S2387737AbgDBN6p (ORCPT + 99 others); Thu, 2 Apr 2020 09:58:45 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:43490 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727322AbgDBN6p (ORCPT ); Thu, 2 Apr 2020 09:58:45 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: koike) with ESMTPSA id 425FA280125 Subject: Re: [PATCH 1/3] rkisp1: Get rid of unused variable warning To: Ezequiel Garcia , linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Cc: kernel@collabora.com, Hans Verkuil References: <20200401213721.24173-1-ezequiel@collabora.com> <20200401213721.24173-2-ezequiel@collabora.com> From: Helen Koike Message-ID: <86db2adb-d567-afc4-b675-49ad031cd75e@collabora.com> Date: Thu, 2 Apr 2020 10:58:35 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <20200401213721.24173-2-ezequiel@collabora.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/1/20 6: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 Acked-by: Helen Koike > --- > 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); > rkisp1 = devm_kzalloc(dev, sizeof(*rkisp1), GFP_KERNEL); > if (!rkisp1) > return -ENOMEM; >