lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 23 Jun 2019 09:00:27 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Mao Wenan <maowenan@...wei.com>
Cc:     airlied@...ux.ie, daniel@...ll.ch, alexander.deucher@....com,
        christian.koenig@....com, David1.Zhou@....com,
        kernel-janitors@...r.kernel.org, amd-gfx@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] drm/amdgpu: remove set but not used variables 'ret'

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.

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ