Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp638901ybd; Sat, 22 Jun 2019 11:14:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPJx7aBmeCWstUo0abzKEtuLi0F9K7Z+75uTnKVv8O+HefmQhYe5qQuh9SK7Wj6NrUcUnZ X-Received: by 2002:a63:e001:: with SMTP id e1mr24774545pgh.306.1561227250819; Sat, 22 Jun 2019 11:14:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561227250; cv=none; d=google.com; s=arc-20160816; b=dZn3qdSBf7NFfSCSLytuMHk73hVrCqImn8s2OD3HfT+YL/OceVXmCLB8K6v2U/5FG+ ZR1YA0CMjRDIK5pC/awcXA6O5Pj7XS+DC6KSqJehBOg6rEodCWpAnL1wSnt4l33k/N2f bCh2TAbqQhfBx4uVd2vIbV063d3Fbm1QW+5I8oP1ddy91HE2m+G/wp80xiF+udNd/2qS zwydXMc8HZSIlG9tcg4wcrzExmYiE/TacX128U0yQwcIZEh7EnPbuVEjv4UGs0ZZtMfM dTAMH0A6+5oVQQ5G/m3W604Y1Re1h8QPrPVH9JKkuKjYHJi7eO5p3Z1OTrnh6FaOE21P ckpg== 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:references:in-reply-to:date:cc:to:from:subject :message-id; bh=/FRsK2ZhffGmhzJPbUoRkPPcl007ZpNW0p/yLahWl8g=; b=CWUFIMJwk+8aBLowG4ATcCiJxS3ZEFgxW2hH3U/qZmTqAW8jTEF2xLj+gQfNr2ANBh U2+lWuNPyByUCDcRvbwk6LBOL8CcHnbvjTnjpK0jrb2GAiBvEECGO+7lz+3y5oDi20ZH Tyq5L5FRyY8bAHdehN5D0XMtZkqEYsOp6jiRGqigTvgjCpjzdOHh9sgNiEtb3D+BCsDw 8K3HAdRrDikioOABrZ4Ho/atKr1h9A8b5+17gTE3FyPTDkwCTJzhertbHiMnucLdQN+h ssDYitOciEZ2HGxwut+fQWMoebVQAWhu0QcgpkCRQsDnMnX0Szpm37jWjMLDWsgrhaOS NUow== 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 z5si5196275pgv.280.2019.06.22.11.13.52; Sat, 22 Jun 2019 11:14: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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726351AbfFVSNb (ORCPT + 99 others); Sat, 22 Jun 2019 14:13:31 -0400 Received: from smtprelay0129.hostedemail.com ([216.40.44.129]:51928 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725995AbfFVSNb (ORCPT ); Sat, 22 Jun 2019 14:13:31 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay07.hostedemail.com (Postfix) with ESMTP id 90855181D33FC; Sat, 22 Jun 2019 18:13:29 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::,RULES_HIT:41:152:355:379:599:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2559:2562:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3873:4321:4605:5007:7903:10004:10400:10848:11026:11232:11233:11473:11657:11658:11914:12043:12048:12296:12297:12438:12679:12740:12895:13069:13161:13229:13311:13357:13894:14659:14721:21063:21080:21451:21627:30012:30054:30070:30091,0,RBL:23.242.196.136:@perches.com:.lbl8.mailshell.net-62.8.0.180 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: guide54_1e3a390309d01 X-Filterd-Recvd-Size: 2148 Received: from XPS-9350.home (cpe-23-242-196-136.socal.res.rr.com [23.242.196.136]) (Authenticated sender: joe@perches.com) by omf08.hostedemail.com (Postfix) with ESMTPA; Sat, 22 Jun 2019 18:13:27 +0000 (UTC) Message-ID: <0ab82cdb0bec30e7e431f106f8e0e9d141491555.camel@perches.com> Subject: Re: [PATCH -next v2] drm/amdgpu: return 'ret' in amdgpu_pmu_init From: Joe Perches To: Mao Wenan , airlied@linux.ie, daniel@ffwll.ch, alexander.deucher@amd.com, christian.koenig@amd.com, David1.Zhou@amd.com, dan.carpenter@oracle.com, julia.lawall@lip6.fr Cc: kernel-janitors@vger.kernel.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jonathan Kim Date: Sat, 22 Jun 2019 11:13:26 -0700 In-Reply-To: <20190622130527.182022-1-maowenan@huawei.com> References: <20190622104318.GT28859@kadam> <20190622130527.182022-1-maowenan@huawei.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-0ubuntu0.18.10.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 Sat, 2019-06-22 at 21:05 +0800, Mao Wenan wrote: > There is one warning: > drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c: In function ‘amdgpu_pmu_init’: > drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:249:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] > int ret = 0; [] > v1->v2: change the subject for this patch; change the indenting when it calls init_pmu_by_type; use the value 'ret' in > amdgpu_pmu_init(). [] > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c [] > @@ -252,8 +252,8 @@ int amdgpu_pmu_init(struct amdgpu_device *adev) > case CHIP_VEGA20: > /* init df */ > ret = init_pmu_by_type(adev, df_v3_6_attr_groups, > - "DF", "amdgpu_df", PERF_TYPE_AMDGPU_DF, > - DF_V3_6_MAX_COUNTERS); > + "DF", "amdgpu_df", PERF_TYPE_AMDGPU_DF, > + DF_V3_6_MAX_COUNTERS); trivia: The indentation change seems superfluous and appears to make the code harder to read. You could also cc Jonathan Kim who wrote all of this.