AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: Ruan Jinjie <ruanjinjie@huawei.com>,
	Felix.Kuehling@amd.com, alexander.deucher@amd.com,
	christian.koenig@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 5/7] drm/virtio: Remove an unnecessary NULL value
Date: Sun, 13 Aug 2023 04:14:49 +0300	[thread overview]
Message-ID: <325014e7-cb8d-54e0-eead-7727c8ec2f07@collabora.com> (raw)
In-Reply-To: <20230809034445.434902-6-ruanjinjie@huawei.com>

On 8/9/23 06:44, Ruan Jinjie wrote:
> The NULL initialization of the pointer assigned by kzalloc() first is
> not necessary, because if the kzalloc() failed, the pointer will be
> assigned NULL, otherwise it works as usual. so remove it.
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
> ---
>  drivers/gpu/drm/virtio/virtgpu_submit.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/virtio/virtgpu_submit.c b/drivers/gpu/drm/virtio/virtgpu_submit.c
> index 3c00135ead45..82563dbec2ab 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_submit.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_submit.c
> @@ -274,7 +274,7 @@ static int virtio_gpu_fence_event_create(struct drm_device *dev,
>  					 struct virtio_gpu_fence *fence,
>  					 u32 ring_idx)
>  {
> -	struct virtio_gpu_fence_event *e = NULL;
> +	struct virtio_gpu_fence_event *e;
>  	int ret;
>  
>  	e = kzalloc(sizeof(*e), GFP_KERNEL);

Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>

-- 
Best regards,
Dmitry


  reply	other threads:[~2023-08-14  7:31 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
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 [this message]
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=325014e7-cb8d-54e0-eead-7727c8ec2f07@collabora.com \
    --to=dmitry.osipenko@collabora.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=christian.koenig@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