Received: by 2002:ac2:5a04:0:0:0:0:0 with SMTP id q4csp206850lfn; Tue, 22 Feb 2022 15:18:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJzll21jzL6Vh1IUnvbj/M4XfQP4c0wA3KjBzPRzd7qVQZzuIEt3frU4dKU69AzmT0w13bPM X-Received: by 2002:a17:902:7b85:b0:14e:fbca:9af9 with SMTP id w5-20020a1709027b8500b0014efbca9af9mr25113336pll.29.1645571900863; Tue, 22 Feb 2022 15:18:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645571900; cv=none; d=google.com; s=arc-20160816; b=w4jgDlKbuh0vBKvX3nJ/fLmDcxs+/M1tu4yPYyFaEVIlD3mB4RWny+DZx63ngd0nLZ K1lFA1uCTdWPLYbxvzr/1D0kkqzfbEyZJiaWhdRVLa3CBlqh24AMQjts5mST8hLZ2+UZ ija0GOEU3fUd5bKrAjeUVQgNuWkXWuDMWsBEGj+Vne46rB/Fw/07stVvmXHepigG3Soh /KQL7YSibcnoYrHJ4mKwaAA8/mwa/p+wLOEBZ7lu0VH2OcjqIyH6fm29wfrnl5XJ5iC9 CBxUD9uG0jKedcPIZF/k4Hse9ygIWHCr65ej3iEz3AfFFMxvrSutDKMXBCvU7k82T0UY oH/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=WDMkvcXrvFCIfwqXXj8ZNdlL4q1BzrbMD+9YGad2AC8=; b=KIwKuyEprRiVy6naW2pHRREdUKvhZwDW5fsrpFR5j1mNsyf72WufkLcEBMStzy5Qt6 C6Fp6HrrB2JuPaz+grBuGkbjG5FLPGQFZx86YqFG2lI8sxJ4wZVC0m4jwHeQTYimUS3j MjF9jwh0kkX07cXVBF4OfF3I5d4akr7Tg39syPFYRTBPdhdMsAtCYCqLsW4FZpov56PE 3zEb5toTTZ+X1ruBFTJeU9Ipt2mc+yJHeB8uRRTlWr0ZfPQCjFaPwNe8jgSlwAHSmjtS wK/bTZJysCMFRQHo51RawIpxh76n8OQHEOegk7GWl8ONIqMTsx69zayU0nPlw2MgWB3/ jgeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZQuVn+wn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s75si21164326pgs.268.2022.02.22.15.18.04; Tue, 22 Feb 2022 15:18:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=ZQuVn+wn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233635AbiBVQ3y (ORCPT + 99 others); Tue, 22 Feb 2022 11:29:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231695AbiBVQ3w (ORCPT ); Tue, 22 Feb 2022 11:29:52 -0500 Received: from mail-ot1-x32c.google.com (mail-ot1-x32c.google.com [IPv6:2607:f8b0:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A023166E15 for ; Tue, 22 Feb 2022 08:29:26 -0800 (PST) Received: by mail-ot1-x32c.google.com with SMTP id j3-20020a9d7683000000b005aeed94f4e9so6639307otl.6 for ; Tue, 22 Feb 2022 08:29:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=WDMkvcXrvFCIfwqXXj8ZNdlL4q1BzrbMD+9YGad2AC8=; b=ZQuVn+wn8BmdTuzrfTawxJB39mBQLQL6meMaDkhqzCs4+MZJo4uIj2rK2As1Iy71K8 oHmjvuOuQ2/hifwFKaEn3a/E2gRi9N+iAghYFkZw0CskSWl8EWbfkryk/KkDw2JtjxN1 PXTeyv7nFMk1xanQhxh6EtkS89DKWEk/d3crdZnicKat0xUdnYCTUmuqUuewk/Xy68cE 1LIVHLaZBVB7Wh+lB/oS/pfkZ3gDPELfX4GUEh+fvXfXv/rJSyfc4Kq+YqxjuOTRyRrn JTo8AuCVL1VfTrTJXovPhwzaBnGDK/CeZbFKlY1kaUW8hNod961VNY18Oyc3uRx68yba d9/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=WDMkvcXrvFCIfwqXXj8ZNdlL4q1BzrbMD+9YGad2AC8=; b=qxMau6vSet39Kc03Ludh3kK3f4bIACmx8kD8xNT9rFp4CD6/Yxk8DrcEFI32ytxE1P s8g6CmQSiQQDqCcADK97aNqCDUfDxYP6T8NnqFvGBF7VAn0vlgUUzDnINCas4aRWUuT6 x44qhMs4npy+FMOUEFmGA6BDXpoIwYXzBfvstA+s8052fAUeCPH/Yva5I7oRlaeZwwL5 9ucXZn3h29pID5gRYLE/KeRcU8XftGoAdX+2Sz/NTem74XEeZDKRao1gqMRlwO/4uWK2 +VxIkyOijFA5dQk/cuY/udQNomelkS2jlXoPpK/KigKumrKSktst0zadspweWIKglgL4 BC/Q== X-Gm-Message-State: AOAM5322tuu4BA8ryL2w+idDap54VWUHBqjzimgtBSzrDh09fDbfe+nE 5fuUNsE9R739Q7nenB+MfJEdIvndx7BZcHEjRIVlEdeJ X-Received: by 2002:a05:6830:573:b0:5ad:5207:41d6 with SMTP id f19-20020a056830057300b005ad520741d6mr6208407otc.357.1645547365691; Tue, 22 Feb 2022 08:29:25 -0800 (PST) MIME-Version: 1.0 References: <20220222131701.356117-1-maira.canal@usp.br> <20220222131701.356117-3-maira.canal@usp.br> In-Reply-To: <20220222131701.356117-3-maira.canal@usp.br> From: Alex Deucher Date: Tue, 22 Feb 2022 11:29:14 -0500 Message-ID: Subject: Re: [PATCH 02/10] drm/amdgpu: Remove tmp unused variable To: =?UTF-8?B?TWHDrXJhIENhbmFs?= Cc: "Deucher, Alexander" , Christian Koenig , xinhui pan , Hawking Zhang , John Clements , Tao Zhou , "Chai, Thomas" , "Tuikov, Luben" , "Stanley.Yang" , Dennis Li , "Joshi, Mukul" , "Wentland, Harry" , "Leo (Sunpeng) Li" , "Siqueira, Rodrigo" , Anthony Koo , Magali Lemes , LKML , Maling list - DRI developers , mwen@igalia.com, amd-gfx list , Isabella Basso Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 22, 2022 at 8:17 AM Ma=C3=ADra Canal wrote= : > > The variable tmp is not used in the dce_v6_0_hpd_fini and > dce_v8_0_hpd_fini functions. Therefor, the variable is removed in order t= o > avoid the following Clang warnings: > > drivers/gpu/drm/amd/amdgpu/dce_v6_0.c:331:6: warning: variable 'tmp' set = but > not used [-Wunused-but-set-variable] > u32 tmp; > ^ > drivers/gpu/drm/amd/amdgpu/dce_v8_0.c:325:6: warning: variable 'tmp' set = but > not used [-Wunused-but-set-variable] > u32 tmp; > ^ > > Signed-off-by: Ma=C3=ADra Canal > --- > drivers/gpu/drm/amd/amdgpu/dce_v6_0.c | 4 +--- > drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 4 +--- > 2 files changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c b/drivers/gpu/drm/amd/= amdgpu/dce_v6_0.c > index b90bc2adf778..2c61f0c2e709 100644 > --- a/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/dce_v6_0.c > @@ -328,7 +328,6 @@ static void dce_v6_0_hpd_fini(struct amdgpu_device *a= dev) > struct drm_device *dev =3D adev_to_drm(adev); > struct drm_connector *connector; > struct drm_connector_list_iter iter; > - u32 tmp; > > drm_connector_list_iter_begin(dev, &iter); > drm_for_each_connector_iter(connector, &iter) { > @@ -337,8 +336,7 @@ static void dce_v6_0_hpd_fini(struct amdgpu_device *a= dev) > if (amdgpu_connector->hpd.hpd >=3D adev->mode_info.num_hp= d) > continue; > > - tmp =3D RREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_con= nector->hpd.hpd]); > - tmp &=3D ~DC_HPD1_CONTROL__DC_HPD1_EN_MASK; > + RREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->= hpd.hpd]); > WREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->= hpd.hpd], 0); We should be writing tmp out here rather than 0. > > amdgpu_irq_put(adev, &adev->hpd_irq, amdgpu_connector->hp= d.hpd); > diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c b/drivers/gpu/drm/amd/= amdgpu/dce_v8_0.c > index 7c1379b02f94..c5e9c5dbd165 100644 > --- a/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/dce_v8_0.c > @@ -322,7 +322,6 @@ static void dce_v8_0_hpd_fini(struct amdgpu_device *a= dev) > struct drm_device *dev =3D adev_to_drm(adev); > struct drm_connector *connector; > struct drm_connector_list_iter iter; > - u32 tmp; > > drm_connector_list_iter_begin(dev, &iter); > drm_for_each_connector_iter(connector, &iter) { > @@ -331,8 +330,7 @@ static void dce_v8_0_hpd_fini(struct amdgpu_device *a= dev) > if (amdgpu_connector->hpd.hpd >=3D adev->mode_info.num_hp= d) > continue; > > - tmp =3D RREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_con= nector->hpd.hpd]); > - tmp &=3D ~DC_HPD1_CONTROL__DC_HPD1_EN_MASK; > + RREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->= hpd.hpd]); > WREG32(mmDC_HPD1_CONTROL + hpd_offsets[amdgpu_connector->= hpd.hpd], 0); Same here. Care to send a patch to fix this up? Thanks, Alex > > amdgpu_irq_put(adev, &adev->hpd_irq, amdgpu_connector->hp= d.hpd); > -- > 2.35.1 >