This change is to cleanup the code a bit.
Signed-off-by: Bernard Zhao
---
drivers/nvdimm/dimm_devs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvdimm/dimm_devs.c b/drivers/nvdimm/dimm_devs.c
index dc7449a40003..bea41bb5f830 100644
--- a/drivers/nvdimm
Add translations to dev-tools gcov
Signed-off-by: Bernard Zhao
---
Changes since V2:
* fix some inaccurate translation
Changes since V1:
* add index.rst in dev-tools and link to to zh_CN/index.rst
* fix some inaccurate translation
---
.../translations/zh_CN/dev-tools/gcov.rst | 261
Hi Wu X.C :
Thanks for your review!
I will fix this and resubmit this patch.
BR//Bernard
From: "Wu X.C."
Date: 2021-04-02 11:58:27
To: Bernard Zhao
Cc: Harry Wei ,Alex Shi
,Alex Shi ,Jonathan Corbet
,Nathan Chancellor ,Nick Desaulniers
,linux-...@vger.kernel.org,li
This patch fix coccicheck warning:
drivers/gpu/drm/msm/dp/dp_link.c:848:5-8: Unneeded variable: "ret". Return "0"
on line 880
Also remove unneeded function return value check.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/dp/dp_link.c | 15 +++
1 file c
save, but no spin_unlock_irqrestore in if/return
branch, seems like a potential bug?
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c
b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ba
: Unneeded semicolon
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/kmb/kmb_dsi.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/kmb/kmb_dsi.c b/drivers/gpu/drm/kmb/kmb_dsi.c
index 4b5d82af84b3..231041b269f5 100644
--- a/drivers/gpu/drm/kmb/kmb_dsi.c
Fix coccicheck warning:
drivers/gpu/drm/gud/gud_internal.h:89:2-3: Unneeded semicolon
drivers/gpu/drm/gud/gud_internal.h:107:2-3: Unneeded semicolon
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/gud/gud_internal.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers
Fix coccicheck warning:
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c:573:39-44: WARNING: conversion to bool
not needed here
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c:575:39-44: WARNING: conversion to bool
not needed here
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdgpu/mmhub_v2_3.c | 4
Add translations to dev-tools gcov
Signed-off-by: Bernard Zhao
Reviewed-by: Wu X.C
---
Changes since V1:
* add index.rst in dev-tools and link to to zh_CN/index.rst
* fix some inaccurate translation
Link for V1:
*https://lore.kernel.org/patchwork/patch/1405740/
---
.../translations/zh_CN/dev
Hi Wu X.C:
From: "Wu X.C."
Date: 2021-03-31 23:35:03
To: Bernard Zhao
Cc: Harry Wei ,Alex Shi
,Alex Shi ,Jonathan Corbet
,Nathan Chancellor ,Nick Desaulniers
,linux-...@vger.kernel.org,linux-kernel@vger.kernel.org,clang-built-li...@googlegroups.com,opensource.ker...@vivo.com
S
From: "Christian König"
Date: 2021-03-31 21:15:22
To: Bernard Zhao ,Huang Rui ,David Airlie
,Daniel Vetter
,dri-de...@lists.freedesktop.org,linux-kernel@vger.kernel.org
Cc: opensource.ker...@vivo.com
Subject: Re: [PATCH] drm/ttm: cleanup coding style a bit>Am 31.03.21 um 1
Fix sparse warning:
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:1195:41: warning: Using plain integer
as NULL pointer
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1
ocks
+ if (obj && obj->use < 0) {
+DRM_ERROR("RAS ERROR: Unbalance obj(%s) use\n",
obj->head.name);
+ }
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
d
Fix sparse warning:
drivers/gpu/drm/ttm/ttm_bo.c:52:1: warning: symbol 'ttm_global_mutex' was not
declared. Should it be static?
drivers/gpu/drm/ttm/ttm_bo.c:53:10: warning: symbol 'ttm_bo_glob_use_count' was
not declared. Should it be static?
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm
- consider code refactoring
+ if (vbios_voltage_id <=
leakage_bin[j]) {
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 84
1 file changed, 35 insertions(+), 49 deletions(-)
diff --git
This change is to make the code a bit readable.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c | 44 ++---
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
b/drivers/gpu/drm/nouveau/dispnv50
Fix patch check warning:
WARNING: Prefer kmalloc_array over kmalloc with multiply
+ buf = kmalloc(MAX_KFIFO_SIZE * sizeof(*buf), GFP_KERNEL);
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
/a6xx_gpu_state.c:198:19: warning: dereference of
noderef expression
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 36 ++---
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c
b/drivers/gpu/drm
Add translations to dev-tools gcov
Signed-off-by: Bernard Zhao
---
.../translations/zh_CN/dev-tools/gcov.rst | 274 ++
1 file changed, 274 insertions(+)
create mode 100644 Documentation/translations/zh_CN/dev-tools/gcov.rst
diff --git a/Documentation/translations/zh_CN/dev
-"Dinghao Liu" wrote: -
>To: dinghao@zju.edu.cn, k...@umn.edu
>From: "Dinghao Liu"
>Date: 02/26/2021 08:56AM
>Cc: "Bernard Metzler" , "Doug Ledford"
>, "Jason Gunthorpe" ,
>linux-r...@vger.kernel.org, linux-kerne
remove unneeded variable: "rc".
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/dp/dp_panel.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/dp/dp_panel.c
b/drivers/gpu/drm/msm/dp/dp_panel.c
index d1780bcac8cc..9cc816663668 100644
---
remove unneeded variable: "ret".
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/tegra/dpaux.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c
index 105fb9cdbb3b..b8abd55f3ef8 100644
--- a/drivers/gpu
Remove unneeded variable: "pattern".
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
b/drivers/gpu/drm/amd/display/dc/core/dc_link_
remove unneeded variable: "ret".
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/vc4/vc4_gem.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
index b641252939d8..445d3bab89e0 100644
--- a/drivers/g
Line 852 DRM_ERROR is redundant because memory alloc already
prints an error when failed.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c
b/drivers
Line 1590 DRM_ERROR is redundant because devm_kzalloc() already
prints an error.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
b
Line 1826 pr_err is redundant because memory alloc already
prints an error when failed.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c
b/drivers/gpu/drm/msm/dsi/dsi_host.c
index
From: Joe Perches
Date: 2020-11-24 06:24:07
To: Sam Ravnborg ,Bernard Zhao
Cc: linux-kernel@vger.kernel.org,Andrew Morton
,Linus Torvalds
,kernel-janitors
,Greg KH
Subject: [RFC PATCH] Add a new "Frozen" status to MAINTAINERS subsystem
entries>On Mon, 2020-11-23 at 22:
options
1.ATM
2.SWIFT WIRE TRANSFER (Banking details required)
3.Bank Draft.
I await hearing from you to enable us complete the process and release of
your funds.
Regards,
Mr. Bernard Lauwers
(Acting Managing Director and WBG Chief Financial Officer)
This change also fix checkpatch.pl warning:
WARNING: Prefer using '"%s...", __func__' to using
'via_driver_irq_postinstall', this function's name, in a string
+ DRM_DEBUG("via_driver_irq_postinstall\n");
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/via/via_irq.c |
-by: Bernard Zhao
Reported-by: kernel test robot
---
Changes since V1:
*fix compile error reported by kernel test robot
Link for V1:
*https://lore.kernel.org/patchwork/patch/1340996/
---
drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm
Fix check_patch.pl warning:
ERROR: do not use assignment in if condition
+ if ((HALCYON_HEADER2 == (cmd = *buf)) &&
ERROR: do not use assignment in if condition
+ if (HALCYON_HEADER2 == (cmd = *buf))
Signed-off-by: Bernard Zhao
---
drivers
-by: Bernard Zhao
---
drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
b/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
index 83c0d5a3e4fd..b8f6fe1a71e6 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c
+++ b/drivers/gpu/drm
Optimise CONFIG_ || CONFIG__MODULE to IS_ENABLED().
This change also fix check_patch.pl warning:
WARNING: Prefer IS_ENABLED() to CONFIG_ ||
CONFIG__MODULE
+#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) || defined
(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)
Signed-off-by: Bernard Zhao
---
drivers/gpu
ay has multiply overflow check, which will be safer.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
index d0aea5
Fix check_patch.pl warning:
kmalloc_array uses number as first arg, sizeof is generally wrong.
+fences = kmalloc_array(sizeof(void *), id_mgr->num_ids,
GFP_KERNEL);
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 2 +-
1 file changed, 1 insertion(+), 1 delet
Add KERN_LEVEL to printk.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/adreno/adreno_gpu.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c
b/drivers/gpu/drm/msm/adreno/adreno_gpu.c
index 458b5b26d3c2..be752db5abed
Add KERN_LEVEL to printk.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
index d6804a802355..c3ac78a32caf 100644
Add KERN_LEVEL to printk.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/a3xx_gpu.c
b/drivers/gpu/drm/msm/adreno/a3xx_gpu.c
index f29c77d9cd42..64c9a9448f53 100644
Add KERN_LEVEL to printk.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/adreno/a2xx_gpu.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/a2xx_gpu.c
b/drivers/gpu/drm/msm/adreno/a2xx_gpu.c
index 7e82c41a85f1..33b45d237e56 100644
Add KERN_LEVEL to printk.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/adreno/a4xx_gpu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/msm/adreno/a4xx_gpu.c
b/drivers/gpu/drm/msm/adreno/a4xx_gpu.c
index 2b93b33b05e4..2206b3b4b191 100644
Hi:
When call printk, set the KERN_LEVEL is suggested by the community.
This patch sereies add KERN_* level to printk which do not set
this level.
Bernard Zhao (5):
adreno/a2xx_gpu.c: add KERN_LEVEL to printk
adreno/a3xx_gpu.c: add KERN_LEVEL to printk
adreno/a4xx_gpu.c: add KERN_LEVEL
Delete the conversion from bool value to bool function return.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
b/drivers/gpu/drm/msm
Remove the conversion from bool value to bool variable.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
Function __thermal_cooling_device_register, when device_register
failed, cdev is not free after error value return, this may
bring in potential memleak.
Signed-off-by: Bernard Zhao
---
drivers/thermal/thermal_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/thermal
Function thermal_add_hwmon_sysfs, hwmon will be NULL when
new_hwmon_device = 0, so there is no need to check, kfree will
handle NULL point.
Signed-off-by: Bernard Zhao
---
drivers/thermal/thermal_hwmon.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/thermal
In function amdgpu_dm_connector_get_modes, drm_edid_is_valid
will check weather (!edid), no need to check again in the if
branch.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm
From: "Uwe Kleine-König"
Date: 2020-11-07 22:01:29
To: Bernard Zhao
Cc: Greg Kroah-Hartman ,Jiri Slaby
,Shawn Guo ,Sascha Hauer
,Pengutronix Kernel Team ,Fabio
Estevam ,NXP Linux Team
,linux-kernel@vger.kernel.org,linux-ser...@vger.kernel.org,linux-arm-ker...@lists.inf
Hi, Greg:
This patch sereies delete code which never run:
{
case XXX:
return XXX;
break; //The break is meanless, so just delete it.
case YYY:
goto YYY;
break; //The break is meanless, so just delete it.
..
}
Bernard Zhao (2):
tty/serial: delete break after
Delete break after return, which will never run.
Signed-off-by: Bernard Zhao
---
drivers/tty/serial/imx.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 1731d9728865..09703079db7b 100644
--- a/drivers/tty/serial/imx.c
+++ b
Delete break after goto/return, which will never run.
Signed-off-by: Bernard Zhao
---
drivers/tty/nozomi.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c
index d42b854cb7df..946cc16827aa 100644
--- a/drivers/tty/nozomi.c
+++ b/drivers/tty
From: Greg Kroah-Hartman
Date: 2020-11-04 19:02:53
To: Bernard Zhao
Cc: Jiri Slaby ,Shawn Guo ,Sascha
Hauer ,Pengutronix Kernel Team
,Fabio Estevam ,NXP Linux Team
,linux-kernel@vger.kernel.org,linux-ser...@vger.kernel.org,linux-arm-ker...@lists.infradead.org,opensource.ker...@vivo.com
Delete break after return, which will never run.
Signed-off-by: Bernard Zhao
---
drivers/tty/serial/imx.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 1731d9728865..09703079db7b 100644
--- a/drivers/tty/serial/imx.c
+++ b
Delete break after goto, which will never run.
Signed-off-by: Bernard Zhao
---
drivers/tty/nozomi.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c
index d42b854cb7df..946cc16827aa 100644
--- a/drivers/tty/nozomi.c
+++ b/drivers/tty/nozomi.c
This patch sereies optimise code like:
{
case XXX:
return XXX;
break; //The break is meanless, so just delete it.
case YYY:
goto YYY;
break; //The break is meanless, so just delete it.
..
}
Signed-off-by: Bernard Zhao
---
Bernard Zhao (2):
drivers/tty
This patch sereies delete break after return, which will never run.
Signed-off-by: Bernard Zhao
*** BLURB HERE ***
Bernard Zhao (2):
drivers/tty: delete break after return
drivers/tty: delete break after return
drivers/tty/nozomi.c | 4
drivers/tty/serial/imx.c | 5 -
2 files
Delete break after return, which will never run.
Signed-off-by: Bernard Zhao
---
drivers/tty/serial/imx.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 1731d9728865..09703079db7b 100644
--- a/drivers/tty/serial/imx.c
+++ b
Delete break after return, which will never run.
Signed-off-by: Bernard Zhao
---
drivers/tty/nozomi.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c
index d42b854cb7df..946cc16827aa 100644
--- a/drivers/tty/nozomi.c
+++ b/drivers/tty/nozomi.c
Delete break after return, which will never run.
Signed-off-by: Bernard Zhao
---
drivers/tty/nozomi.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c
index d42b854cb7df..946cc16827aa 100644
--- a/drivers/tty/nozomi.c
+++ b/drivers/tty/nozomi.c
This patch sereies delete break after return, which will never run.
Signed-off-by: Bernard Zhao
*** BLURB HERE ***
Bernard Zhao (2):
drivers/tty: delete break after return
drivers/tty: delete break after return
drivers/tty/nozomi.c | 4
drivers/tty/serial/imx.c | 5 -
2 files
Delete break after return, which will never run.
Signed-off-by: Bernard Zhao
---
drivers/tty/serial/imx.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 1731d9728865..09703079db7b 100644
--- a/drivers/tty/serial/imx.c
+++ b
From: Daniel Vetter
Date: 2020-11-02 18:17:24
To: Bernard Zhao
Cc: Maarten Lankhorst ,Maxime Ripard
,Thomas Zimmermann ,David Airlie
,Daniel Vetter
,dri-de...@lists.freedesktop.org,linux-kernel@vger.kernel.org,opensource.ker...@vivo.com
Subject: Re: [PATCH] gpu/drm: make crtc check before
Fix typoes.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c
b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c
index 2c6db379afae..e994d233aa21
Delete the conversion from bool value to bool function return.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
b/drivers/gpu/drm/msm
Remove the conversion from bool value to bool variable.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
In function amdgpu_register_gpu_instance, there is no need to
protect DRM_ERROR in mutex mgpu_info.mutex.
This change is to make the code to run a bit fast.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
In function drm_bridge_connector_get_modes_edid, drm_edid_is_valid
will check weather (!edid), no need to check again in the if
branch.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/drm_bridge_connector.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm
In function prepare_signaling, crtc check (c==0) is not related
with the next new_connector circle, maybe we can put the crtc
check just after the crtc circle and before new_connector circle.
This change is to make the code to run a bit first.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm
Function thermal_add_hwmon_sysfs, hwmon will be NULL when
new_hwmon_device = 0, so there is no need to check, kfree will
handle NULL point.
Signed-off-by: Bernard Zhao
---
drivers/thermal/thermal_hwmon.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/thermal
Function __thermal_cooling_device_register, when device_register
failed, cdev is not free after error value return, this may
bring in potential memleak.
Signed-off-by: Bernard Zhao
---
drivers/thermal/thermal_core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/thermal
From: Sam Ravnborg
Date: 2020-10-25 01:14:57
To: Bernard
Cc: Thomas Zimmermann ,opensource.ker...@vivo.com,David
Airlie
,linux-kernel@vger.kernel.org,dri-de...@lists.freedesktop.org,Dave
Airlie
Subject: Re: Re: [PATCH] gpu/drm/mgag200:remove break after return>Hi Bernard.
>
>On
Function thermal_zone_device_register, in the for circle, if the
first if branch set the count bit in tz->trips_disabled, there is
no need to set in the other if branch again.
This change is to make the code run a bit fast and readable.
Signed-off-by: Bernard Zhao
Changes since V1:
*m
From: Daniel Lezcano
Date: 2020-10-27 02:35:18
To: Bernard ,Zhang Rui ,Amit Kucheria
,linux...@vger.kernel.org,linux-kernel@vger.kernel.org
Cc: opensource.ker...@vivo.com
Subject: Re: [Resend][PATCH] drivers/thermal: optimize the for circle to run a
bit fast>On 26/10/2020 02:49, Bern
Struct power_allocator_params element allocated_tzp is only used
in unbind to kfree the kzalloc space.
Maybe we don’t have to need this member to mark, also, kfree will
handle NULL point, there is no risk.
This change is to make the code run a bit fast.
Signed-off-by: Bernard Zhao
---
drivers
Function thermal_zone_device_register, in the for circle, if the
first if branch set the count bit in tz->trips_disabled, there is
no need to set in the other if branch again.
This change is to make the code run a bit fast and readable.
Signed-off-by: Bernard Zhao
---
drivers/ther
From: Thomas Zimmermann
Date: 2020-10-23 15:13:30
To: Bernard Zhao ,Dave Airlie ,David
Airlie ,Daniel Vetter
,dri-de...@lists.freedesktop.org,linux-kernel@vger.kernel.org
Cc: opensource.ker...@vivo.com
Subject: Re: [PATCH] gpu/drm/mgag200:remove break after return>Hi
>
>On 23.10
In function mgag200_set_pci_regs, there are some switch cases
returned, then break. These break will never run.
This patch is to make the code a bit readable.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/mgag200/mgag200_mode.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff
Function thermal_zone_device_register, in the for circle, if the
first if branch set the count bit in tz->trips_disabled, there is
no need to set in the other if branch again.
This change is to make the code run a bit fast and readable.
Signed-off-by: Bernard Zhao
---
drivers/ther
Struct power_allocator_params element allocated_tzp is only used
in unbind to kfree the kzalloc space.
Maybe we don’t have to need this member to mark, also, kfree will
handle NULL point, there is no risk.
This change is to make the code run a bit fast.
Signed-off-by: Bernard Zhao
---
drivers
In functions vegam_is_dpm_running & vegam_populate_avfs_parameters,
maybe there is no need to conver bool condition to bool variable
or bool return value.
This change is to make the code a bit more readable.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/powerplay/smumgr/vegam_smumgr.c
Function mtk_hdmi_aud_set_input always return 0, no need to
keep the return value. Functions mtk_hdmi_aud_enable_packet &
mtk_hdmi_aud_on_off_hw_ncts are the same, these two functions
just call next functions. Maybe it`s a bit better to just call
the inner function.
Signed-off-by: Bernard
Functions armada_drm_crtc_atomic_flush &
armada_drm_crtc_atomic_enable don`t use the second parameter.
So we may get warning like :
warning: unused parameter ‘***’ [-Wunused-parameter].
This change is to fix the compile warning with -Wunused-parameter.
Signed-off-by: Bernard Zhao
---
dri
gned-off-by: Bernard Zhao
---
drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
index 4d29568be3f5..6e55ec0e80bb 100644
--- a/drivers/gpu/drm/mediatek/mtk_dr
Functions (disable_all_writeback_pipes_for_stream &
dc_enable_stereo & dc_post_update_surfaces_to_stream)
always return true, there is no need to keep the return value.
This change is to make the code a bit more readable.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/dc/c
>Cc: "Ira Weiny" , "Mike Marciniszyn"
>, "Dennis Dalessandro"
>, "Doug Ledford" ,
>"Jason Gunthorpe" , "Faisal Latif"
>, "Shiraz Saleem" ,
>"Bernard Metzler" , x...@kernel.org, "Dave Hansen"
able.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c
b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c
index f1bc6a1af7a7..e6da0469b743 100644
--- a/drivers
Functions (disable_all_writeback_pipes_for_stream &
dc_enable_stereo & dc_post_update_surfaces_to_stream)
always return true, there is no need to keep the return value.
This change is to make the code a bit more readable.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/dc/c
Change the comment typo: "programm" -> "program".
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 +-
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 4 ++
Change the comment typo: "programm" -> "program".
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/radeon/uvd_v1_0.c | 4 ++--
drivers/gpu/drm/radeon/uvd_v2_2.c | 2 +-
drivers/gpu/drm/radeon/uvd_v4_2.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a
Change struct memcard`s element "removeable" -> "removable".
Signed-off-by: Bernard Zhao
---
drivers/mtd/maps/vmu-flash.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/maps/vmu-flash.c b/drivers/mtd/maps/vmu-flash.c
index 177bf134e1
In the function dal_ddc_service_query_ddc_data,
get rid of dal_ddc_i2c_payloads_destroy, call
dal_vector_destruct() directly.
This change is to make the code run a bit fast.
Signed-off-by: Bernard Zhao
Changes since V1:
*get rid of dal_ddc_i2c_payloads_destroy, call
dal_vector_destruct
From: Alex Deucher
Date: 2020-09-22 03:33:20
To: Bernard Zhao
Cc: Harry Wentland ,Leo Li ,Alex
Deucher ,"Christian König"
,David Airlie ,Daniel Vetter
,Rodrigo Siqueira ,Jun Lei
,Aric Cyr ,Wenjing Liu
,abdoulaye berthe ,Michael
Strauss ,Brandon Syu ,Martin
Leung ,amd-gfx lis
Static function dal_ddc_i2c_payloads_destroy is only called
in dal_ddc_service_query_ddc_data, the parameter is
, there is no point NULL risk, so no need to check.
This change is to make the code run a bit fast.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
This change will speed-up a bit these ipu_idmac_get &
ipu_idmac_put processing and there is no need to protect
kzalloc & kfree.
Signed-off-by: Bernard Zhao
---
drivers/gpu/ipu-v3/ipu-common.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a
In fnction is_cr_done & is_ch_eq_done, when done = false
happened once, no need to circle left ln_count.
This change is to make the code run a bit fast.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c | 14 +-
1 file changed, 5 insertions(+
Remove first assignment to info which is meaningless.
Put the width and higth check first.
This change is to make the code a bit readable.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/drm_framebuffer.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu
In function drm_atomic_helper_shutdown, maybe there is no need
to protect DRM_ERROR log in DRM_MODESET_LOCK_ALL_BEGIN &
DRM_MODESET_LOCK_ALL_END. This change is to make code run a bit
fast.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/drm_atomic_helper.c | 4 +---
1 file changed, 1 inser
In function via_mem_alloc`s error branch, DRM_ERROR is protected
in the mutex_lock(>struct_mutex) area.
From the code, we see that DRM_ERROR is just an error log print
without any struct element, there is no need to protect this.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/via/via_mm.c
This change will speed-up a bit these ipu_idmac_get &
ipu_idmac_put processing and there is no need to protect
kzalloc & kfree.
Signed-off-by: Bernard Zhao
---
drivers/gpu/ipu-v3/ipu-common.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a
In function via_mem_alloc`s error branch, DRM_ERROR is protected
in the mutex_lock(>struct_mutex) area.
>From the code, we see that DRM_ERROR is just an error log print
without any struct element, there is no need to protect this.
Signed-off-by: Bernard Zhao
---
drivers/gpu/drm/via/via_mm
1 - 100 of 243 matches
Mail list logo