Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp1072667ybd; Sat, 22 Jun 2019 23:12:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqz259gr7aCsQH/Hl7gXFJK+yrhA9zbc8pZaNpMlxtg45iCpjRBM9zipGsvlMveRQKkMO1PU X-Received: by 2002:a17:902:e2:: with SMTP id a89mr141875385pla.210.1561270332348; Sat, 22 Jun 2019 23:12:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561270332; cv=none; d=google.com; s=arc-20160816; b=IMFCKhdOaDQ4vPslJEtJFqC/K1H06DmjDQtwDmttkqHlFUHYU8bwbG6m9PrabSl0Ux nZSi/KhUGiVPHv/GdtGZnKVNpXjCCeMY+LkAjWLQp2Nl6Thd38iyF1bmSCs3hfQ3oktJ J1i4kiycnYa4kBab3kAvQhc+vxECkZltZb3vPuQU25d7C7zVIh5L6Zak+phtrZkR86Z2 hg7mDJjSBLQqlaLJzGWbBBUhGyMm9Z5zTWi2j5QXJWruu8n9IGvkf7gBTGQeNwpmwzIJ iIjkxXZjTd+rSoWmMPbfYXvryCvCPau5bZxuWxD6docq9RTVcPNsS92J+X6jgdnD1eiO 1CAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=dJR1eD3G9ZaBpOueVKw5CxH6C+tcDc2bcbMJorHcVOo=; b=sChHnhOP2FH6x/yPY8ybXdGlwPv96/T71+wbUQqcoWybnHXFYi7uNBCioELiliVFsF ZtjaIJHmx2kM0zntVZt6NiUB577tlNHxdJyoaay4SAiQwJWzfqpsPq0aJvApHVUOGkth OGoeNfL2n4IbG7yivPY0ceTAxH0vRjI8oYKnuF/tfAQcFu6Ammggu4iyklmvhU4DerwF Z0/yZNUPoAQhLas9kwpGPp/AC7I6Q+WPoPdp4PVgNdBOwvlxi+aA16fJxZXP3U02dTFx 1jYmekdhGEBA8W52xRBJPmVs7rOMyHDAwqHyZIWKfjOr/hehLst6um//NjEH1VP5IJfo xTcQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i198si7622386pfe.228.2019.06.22.23.11.56; Sat, 22 Jun 2019 23:12:12 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726415AbfFWGKX (ORCPT + 99 others); Sun, 23 Jun 2019 02:10:23 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:59882 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726050AbfFWGKX (ORCPT ); Sun, 23 Jun 2019 02:10:23 -0400 X-IronPort-AV: E=Sophos;i="5.63,407,1557180000"; d="scan'208";a="388655915" Received: from abo-12-105-68.mrs.modulonet.fr (HELO hadrien) ([85.68.105.12]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jun 2019 08:10:21 +0200 Date: Sun, 23 Jun 2019 08:10:21 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Dan Carpenter cc: Mao Wenan , airlied@linux.ie, daniel@ffwll.ch, alexander.deucher@amd.com, christian.koenig@amd.com, David1.Zhou@amd.com, kernel-janitors@vger.kernel.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] drm/amdgpu: remove set but not used variables 'ret' In-Reply-To: <20190623060027.GU28859@kadam> Message-ID: References: <20190622030314.169640-1-maowenan@huawei.com> <20190622104318.GT28859@kadam> <20190623060027.GU28859@kadam> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 23 Jun 2019, Dan Carpenter wrote: > On Sat, Jun 22, 2019 at 01:43:19PM +0300, Dan Carpenter wrote: > > On Sat, Jun 22, 2019 at 11:03:14AM +0800, Mao Wenan wrote: > > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c > > > index 0e6dba9..0bf4dd9 100644 > > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c > > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c > > > @@ -246,12 +246,10 @@ static int init_pmu_by_type(struct amdgpu_device *adev, > > > /* init amdgpu_pmu */ > > > int amdgpu_pmu_init(struct amdgpu_device *adev) > > > { > > > - int ret = 0; > > > - > > > switch (adev->asic_type) { > > > case CHIP_VEGA20: > > > /* init df */ > > > - ret = init_pmu_by_type(adev, df_v3_6_attr_groups, > > > + init_pmu_by_type(adev, df_v3_6_attr_groups, > > > "DF", "amdgpu_df", PERF_TYPE_AMDGPU_DF, > > > DF_V3_6_MAX_COUNTERS); > > > > > > You're resending this for other reasons, but don't forget to update the > > indenting on the arguments so they still line up with the '('. > > > > Sorry, I was unclear. If you pull the init_pmu_by_type( back 6 > characters then you also need to pull the "DF" back 6 characters. > > init_pmu_by_type(adev, df_v3_6_attr_groups, "DF", "amdgpu_df", > PERF_TYPE_AMDGPU_DF, DF_V3_6_MAX_COUNTERS); > > You can actually fit it into two lines afterwards. My suggestion was to keep the ret = instead of discarding the indication of failure, so I think that this is not relevant. julia