From: Michal Hocko <mhocko@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>, Andrew Morton <akpm@linux-foundation.org>
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"David Airlie" <airlied@linux.ie>,
"Felix Kuehling" <Felix.Kuehling@amd.com>,
"Jammy Zhou" <Jammy.Zhou@amd.com>, "Monk Liu" <monk.liu@amd.com>,
"Jack Xiao" <Jack.Xiao@amd.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/amdgpu: use ERR_PTR() to return from amdgpu_mn_get
Date: Thu, 28 Apr 2016 12:06:44 +0200 [thread overview]
Message-ID: <20160428100644.GC31489@dhcp22.suse.cz> (raw)
In-Reply-To: <1461836093-1436847-1-git-send-email-arnd@arndb.de>
On Thu 28-04-16 11:33:48, Arnd Bergmann wrote:
> The newly added failure path in amdgpu_mn_get() use the
> wrong return type:
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c: In function 'amdgpu_mn_get':
> drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:237:10: error: return makes pointer from integer without a cast
>
> This adds the necessary ERR_PTR() conversion.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: ad35eee9fb17 ("drm/amdgpu: make amdgpu_mn_get wait for mmap_sem killable")
This is in the mmotm tree so the sha is unstable.
Acked-by: Michal Hocko <mhocko@suse.com>
Thanks for catching this.
Andrew, could you fold this into the original patch please?
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
> index cf90686a50d1..32fa7b7913f7 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
> @@ -234,7 +234,7 @@ static struct amdgpu_mn *amdgpu_mn_get(struct amdgpu_device *adev)
> mutex_lock(&adev->mn_lock);
> if (down_write_killable(&mm->mmap_sem)) {
> mutex_unlock(&adev->mn_lock);
> - return -EINTR;
> + return ERR_PTR(-EINTR);
> }
>
> hash_for_each_possible(adev->mn_hash, rmn, node, (unsigned long)mm)
> --
> 2.7.0
--
Michal Hocko
SUSE Labs
prev parent reply other threads:[~2016-04-28 10:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-28 9:33 Arnd Bergmann
2016-04-28 10:06 ` Michal Hocko [this message]
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=20160428100644.GC31489@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=Felix.Kuehling@amd.com \
--cc=Jack.Xiao@amd.com \
--cc=Jammy.Zhou@amd.com \
--cc=airlied@linux.ie \
--cc=akpm@linux-foundation.org \
--cc=alexander.deucher@amd.com \
--cc=arnd@arndb.de \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=monk.liu@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
all inboxes | Powered by JetHome®