From: Matthew Brost <matthew.brost@intel.com>
To: Yu Jiaoliang <yujiaoliang@vivo.com>
Cc: "Lucas De Marchi" <lucas.demarchi@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, opensource.kernel@vivo.com
Subject: Re: [PATCH v1] drm/xe: Use ERR_CAST to return an error-valued pointer
Date: Thu, 12 Sep 2024 19:30:01 +0000 [thread overview]
Message-ID: <ZuNBOYn/U+At5Vog@DUT025-TGLU.fm.intel.com> (raw)
In-Reply-To: <Zt8exTWvVGz7CuDf@DUT025-TGLU.fm.intel.com>
On Mon, Sep 09, 2024 at 04:13:57PM +0000, Matthew Brost wrote:
> On Fri, Sep 06, 2024 at 03:01:09PM +0800, Yu Jiaoliang wrote:
> > Instead of directly casting and returning an error-valued pointer,
> > use ERR_CAST to make the error handling more explicit and improve
> > code clarity.
> >
> > Signed-off-by: Yu Jiaoliang <yujiaoliang@vivo.com>
>
> Reviewed-by: Matthew Brost <matthew.brost@intel.com>
>
Merged to drm-xe-next.
Thanks for the patch.
Matt
> > ---
> > drivers/gpu/drm/xe/xe_sa.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/xe/xe_sa.c b/drivers/gpu/drm/xe/xe_sa.c
> > index fe2cb2a96f78..e055bed7ae55 100644
> > --- a/drivers/gpu/drm/xe/xe_sa.c
> > +++ b/drivers/gpu/drm/xe/xe_sa.c
> > @@ -53,7 +53,7 @@ struct xe_sa_manager *xe_sa_bo_manager_init(struct xe_tile *tile, u32 size, u32
> > if (IS_ERR(bo)) {
> > drm_err(&xe->drm, "failed to allocate bo for sa manager: %ld\n",
> > PTR_ERR(bo));
> > - return (struct xe_sa_manager *)bo;
> > + return ERR_CAST(bo);
> > }
> > sa_manager->bo = bo;
> > sa_manager->is_iomem = bo->vmap.is_iomem;
> > --
> > 2.34.1
> >
next prev parent reply other threads:[~2024-09-12 19:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 7:01 [PATCH v1] drm/xe: Use ERR_CAST to return an error-valued pointer Yu Jiaoliang
2024-09-09 13:28 ` ✓ CI.Patch_applied: success for " Patchwork
2024-09-09 13:28 ` ✓ CI.checkpatch: " Patchwork
2024-09-09 13:29 ` ✓ CI.KUnit: " Patchwork
2024-09-09 13:41 ` ✓ CI.Build: " Patchwork
2024-09-09 13:44 ` ✓ CI.Hooks: " Patchwork
2024-09-09 13:45 ` ✓ CI.checksparse: " Patchwork
2024-09-09 14:00 ` ✓ CI.BAT: " Patchwork
2024-09-09 16:13 ` [PATCH v1] " Matthew Brost
2024-09-12 19:30 ` Matthew Brost [this message]
2024-09-09 20:16 ` ✗ CI.FULL: failure for " Patchwork
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=ZuNBOYn/U+At5Vog@DUT025-TGLU.fm.intel.com \
--to=matthew.brost@intel.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lucas.demarchi@intel.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=opensource.kernel@vivo.com \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=thomas.hellstrom@linux.intel.com \
--cc=tzimmermann@suse.de \
--cc=yujiaoliang@vivo.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