From: Arnd Bergmann <arnd@arndb.de> To: Alex Deucher <alexander.deucher@amd.com>, Michal Hocko <mhocko@suse.com> Cc: "Arnd Bergmann" <arnd@arndb.de>, "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: [PATCH] drm/amdgpu: use ERR_PTR() to return from amdgpu_mn_get Date: Thu, 28 Apr 2016 11:33:48 +0200 [thread overview] Message-ID: <1461836093-1436847-1-git-send-email-arnd@arndb.de> (raw) 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") --- 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
WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de> To: Alex Deucher <alexander.deucher@amd.com>, Michal Hocko <mhocko@suse.com> Cc: "Jack Xiao" <Jack.Xiao@amd.com>, "Arnd Bergmann" <arnd@arndb.de>, "Jammy Zhou" <Jammy.Zhou@amd.com>, "Felix Kuehling" <Felix.Kuehling@amd.com>, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, "Christian König" <christian.koenig@amd.com>, "Monk Liu" <monk.liu@amd.com> Subject: [PATCH] drm/amdgpu: use ERR_PTR() to return from amdgpu_mn_get Date: Thu, 28 Apr 2016 11:33:48 +0200 [thread overview] Message-ID: <1461836093-1436847-1-git-send-email-arnd@arndb.de> (raw) 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") --- 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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2016-04-28 9:35 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-04-28 9:33 Arnd Bergmann [this message] 2016-04-28 9:33 ` [PATCH] drm/amdgpu: use ERR_PTR() to return from amdgpu_mn_get Arnd Bergmann 2016-04-28 10:06 ` Michal Hocko
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=1461836093-1436847-1-git-send-email-arnd@arndb.de \ --to=arnd@arndb.de \ --cc=Felix.Kuehling@amd.com \ --cc=Jack.Xiao@amd.com \ --cc=Jammy.Zhou@amd.com \ --cc=airlied@linux.ie \ --cc=alexander.deucher@amd.com \ --cc=christian.koenig@amd.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mhocko@suse.com \ --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: 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.