AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	Rex Zhu <Rex.Zhu@amd.com>
Cc: kernel-janitors@vger.kernel.org, amd-gfx@lists.freedesktop.org,
	"Huang Rui" <ray.huang@amd.com>,
	dri-devel@lists.freedesktop.org,
	"Eric Huang" <JinHuiEric.Huang@amd.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH] drm/amd/powerplay: fix amd_powerplay_reset()
Date: Tue, 24 Oct 2017 13:11:07 +0300	[thread overview]
Message-ID: <87k1zkj1ok.fsf@intel.com> (raw)
In-Reply-To: <20171024094418.za4qacxapyrud2m4@mwanda>

On Tue, 24 Oct 2017, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> We accidentally inverted an if statement and turned amd_powerplay_reset()
> into a no-op.
>
> Fixes: ae97988fc89e ("drm/amd/powerplay: tidy up ret checks in amd_powerplay.c (v3)")

For some reason I looked up that commit, and it has *two* cases where
"ret != 0" gets changed to "!ret".

BR,
Jani.


> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> IMHO, tidying unreadable double negatives is tricky and error prone but
> still worth it in the long run.
>
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> index 3c8ef4bfc205..0f8b6dc853a5 100644
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> @@ -1184,7 +1184,7 @@ int amd_powerplay_reset(void *handle)
>  	int ret;
>  
>  	ret = pp_check(instance);
> -	if (!ret)
> +	if (ret)
>  		return ret;
>  
>  	ret = pp_hw_fini(instance);
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-10-24 10:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24  9:44 [PATCH] drm/amd/powerplay: fix amd_powerplay_reset() Dan Carpenter
2017-10-24 10:11 ` Jani Nikula [this message]
2017-10-24 10:31   ` Dan Carpenter
2017-10-25 22:28 ` Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k1zkj1ok.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=JinHuiEric.Huang@amd.com \
    --cc=Rex.Zhu@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=ray.huang@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox