All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next 0/7] drm: Remove many unnecessary NULL values
@ 2023-08-09  3:44 ` Ruan Jinjie
  0 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

The NULL initialization of the pointers assigned by kzalloc() or
kunit_kzalloc() first is not necessary, because if the kzalloc() or
kunit_kzalloc() failed, the pointers will be assigned NULL, otherwise
it works as usual. so remove it.

Ruan Jinjie (7):
  drm/amdkfd: Remove unnecessary NULL values
  drm/amd/display: Remove unnecessary NULL values
  drm/msm: Remove unnecessary NULL values
  drm/radeon: Remove unnecessary NULL values
  drm/virtio: Remove an unnecessary NULL value
  drm/format-helper: Remove unnecessary NULL values
  drm: Remove unnecessary NULL values

 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c  |  4 +--
 .../gpu/drm/amd/display/dc/bios/bios_parser.c |  4 +--
 .../drm/amd/display/dc/bios/bios_parser2.c    |  4 +--
 drivers/gpu/drm/drm_agpsupport.c              |  2 +-
 drivers/gpu/drm/drm_atomic_uapi.c             |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_ipp.c       |  2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c      |  2 +-
 drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c      |  2 +-
 drivers/gpu/drm/nouveau/dispnv04/tvnv17.c     |  2 +-
 drivers/gpu/drm/radeon/radeon_agp.c           |  2 +-
 drivers/gpu/drm/radeon/radeon_combios.c       |  6 ++--
 .../gpu/drm/radeon/radeon_legacy_encoders.c   |  4 +--
 .../gpu/drm/tests/drm_format_helper_test.c    | 28 +++++++++----------
 drivers/gpu/drm/virtio/virtgpu_submit.c       |  2 +-
 14 files changed, 33 insertions(+), 33 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH -next 0/7] drm: Remove many unnecessary NULL values
@ 2023-08-09  3:44 ` Ruan Jinjie
  0 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

The NULL initialization of the pointers assigned by kzalloc() or
kunit_kzalloc() first is not necessary, because if the kzalloc() or
kunit_kzalloc() failed, the pointers will be assigned NULL, otherwise
it works as usual. so remove it.

Ruan Jinjie (7):
  drm/amdkfd: Remove unnecessary NULL values
  drm/amd/display: Remove unnecessary NULL values
  drm/msm: Remove unnecessary NULL values
  drm/radeon: Remove unnecessary NULL values
  drm/virtio: Remove an unnecessary NULL value
  drm/format-helper: Remove unnecessary NULL values
  drm: Remove unnecessary NULL values

 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c  |  4 +--
 .../gpu/drm/amd/display/dc/bios/bios_parser.c |  4 +--
 .../drm/amd/display/dc/bios/bios_parser2.c    |  4 +--
 drivers/gpu/drm/drm_agpsupport.c              |  2 +-
 drivers/gpu/drm/drm_atomic_uapi.c             |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_ipp.c       |  2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c      |  2 +-
 drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c      |  2 +-
 drivers/gpu/drm/nouveau/dispnv04/tvnv17.c     |  2 +-
 drivers/gpu/drm/radeon/radeon_agp.c           |  2 +-
 drivers/gpu/drm/radeon/radeon_combios.c       |  6 ++--
 .../gpu/drm/radeon/radeon_legacy_encoders.c   |  4 +--
 .../gpu/drm/tests/drm_format_helper_test.c    | 28 +++++++++----------
 drivers/gpu/drm/virtio/virtgpu_submit.c       |  2 +-
 14 files changed, 33 insertions(+), 33 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 40+ messages in thread

* [Nouveau] [PATCH -next 0/7] drm: Remove many unnecessary NULL values
@ 2023-08-09  3:44 ` Ruan Jinjie
  0 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

The NULL initialization of the pointers assigned by kzalloc() or
kunit_kzalloc() first is not necessary, because if the kzalloc() or
kunit_kzalloc() failed, the pointers will be assigned NULL, otherwise
it works as usual. so remove it.

Ruan Jinjie (7):
  drm/amdkfd: Remove unnecessary NULL values
  drm/amd/display: Remove unnecessary NULL values
  drm/msm: Remove unnecessary NULL values
  drm/radeon: Remove unnecessary NULL values
  drm/virtio: Remove an unnecessary NULL value
  drm/format-helper: Remove unnecessary NULL values
  drm: Remove unnecessary NULL values

 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c  |  4 +--
 .../gpu/drm/amd/display/dc/bios/bios_parser.c |  4 +--
 .../drm/amd/display/dc/bios/bios_parser2.c    |  4 +--
 drivers/gpu/drm/drm_agpsupport.c              |  2 +-
 drivers/gpu/drm/drm_atomic_uapi.c             |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_ipp.c       |  2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c      |  2 +-
 drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c      |  2 +-
 drivers/gpu/drm/nouveau/dispnv04/tvnv17.c     |  2 +-
 drivers/gpu/drm/radeon/radeon_agp.c           |  2 +-
 drivers/gpu/drm/radeon/radeon_combios.c       |  6 ++--
 .../gpu/drm/radeon/radeon_legacy_encoders.c   |  4 +--
 .../gpu/drm/tests/drm_format_helper_test.c    | 28 +++++++++----------
 drivers/gpu/drm/virtio/virtgpu_submit.c       |  2 +-
 14 files changed, 33 insertions(+), 33 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 40+ messages in thread

* [PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values
  2023-08-09  3:44 ` Ruan Jinjie
  (?)
@ 2023-08-09  3:44   ` Ruan Jinjie
  -1 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

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>
---
 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);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values
@ 2023-08-09  3:44   ` Ruan Jinjie
  0 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

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>
---
 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);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [Nouveau] [PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values
@ 2023-08-09  3:44   ` Ruan Jinjie
  0 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

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>
---
 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);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH -next 2/7] drm/amd/display: Remove unnecessary NULL values
  2023-08-09  3:44 ` Ruan Jinjie
  (?)
@ 2023-08-09  3:44   ` Ruan Jinjie
  -1 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

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>
---
 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c  | 4 ++--
 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
index 4f005ae1516c..6b3190447581 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
@@ -96,7 +96,7 @@ struct dc_bios *bios_parser_create(
 	struct bp_init_data *init,
 	enum dce_version dce_version)
 {
-	struct bios_parser *bp = NULL;
+	struct bios_parser *bp;
 
 	bp = kzalloc(sizeof(struct bios_parser), GFP_KERNEL);
 	if (!bp)
@@ -2576,7 +2576,7 @@ static struct integrated_info *bios_parser_create_integrated_info(
 	struct dc_bios *dcb)
 {
 	struct bios_parser *bp = BP_FROM_DCB(dcb);
-	struct integrated_info *info = NULL;
+	struct integrated_info *info;
 
 	info = kzalloc(sizeof(struct integrated_info), GFP_KERNEL);
 
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
index 540d19efad8f..c7b3359f1e1d 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
@@ -3086,7 +3086,7 @@ static struct integrated_info *bios_parser_create_integrated_info(
 	struct dc_bios *dcb)
 {
 	struct bios_parser *bp = BP_FROM_DCB(dcb);
-	struct integrated_info *info = NULL;
+	struct integrated_info *info;
 
 	info = kzalloc(sizeof(struct integrated_info), GFP_KERNEL);
 
@@ -3675,7 +3675,7 @@ struct dc_bios *firmware_parser_create(
 	struct bp_init_data *init,
 	enum dce_version dce_version)
 {
-	struct bios_parser *bp = NULL;
+	struct bios_parser *bp;
 
 	bp = kzalloc(sizeof(struct bios_parser), GFP_KERNEL);
 	if (!bp)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH -next 2/7] drm/amd/display: Remove unnecessary NULL values
@ 2023-08-09  3:44   ` Ruan Jinjie
  0 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

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>
---
 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c  | 4 ++--
 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
index 4f005ae1516c..6b3190447581 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
@@ -96,7 +96,7 @@ struct dc_bios *bios_parser_create(
 	struct bp_init_data *init,
 	enum dce_version dce_version)
 {
-	struct bios_parser *bp = NULL;
+	struct bios_parser *bp;
 
 	bp = kzalloc(sizeof(struct bios_parser), GFP_KERNEL);
 	if (!bp)
@@ -2576,7 +2576,7 @@ static struct integrated_info *bios_parser_create_integrated_info(
 	struct dc_bios *dcb)
 {
 	struct bios_parser *bp = BP_FROM_DCB(dcb);
-	struct integrated_info *info = NULL;
+	struct integrated_info *info;
 
 	info = kzalloc(sizeof(struct integrated_info), GFP_KERNEL);
 
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
index 540d19efad8f..c7b3359f1e1d 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
@@ -3086,7 +3086,7 @@ static struct integrated_info *bios_parser_create_integrated_info(
 	struct dc_bios *dcb)
 {
 	struct bios_parser *bp = BP_FROM_DCB(dcb);
-	struct integrated_info *info = NULL;
+	struct integrated_info *info;
 
 	info = kzalloc(sizeof(struct integrated_info), GFP_KERNEL);
 
@@ -3675,7 +3675,7 @@ struct dc_bios *firmware_parser_create(
 	struct bp_init_data *init,
 	enum dce_version dce_version)
 {
-	struct bios_parser *bp = NULL;
+	struct bios_parser *bp;
 
 	bp = kzalloc(sizeof(struct bios_parser), GFP_KERNEL);
 	if (!bp)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [Nouveau] [PATCH -next 2/7] drm/amd/display: Remove unnecessary NULL values
@ 2023-08-09  3:44   ` Ruan Jinjie
  0 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

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>
---
 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c  | 4 ++--
 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
index 4f005ae1516c..6b3190447581 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
@@ -96,7 +96,7 @@ struct dc_bios *bios_parser_create(
 	struct bp_init_data *init,
 	enum dce_version dce_version)
 {
-	struct bios_parser *bp = NULL;
+	struct bios_parser *bp;
 
 	bp = kzalloc(sizeof(struct bios_parser), GFP_KERNEL);
 	if (!bp)
@@ -2576,7 +2576,7 @@ static struct integrated_info *bios_parser_create_integrated_info(
 	struct dc_bios *dcb)
 {
 	struct bios_parser *bp = BP_FROM_DCB(dcb);
-	struct integrated_info *info = NULL;
+	struct integrated_info *info;
 
 	info = kzalloc(sizeof(struct integrated_info), GFP_KERNEL);
 
diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
index 540d19efad8f..c7b3359f1e1d 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
@@ -3086,7 +3086,7 @@ static struct integrated_info *bios_parser_create_integrated_info(
 	struct dc_bios *dcb)
 {
 	struct bios_parser *bp = BP_FROM_DCB(dcb);
-	struct integrated_info *info = NULL;
+	struct integrated_info *info;
 
 	info = kzalloc(sizeof(struct integrated_info), GFP_KERNEL);
 
@@ -3675,7 +3675,7 @@ struct dc_bios *firmware_parser_create(
 	struct bp_init_data *init,
 	enum dce_version dce_version)
 {
-	struct bios_parser *bp = NULL;
+	struct bios_parser *bp;
 
 	bp = kzalloc(sizeof(struct bios_parser), GFP_KERNEL);
 	if (!bp)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH -next 3/7] drm/msm: Remove unnecessary NULL values
  2023-08-09  3:44 ` Ruan Jinjie
  (?)
@ 2023-08-09  3:44   ` Ruan Jinjie
  -1 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

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>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 +-
 drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
index 8ce7586e2ddf..3c475f8042b0 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@ -1466,7 +1466,7 @@ struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane,
 	struct msm_drm_private *priv = dev->dev_private;
 	struct dpu_kms *dpu_kms = to_dpu_kms(priv->kms);
 	struct drm_crtc *crtc = NULL;
-	struct dpu_crtc *dpu_crtc = NULL;
+	struct dpu_crtc *dpu_crtc;
 	int i, ret;
 
 	dpu_crtc = kzalloc(sizeof(*dpu_crtc), GFP_KERNEL);
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
index 56a3063545ec..b68682c1b5bc 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
@@ -379,7 +379,7 @@ struct mdp5_smp *mdp5_smp_init(struct mdp5_kms *mdp5_kms, const struct mdp5_smp_
 {
 	struct mdp5_smp_state *state;
 	struct mdp5_global_state *global_state;
-	struct mdp5_smp *smp = NULL;
+	struct mdp5_smp *smp;
 	int ret;
 
 	smp = kzalloc(sizeof(*smp), GFP_KERNEL);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH -next 3/7] drm/msm: Remove unnecessary NULL values
@ 2023-08-09  3:44   ` Ruan Jinjie
  0 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

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>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 +-
 drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
index 8ce7586e2ddf..3c475f8042b0 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@ -1466,7 +1466,7 @@ struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane,
 	struct msm_drm_private *priv = dev->dev_private;
 	struct dpu_kms *dpu_kms = to_dpu_kms(priv->kms);
 	struct drm_crtc *crtc = NULL;
-	struct dpu_crtc *dpu_crtc = NULL;
+	struct dpu_crtc *dpu_crtc;
 	int i, ret;
 
 	dpu_crtc = kzalloc(sizeof(*dpu_crtc), GFP_KERNEL);
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
index 56a3063545ec..b68682c1b5bc 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
@@ -379,7 +379,7 @@ struct mdp5_smp *mdp5_smp_init(struct mdp5_kms *mdp5_kms, const struct mdp5_smp_
 {
 	struct mdp5_smp_state *state;
 	struct mdp5_global_state *global_state;
-	struct mdp5_smp *smp = NULL;
+	struct mdp5_smp *smp;
 	int ret;
 
 	smp = kzalloc(sizeof(*smp), GFP_KERNEL);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [Nouveau] [PATCH -next 3/7] drm/msm: Remove unnecessary NULL values
@ 2023-08-09  3:44   ` Ruan Jinjie
  0 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

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>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 +-
 drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
index 8ce7586e2ddf..3c475f8042b0 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@ -1466,7 +1466,7 @@ struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane,
 	struct msm_drm_private *priv = dev->dev_private;
 	struct dpu_kms *dpu_kms = to_dpu_kms(priv->kms);
 	struct drm_crtc *crtc = NULL;
-	struct dpu_crtc *dpu_crtc = NULL;
+	struct dpu_crtc *dpu_crtc;
 	int i, ret;
 
 	dpu_crtc = kzalloc(sizeof(*dpu_crtc), GFP_KERNEL);
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
index 56a3063545ec..b68682c1b5bc 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c
@@ -379,7 +379,7 @@ struct mdp5_smp *mdp5_smp_init(struct mdp5_kms *mdp5_kms, const struct mdp5_smp_
 {
 	struct mdp5_smp_state *state;
 	struct mdp5_global_state *global_state;
-	struct mdp5_smp *smp = NULL;
+	struct mdp5_smp *smp;
 	int ret;
 
 	smp = kzalloc(sizeof(*smp), GFP_KERNEL);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH -next 4/7] drm/radeon: Remove unnecessary NULL values
  2023-08-09  3:44 ` Ruan Jinjie
  (?)
@ 2023-08-09  3:44   ` Ruan Jinjie
  -1 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

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>
---
 drivers/gpu/drm/radeon/radeon_agp.c             | 2 +-
 drivers/gpu/drm/radeon/radeon_combios.c         | 6 +++---
 drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_agp.c b/drivers/gpu/drm/radeon/radeon_agp.c
index d124600b5f58..a3d749e350f9 100644
--- a/drivers/gpu/drm/radeon/radeon_agp.c
+++ b/drivers/gpu/drm/radeon/radeon_agp.c
@@ -130,7 +130,7 @@ static struct radeon_agpmode_quirk radeon_agpmode_quirk_list[] = {
 struct radeon_agp_head *radeon_agp_head_init(struct drm_device *dev)
 {
 	struct pci_dev *pdev = to_pci_dev(dev->dev);
-	struct radeon_agp_head *head = NULL;
+	struct radeon_agp_head *head;
 
 	head = kzalloc(sizeof(*head), GFP_KERNEL);
 	if (!head)
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index 795c3667f6d6..2620efc7c675 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -863,7 +863,7 @@ struct radeon_encoder_primary_dac *radeon_combios_get_primary_dac_info(struct
 	struct radeon_device *rdev = dev->dev_private;
 	uint16_t dac_info;
 	uint8_t rev, bg, dac;
-	struct radeon_encoder_primary_dac *p_dac = NULL;
+	struct radeon_encoder_primary_dac *p_dac;
 	int found = 0;
 
 	p_dac = kzalloc(sizeof(struct radeon_encoder_primary_dac),
@@ -1014,7 +1014,7 @@ struct radeon_encoder_tv_dac *radeon_combios_get_tv_dac_info(struct
 	struct radeon_device *rdev = dev->dev_private;
 	uint16_t dac_info;
 	uint8_t rev, bg, dac;
-	struct radeon_encoder_tv_dac *tv_dac = NULL;
+	struct radeon_encoder_tv_dac *tv_dac;
 	int found = 0;
 
 	tv_dac = kzalloc(sizeof(struct radeon_encoder_tv_dac), GFP_KERNEL);
@@ -1100,7 +1100,7 @@ static struct radeon_encoder_lvds *radeon_legacy_get_lvds_info_from_regs(struct
 									 radeon_device
 									 *rdev)
 {
-	struct radeon_encoder_lvds *lvds = NULL;
+	struct radeon_encoder_lvds *lvds;
 	uint32_t fp_vert_stretch, fp_horz_stretch;
 	uint32_t ppll_div_sel, ppll_val;
 	uint32_t lvds_ss_gen_cntl = RREG32(RADEON_LVDS_SS_GEN_CNTL);
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
index 601d35d34eab..c4350ac2b3d2 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
@@ -1692,7 +1692,7 @@ static struct radeon_encoder_int_tmds *radeon_legacy_get_tmds_info(struct radeon
 {
 	struct drm_device *dev = encoder->base.dev;
 	struct radeon_device *rdev = dev->dev_private;
-	struct radeon_encoder_int_tmds *tmds = NULL;
+	struct radeon_encoder_int_tmds *tmds;
 	bool ret;
 
 	tmds = kzalloc(sizeof(struct radeon_encoder_int_tmds), GFP_KERNEL);
@@ -1715,7 +1715,7 @@ static struct radeon_encoder_ext_tmds *radeon_legacy_get_ext_tmds_info(struct ra
 {
 	struct drm_device *dev = encoder->base.dev;
 	struct radeon_device *rdev = dev->dev_private;
-	struct radeon_encoder_ext_tmds *tmds = NULL;
+	struct radeon_encoder_ext_tmds *tmds;
 	bool ret;
 
 	if (rdev->is_atom_bios)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH -next 4/7] drm/radeon: Remove unnecessary NULL values
@ 2023-08-09  3:44   ` Ruan Jinjie
  0 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

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>
---
 drivers/gpu/drm/radeon/radeon_agp.c             | 2 +-
 drivers/gpu/drm/radeon/radeon_combios.c         | 6 +++---
 drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_agp.c b/drivers/gpu/drm/radeon/radeon_agp.c
index d124600b5f58..a3d749e350f9 100644
--- a/drivers/gpu/drm/radeon/radeon_agp.c
+++ b/drivers/gpu/drm/radeon/radeon_agp.c
@@ -130,7 +130,7 @@ static struct radeon_agpmode_quirk radeon_agpmode_quirk_list[] = {
 struct radeon_agp_head *radeon_agp_head_init(struct drm_device *dev)
 {
 	struct pci_dev *pdev = to_pci_dev(dev->dev);
-	struct radeon_agp_head *head = NULL;
+	struct radeon_agp_head *head;
 
 	head = kzalloc(sizeof(*head), GFP_KERNEL);
 	if (!head)
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index 795c3667f6d6..2620efc7c675 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -863,7 +863,7 @@ struct radeon_encoder_primary_dac *radeon_combios_get_primary_dac_info(struct
 	struct radeon_device *rdev = dev->dev_private;
 	uint16_t dac_info;
 	uint8_t rev, bg, dac;
-	struct radeon_encoder_primary_dac *p_dac = NULL;
+	struct radeon_encoder_primary_dac *p_dac;
 	int found = 0;
 
 	p_dac = kzalloc(sizeof(struct radeon_encoder_primary_dac),
@@ -1014,7 +1014,7 @@ struct radeon_encoder_tv_dac *radeon_combios_get_tv_dac_info(struct
 	struct radeon_device *rdev = dev->dev_private;
 	uint16_t dac_info;
 	uint8_t rev, bg, dac;
-	struct radeon_encoder_tv_dac *tv_dac = NULL;
+	struct radeon_encoder_tv_dac *tv_dac;
 	int found = 0;
 
 	tv_dac = kzalloc(sizeof(struct radeon_encoder_tv_dac), GFP_KERNEL);
@@ -1100,7 +1100,7 @@ static struct radeon_encoder_lvds *radeon_legacy_get_lvds_info_from_regs(struct
 									 radeon_device
 									 *rdev)
 {
-	struct radeon_encoder_lvds *lvds = NULL;
+	struct radeon_encoder_lvds *lvds;
 	uint32_t fp_vert_stretch, fp_horz_stretch;
 	uint32_t ppll_div_sel, ppll_val;
 	uint32_t lvds_ss_gen_cntl = RREG32(RADEON_LVDS_SS_GEN_CNTL);
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
index 601d35d34eab..c4350ac2b3d2 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
@@ -1692,7 +1692,7 @@ static struct radeon_encoder_int_tmds *radeon_legacy_get_tmds_info(struct radeon
 {
 	struct drm_device *dev = encoder->base.dev;
 	struct radeon_device *rdev = dev->dev_private;
-	struct radeon_encoder_int_tmds *tmds = NULL;
+	struct radeon_encoder_int_tmds *tmds;
 	bool ret;
 
 	tmds = kzalloc(sizeof(struct radeon_encoder_int_tmds), GFP_KERNEL);
@@ -1715,7 +1715,7 @@ static struct radeon_encoder_ext_tmds *radeon_legacy_get_ext_tmds_info(struct ra
 {
 	struct drm_device *dev = encoder->base.dev;
 	struct radeon_device *rdev = dev->dev_private;
-	struct radeon_encoder_ext_tmds *tmds = NULL;
+	struct radeon_encoder_ext_tmds *tmds;
 	bool ret;
 
 	if (rdev->is_atom_bios)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [Nouveau] [PATCH -next 4/7] drm/radeon: Remove unnecessary NULL values
@ 2023-08-09  3:44   ` Ruan Jinjie
  0 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

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>
---
 drivers/gpu/drm/radeon/radeon_agp.c             | 2 +-
 drivers/gpu/drm/radeon/radeon_combios.c         | 6 +++---
 drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_agp.c b/drivers/gpu/drm/radeon/radeon_agp.c
index d124600b5f58..a3d749e350f9 100644
--- a/drivers/gpu/drm/radeon/radeon_agp.c
+++ b/drivers/gpu/drm/radeon/radeon_agp.c
@@ -130,7 +130,7 @@ static struct radeon_agpmode_quirk radeon_agpmode_quirk_list[] = {
 struct radeon_agp_head *radeon_agp_head_init(struct drm_device *dev)
 {
 	struct pci_dev *pdev = to_pci_dev(dev->dev);
-	struct radeon_agp_head *head = NULL;
+	struct radeon_agp_head *head;
 
 	head = kzalloc(sizeof(*head), GFP_KERNEL);
 	if (!head)
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index 795c3667f6d6..2620efc7c675 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -863,7 +863,7 @@ struct radeon_encoder_primary_dac *radeon_combios_get_primary_dac_info(struct
 	struct radeon_device *rdev = dev->dev_private;
 	uint16_t dac_info;
 	uint8_t rev, bg, dac;
-	struct radeon_encoder_primary_dac *p_dac = NULL;
+	struct radeon_encoder_primary_dac *p_dac;
 	int found = 0;
 
 	p_dac = kzalloc(sizeof(struct radeon_encoder_primary_dac),
@@ -1014,7 +1014,7 @@ struct radeon_encoder_tv_dac *radeon_combios_get_tv_dac_info(struct
 	struct radeon_device *rdev = dev->dev_private;
 	uint16_t dac_info;
 	uint8_t rev, bg, dac;
-	struct radeon_encoder_tv_dac *tv_dac = NULL;
+	struct radeon_encoder_tv_dac *tv_dac;
 	int found = 0;
 
 	tv_dac = kzalloc(sizeof(struct radeon_encoder_tv_dac), GFP_KERNEL);
@@ -1100,7 +1100,7 @@ static struct radeon_encoder_lvds *radeon_legacy_get_lvds_info_from_regs(struct
 									 radeon_device
 									 *rdev)
 {
-	struct radeon_encoder_lvds *lvds = NULL;
+	struct radeon_encoder_lvds *lvds;
 	uint32_t fp_vert_stretch, fp_horz_stretch;
 	uint32_t ppll_div_sel, ppll_val;
 	uint32_t lvds_ss_gen_cntl = RREG32(RADEON_LVDS_SS_GEN_CNTL);
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
index 601d35d34eab..c4350ac2b3d2 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
@@ -1692,7 +1692,7 @@ static struct radeon_encoder_int_tmds *radeon_legacy_get_tmds_info(struct radeon
 {
 	struct drm_device *dev = encoder->base.dev;
 	struct radeon_device *rdev = dev->dev_private;
-	struct radeon_encoder_int_tmds *tmds = NULL;
+	struct radeon_encoder_int_tmds *tmds;
 	bool ret;
 
 	tmds = kzalloc(sizeof(struct radeon_encoder_int_tmds), GFP_KERNEL);
@@ -1715,7 +1715,7 @@ static struct radeon_encoder_ext_tmds *radeon_legacy_get_ext_tmds_info(struct ra
 {
 	struct drm_device *dev = encoder->base.dev;
 	struct radeon_device *rdev = dev->dev_private;
-	struct radeon_encoder_ext_tmds *tmds = NULL;
+	struct radeon_encoder_ext_tmds *tmds;
 	bool ret;
 
 	if (rdev->is_atom_bios)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH -next 5/7] drm/virtio: Remove an unnecessary NULL value
  2023-08-09  3:44 ` Ruan Jinjie
  (?)
@ 2023-08-09  3:44   ` Ruan Jinjie
  -1 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

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);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH -next 5/7] drm/virtio: Remove an unnecessary NULL value
@ 2023-08-09  3:44   ` Ruan Jinjie
  0 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

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);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [Nouveau] [PATCH -next 5/7] drm/virtio: Remove an unnecessary NULL value
@ 2023-08-09  3:44   ` Ruan Jinjie
  0 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

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);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH -next 6/7] drm/format-helper: Remove unnecessary NULL values
  2023-08-09  3:44 ` Ruan Jinjie
  (?)
@ 2023-08-09  3:44   ` Ruan Jinjie
  -1 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

The NULL initialization of the pointers assigned by
kunit_kzalloc() first is not necessary, because if kunit_kzalloc()
failed, the pointers will be assigned NULL, otherwise it works
as usual. so remove it.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
---
 .../gpu/drm/tests/drm_format_helper_test.c    | 28 +++++++++----------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu/drm/tests/drm_format_helper_test.c
index 474bb7a1c4ee..1db12d8ed23c 100644
--- a/drivers/gpu/drm/tests/drm_format_helper_test.c
+++ b/drivers/gpu/drm/tests/drm_format_helper_test.c
@@ -452,7 +452,7 @@ static size_t conversion_buf_size(u32 dst_format, unsigned int dst_pitch,
 
 static u16 *le16buf_to_cpu(struct kunit *test, const __le16 *buf, size_t buf_size)
 {
-	u16 *dst = NULL;
+	u16 *dst;
 	int n;
 
 	dst = kunit_kzalloc(test, sizeof(*dst) * buf_size, GFP_KERNEL);
@@ -467,7 +467,7 @@ static u16 *le16buf_to_cpu(struct kunit *test, const __le16 *buf, size_t buf_siz
 
 static u32 *le32buf_to_cpu(struct kunit *test, const __le32 *buf, size_t buf_size)
 {
-	u32 *dst = NULL;
+	u32 *dst;
 	int n;
 
 	dst = kunit_kzalloc(test, sizeof(*dst) * buf_size, GFP_KERNEL);
@@ -482,7 +482,7 @@ static u32 *le32buf_to_cpu(struct kunit *test, const __le32 *buf, size_t buf_siz
 
 static __le32 *cpubuf_to_le32(struct kunit *test, const u32 *buf, size_t buf_size)
 {
-	__le32 *dst = NULL;
+	__le32 *dst;
 	int n;
 
 	dst = kunit_kzalloc(test, sizeof(*dst) * buf_size, GFP_KERNEL);
@@ -509,7 +509,7 @@ static void drm_test_fb_xrgb8888_to_gray8(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_gray8_result *result = &params->gray8_result;
 	size_t dst_size;
-	u8 *buf = NULL;
+	u8 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -539,7 +539,7 @@ static void drm_test_fb_xrgb8888_to_rgb332(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_rgb332_result *result = &params->rgb332_result;
 	size_t dst_size;
-	u8 *buf = NULL;
+	u8 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -569,7 +569,7 @@ static void drm_test_fb_xrgb8888_to_rgb565(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_rgb565_result *result = &params->rgb565_result;
 	size_t dst_size;
-	u16 *buf = NULL;
+	u16 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -605,7 +605,7 @@ static void drm_test_fb_xrgb8888_to_xrgb1555(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_xrgb1555_result *result = &params->xrgb1555_result;
 	size_t dst_size;
-	u16 *buf = NULL;
+	u16 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -636,7 +636,7 @@ static void drm_test_fb_xrgb8888_to_argb1555(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_argb1555_result *result = &params->argb1555_result;
 	size_t dst_size;
-	u16 *buf = NULL;
+	u16 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -667,7 +667,7 @@ static void drm_test_fb_xrgb8888_to_rgba5551(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_rgba5551_result *result = &params->rgba5551_result;
 	size_t dst_size;
-	u16 *buf = NULL;
+	u16 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -698,7 +698,7 @@ static void drm_test_fb_xrgb8888_to_rgb888(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_rgb888_result *result = &params->rgb888_result;
 	size_t dst_size;
-	u8 *buf = NULL;
+	u8 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -732,7 +732,7 @@ static void drm_test_fb_xrgb8888_to_argb8888(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_argb8888_result *result = &params->argb8888_result;
 	size_t dst_size;
-	u32 *buf = NULL;
+	u32 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -763,7 +763,7 @@ static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_xrgb2101010_result *result = &params->xrgb2101010_result;
 	size_t dst_size;
-	u32 *buf = NULL;
+	u32 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -794,7 +794,7 @@ static void drm_test_fb_xrgb8888_to_argb2101010(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_argb2101010_result *result = &params->argb2101010_result;
 	size_t dst_size;
-	u32 *buf = NULL;
+	u32 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -825,7 +825,7 @@ static void drm_test_fb_xrgb8888_to_mono(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_mono_result *result = &params->mono_result;
 	size_t dst_size;
-	u8 *buf = NULL;
+	u8 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH -next 6/7] drm/format-helper: Remove unnecessary NULL values
@ 2023-08-09  3:44   ` Ruan Jinjie
  0 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

The NULL initialization of the pointers assigned by
kunit_kzalloc() first is not necessary, because if kunit_kzalloc()
failed, the pointers will be assigned NULL, otherwise it works
as usual. so remove it.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
---
 .../gpu/drm/tests/drm_format_helper_test.c    | 28 +++++++++----------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu/drm/tests/drm_format_helper_test.c
index 474bb7a1c4ee..1db12d8ed23c 100644
--- a/drivers/gpu/drm/tests/drm_format_helper_test.c
+++ b/drivers/gpu/drm/tests/drm_format_helper_test.c
@@ -452,7 +452,7 @@ static size_t conversion_buf_size(u32 dst_format, unsigned int dst_pitch,
 
 static u16 *le16buf_to_cpu(struct kunit *test, const __le16 *buf, size_t buf_size)
 {
-	u16 *dst = NULL;
+	u16 *dst;
 	int n;
 
 	dst = kunit_kzalloc(test, sizeof(*dst) * buf_size, GFP_KERNEL);
@@ -467,7 +467,7 @@ static u16 *le16buf_to_cpu(struct kunit *test, const __le16 *buf, size_t buf_siz
 
 static u32 *le32buf_to_cpu(struct kunit *test, const __le32 *buf, size_t buf_size)
 {
-	u32 *dst = NULL;
+	u32 *dst;
 	int n;
 
 	dst = kunit_kzalloc(test, sizeof(*dst) * buf_size, GFP_KERNEL);
@@ -482,7 +482,7 @@ static u32 *le32buf_to_cpu(struct kunit *test, const __le32 *buf, size_t buf_siz
 
 static __le32 *cpubuf_to_le32(struct kunit *test, const u32 *buf, size_t buf_size)
 {
-	__le32 *dst = NULL;
+	__le32 *dst;
 	int n;
 
 	dst = kunit_kzalloc(test, sizeof(*dst) * buf_size, GFP_KERNEL);
@@ -509,7 +509,7 @@ static void drm_test_fb_xrgb8888_to_gray8(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_gray8_result *result = &params->gray8_result;
 	size_t dst_size;
-	u8 *buf = NULL;
+	u8 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -539,7 +539,7 @@ static void drm_test_fb_xrgb8888_to_rgb332(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_rgb332_result *result = &params->rgb332_result;
 	size_t dst_size;
-	u8 *buf = NULL;
+	u8 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -569,7 +569,7 @@ static void drm_test_fb_xrgb8888_to_rgb565(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_rgb565_result *result = &params->rgb565_result;
 	size_t dst_size;
-	u16 *buf = NULL;
+	u16 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -605,7 +605,7 @@ static void drm_test_fb_xrgb8888_to_xrgb1555(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_xrgb1555_result *result = &params->xrgb1555_result;
 	size_t dst_size;
-	u16 *buf = NULL;
+	u16 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -636,7 +636,7 @@ static void drm_test_fb_xrgb8888_to_argb1555(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_argb1555_result *result = &params->argb1555_result;
 	size_t dst_size;
-	u16 *buf = NULL;
+	u16 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -667,7 +667,7 @@ static void drm_test_fb_xrgb8888_to_rgba5551(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_rgba5551_result *result = &params->rgba5551_result;
 	size_t dst_size;
-	u16 *buf = NULL;
+	u16 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -698,7 +698,7 @@ static void drm_test_fb_xrgb8888_to_rgb888(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_rgb888_result *result = &params->rgb888_result;
 	size_t dst_size;
-	u8 *buf = NULL;
+	u8 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -732,7 +732,7 @@ static void drm_test_fb_xrgb8888_to_argb8888(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_argb8888_result *result = &params->argb8888_result;
 	size_t dst_size;
-	u32 *buf = NULL;
+	u32 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -763,7 +763,7 @@ static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_xrgb2101010_result *result = &params->xrgb2101010_result;
 	size_t dst_size;
-	u32 *buf = NULL;
+	u32 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -794,7 +794,7 @@ static void drm_test_fb_xrgb8888_to_argb2101010(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_argb2101010_result *result = &params->argb2101010_result;
 	size_t dst_size;
-	u32 *buf = NULL;
+	u32 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -825,7 +825,7 @@ static void drm_test_fb_xrgb8888_to_mono(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_mono_result *result = &params->mono_result;
 	size_t dst_size;
-	u8 *buf = NULL;
+	u8 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [Nouveau] [PATCH -next 6/7] drm/format-helper: Remove unnecessary NULL values
@ 2023-08-09  3:44   ` Ruan Jinjie
  0 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

The NULL initialization of the pointers assigned by
kunit_kzalloc() first is not necessary, because if kunit_kzalloc()
failed, the pointers will be assigned NULL, otherwise it works
as usual. so remove it.

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
---
 .../gpu/drm/tests/drm_format_helper_test.c    | 28 +++++++++----------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu/drm/tests/drm_format_helper_test.c
index 474bb7a1c4ee..1db12d8ed23c 100644
--- a/drivers/gpu/drm/tests/drm_format_helper_test.c
+++ b/drivers/gpu/drm/tests/drm_format_helper_test.c
@@ -452,7 +452,7 @@ static size_t conversion_buf_size(u32 dst_format, unsigned int dst_pitch,
 
 static u16 *le16buf_to_cpu(struct kunit *test, const __le16 *buf, size_t buf_size)
 {
-	u16 *dst = NULL;
+	u16 *dst;
 	int n;
 
 	dst = kunit_kzalloc(test, sizeof(*dst) * buf_size, GFP_KERNEL);
@@ -467,7 +467,7 @@ static u16 *le16buf_to_cpu(struct kunit *test, const __le16 *buf, size_t buf_siz
 
 static u32 *le32buf_to_cpu(struct kunit *test, const __le32 *buf, size_t buf_size)
 {
-	u32 *dst = NULL;
+	u32 *dst;
 	int n;
 
 	dst = kunit_kzalloc(test, sizeof(*dst) * buf_size, GFP_KERNEL);
@@ -482,7 +482,7 @@ static u32 *le32buf_to_cpu(struct kunit *test, const __le32 *buf, size_t buf_siz
 
 static __le32 *cpubuf_to_le32(struct kunit *test, const u32 *buf, size_t buf_size)
 {
-	__le32 *dst = NULL;
+	__le32 *dst;
 	int n;
 
 	dst = kunit_kzalloc(test, sizeof(*dst) * buf_size, GFP_KERNEL);
@@ -509,7 +509,7 @@ static void drm_test_fb_xrgb8888_to_gray8(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_gray8_result *result = &params->gray8_result;
 	size_t dst_size;
-	u8 *buf = NULL;
+	u8 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -539,7 +539,7 @@ static void drm_test_fb_xrgb8888_to_rgb332(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_rgb332_result *result = &params->rgb332_result;
 	size_t dst_size;
-	u8 *buf = NULL;
+	u8 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -569,7 +569,7 @@ static void drm_test_fb_xrgb8888_to_rgb565(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_rgb565_result *result = &params->rgb565_result;
 	size_t dst_size;
-	u16 *buf = NULL;
+	u16 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -605,7 +605,7 @@ static void drm_test_fb_xrgb8888_to_xrgb1555(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_xrgb1555_result *result = &params->xrgb1555_result;
 	size_t dst_size;
-	u16 *buf = NULL;
+	u16 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -636,7 +636,7 @@ static void drm_test_fb_xrgb8888_to_argb1555(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_argb1555_result *result = &params->argb1555_result;
 	size_t dst_size;
-	u16 *buf = NULL;
+	u16 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -667,7 +667,7 @@ static void drm_test_fb_xrgb8888_to_rgba5551(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_rgba5551_result *result = &params->rgba5551_result;
 	size_t dst_size;
-	u16 *buf = NULL;
+	u16 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -698,7 +698,7 @@ static void drm_test_fb_xrgb8888_to_rgb888(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_rgb888_result *result = &params->rgb888_result;
 	size_t dst_size;
-	u8 *buf = NULL;
+	u8 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -732,7 +732,7 @@ static void drm_test_fb_xrgb8888_to_argb8888(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_argb8888_result *result = &params->argb8888_result;
 	size_t dst_size;
-	u32 *buf = NULL;
+	u32 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -763,7 +763,7 @@ static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_xrgb2101010_result *result = &params->xrgb2101010_result;
 	size_t dst_size;
-	u32 *buf = NULL;
+	u32 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -794,7 +794,7 @@ static void drm_test_fb_xrgb8888_to_argb2101010(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_argb2101010_result *result = &params->argb2101010_result;
 	size_t dst_size;
-	u32 *buf = NULL;
+	u32 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
@@ -825,7 +825,7 @@ static void drm_test_fb_xrgb8888_to_mono(struct kunit *test)
 	const struct convert_xrgb8888_case *params = test->param_value;
 	const struct convert_to_mono_result *result = &params->mono_result;
 	size_t dst_size;
-	u8 *buf = NULL;
+	u8 *buf;
 	__le32 *xrgb8888 = NULL;
 	struct iosys_map dst, src;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH -next 7/7] drm: Remove unnecessary NULL values
  2023-08-09  3:44 ` Ruan Jinjie
  (?)
@ 2023-08-09  3:44   ` Ruan Jinjie
  -1 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

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>
---
 drivers/gpu/drm/drm_agpsupport.c          | 2 +-
 drivers/gpu/drm/drm_atomic_uapi.c         | 2 +-
 drivers/gpu/drm/exynos/exynos_drm_ipp.c   | 2 +-
 drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c
index a4ad6fd13abc..158709849481 100644
--- a/drivers/gpu/drm/drm_agpsupport.c
+++ b/drivers/gpu/drm/drm_agpsupport.c
@@ -384,7 +384,7 @@ int drm_legacy_agp_free_ioctl(struct drm_device *dev, void *data,
 struct drm_agp_head *drm_legacy_agp_init(struct drm_device *dev)
 {
 	struct pci_dev *pdev = to_pci_dev(dev->dev);
-	struct drm_agp_head *head = NULL;
+	struct drm_agp_head *head;
 
 	head = kzalloc(sizeof(*head), GFP_KERNEL);
 	if (!head)
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index 98d3b10c08ae..5a433af75132 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -942,7 +942,7 @@ int drm_atomic_get_property(struct drm_mode_object *obj,
 static struct drm_pending_vblank_event *create_vblank_event(
 		struct drm_crtc *crtc, uint64_t user_data)
 {
-	struct drm_pending_vblank_event *e = NULL;
+	struct drm_pending_vblank_event *e;
 
 	e = kzalloc(sizeof *e, GFP_KERNEL);
 	if (!e)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
index ea9f66037600..419d0afccdb9 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
@@ -695,7 +695,7 @@ static int exynos_drm_ipp_task_setup_buffers(struct exynos_drm_ipp_task *task,
 static int exynos_drm_ipp_event_create(struct exynos_drm_ipp_task *task,
 				 struct drm_file *file_priv, uint64_t user_data)
 {
-	struct drm_pending_exynos_ipp_event *e = NULL;
+	struct drm_pending_exynos_ipp_event *e;
 	int ret;
 
 	e = kzalloc(sizeof(*e), GFP_KERNEL);
diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
index 670c9739e5e1..9accb2a12719 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
@@ -789,7 +789,7 @@ nv17_tv_create(struct drm_connector *connector, struct dcb_output *entry)
 {
 	struct drm_device *dev = connector->dev;
 	struct drm_encoder *encoder;
-	struct nv17_tv_encoder *tv_enc = NULL;
+	struct nv17_tv_encoder *tv_enc;
 
 	tv_enc = kzalloc(sizeof(*tv_enc), GFP_KERNEL);
 	if (!tv_enc)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [PATCH -next 7/7] drm: Remove unnecessary NULL values
@ 2023-08-09  3:44   ` Ruan Jinjie
  0 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

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>
---
 drivers/gpu/drm/drm_agpsupport.c          | 2 +-
 drivers/gpu/drm/drm_atomic_uapi.c         | 2 +-
 drivers/gpu/drm/exynos/exynos_drm_ipp.c   | 2 +-
 drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c
index a4ad6fd13abc..158709849481 100644
--- a/drivers/gpu/drm/drm_agpsupport.c
+++ b/drivers/gpu/drm/drm_agpsupport.c
@@ -384,7 +384,7 @@ int drm_legacy_agp_free_ioctl(struct drm_device *dev, void *data,
 struct drm_agp_head *drm_legacy_agp_init(struct drm_device *dev)
 {
 	struct pci_dev *pdev = to_pci_dev(dev->dev);
-	struct drm_agp_head *head = NULL;
+	struct drm_agp_head *head;
 
 	head = kzalloc(sizeof(*head), GFP_KERNEL);
 	if (!head)
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index 98d3b10c08ae..5a433af75132 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -942,7 +942,7 @@ int drm_atomic_get_property(struct drm_mode_object *obj,
 static struct drm_pending_vblank_event *create_vblank_event(
 		struct drm_crtc *crtc, uint64_t user_data)
 {
-	struct drm_pending_vblank_event *e = NULL;
+	struct drm_pending_vblank_event *e;
 
 	e = kzalloc(sizeof *e, GFP_KERNEL);
 	if (!e)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
index ea9f66037600..419d0afccdb9 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
@@ -695,7 +695,7 @@ static int exynos_drm_ipp_task_setup_buffers(struct exynos_drm_ipp_task *task,
 static int exynos_drm_ipp_event_create(struct exynos_drm_ipp_task *task,
 				 struct drm_file *file_priv, uint64_t user_data)
 {
-	struct drm_pending_exynos_ipp_event *e = NULL;
+	struct drm_pending_exynos_ipp_event *e;
 	int ret;
 
 	e = kzalloc(sizeof(*e), GFP_KERNEL);
diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
index 670c9739e5e1..9accb2a12719 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
@@ -789,7 +789,7 @@ nv17_tv_create(struct drm_connector *connector, struct dcb_output *entry)
 {
 	struct drm_device *dev = connector->dev;
 	struct drm_encoder *encoder;
-	struct nv17_tv_encoder *tv_enc = NULL;
+	struct nv17_tv_encoder *tv_enc;
 
 	tv_enc = kzalloc(sizeof(*tv_enc), GFP_KERNEL);
 	if (!tv_enc)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* [Nouveau] [PATCH -next 7/7] drm: Remove unnecessary NULL values
@ 2023-08-09  3:44   ` Ruan Jinjie
  0 siblings, 0 replies; 40+ messages in thread
From: Ruan Jinjie @ 2023-08-09  3:44 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization
  Cc: ruanjinjie

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>
---
 drivers/gpu/drm/drm_agpsupport.c          | 2 +-
 drivers/gpu/drm/drm_atomic_uapi.c         | 2 +-
 drivers/gpu/drm/exynos/exynos_drm_ipp.c   | 2 +-
 drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c
index a4ad6fd13abc..158709849481 100644
--- a/drivers/gpu/drm/drm_agpsupport.c
+++ b/drivers/gpu/drm/drm_agpsupport.c
@@ -384,7 +384,7 @@ int drm_legacy_agp_free_ioctl(struct drm_device *dev, void *data,
 struct drm_agp_head *drm_legacy_agp_init(struct drm_device *dev)
 {
 	struct pci_dev *pdev = to_pci_dev(dev->dev);
-	struct drm_agp_head *head = NULL;
+	struct drm_agp_head *head;
 
 	head = kzalloc(sizeof(*head), GFP_KERNEL);
 	if (!head)
diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c
index 98d3b10c08ae..5a433af75132 100644
--- a/drivers/gpu/drm/drm_atomic_uapi.c
+++ b/drivers/gpu/drm/drm_atomic_uapi.c
@@ -942,7 +942,7 @@ int drm_atomic_get_property(struct drm_mode_object *obj,
 static struct drm_pending_vblank_event *create_vblank_event(
 		struct drm_crtc *crtc, uint64_t user_data)
 {
-	struct drm_pending_vblank_event *e = NULL;
+	struct drm_pending_vblank_event *e;
 
 	e = kzalloc(sizeof *e, GFP_KERNEL);
 	if (!e)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_ipp.c b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
index ea9f66037600..419d0afccdb9 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_ipp.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_ipp.c
@@ -695,7 +695,7 @@ static int exynos_drm_ipp_task_setup_buffers(struct exynos_drm_ipp_task *task,
 static int exynos_drm_ipp_event_create(struct exynos_drm_ipp_task *task,
 				 struct drm_file *file_priv, uint64_t user_data)
 {
-	struct drm_pending_exynos_ipp_event *e = NULL;
+	struct drm_pending_exynos_ipp_event *e;
 	int ret;
 
 	e = kzalloc(sizeof(*e), GFP_KERNEL);
diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
index 670c9739e5e1..9accb2a12719 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.c
@@ -789,7 +789,7 @@ nv17_tv_create(struct drm_connector *connector, struct dcb_output *entry)
 {
 	struct drm_device *dev = connector->dev;
 	struct drm_encoder *encoder;
-	struct nv17_tv_encoder *tv_enc = NULL;
+	struct nv17_tv_encoder *tv_enc;
 
 	tv_enc = kzalloc(sizeof(*tv_enc), GFP_KERNEL);
 	if (!tv_enc)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 40+ messages in thread

* Re: [PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values
  2023-08-09  3:44   ` Ruan Jinjie
  (?)
@ 2023-08-09  6:15     ` Christian König
  -1 siblings, 0 replies; 40+ messages in thread
From: Christian König @ 2023-08-09  6:15 UTC (permalink / raw)
  To: Ruan Jinjie, Felix.Kuehling, alexander.deucher, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization

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);


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [Nouveau] [PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values
@ 2023-08-09  6:15     ` Christian König
  0 siblings, 0 replies; 40+ messages in thread
From: Christian König @ 2023-08-09  6:15 UTC (permalink / raw)
  To: Ruan Jinjie, Felix.Kuehling, alexander.deucher, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization

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);


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values
@ 2023-08-09  6:15     ` Christian König
  0 siblings, 0 replies; 40+ messages in thread
From: Christian König via Virtualization @ 2023-08-09  6:15 UTC (permalink / raw)
  To: Ruan Jinjie, Felix.Kuehling, alexander.deucher, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization

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);

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH -next 6/7] drm/format-helper: Remove unnecessary NULL values
  2023-08-09  3:44   ` Ruan Jinjie
@ 2023-08-09 12:20     ` Arthur Grillo
  -1 siblings, 0 replies; 40+ messages in thread
From: Arthur Grillo @ 2023-08-09 12:20 UTC (permalink / raw)
  To: Ruan Jinjie, Felix.Kuehling, alexander.deucher, christian.koenig,
	Xinhui.Pan, airlied, daniel, harry.wentland, sunpeng.li,
	Rodrigo.Siqueira, maarten.lankhorst, mripard, tzimmermann,
	inki.dae, sw0312.kim, kyungmin.park, krzysztof.kozlowski,
	alim.akhtar, robdclark, quic_abhinavk, dmitry.baryshkov, sean,
	marijn.suijten, bskeggs, kherbst, lyude, kraxel, gurchetansingh,
	olvaffe, paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, amd-gfx,
	dri-devel, linux-arm-kernel, linux-samsung-soc, linux-arm-msm,
	freedreno, nouveau, virtualization



On 09/08/23 00:44, Ruan Jinjie wrote:
> The NULL initialization of the pointers assigned by
> kunit_kzalloc() first is not necessary, because if kunit_kzalloc()
> failed, the pointers will be assigned NULL, otherwise it works
> as usual. so remove it.
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
> ---
>  .../gpu/drm/tests/drm_format_helper_test.c    | 28 +++++++++----------
>  1 file changed, 14 insertions(+), 14 deletions(-)

Reviewed-by: Arthur Grillo <arthurgrillo@riseup.net>

Best Regards,
~Arthur Grillo

> 
> diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu/drm/tests/drm_format_helper_test.c
> index 474bb7a1c4ee..1db12d8ed23c 100644
> --- a/drivers/gpu/drm/tests/drm_format_helper_test.c
> +++ b/drivers/gpu/drm/tests/drm_format_helper_test.c
> @@ -452,7 +452,7 @@ static size_t conversion_buf_size(u32 dst_format, unsigned int dst_pitch,
>  
>  static u16 *le16buf_to_cpu(struct kunit *test, const __le16 *buf, size_t buf_size)
>  {
> -	u16 *dst = NULL;
> +	u16 *dst;
>  	int n;
>  
>  	dst = kunit_kzalloc(test, sizeof(*dst) * buf_size, GFP_KERNEL);
> @@ -467,7 +467,7 @@ static u16 *le16buf_to_cpu(struct kunit *test, const __le16 *buf, size_t buf_siz
>  
>  static u32 *le32buf_to_cpu(struct kunit *test, const __le32 *buf, size_t buf_size)
>  {
> -	u32 *dst = NULL;
> +	u32 *dst;
>  	int n;
>  
>  	dst = kunit_kzalloc(test, sizeof(*dst) * buf_size, GFP_KERNEL);
> @@ -482,7 +482,7 @@ static u32 *le32buf_to_cpu(struct kunit *test, const __le32 *buf, size_t buf_siz
>  
>  static __le32 *cpubuf_to_le32(struct kunit *test, const u32 *buf, size_t buf_size)
>  {
> -	__le32 *dst = NULL;
> +	__le32 *dst;
>  	int n;
>  
>  	dst = kunit_kzalloc(test, sizeof(*dst) * buf_size, GFP_KERNEL);
> @@ -509,7 +509,7 @@ static void drm_test_fb_xrgb8888_to_gray8(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_gray8_result *result = &params->gray8_result;
>  	size_t dst_size;
> -	u8 *buf = NULL;
> +	u8 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -539,7 +539,7 @@ static void drm_test_fb_xrgb8888_to_rgb332(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_rgb332_result *result = &params->rgb332_result;
>  	size_t dst_size;
> -	u8 *buf = NULL;
> +	u8 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -569,7 +569,7 @@ static void drm_test_fb_xrgb8888_to_rgb565(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_rgb565_result *result = &params->rgb565_result;
>  	size_t dst_size;
> -	u16 *buf = NULL;
> +	u16 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -605,7 +605,7 @@ static void drm_test_fb_xrgb8888_to_xrgb1555(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_xrgb1555_result *result = &params->xrgb1555_result;
>  	size_t dst_size;
> -	u16 *buf = NULL;
> +	u16 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -636,7 +636,7 @@ static void drm_test_fb_xrgb8888_to_argb1555(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_argb1555_result *result = &params->argb1555_result;
>  	size_t dst_size;
> -	u16 *buf = NULL;
> +	u16 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -667,7 +667,7 @@ static void drm_test_fb_xrgb8888_to_rgba5551(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_rgba5551_result *result = &params->rgba5551_result;
>  	size_t dst_size;
> -	u16 *buf = NULL;
> +	u16 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -698,7 +698,7 @@ static void drm_test_fb_xrgb8888_to_rgb888(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_rgb888_result *result = &params->rgb888_result;
>  	size_t dst_size;
> -	u8 *buf = NULL;
> +	u8 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -732,7 +732,7 @@ static void drm_test_fb_xrgb8888_to_argb8888(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_argb8888_result *result = &params->argb8888_result;
>  	size_t dst_size;
> -	u32 *buf = NULL;
> +	u32 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -763,7 +763,7 @@ static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_xrgb2101010_result *result = &params->xrgb2101010_result;
>  	size_t dst_size;
> -	u32 *buf = NULL;
> +	u32 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -794,7 +794,7 @@ static void drm_test_fb_xrgb8888_to_argb2101010(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_argb2101010_result *result = &params->argb2101010_result;
>  	size_t dst_size;
> -	u32 *buf = NULL;
> +	u32 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -825,7 +825,7 @@ static void drm_test_fb_xrgb8888_to_mono(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_mono_result *result = &params->mono_result;
>  	size_t dst_size;
> -	u8 *buf = NULL;
> +	u8 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [Nouveau] [PATCH -next 6/7] drm/format-helper: Remove unnecessary NULL values
@ 2023-08-09 12:20     ` Arthur Grillo
  0 siblings, 0 replies; 40+ messages in thread
From: Arthur Grillo @ 2023-08-09 12:20 UTC (permalink / raw)
  To: Ruan Jinjie, Felix.Kuehling, alexander.deucher, christian.koenig,
	Xinhui.Pan, airlied, daniel, harry.wentland, sunpeng.li,
	Rodrigo.Siqueira, maarten.lankhorst, mripard, tzimmermann,
	inki.dae, sw0312.kim, kyungmin.park, krzysztof.kozlowski,
	alim.akhtar, robdclark, quic_abhinavk, dmitry.baryshkov, sean,
	marijn.suijten, bskeggs, kherbst, lyude, kraxel, gurchetansingh,
	olvaffe, paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, amd-gfx,
	dri-devel, linux-arm-kernel, linux-samsung-soc, linux-arm-msm,
	freedreno, nouveau, virtualization



On 09/08/23 00:44, Ruan Jinjie wrote:
> The NULL initialization of the pointers assigned by
> kunit_kzalloc() first is not necessary, because if kunit_kzalloc()
> failed, the pointers will be assigned NULL, otherwise it works
> as usual. so remove it.
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
> ---
>  .../gpu/drm/tests/drm_format_helper_test.c    | 28 +++++++++----------
>  1 file changed, 14 insertions(+), 14 deletions(-)

Reviewed-by: Arthur Grillo <arthurgrillo@riseup.net>

Best Regards,
~Arthur Grillo

> 
> diff --git a/drivers/gpu/drm/tests/drm_format_helper_test.c b/drivers/gpu/drm/tests/drm_format_helper_test.c
> index 474bb7a1c4ee..1db12d8ed23c 100644
> --- a/drivers/gpu/drm/tests/drm_format_helper_test.c
> +++ b/drivers/gpu/drm/tests/drm_format_helper_test.c
> @@ -452,7 +452,7 @@ static size_t conversion_buf_size(u32 dst_format, unsigned int dst_pitch,
>  
>  static u16 *le16buf_to_cpu(struct kunit *test, const __le16 *buf, size_t buf_size)
>  {
> -	u16 *dst = NULL;
> +	u16 *dst;
>  	int n;
>  
>  	dst = kunit_kzalloc(test, sizeof(*dst) * buf_size, GFP_KERNEL);
> @@ -467,7 +467,7 @@ static u16 *le16buf_to_cpu(struct kunit *test, const __le16 *buf, size_t buf_siz
>  
>  static u32 *le32buf_to_cpu(struct kunit *test, const __le32 *buf, size_t buf_size)
>  {
> -	u32 *dst = NULL;
> +	u32 *dst;
>  	int n;
>  
>  	dst = kunit_kzalloc(test, sizeof(*dst) * buf_size, GFP_KERNEL);
> @@ -482,7 +482,7 @@ static u32 *le32buf_to_cpu(struct kunit *test, const __le32 *buf, size_t buf_siz
>  
>  static __le32 *cpubuf_to_le32(struct kunit *test, const u32 *buf, size_t buf_size)
>  {
> -	__le32 *dst = NULL;
> +	__le32 *dst;
>  	int n;
>  
>  	dst = kunit_kzalloc(test, sizeof(*dst) * buf_size, GFP_KERNEL);
> @@ -509,7 +509,7 @@ static void drm_test_fb_xrgb8888_to_gray8(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_gray8_result *result = &params->gray8_result;
>  	size_t dst_size;
> -	u8 *buf = NULL;
> +	u8 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -539,7 +539,7 @@ static void drm_test_fb_xrgb8888_to_rgb332(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_rgb332_result *result = &params->rgb332_result;
>  	size_t dst_size;
> -	u8 *buf = NULL;
> +	u8 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -569,7 +569,7 @@ static void drm_test_fb_xrgb8888_to_rgb565(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_rgb565_result *result = &params->rgb565_result;
>  	size_t dst_size;
> -	u16 *buf = NULL;
> +	u16 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -605,7 +605,7 @@ static void drm_test_fb_xrgb8888_to_xrgb1555(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_xrgb1555_result *result = &params->xrgb1555_result;
>  	size_t dst_size;
> -	u16 *buf = NULL;
> +	u16 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -636,7 +636,7 @@ static void drm_test_fb_xrgb8888_to_argb1555(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_argb1555_result *result = &params->argb1555_result;
>  	size_t dst_size;
> -	u16 *buf = NULL;
> +	u16 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -667,7 +667,7 @@ static void drm_test_fb_xrgb8888_to_rgba5551(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_rgba5551_result *result = &params->rgba5551_result;
>  	size_t dst_size;
> -	u16 *buf = NULL;
> +	u16 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -698,7 +698,7 @@ static void drm_test_fb_xrgb8888_to_rgb888(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_rgb888_result *result = &params->rgb888_result;
>  	size_t dst_size;
> -	u8 *buf = NULL;
> +	u8 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -732,7 +732,7 @@ static void drm_test_fb_xrgb8888_to_argb8888(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_argb8888_result *result = &params->argb8888_result;
>  	size_t dst_size;
> -	u32 *buf = NULL;
> +	u32 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -763,7 +763,7 @@ static void drm_test_fb_xrgb8888_to_xrgb2101010(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_xrgb2101010_result *result = &params->xrgb2101010_result;
>  	size_t dst_size;
> -	u32 *buf = NULL;
> +	u32 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -794,7 +794,7 @@ static void drm_test_fb_xrgb8888_to_argb2101010(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_argb2101010_result *result = &params->argb2101010_result;
>  	size_t dst_size;
> -	u32 *buf = NULL;
> +	u32 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  
> @@ -825,7 +825,7 @@ static void drm_test_fb_xrgb8888_to_mono(struct kunit *test)
>  	const struct convert_xrgb8888_case *params = test->param_value;
>  	const struct convert_to_mono_result *result = &params->mono_result;
>  	size_t dst_size;
> -	u8 *buf = NULL;
> +	u8 *buf;
>  	__le32 *xrgb8888 = NULL;
>  	struct iosys_map dst, src;
>  

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values
  2023-08-09  6:15     ` [Nouveau] " Christian König
                         ` (2 preceding siblings ...)
  (?)
@ 2023-08-09 13:11       ` Alex Deucher
  -1 siblings, 0 replies; 40+ messages in thread
From: Alex Deucher @ 2023-08-09 13:11 UTC (permalink / raw)
  To: Christian König
  Cc: Ruan Jinjie, Felix.Kuehling, alexander.deucher, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, dmitry.baryshkov, sean, marijn.suijten, bskeggs,
	kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization

Applied.  Thanks!

On Wed, Aug 9, 2023 at 2:15 AM Christian König <christian.koenig@amd.com> wrote:
>
> 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);
>

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [Nouveau] [PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values
@ 2023-08-09 13:11       ` Alex Deucher
  0 siblings, 0 replies; 40+ messages in thread
From: Alex Deucher @ 2023-08-09 13:11 UTC (permalink / raw)
  To: Christian König
  Cc: wenjing.liu, dri-devel, gurchetansingh, mairacanal, kraxel,
	alim.akhtar, marijn.suijten, arthurgrillo, Charlene.Liu,
	linux-samsung-soc, Ruan Jinjie, Rodrigo.Siqueira,
	krzysztof.kozlowski, amd-gfx, quic_vpolimer, tony.tascioglu,
	aurabindo.pillai, bskeggs, george.shen, kyungmin.park,
	harry.wentland, olvaffe, haoping.liu, daniel, javierm,
	sunpeng.li, linux-arm-msm, jiasheng, maarten.lankhorst,
	quic_abhinavk, mripard, inki.dae, alexander.deucher, davidgow,
	nouveau, virtualization, sean, linux-arm-kernel, noralf,
	paulo.miguel.almeida.rodenas, chiahsuan.chung, drv,
	tales.aparecida, Felix.Kuehling, Xinhui.Pan, sw0312.kim,
	robdclark, jaehyun.chung, dmitry.baryshkov, jose.exposito89,
	freedreno, sancchen

Applied.  Thanks!

On Wed, Aug 9, 2023 at 2:15 AM Christian König <christian.koenig@amd.com> wrote:
>
> 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);
>

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values
@ 2023-08-09 13:11       ` Alex Deucher
  0 siblings, 0 replies; 40+ messages in thread
From: Alex Deucher @ 2023-08-09 13:11 UTC (permalink / raw)
  To: Christian König
  Cc: kherbst, wenjing.liu, dri-devel, gurchetansingh, mairacanal,
	alim.akhtar, marijn.suijten, airlied, arthurgrillo, Charlene.Liu,
	linux-samsung-soc, Ruan Jinjie, Rodrigo.Siqueira,
	krzysztof.kozlowski, amd-gfx, quic_vpolimer, tony.tascioglu,
	aurabindo.pillai, bskeggs, george.shen, kyungmin.park,
	harry.wentland, olvaffe, haoping.liu, lyude, daniel, javierm,
	sunpeng.li, linux-arm-msm, jiasheng, maarten.lankhorst,
	quic_abhinavk, mripard, inki.dae, alexander.deucher, davidgow,
	nouveau, virtualization, sean, linux-arm-kernel, noralf,
	paulo.miguel.almeida.rodenas, chiahsuan.chung, drv,
	tales.aparecida, Felix.Kuehling, Xinhui.Pan, sw0312.kim,
	robdclark, jaehyun.chung, tzimmermann, dmitry.baryshkov,
	jose.exposito89, freedreno, sancchen

Applied.  Thanks!

On Wed, Aug 9, 2023 at 2:15 AM Christian König <christian.koenig@amd.com> wrote:
>
> 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);
>
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values
@ 2023-08-09 13:11       ` Alex Deucher
  0 siblings, 0 replies; 40+ messages in thread
From: Alex Deucher @ 2023-08-09 13:11 UTC (permalink / raw)
  To: Christian König
  Cc: kherbst, wenjing.liu, dri-devel, gurchetansingh, mairacanal,
	kraxel, alim.akhtar, marijn.suijten, arthurgrillo, Charlene.Liu,
	linux-samsung-soc, Ruan Jinjie, Rodrigo.Siqueira,
	krzysztof.kozlowski, amd-gfx, quic_vpolimer, tony.tascioglu,
	aurabindo.pillai, bskeggs, george.shen, kyungmin.park,
	haoping.liu, javierm, sunpeng.li, linux-arm-msm, jiasheng,
	quic_abhinavk, mripard, alexander.deucher, davidgow, nouveau,
	virtualization, sean, linux-arm-kernel, noralf,
	paulo.miguel.almeida.rodenas, chiahsuan.chung, drv,
	tales.aparecida, Felix.Kuehling, Xinhui.Pan, sw0312.kim,
	jaehyun.chung, tzimmermann, dmitry.baryshkov, jose.exposito89,
	freedreno, sancchen

Applied.  Thanks!

On Wed, Aug 9, 2023 at 2:15 AM Christian König <christian.koenig@amd.com> wrote:
>
> 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);
>

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH -next 1/7] drm/amdkfd: Remove unnecessary NULL values
@ 2023-08-09 13:11       ` Alex Deucher
  0 siblings, 0 replies; 40+ messages in thread
From: Alex Deucher @ 2023-08-09 13:11 UTC (permalink / raw)
  To: Christian König
  Cc: kherbst, wenjing.liu, dri-devel, gurchetansingh, mairacanal,
	kraxel, alim.akhtar, marijn.suijten, airlied, arthurgrillo,
	Charlene.Liu, linux-samsung-soc, Ruan Jinjie, Rodrigo.Siqueira,
	krzysztof.kozlowski, amd-gfx, quic_vpolimer, tony.tascioglu,
	aurabindo.pillai, bskeggs, george.shen, kyungmin.park,
	harry.wentland, olvaffe, haoping.liu, daniel, javierm,
	sunpeng.li, linux-arm-msm, jiasheng, maarten.lankhorst,
	quic_abhinavk, mripard, inki.dae, alexander.deucher, davidgow,
	nouveau, virtualization, sean, linux-arm-kernel, noralf,
	paulo.miguel.almeida.rodenas, chiahsuan.chung, drv,
	tales.aparecida, Felix.Kuehling, Xinhui.Pan, sw0312.kim,
	robdclark, jaehyun.chung, tzimmermann, dmitry.baryshkov,
	jose.exposito89, freedreno, sancchen

Applied.  Thanks!

On Wed, Aug 9, 2023 at 2:15 AM Christian König <christian.koenig@amd.com> wrote:
>
> 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);
>

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH -next 3/7] drm/msm: Remove unnecessary NULL values
  2023-08-09  3:44   ` Ruan Jinjie
@ 2023-08-12  0:28     ` Abhinav Kumar
  -1 siblings, 0 replies; 40+ messages in thread
From: Abhinav Kumar @ 2023-08-12  0:28 UTC (permalink / raw)
  To: Ruan Jinjie, Felix.Kuehling, alexander.deucher, christian.koenig,
	Xinhui.Pan, airlied, daniel, harry.wentland, sunpeng.li,
	Rodrigo.Siqueira, maarten.lankhorst, mripard, tzimmermann,
	inki.dae, sw0312.kim, kyungmin.park, krzysztof.kozlowski,
	alim.akhtar, robdclark, dmitry.baryshkov, sean, marijn.suijten,
	bskeggs, kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization



On 8/8/2023 8:44 PM, Ruan Jinjie wrote:
> 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>
> ---
>   drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 +-
>   drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [Nouveau] [PATCH -next 3/7] drm/msm: Remove unnecessary NULL values
@ 2023-08-12  0:28     ` Abhinav Kumar
  0 siblings, 0 replies; 40+ messages in thread
From: Abhinav Kumar @ 2023-08-12  0:28 UTC (permalink / raw)
  To: Ruan Jinjie, Felix.Kuehling, alexander.deucher, christian.koenig,
	Xinhui.Pan, airlied, daniel, harry.wentland, sunpeng.li,
	Rodrigo.Siqueira, maarten.lankhorst, mripard, tzimmermann,
	inki.dae, sw0312.kim, kyungmin.park, krzysztof.kozlowski,
	alim.akhtar, robdclark, dmitry.baryshkov, sean, marijn.suijten,
	bskeggs, kherbst, lyude, kraxel, gurchetansingh, olvaffe,
	paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization



On 8/8/2023 8:44 PM, Ruan Jinjie wrote:
> 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>
> ---
>   drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 +-
>   drivers/gpu/drm/msm/disp/mdp5/mdp5_smp.c | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH -next 5/7] drm/virtio: Remove an unnecessary NULL value
  2023-08-09  3:44   ` Ruan Jinjie
@ 2023-08-13  1:14     ` Dmitry Osipenko
  -1 siblings, 0 replies; 40+ messages in thread
From: Dmitry Osipenko @ 2023-08-13  1:14 UTC (permalink / raw)
  To: Ruan Jinjie, Felix.Kuehling, alexander.deucher, christian.koenig,
	Xinhui.Pan, airlied, daniel, harry.wentland, sunpeng.li,
	Rodrigo.Siqueira, maarten.lankhorst, mripard, tzimmermann,
	inki.dae, sw0312.kim, kyungmin.park, krzysztof.kozlowski,
	alim.akhtar, robdclark, quic_abhinavk, dmitry.baryshkov, sean,
	marijn.suijten, bskeggs, kherbst, lyude, kraxel, gurchetansingh,
	olvaffe, paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization

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


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [Nouveau] [PATCH -next 5/7] drm/virtio: Remove an unnecessary NULL value
@ 2023-08-13  1:14     ` Dmitry Osipenko
  0 siblings, 0 replies; 40+ messages in thread
From: Dmitry Osipenko @ 2023-08-13  1:14 UTC (permalink / raw)
  To: Ruan Jinjie, Felix.Kuehling, alexander.deucher, christian.koenig,
	Xinhui.Pan, airlied, daniel, harry.wentland, sunpeng.li,
	Rodrigo.Siqueira, maarten.lankhorst, mripard, tzimmermann,
	inki.dae, sw0312.kim, kyungmin.park, krzysztof.kozlowski,
	alim.akhtar, robdclark, quic_abhinavk, dmitry.baryshkov, sean,
	marijn.suijten, bskeggs, kherbst, lyude, kraxel, gurchetansingh,
	olvaffe, paulo.miguel.almeida.rodenas, wenjing.liu, haoping.liu,
	Charlene.Liu, chiahsuan.chung, george.shen, sancchen,
	tony.tascioglu, jaehyun.chung, tales.aparecida, drv,
	aurabindo.pillai, quic_vpolimer, jiasheng, noralf,
	jose.exposito89, javierm, mairacanal, davidgow, arthurgrillo,
	amd-gfx, dri-devel, linux-arm-kernel, linux-samsung-soc,
	linux-arm-msm, freedreno, nouveau, virtualization

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


^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [PATCH -next 0/7] drm: Remove many unnecessary NULL values
  2023-08-09  3:44 ` Ruan Jinjie
@ 2023-10-08 14:01   ` Dmitry Baryshkov
  -1 siblings, 0 replies; 40+ messages in thread
From: Dmitry Baryshkov @ 2023-10-08 14:01 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, sean, marijn.suijten, bskeggs, kherbst, lyude,
	kraxel, gurchetansingh, olvaffe, paulo.miguel.almeida.rodenas,
	wenjing.liu, haoping.liu, Charlene.Liu, chiahsuan.chung,
	george.shen, sancchen, tony.tascioglu, jaehyun.chung,
	tales.aparecida, drv, aurabindo.pillai, quic_vpolimer, jiasheng,
	noralf, jose.exposito89, javierm, mairacanal, davidgow,
	arthurgrillo, amd-gfx, dri-devel, linux-arm-kernel,
	linux-samsung-soc, linux-arm-msm, freedreno, nouveau,
	virtualization, Ruan Jinjie


On Wed, 09 Aug 2023 11:44:38 +0800, Ruan Jinjie wrote:
> The NULL initialization of the pointers assigned by kzalloc() or
> kunit_kzalloc() first is not necessary, because if the kzalloc() or
> kunit_kzalloc() failed, the pointers will be assigned NULL, otherwise
> it works as usual. so remove it.
> 
> Ruan Jinjie (7):
>   drm/amdkfd: Remove unnecessary NULL values
>   drm/amd/display: Remove unnecessary NULL values
>   drm/msm: Remove unnecessary NULL values
>   drm/radeon: Remove unnecessary NULL values
>   drm/virtio: Remove an unnecessary NULL value
>   drm/format-helper: Remove unnecessary NULL values
>   drm: Remove unnecessary NULL values
> 
> [...]

Applied, thanks!

[3/7] drm/msm: Remove unnecessary NULL values
      https://gitlab.freedesktop.org/lumag/msm/-/commit/92a48b6ed510

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

^ permalink raw reply	[flat|nested] 40+ messages in thread

* Re: [Nouveau] [PATCH -next 0/7] drm: Remove many unnecessary NULL values
@ 2023-10-08 14:01   ` Dmitry Baryshkov
  0 siblings, 0 replies; 40+ messages in thread
From: Dmitry Baryshkov @ 2023-10-08 14:01 UTC (permalink / raw)
  To: Felix.Kuehling, alexander.deucher, christian.koenig, Xinhui.Pan,
	airlied, daniel, harry.wentland, sunpeng.li, Rodrigo.Siqueira,
	maarten.lankhorst, mripard, tzimmermann, inki.dae, sw0312.kim,
	kyungmin.park, krzysztof.kozlowski, alim.akhtar, robdclark,
	quic_abhinavk, sean, marijn.suijten, bskeggs, kherbst, lyude,
	kraxel, gurchetansingh, olvaffe, paulo.miguel.almeida.rodenas,
	wenjing.liu, haoping.liu, Charlene.Liu, chiahsuan.chung,
	george.shen, sancchen, tony.tascioglu, jaehyun.chung,
	tales.aparecida, drv, aurabindo.pillai, quic_vpolimer, jiasheng,
	noralf, jose.exposito89, javierm, mairacanal, davidgow,
	arthurgrillo, amd-gfx, dri-devel, linux-arm-kernel,
	linux-samsung-soc, linux-arm-msm, freedreno, nouveau,
	virtualization, Ruan Jinjie


On Wed, 09 Aug 2023 11:44:38 +0800, Ruan Jinjie wrote:
> The NULL initialization of the pointers assigned by kzalloc() or
> kunit_kzalloc() first is not necessary, because if the kzalloc() or
> kunit_kzalloc() failed, the pointers will be assigned NULL, otherwise
> it works as usual. so remove it.
> 
> Ruan Jinjie (7):
>   drm/amdkfd: Remove unnecessary NULL values
>   drm/amd/display: Remove unnecessary NULL values
>   drm/msm: Remove unnecessary NULL values
>   drm/radeon: Remove unnecessary NULL values
>   drm/virtio: Remove an unnecessary NULL value
>   drm/format-helper: Remove unnecessary NULL values
>   drm: Remove unnecessary NULL values
> 
> [...]

Applied, thanks!

[3/7] drm/msm: Remove unnecessary NULL values
      https://gitlab.freedesktop.org/lumag/msm/-/commit/92a48b6ed510

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

^ permalink raw reply	[flat|nested] 40+ messages in thread

end of thread, other threads:[~2023-10-09  8:05 UTC | newest]

Thread overview: 40+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-09  3:44 [PATCH -next 0/7] drm: Remove many unnecessary NULL values Ruan Jinjie
2023-08-09  3:44 ` [Nouveau] " Ruan Jinjie
2023-08-09  3:44 ` Ruan Jinjie
2023-08-09  3:44 ` [PATCH -next 1/7] drm/amdkfd: Remove " Ruan Jinjie
2023-08-09  3:44   ` [Nouveau] " Ruan Jinjie
2023-08-09  3:44   ` Ruan Jinjie
2023-08-09  6:15   ` Christian König
2023-08-09  6:15     ` Christian König via Virtualization
2023-08-09  6:15     ` [Nouveau] " Christian König
2023-08-09 13:11     ` Alex Deucher
2023-08-09 13:11       ` Alex Deucher
2023-08-09 13:11       ` Alex Deucher
2023-08-09 13:11       ` Alex Deucher
2023-08-09 13:11       ` [Nouveau] " Alex Deucher
2023-08-09  3:44 ` [PATCH -next 2/7] drm/amd/display: " Ruan Jinjie
2023-08-09  3:44   ` [Nouveau] " Ruan Jinjie
2023-08-09  3:44   ` Ruan Jinjie
2023-08-09  3:44 ` [PATCH -next 3/7] drm/msm: " Ruan Jinjie
2023-08-09  3:44   ` [Nouveau] " Ruan Jinjie
2023-08-09  3:44   ` Ruan Jinjie
2023-08-12  0:28   ` Abhinav Kumar
2023-08-12  0:28     ` [Nouveau] " Abhinav Kumar
2023-08-09  3:44 ` [PATCH -next 4/7] drm/radeon: " Ruan Jinjie
2023-08-09  3:44   ` [Nouveau] " Ruan Jinjie
2023-08-09  3:44   ` Ruan Jinjie
2023-08-09  3:44 ` [PATCH -next 5/7] drm/virtio: Remove an unnecessary NULL value Ruan Jinjie
2023-08-09  3:44   ` [Nouveau] " Ruan Jinjie
2023-08-09  3:44   ` Ruan Jinjie
2023-08-13  1:14   ` Dmitry Osipenko
2023-08-13  1:14     ` [Nouveau] " Dmitry Osipenko
2023-08-09  3:44 ` [PATCH -next 6/7] drm/format-helper: Remove unnecessary NULL values Ruan Jinjie
2023-08-09  3:44   ` [Nouveau] " Ruan Jinjie
2023-08-09  3:44   ` Ruan Jinjie
2023-08-09 12:20   ` Arthur Grillo
2023-08-09 12:20     ` [Nouveau] " Arthur Grillo
2023-08-09  3:44 ` [PATCH -next 7/7] drm: " Ruan Jinjie
2023-08-09  3:44   ` [Nouveau] " Ruan Jinjie
2023-08-09  3:44   ` Ruan Jinjie
2023-10-08 14:01 ` [PATCH -next 0/7] drm: Remove many " Dmitry Baryshkov
2023-10-08 14:01   ` [Nouveau] " Dmitry Baryshkov

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.