[PATCH 3/3] debugobjects: Use hlist_cut_number() to optimize performance and improve readability

2024-09-04 Thread Zhen Lei
hlist_cut_number() in __free_object(), the result is obviously positive, the check of the return value is omitted. Signed-off-by: Zhen Lei --- lib/debugobjects.c | 115 +++-- 1 file changed, 48 insertions(+), 67 deletions(-) diff --git a/lib/debugobjects.c b/lib

[PATCH 2/3] list: test: Add a test for hlist_cut_number()

2024-09-04 Thread Zhen Lei
Test cases cover all possible situations: 1. The cut number is invalid: zero or negative 2. Partially cut. 3. Cut all. 4. The cut number is greater than the number of nodes in the old list. 5. The old list is empty. Signed-off-by: Zhen Lei --- lib/list-test.c | 51

[PATCH 1/3] list: add hlist_cut_number()

2024-09-04 Thread Zhen Lei
longer split and then spliced into the new list one by one, this also enhances readability. Signed-off-by: Zhen Lei --- include/linux/list.h | 44 1 file changed, 44 insertions(+) diff --git a/include/linux/list.h b/include/linux/list.h index

[PATCH 0/3] debugobjects: Add hlist_cut_number() and use it to optimize code

2024-09-04 Thread Zhen Lei
Zhen Lei (3): list: add hlist_cut_number() list: test: Add a test for hlist_cut_number() debugobjects: Use hlist_cut_number() to optimize performance and improve readability include/linux/list.h | 44 + lib/debugobjects.c | 115

[PATCH 1/1] uprobe: fix comment of uprobe_apply()

2024-08-20 Thread Zhen Lei
Depending on the argument 'add', uprobe_apply() may be registering or unregistering a probe. The current comment misses the description of the registration. Signed-off-by: Zhen Lei --- kernel/events/uprobes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ker

[PATCH 1/1] char: hpet: Remove unused local variable 'm' in hpet_interrupt()

2021-04-15 Thread Zhen Lei
slightly degraded. Since the following comments give some description based on 'm', so move the assignment of 'm' into it. Fixes: 273ef9509b79 ("drivers/char/hpet.c: fix periodic-emulation for delayed interrupt") Reported-by: Hulk Robot Signed-off-by: Zhen L

[PATCH 1/1] perf map: Fix error return code in maps__clone()

2021-04-15 Thread Zhen Lei
Although 'err' has been initialized to -ENOMEM, but it will be reassigned by the "err = unwind__prepare_access(...)" statement in the for loop. So that, the value of 'err' is unknown when map__clone() failed. Reported-by: Hulk Robot Signed-off-by: Zhen Lei

[PATCH 1/1] perf data: Fix error return code in perf_data__create_dir()

2021-04-15 Thread Zhen Lei
Although 'ret' has been initialized to -1, but it will be reassigned by the "ret = open(...)" statement in the for loop. So that, the value of 'ret' is unknown when asprintf() failed. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- tools/perf/util/data.

[PATCH 1/1] dt-bindings: serial: Add label property for pl011

2021-04-15 Thread Zhen Lei
/hisilicon/hi3660-hikey960.dt.yaml: \ serial@ffd74000: Additional properties are not allowed ('label' was unexpected) From schema: Documentation/devicetree/bindings/serial/pl011.yaml Signed-off-by: Zhen Lei --- Documentation/devicetree/bindings/serial/pl011.yaml | 3 +++ 1 file c

[PATCH v3 0/2] clean up dt_binding_check and dtbs_check warnings of renesas,rsnd.yaml

2021-04-12 Thread Zhen Lei
wc -l 2 After: cat err.txt | wc -l 0 make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/sound/renesas,rsnd.yaml -j24 2>err.txt Before: cat err.txt | wc -l 130 After: cat err.txt | wc -l 0 Zhen Lei (2): ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required

[PATCH v3 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes

2021-04-12 Thread Zhen Lei
'port' depending on it's need. Both are not allowed at the same time. The check is done in "allOf". Signed-off-by: Zhen Lei --- .../devicetree/bindings/sound/renesas,rsnd.yaml | 12 1 file changed, 12 insertions(+) diff --git a/Documentation/devic

[PATCH v3 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property

2021-04-12 Thread Zhen Lei
this driver does not reference any property in file audio-graph.yaml. This can be proved to be true, because after I deleted "$ref: audio-graph.yaml#", the old 'dais' warnings are cleared, and no new warning are generated. Signed-off-by: Zhen Lei --- Documentation/devicetree/b

[PATCH 1/1] lib/lzo: remove unused local variable 'level'

2021-04-08 Thread Zhen Lei
Hulk Robot Signed-off-by: Zhen Lei --- lib/decompress_unlzo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/decompress_unlzo.c b/lib/decompress_unlzo.c index 1f439a622076c10..64c1358500ce4e9 100644 --- a/lib/decompress_unlzo.c +++ b/lib/decompress_unlzo.c @@ -43,7 +43,6

[PATCH 0/3] scsi: mptfusion: Clear the warnings indicating that the variable is not used

2021-04-07 Thread Zhen Lei
:8: warning: variable ‘retval’ set but not used [-Wunused-but-set-variable] 2337 | int retval; |^~ Zhen Lei (3): scsi: mptfusion: Remove unused local variable 'time_count' scsi: mptfusion: Remove unused local variable 'port' scsi: mptfusion: Fix

[PATCH 1/3] scsi: mptfusion: Remove unused local variable 'time_count'

2021-04-07 Thread Zhen Lei
error handling.") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/message/fusion/mptctl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c index 24aebad60366..0a9321239e76 100644 --- a/drivers/message/fusio

[PATCH 2/3] scsi: mptfusion: Remove unused local variable 'port'

2021-04-07 Thread Zhen Lei
Fixes the following W=1 kernel build warning: drivers/message/fusion/mptctl.c: In function ‘mptctl_gettargetinfo drivers/message/fusion/mptctl.c:1372:7: warning: variable ‘port’ set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/message

[PATCH 3/3] scsi: mptfusion: Fix error return code of mptctl_hp_hostinfo()

2021-04-07 Thread Zhen Lei
Ensure that all "goto out" error branches return correct error codes. Currently, always returns 0. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/message/fusion/mptctl.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drive

[PATCH 1/1] agp: remove unused local variable 'current_size'

2021-04-07 Thread Zhen Lei
Fixes the following W=1 kernel build warning: drivers/char/agp/via-agp.c: In function ‘via_configure_agp3’: drivers/char/agp/via-agp.c:131:28: warning: variable ‘current_size’ set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/char/agp

[PATCH 1/1] ide: remove unused local variable 'sitre'

2021-04-07 Thread Zhen Lei
Hulk Robot Signed-off-by: Zhen Lei --- drivers/ide/piix.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/ide/piix.c b/drivers/ide/piix.c index a671cead6ae72b7..b512d2dc9108cf6 100644 --- a/drivers/ide/piix.c +++ b/drivers/ide/piix.c @@ -143,13 +143,11 @@ static void piix_set_dma_mode(

[PATCH 1/1] drm/nouveau/kms: remove unused local variable 'width'

2021-04-07 Thread Zhen Lei
Check framebuffer size against bo") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/nouveau/nouveau_display.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_displ

[PATCH 1/1] ide: remove unused static variable 'ide_media_proc_fops'

2021-04-07 Thread Zhen Lei
s with ->proc_show"). Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/ide/ide-proc.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index 15c17f3781ee917..34bed14f88c78b3 100644 --- a/drivers/ide/ide-proc.c ++

[PATCH 1/1] usb: typec: tcpm: remove unused static variable 'tcpm_altmode_ops'

2021-04-07 Thread Zhen Lei
ove tcpc_config configuration mechanism"). By the way, the static functions referenced only by the variable 'tcpm_altmode_ops' are deleted accordingly. Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/usb/typec/tcpm/tcpm.c | 60 ---

[PATCH 1/1] drm/msm/dpu: remove unused local variable 'cmd_enc'

2021-04-07 Thread Zhen Lei
] Fixes: fe286893ed34 ("drm/msm/dpu: Remove unused call in wait_for_commit_done") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phy

[PATCH 1/1] drm/msm/dp: remove unused local variable 'hpd'

2021-04-07 Thread Zhen Lei
nnect/disconnect handled at irq_hpd") Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers/gpu/drm/msm/dp/dp_display.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index 5a39da6e1eaf277..31bf2a40a9eb2c9 10

[PATCH 1/1] agp/uninorth: remove unused local variable 'size'

2021-04-07 Thread Zhen Lei
Fixes the following W=1 kernel build warning: drivers/char/agp/uninorth-agp.c: In function ‘uninorth_create_gatt_table: drivers/char/agp/uninorth-agp.c:372:6: warning: variable ‘size’ set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: Zhen Lei --- drivers

[PATCH v2 0/1] thermal: ti-soc-thermal: Remove duplicated header file inclusion

2021-04-06 Thread Zhen Lei
v1 --> v2: Arrange all included header files in alphabetical order. Zhen Lei (1): thermal: ti-soc-thermal: Remove duplicated header file inclusion drivers/thermal/ti-soc-thermal/ti-bandgap.c | 35 ++--- 1 file changed, 17 insertions(+), 18 deletions(-) -- 1.8.3

[PATCH v2 1/1] thermal: ti-soc-thermal: Remove duplicated header file inclusion

2021-04-06 Thread Zhen Lei
Delete one of the header files that are included twice, all included header files are then rearranged alphabetically. Signed-off-by: Zhen Lei --- drivers/thermal/ti-soc-thermal/ti-bandgap.c | 35 ++--- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a

[PATCH v2 1/1] pinctrl: Remove duplicated header file inclusion

2021-04-06 Thread Zhen Lei
Delete one of the header files that are included twice, all included header files are then rearranged alphabetically. Signed-off-by: Zhen Lei --- drivers/pinctrl/pinctrl-k210.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/pinctrl/pinctrl-k210.c b

[PATCH v2 0/1] pinctrl: Remove duplicated header file inclusion

2021-04-06 Thread Zhen Lei
v1 --> v2: Arrange all included header files in alphabetical order. Zhen Lei (1): pinctrl: Remove duplicated header file inclusion drivers/pinctrl/pinctrl-k210.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) -- 1.8.3

[PATCH v2 1/1] drm/nouveau/dmem: Remove duplicated header file inclusion

2021-04-06 Thread Zhen Lei
Delete one of the header files that are included twice, all included header files are then rearranged alphabetically. Signed-off-by: Zhen Lei --- drivers/gpu/drm/nouveau/nouveau_dmem.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/drivers/gpu

[PATCH v2 0/1] drm/nouveau/dmem: Remove duplicated header file

2021-04-06 Thread Zhen Lei
v1 --> v2: Arrange all included header files in alphabetical order. Zhen Lei (1): drm/nouveau/dmem: Remove duplicated header file inclusion drivers/gpu/drm/nouveau/nouveau_dmem.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) -- 1.8.3

[PATCH v2 1/1] net/mlx5: Remove duplicated header file inclusion

2021-04-06 Thread Zhen Lei
Delete one of the header files "esw/indir_table.h" that are included twice, all included header files are then rearranged alphabetically. Signed-off-by: Zhen Lei --- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 13 ++--- 1 file changed, 6 insertions(+), 7

[PATCH v2 0/1] net/mlx5: Remove duplicated header file inclusion

2021-04-06 Thread Zhen Lei
v1 --> v2: Arrange all included header files in alphabetical order. Zhen Lei (1): net/mlx5: Remove duplicated header file inclusion drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) -- 1.8.3

[PATCH v2 0/1] bus: bt1-apb: Remove duplicated header file inclusion

2021-04-06 Thread Zhen Lei
v1 --> v2: Arrange all included header files in alphabetical order. Zhen Lei (1): bus: bt1-apb: Remove duplicated header file inclusion drivers/bus/bt1-apb.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) -- 1.8.3

[PATCH v2 1/1] bus: bt1-apb: Remove duplicated header file inclusion

2021-04-06 Thread Zhen Lei
Delete one of the header files that are included twice, all included header files are then rearranged alphabetically. Signed-off-by: Zhen Lei --- drivers/bus/bt1-apb.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/bus/bt1-apb.c b/drivers/bus/bt1

[PATCH v2 0/2] clean up dt_binding_check and dtbs_check warnings of renesas,rsnd.yaml

2021-03-31 Thread Zhen Lei
on/devicetree/bindings/sound/renesas,rsnd.yaml -j24 2>err.txt Before: cat err.txt | wc -l 130 After: cat err.txt | wc -l 0 Zhen Lei (2): ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports

[PATCH v2 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes

2021-03-31 Thread Zhen Lei
g will be reported: arch/arm64/boot/dts/renesas/r8a774a1-beacon-rzg2m-kit.dt.yaml: \ sound@ec50: 'ports' does not match any of the regexes: \ '^rcar_sound,ctu$', '^rcar_sound,dai$', '^rcar_sound,dvc$', ... Signed-off-by: Zhen Lei --- Documentation/de

[PATCH v2 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property

2021-03-31 Thread Zhen Lei
this driver does not reference any property in file audio-graph.yaml. This can be proved to be true, because after I deleted "$ref: audio-graph.yaml#", the old 'dais' warnings are cleared, and no new warning are generated. Signed-off-by: Zhen Lei --- Documentation/devicetree/b

[PATCH 2/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'ports' does not match any of the regexes

2021-03-29 Thread Zhen Lei
not match any of the regexes: \ '^rcar_sound,ctu$', '^rcar_sound,dai$', '^rcar_sound,dvc$', ... Signed-off-by: Zhen Lei --- Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/s

[PATCH 0/2] clean up dt_binding_check and dtbs_check warnings of renesas,rsnd.yaml

2021-03-29 Thread Zhen Lei
nd/renesas,rsnd.yaml make dt_binding_check -j24 2>err.txt Before: cat err.txt | wc -l 2 After: cat err.txt | wc -l 0 make dtbs_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/sound/renesas,rsnd.yaml -j24 2>err.txt Before: cat err.txt | wc -l 130 After: cat err.txt | wc -l 0 Zhen Lei

[PATCH 1/2] ASoC: dt-bindings: renesas, rsnd: Clear warning 'dais' is a required property

2021-03-29 Thread Zhen Lei
;, so the "$ref: audio-graph-card.yaml#" should be described as "anyOf". To ensure the validation of "anyOf" always passes, group it with the "if" statement, because the result of the "if" statement is always not empty. Signed-off-by: Zhen L

[PATCH 1/1] ASoC: intel, keembay-i2s: Fix a dt_binding_check warning

2021-03-29 Thread Zhen Lei
14: dmas: [[4294967295, 29, 4294967295, 33]] is too short Signed-off-by: Zhen Lei --- Documentation/devicetree/bindings/sound/intel,keembay-i2s.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/sound/intel,keembay-i2s.yaml b/Documentation/d

[PATCH 2/2] arm64: dts: imx8mp: Use the correct name for child node "snps,dwc3"

2021-03-29 Thread Zhen Lei
After the node name of "snps,dwc3" has been corrected to start with "usb" in fsl,imx8mp-dwc3.yaml. Its name in dts should be modified accordingly. Signed-off-by: Zhen Lei --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-

[PATCH 1/2] dt-bindings: usb: dwc3-imx8mp: Use the correct name for child node "snps,dwc3"

2021-03-29 Thread Zhen Lei
t;. Ensure that all properties of the child node comply with snps,dwc3.yaml. Signed-off-by: Zhen Lei --- Documentation/devicetree/bindings/usb/fsl,imx8mp-dwc3.yaml | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/usb/fsl,imx8mp-dwc3.ya

[PATCH 0/2] dt-bindings: usb: dwc3-imx8mp: Use the correct name for child node "snps,dwc3"

2021-03-29 Thread Zhen Lei
e/bindings/usb/fsl,imx8mp-dwc3.example.dt.yaml: \ dwc3@3810: $nodename:0: 'dwc3@3810' does not match '^usb(@.*)?' From schema: Documentation/devicetree/bindings/usb/snps,dwc3.yaml Zhen Lei (2): dt-bindings: usb: dwc3-imx8mp: Use the correct name for child

[PATCH 1/1] drm/amd/display: Remove duplicated header file inclusion

2021-03-26 Thread Zhen Lei
The header file "dce110/dce110_resource.h" is already included above and can be removed here. Signed-off-by: Zhen Lei --- drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/dc/dcn21/dcn21_resource.c b/d

[PATCH 1/1] scsi: ufs: Remove duplicated header file inclusion

2021-03-26 Thread Zhen Lei
The header file is already included above and can be removed here. Signed-off-by: Zhen Lei --- drivers/scsi/ufs/ufshcd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index c86760788c72c9a..e8aa7de17d0accd 100644 --- a/drivers/scsi/ufs

[PATCH 1/1] drm/nouveau/nvenc: Remove duplicated header file inclusion

2021-03-26 Thread Zhen Lei
The header file "priv.h" is already included above and can be removed here. Signed-off-by: Zhen Lei --- drivers/gpu/drm/nouveau/nvkm/engine/nvenc/base.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/nvenc/base.c b/drivers/gpu/drm/nouveau/n

[PATCH 1/1] drm/nouveau/dmem: Remove duplicated header file inclusion

2021-03-26 Thread Zhen Lei
The header file is already included above and can be removed here. Signed-off-by: Zhen Lei --- drivers/gpu/drm/nouveau/nouveau_dmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_dmem.c b/drivers/gpu/drm/nouveau/nouveau_dmem.c index 92987daa5e17d02

[PATCH 1/1] drm/amd/display: Remove duplicated header file inclusion

2021-03-26 Thread Zhen Lei
The header file is included in the following common section and can be removed here. Signed-off-by: Zhen Lei --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display

[PATCH 1/1] thermal: ti-soc-thermal: Remove duplicated header file inclusion

2021-03-26 Thread Zhen Lei
The header file is already included above and can be removed here. Signed-off-by: Zhen Lei --- drivers/thermal/ti-soc-thermal/ti-bandgap.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c index

[PATCH 1/1] pinctrl: Remove duplicated header file inclusion

2021-03-26 Thread Zhen Lei
The header file is already included above and can be removed here. Signed-off-by: Zhen Lei --- drivers/pinctrl/pinctrl-k210.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/pinctrl/pinctrl-k210.c b/drivers/pinctrl/pinctrl-k210.c index 8a733cf77ba0522..f831526d06ff68f 100644 --- a

[PATCH 1/1] soc: litex: Remove duplicated header file inclusion

2021-03-26 Thread Zhen Lei
The header file is already included above and can be removed here. Signed-off-by: Zhen Lei --- drivers/soc/litex/litex_soc_ctrl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/soc/litex/litex_soc_ctrl.c b/drivers/soc/litex/litex_soc_ctrl.c index 6268bfa7f0d6088..c3e379a990f2cc9

[PATCH 1/1] watchdog: dw_wdt: Remove duplicated header file inclusion

2021-03-26 Thread Zhen Lei
The header file is already included above and can be removed here. Signed-off-by: Zhen Lei --- drivers/watchdog/dw_wdt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c index 32d0e1781e63c4e..b1642e2d9175584 100644 --- a/drivers/watchdog

[PATCH 1/1] bus: bt1-apb: Remove duplicated header file inclusion

2021-03-26 Thread Zhen Lei
The header file is already included above and can be removed here. Signed-off-by: Zhen Lei --- drivers/bus/bt1-apb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/bus/bt1-apb.c b/drivers/bus/bt1-apb.c index b25ff941e7c7f52..74b1b712ef3a804 100644 --- a/drivers/bus/bt1-apb.c +++ b

[PATCH 1/1] media: vidtv: Remove duplicated header file inclusion

2021-03-26 Thread Zhen Lei
The header file is already included above and can be removed here. Signed-off-by: Zhen Lei --- drivers/media/test-drivers/vidtv/vidtv_psi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/test-drivers/vidtv/vidtv_psi.c b/drivers/media/test-drivers/vidtv/vidtv_psi.c index

[PATCH 1/1] media: atomisp: Remove duplicated header file inclusion

2021-03-26 Thread Zhen Lei
The header file "ia_css_isys.h" is already included above and can be removed here. Signed-off-by: Zhen Lei --- drivers/staging/media/atomisp/pci/sh_css.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/media/atomisp/pci/sh_css.c b/drivers/staging/media/a

[PATCH 1/1] net/mlx5: Remove duplicated header file inclusion

2021-03-26 Thread Zhen Lei
The header file "esw/indir_table.h" is already included above and can be removed here. Signed-off-by: Zhen Lei --- drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c

[PATCH 2/4] vfio/mdev: Fix spelling mistake "interal" -> "internal"

2021-03-26 Thread Zhen Lei
There is a spelling mistake in a comment, fix it. Signed-off-by: Zhen Lei --- drivers/vfio/mdev/mdev_private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vfio/mdev/mdev_private.h b/drivers/vfio/mdev/mdev_private.h index 7d922950caaf3c1..4d62b76c473409d 100644

[PATCH 4/4] vfio/platform: Fix spelling mistake "registe" -> "register"

2021-03-26 Thread Zhen Lei
There is a spelling mistake in a comment, fix it. Signed-off-by: Zhen Lei --- drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/vfio/platform/reset/vfio_platform_calxedaxgmac.c b/drivers/vfio/platform/reset

[PATCH 3/4] vfio/pci: fix a couple of spelling mistakes

2021-03-26 Thread Zhen Lei
There are several spelling mistakes, as follows: permision ==> permission thru ==> through presense ==> presence Signed-off-by: Zhen Lei --- drivers/vfio/pci/vfio_pci.c | 2 +- drivers/vfio/pci/vfio_pci_config.c | 2 +- drivers/vfio/pci/vfio_pci_nvlink2.c | 4 ++-- 3 files c

[PATCH 0/4] vfio: fix a couple of spelling mistakes detected by codespell tool

2021-03-26 Thread Zhen Lei
This detection and correction covers the entire driver/vfio directory. Zhen Lei (4): vfio/type1: fix a couple of spelling mistakes vfio/mdev: Fix spelling mistake "interal" -> "internal" vfio/pci: fix a couple of spelling mistakes vfio/platform: Fix spelling mistake

[PATCH 1/4] vfio/type1: fix a couple of spelling mistakes

2021-03-26 Thread Zhen Lei
There are several spelling mistakes, as follows: userpsace ==> userspace Accouting ==> Accounting exlude ==> exclude Signed-off-by: Zhen Lei --- drivers/vfio/vfio_iommu_type1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/vfio/vfio_iommu_type1.c

[PATCH 8/8] iommu/vt-d: fix a couple of spelling mistakes

2021-03-25 Thread Zhen Lei
There are several spelling mistakes, as follows: guarentees ==> guarantees resgister ==> register insufficent ==> insufficient creats ==> creates tabke ==> take Signed-off-by: Zhen Lei --- drivers/iommu/intel/dmar.c | 6 +++--- drivers/iommu/intel/iommu.c | 2 +-

[PATCH 2/8] iommu/omap: Fix spelling mistake "alignement" -> "alignment"

2021-03-25 Thread Zhen Lei
There is a spelling mistake in a comment, fix it. Signed-off-by: Zhen Lei --- drivers/iommu/omap-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index 71f29c0927fc710..b2a6ab700ec43d1 100644 --- a/drivers/iommu

[PATCH 6/8] iommu/amd: fix a couple of spelling mistakes

2021-03-25 Thread Zhen Lei
There are several spelling mistakes, as follows: alignement ==> alignment programing ==> programming implemtation ==> implementation assignement ==> assignment By the way, both "programing" and "programming" are acceptable, but the latter seems more formal. Signe

[PATCH 3/8] iommu/mediatek: Fix spelling mistake "phyiscal" -> "physical"

2021-03-25 Thread Zhen Lei
There is a spelling mistake in a comment, fix it. Signed-off-by: Zhen Lei --- drivers/iommu/mtk_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/mtk_iommu.c b/drivers/iommu/mtk_iommu.c index 6ecc007f07cd52e..c8c9bf1d70b29dc 100644 --- a/drivers/iommu

[PATCH 5/8] iommu: fix a couple of spelling mistakes

2021-03-25 Thread Zhen Lei
There are several spelling mistakes, as follows: funcions ==> functions distiguish ==> distinguish detroyed ==> destroyed Signed-off-by: Zhen Lei --- drivers/iommu/iommu.c | 4 ++-- drivers/iommu/iova.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/driv

[PATCH 7/8] iommu/arm-smmu: Fix spelling mistake "initally" -> "initially"

2021-03-25 Thread Zhen Lei
There is a spelling mistake in a comment, fix it. Signed-off-by: Zhen Lei --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index d8c6bfde6a61587

[PATCH 4/8] iommu/sun50i: Fix spelling mistake "consits" -> "consists"

2021-03-25 Thread Zhen Lei
There is a spelling mistake in a comment, fix it. Signed-off-by: Zhen Lei --- drivers/iommu/sun50i-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/sun50i-iommu.c b/drivers/iommu/sun50i-iommu.c index ea6db1341916524..7685b96b2d445a7 100644 --- a/drivers

[PATCH 0/8] iommu: fix a couple of spelling mistakes detected by codespell tool

2021-03-25 Thread Zhen Lei
This detection and correction covers the entire driver/iommu directory. Zhen Lei (8): iommu/pamu: fix a couple of spelling mistakes iommu/omap: Fix spelling mistake "alignement" -> "alignment" iommu/mediatek: Fix spelling mistake "phyiscal" -> "physi

[PATCH 1/8] iommu/pamu: fix a couple of spelling mistakes

2021-03-25 Thread Zhen Lei
There are several spelling mistakes, as follows: Returs ==> Returns defaul ==> default assocaited ==> associated Signed-off-by: Zhen Lei --- drivers/iommu/fsl_pamu.c| 2 +- drivers/iommu/fsl_pamu_domain.c | 2 +- drivers/iommu/fsl_pamu_domain.h | 2 +- 3 files changed, 3 i

[PATCH 1/1] iommu/arm-smmu-v3: add bit field SFM into GERROR_ERR_MASK

2021-03-24 Thread Zhen Lei
: Add initial driver support for ARM SMMUv3 devices") Reported-by: Rui Zhu Signed-off-by: Zhen Lei --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h b/drivers/iommu/arm/arm-smmu-v3/a

[PATCH v7 4/4] ARM: Add support for Hisilicon Kunpeng L3 cache controller

2021-02-01 Thread Zhen Lei
range, the upper 30 bits of the physical address are recorded in registers L3_MAINT_START and L3_MAINT_END, and ignore the lower 6 bits cacheline offset. Signed-off-by: Zhen Lei Reviewed-by: Arnd Bergmann --- arch/arm/mm/Kconfig| 10 ++ arch/arm/mm/Makefile | 1 + arch

[PATCH v7 3/4] dt-bindings: arm: hisilicon: Add binding for Kunpeng L3 cache controller

2021-02-01 Thread Zhen Lei
Add devicetree binding for Hisilicon Kunpeng L3 cache controller. Signed-off-by: Zhen Lei Reviewed-by: Arnd Bergmann --- .../arm/hisilicon/kunpeng-l3cache.yaml| 40 +++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/hisilicon

[PATCH v7 2/4] ARM: hisi: add support for Kunpeng50x SoC

2021-02-01 Thread Zhen Lei
Enable support for the Hisilicon Kunpeng506 and Kunpeng509 SoC. Signed-off-by: Zhen Lei Reviewed-by: Arnd Bergmann --- arch/arm/mach-hisi/Kconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig index 2e980f834a6aa1b

[PATCH v7 1/4] ARM: LPAE: Use phys_addr_t instead of unsigned long in outercache hooks

2021-02-01 Thread Zhen Lei
Note that the outercache functions have been doing this cast before this patch. So now, the cast is just moved into the outercache hook functions. No functional change. Signed-off-by: Zhen Lei Reviewed-by: Arnd Bergmann --- arch/arm/include/asm/outercache.h | 6 ++-- arch/arm/mm/cache-feroceo

[PATCH v7 0/4] ARM: Add support for Hisilicon Kunpeng L3 cache controller

2021-02-01 Thread Zhen Lei
d) +static void __l2c220_inv_range(unsigned long start, unsigned long end) { ... } +static void l2c220_inv_range(phys_addr_t start, phys_addr_t end) +{ + __l2c220_inv_range(start, end); +} Zhen Lei (4): ARM: LPAE: Use phys_addr_t instead of unsigned long in outercache hooks ARM: hisi: add

[PATCH v5 1/1] perf/smmuv3: Don't reserve the PMCG register spaces

2021-02-01 Thread Zhen Lei
register space. When both the SMMU and PMCG drivers reserve their own resources, a resource conflict occurs. To avoid this conflict, don't reserve the PMCG regions. Suggested-by: Robin Murphy Signed-off-by: Zhen Lei Reviewed-by: Robin Murphy --- drivers/perf/arm_smmuv3_pmu.c

[PATCH v5 0/1] perf/smmuv3: Don't reserve the PMCG register spaces

2021-02-01 Thread Zhen Lei
s: If the PMCG register resources are located in the 64KB Page0 of the SMMU, the PMCG driver does not reserve the conflict resources when the SMMUv3 driver has reserved the conflict resources before. Instead, the PMCG driver only performs devm_ioremap() to ensure that it can work properly. Zhen Lei

[PATCH v6 1/4] ARM: LPAE: Use phys_addr_t instead of unsigned long in outercache hooks

2021-01-31 Thread Zhen Lei
Note that the outercache functions have been doing this cast before this patch. So now, the cast is just moved into the outercache hook functions. No functional change. Signed-off-by: Zhen Lei Reviewed-by: Arnd Bergmann --- arch/arm/include/asm/outercache.h | 6 ++-- arch/arm/mm/cache-feroceo

[PATCH v6 4/4] ARM: Add support for Hisilicon Kunpeng L3 cache controller

2021-01-31 Thread Zhen Lei
range, the upper 30 bits of the physical address are recorded in registers L3_MAINT_START and L3_MAINT_END, and ignore the lower 6 bits cacheline offset. Signed-off-by: Zhen Lei --- arch/arm/mm/Kconfig| 10 ++ arch/arm/mm/Makefile | 1 + arch/arm/mm/cache-kunpeng-l3.c

[PATCH v6 2/4] ARM: hisi: add support for Kunpeng50x SoC

2021-01-31 Thread Zhen Lei
Enable support for the Hisilicon Kunpeng506 and Kunpeng509 SoC. Signed-off-by: Zhen Lei --- arch/arm/mach-hisi/Kconfig | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig index 2e980f834a6aa1b..a004eac24b243af 100644 --- a/arch/arm

[PATCH v6 3/4] dt-bindings: arm: hisilicon: Add binding for Kunpeng L3 cache controller

2021-01-31 Thread Zhen Lei
Add devicetree binding for Hisilicon Kunpeng L3 cache controller. Signed-off-by: Zhen Lei Reviewed-by: Arnd Bergmann --- .../arm/hisilicon/kunpeng-l3cache.yaml| 40 +++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/hisilicon

[PATCH v6 0/4] ARM: Add support for Hisilicon Kunpeng L3 cache controller

2021-01-31 Thread Zhen Lei
igned long by adding a middle-tier function. For example: -static void l2c220_inv_range(unsigned long start, unsigned long end) +static void __l2c220_inv_range(unsigned long start, unsigned long end) { ... } +static void l2c220_inv_range(phys_addr_t start, phys_addr_t end) +{ + __l2c220_inv_range(

[PATCH v4 2/2] iommu/arm-smmu-v3: Reserving the entire SMMU register space

2021-01-30 Thread Zhen Lei
ng on SMMU_IDR6.CMDQ_CONTROL_PAGE_LOG2NUMQ. Processing its resource reservation to avoid resource conflict with PMCG is a bit more complicated. Therefore, the resources of the PMCG are not reserved, and the entire SMMU resources are reserved. Signed-off-by: Zhen Lei --- drivers/iommu/arm/arm-smmu-v3/arm

[PATCH v4 1/2] perf/smmuv3: Don't reserve the PMCG register spaces

2021-01-30 Thread Zhen Lei
register space. When both the SMMU and PMCG drivers reserve their own resources, a resource conflict occurs. To avoid this conflict, don't reserve the PMCG regions. Suggested-by: Robin Murphy Signed-off-by: Zhen Lei --- drivers/perf/arm_smmuv3_pmu.c | 25 +++-- 1 file ch

[PATCH v4 0/2] perf/smmuv3: Don't reserve the PMCG register spaces

2021-01-30 Thread Zhen Lei
sources when the SMMUv3 driver has reserved the conflict resources before. Instead, the PMCG driver only performs devm_ioremap() to ensure that it can work properly. Zhen Lei (2): perf/smmuv3: Don't reserve the PMCG register spaces iommu/arm-smmu-v3: Reserving the entire SMMU register space dr

[PATCH v3 0/3] perf/smmuv3: Don't reserve the PMCG register spaces

2021-01-27 Thread Zhen Lei
Therefore, the proper solution is: If the PMCG register resources are located in the 64KB Page0 of the SMMU, the PMCG driver does not reserve the conflict resources when the SMMUv3 driver has reserved the conflict resources before. Instead, the PMCG driver only performs devm_ioremap() to ensure t

[PATCH v3 2/3] perf/smmuv3: Add a MODULE_SOFTDEP() to indicate dependency on SMMU

2021-01-27 Thread Zhen Lei
The MODULE_SOFTDEP() gives user space a hint of the loading sequence. And when command "modprobe arm_smmuv3_pmu" is executed, the arm_smmu_v3.ko is automatically loaded in advance. Signed-off-by: Zhen Lei --- drivers/perf/arm_smmuv3_pmu.c | 1 + 1 file changed, 1 insertion(+) di

[PATCH v3 1/3] perf/smmuv3: Don't reserve the PMCG register spaces

2021-01-27 Thread Zhen Lei
register space. When both the SMMU and PMCG drivers reserve their own resources, a resource conflict occurs. To avoid this conflict, don't reserve the PMCG regions. Suggested-by: Robin Murphy Signed-off-by: Zhen Lei --- drivers/perf/arm_smmuv3_pmu.c | 27 +-- 1

[PATCH v3 3/3] iommu/arm-smmu-v3: Reserving the entire SMMU register space

2021-01-27 Thread Zhen Lei
ng on SMMU_IDR6.CMDQ_CONTROL_PAGE_LOG2NUMQ. Processing its resource reservation to avoid resource conflict with PMCG is a bit more complicated. Therefore, the resources of the PMCG are not reserved, and the entire SMMU resources are reserved. Suggested-by: Robin Murphy Signed-off-by: Zhen Lei --- driver

[PATCH v2 0/3] perf/smmuv3: Don't reserve the PMCG register spaces

2021-01-26 Thread Zhen Lei
MU, the PMCG driver does not reserve the conflict resources when the SMMUv3 driver has reserved the conflict resources before. Instead, the PMCG driver only performs devm_ioremap() to ensure that it can work properly. Zhen Lei (3): perf/smmuv3: Don't reserve the PMCG register spaces perf/

[PATCH v2 1/3] perf/smmuv3: Don't reserve the PMCG register spaces

2021-01-26 Thread Zhen Lei
register space. When both the SMMU and PMCG drivers reserve their own resources, a resource conflict occurs. To avoid this conflict, don't reserve the PMCG regions. Suggested-by: Robin Murphy Signed-off-by: Zhen Lei --- drivers/perf/arm_smmuv3_pmu.c | 27 +-- 1

[PATCH v2 3/3] iommu/arm-smmu-v3: Reserving the entire SMMU register space

2021-01-26 Thread Zhen Lei
ng on SMMU_IDR6.CMDQ_CONTROL_PAGE_LOG2NUMQ. Processing its resource reservation to avoid resource conflict with PMCG is a bit more complicated. Therefore, the resources of the PMCG are not reserved, and the entire SMMU resources are reserved. Suggested-by: Robin Murphy Signed-off-by: Zhen Lei --- driver

[PATCH v2 2/3] perf/smmuv3: Add a MODULE_SOFTDEP() to indicate dependency on SMMU

2021-01-26 Thread Zhen Lei
The MODULE_SOFTDEP() gives user space a hint of the loading sequence. And when command "modprobe arm_smmuv3_pmu" is executed, the arm_smmu_v3.ko is automatically loaded in advance. Signed-off-by: Zhen Lei --- drivers/perf/arm_smmuv3_pmu.c | 1 + 1 file changed, 1 insertion(+) di

[PATCH 1/1] iommu/arm-smmu-v3: Use DEFINE_RES_MEM() to simplify code

2021-01-22 Thread Zhen Lei
No functional change. Signed-off-by: Zhen Lei --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index bca458c00e48a8b

[PATCH 2/2] Revert "iommu/arm-smmu-v3: Don't reserve implementation defined register space"

2021-01-18 Thread Zhen Lei
This reverts commit 52f3fab0067d6fa9e99c1b7f63265dd48ca76046. This problem has been fixed by another patch. The original method had side effects, it was not mapped to the user-specified resource size. The code will become more complex when ECMDQ is supported later. Signed-off-by: Zhen Lei

[PATCH 1/2] perf/smmuv3: Don't reserve the register space that overlaps with the SMMUv3

2021-01-18 Thread Zhen Lei
reserve the corresponding resource again. Otherwise, a resource reservation conflict is reported during boot. Signed-off-by: Zhen Lei --- drivers/perf/arm_smmuv3_pmu.c | 42 -- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/drivers/perf

[PATCH 0/2] Use another method to avoid resource conflicts between the SMMU and PMCG drivers

2021-01-18 Thread Zhen Lei
ure that it can work properly. Zhen Lei (2): perf/smmuv3: Don't reserve the register space that overlaps with the SMMUv3 Revert "iommu/arm-smmu-v3: Don't reserve implementation defined register space" drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 32 +++---

  1   2   3   4   5   6   7   >