From: Tian Tao <tiantao6@hisilicon.com> To: <airlied@linux.ie>, <daniel@ffwll.ch> Cc: Tian Tao <tiantao6@hisilicon.com>, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/amdgpu: remove set but not used variables Date: Tue, 13 Apr 2021 16:03:41 +0800 [thread overview] Message-ID: <1618301021-46389-1-git-send-email-tiantao6@hisilicon.com> (raw) The value of ret set but will rewriten, so just delete. Signed-off-by: Tian Tao <tiantao6@hisilicon.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 1fb2a91..f303ad6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -1815,10 +1815,8 @@ int amdgpu_ras_recovery_init(struct amdgpu_device *adev) return 0; *data = kmalloc(sizeof(**data), GFP_KERNEL | __GFP_ZERO); - if (!*data) { - ret = -ENOMEM; - goto out; - } + if (!*data) + return -ENOMEM; mutex_init(&con->recovery_lock); INIT_WORK(&con->recovery_work, amdgpu_ras_do_recovery); @@ -1848,7 +1846,7 @@ int amdgpu_ras_recovery_init(struct amdgpu_device *adev) kfree((*data)->bps); kfree(*data); con->eh_data = NULL; -out: + dev_warn(adev->dev, "Failed to initialize ras recovery!\n"); /* -- 2.7.4 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Tian Tao <tiantao6@hisilicon.com> To: <airlied@linux.ie>, <daniel@ffwll.ch> Cc: Tian Tao <tiantao6@hisilicon.com>, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org Subject: [PATCH] drm/amdgpu: remove set but not used variables Date: Tue, 13 Apr 2021 16:03:41 +0800 [thread overview] Message-ID: <1618301021-46389-1-git-send-email-tiantao6@hisilicon.com> (raw) The value of ret set but will rewriten, so just delete. Signed-off-by: Tian Tao <tiantao6@hisilicon.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 1fb2a91..f303ad6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -1815,10 +1815,8 @@ int amdgpu_ras_recovery_init(struct amdgpu_device *adev) return 0; *data = kmalloc(sizeof(**data), GFP_KERNEL | __GFP_ZERO); - if (!*data) { - ret = -ENOMEM; - goto out; - } + if (!*data) + return -ENOMEM; mutex_init(&con->recovery_lock); INIT_WORK(&con->recovery_work, amdgpu_ras_do_recovery); @@ -1848,7 +1846,7 @@ int amdgpu_ras_recovery_init(struct amdgpu_device *adev) kfree((*data)->bps); kfree(*data); con->eh_data = NULL; -out: + dev_warn(adev->dev, "Failed to initialize ras recovery!\n"); /* -- 2.7.4 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next reply other threads:[~2021-04-13 8:03 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-13 8:03 Tian Tao [this message] 2021-04-13 8:03 ` [PATCH] drm/amdgpu: remove set but not used variables Tian Tao
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=1618301021-46389-1-git-send-email-tiantao6@hisilicon.com \ --to=tiantao6@hisilicon.com \ --cc=airlied@linux.ie \ --cc=amd-gfx@lists.freedesktop.org \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.