From: "Christian König" <christian.koenig@amd.com>
To: Ruan Jinjie <ruanjinjie@huawei.com>,
Felix.Kuehling@amd.com, alexander.deucher@amd.com,
Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch,
harry.wentland@amd.com, sunpeng.li@amd.com,
Rodrigo.Siqueira@amd.com, maarten.lankhorst@linux.intel.com,
mripard@kernel.org, tzimmermann@suse.de, inki.dae@samsung.com,
sw0312.kim@samsung.com, kyungmin.park@samsung.com,
krzysztof.kozlowski@linaro.org, alim.akhtar@samsung.com,
robdclark@gmail.com, quic_abhinavk@quicinc.com,
dmitry.baryshkov@linaro.org, sean@poorly.run,
marijn.suijten@somainline.org, bskeggs@redhat.com,
kherbst@redhat.com, lyude@redhat.com, kraxel@redhat.com,
gurchetansingh@chromium.org, olvaffe@gmail.com,
paulo.miguel.almeida.rodenas@gmail.com, wenjing.liu@amd.com,
haoping.liu@amd.com, Charlene.Liu@amd.com,
chiahsuan.chung@amd.com, george.shen@amd.com, sancchen@amd.com,
tony.tascioglu@amd.com, jaehyun.chung@amd.com,
tales.aparecida@gmail.com, drv@mailo.com,
aurabindo.pillai@amd.com, quic_vpolimer@quicinc.com,
jiasheng@iscas.ac.cn, noralf@tronnes.org,
jose.exposito89@gmail.com, javierm@redhat.com,
mairacanal@riseup.net, davidgow@google.com,
arthurgrillo@riseup.net, amd-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org,
linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
freedreno@lists.freedesktop.org, nouveau@lists.freedesktop.org,
virtualization@lists.linux-foundation.org
Subject: Re: [PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values
Date: Wed, 9 Aug 2023 08:15:23 +0200 [thread overview]
Message-ID: <c2b0d96e-b768-b295-c672-3ae52e14b10b@amd.com> (raw)
In-Reply-To: <20230809034445.434902-2-ruanjinjie@huawei.com>
Am 09.08.23 um 05:44 schrieb Ruan Jinjie:
> The NULL initialization of the pointers assigned by kzalloc() first is
> not necessary, because if the kzalloc() failed, the pointers will be
> assigned NULL, otherwise it works as usual. so remove it.
>
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Reviewed-by: Christian König <christian.koenig@amd.com> for this one,
the amd display code and the radeon stuff.
Thanks,
Christian.
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c
> index 863cf060af48..d01bb57733b3 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c
> @@ -48,7 +48,7 @@ int pipe_priority_map[] = {
>
> struct kfd_mem_obj *allocate_hiq_mqd(struct kfd_node *dev, struct queue_properties *q)
> {
> - struct kfd_mem_obj *mqd_mem_obj = NULL;
> + struct kfd_mem_obj *mqd_mem_obj;
>
> mqd_mem_obj = kzalloc(sizeof(struct kfd_mem_obj), GFP_KERNEL);
> if (!mqd_mem_obj)
> @@ -64,7 +64,7 @@ struct kfd_mem_obj *allocate_hiq_mqd(struct kfd_node *dev, struct queue_properti
> struct kfd_mem_obj *allocate_sdma_mqd(struct kfd_node *dev,
> struct queue_properties *q)
> {
> - struct kfd_mem_obj *mqd_mem_obj = NULL;
> + struct kfd_mem_obj *mqd_mem_obj;
> uint64_t offset;
>
> mqd_mem_obj = kzalloc(sizeof(struct kfd_mem_obj), GFP_KERNEL);
next prev parent reply other threads:[~2023-08-09 6:15 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 3:44 [PATCH -next 0/7] drm: Remove many unnecessary NULL values Ruan Jinjie
2023-08-09 3:44 ` [PATCH -next 1/7] drm/amdkfd: Remove " Ruan Jinjie
2023-08-09 6:15 ` Christian König [this message]
2023-08-09 13:11 ` Alex Deucher
2023-08-09 3:44 ` [PATCH -next 2/7] drm/amd/display: " Ruan Jinjie
2023-08-09 3:44 ` [PATCH -next 3/7] drm/msm: " Ruan Jinjie
2023-08-12 0:28 ` Abhinav Kumar
2023-08-09 3:44 ` [PATCH -next 4/7] drm/radeon: " Ruan Jinjie
2023-08-09 3:44 ` [PATCH -next 5/7] drm/virtio: Remove an unnecessary NULL value Ruan Jinjie
2023-08-13 1:14 ` Dmitry Osipenko
2023-08-09 3:44 ` [PATCH -next 6/7] drm/format-helper: Remove unnecessary NULL values Ruan Jinjie
2023-08-09 12:20 ` Arthur Grillo
2023-08-09 3:44 ` [PATCH -next 7/7] drm: " Ruan Jinjie
2023-10-08 14:01 ` [PATCH -next 0/7] drm: Remove many " Dmitry Baryshkov
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=c2b0d96e-b768-b295-c672-3ae52e14b10b@amd.com \
--to=christian.koenig@amd.com \
--cc=Charlene.Liu@amd.com \
--cc=Felix.Kuehling@amd.com \
--cc=Rodrigo.Siqueira@amd.com \
--cc=Xinhui.Pan@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=alim.akhtar@samsung.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=arthurgrillo@riseup.net \
--cc=aurabindo.pillai@amd.com \
--cc=bskeggs@redhat.com \
--cc=chiahsuan.chung@amd.com \
--cc=daniel@ffwll.ch \
--cc=davidgow@google.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=drv@mailo.com \
--cc=freedreno@lists.freedesktop.org \
--cc=george.shen@amd.com \
--cc=gurchetansingh@chromium.org \
--cc=haoping.liu@amd.com \
--cc=harry.wentland@amd.com \
--cc=inki.dae@samsung.com \
--cc=jaehyun.chung@amd.com \
--cc=javierm@redhat.com \
--cc=jiasheng@iscas.ac.cn \
--cc=jose.exposito89@gmail.com \
--cc=kherbst@redhat.com \
--cc=kraxel@redhat.com \
--cc=krzysztof.kozlowski@linaro.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mairacanal@riseup.net \
--cc=marijn.suijten@somainline.org \
--cc=mripard@kernel.org \
--cc=noralf@tronnes.org \
--cc=nouveau@lists.freedesktop.org \
--cc=olvaffe@gmail.com \
--cc=paulo.miguel.almeida.rodenas@gmail.com \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_vpolimer@quicinc.com \
--cc=robdclark@gmail.com \
--cc=ruanjinjie@huawei.com \
--cc=sancchen@amd.com \
--cc=sean@poorly.run \
--cc=sunpeng.li@amd.com \
--cc=sw0312.kim@samsung.com \
--cc=tales.aparecida@gmail.com \
--cc=tony.tascioglu@amd.com \
--cc=tzimmermann@suse.de \
--cc=virtualization@lists.linux-foundation.org \
--cc=wenjing.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