[PATCH] bus: bt1-apb: Fix duplicate included clk.h

2020-09-29 Thread Tian Tao
linux/clk.h is included more than once, Remove the one that isn't necessary. Signed-off-by: Tian Tao Acked-by: Serge Semin --- 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 b25ff94..e9e196c 100644 --- a/drivers/bus

[PATCH drm/hisilicon 1/2] drm/hisilicon: Use the same style of variable type in hibmc_drm_de

2020-09-30 Thread Tian Tao
Consistently Use the same style of variable type in hibmc_drm_de.c. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 59 +- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c b

[PATCH drm/hisilicon 2/2] drm/hisilicon: Use the same style of variable type in hibmc_drm_drv

2020-09-30 Thread Tian Tao
Consistently Use the same style of variable type in hibmc_drm_de.c and hibmc_drm_de.h. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 13 ++--- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 8 2 files changed, 10 insertions(+), 11 deletions

[PATCH drm/hisilicon 0/2] Use the same style of variable type

2020-09-30 Thread Tian Tao
patch #1 and #2 Use the same style of variable type in hisilicon drm driver and both are clean up, no actual functional changes. Tian Tao (2): drm/hisilicon: Use the same style of variable type in hibmc_drm_de drm/hisilicon: Use the same style of variable type in hibmc_drm_drv drivers/gpu

[PATCH drm/hisilicon v2 0/2] Use the same style of variable type

2020-10-15 Thread Tian Tao
patch #1 and #2 Use the same style of variable type in hisilicon drm driver and both are clean up, no actual functional changes. Changes since v1: -Change part of unsigned int to size_t. Tian Tao (2): drm/hisilicon: Use the same style of variable type in hibmc_drm_de drm/hisilicon: Use

[PATCH drm/hisilicon v2 1/2] drm/hisilicon: Use the same style of variable type in hibmc_drm_de

2020-10-15 Thread Tian Tao
Consistently Use the same style of variable type in hibmc_drm_de.c. Signed-off-by: Tian Tao Acked-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 59 +- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/hisilicon

[PATCH drm/hisilicon v2 2/2] drm/hisilicon: Use the same style of variable type in hibmc_drm_drv

2020-10-15 Thread Tian Tao
Consistently Use the same style of variable type in hibmc_drm_drv.c and hibmc_drm_drv.h. Signed-off-by: Tian Tao Acked-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 13 ++--- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 8 2 files changed

[PATCH drm/hisilicon v3 0/2] Use the same style of variable type

2020-10-15 Thread Tian Tao
patch #1 and #2 Use the same style of variable type in hisilicon drm driver and both are clean up, no actual functional changes. Changes since v1: -Change part of unsigned int to size_t. Changes since v2: -Modify the type of fb_base and fb_size to resource_size_t. Tian Tao (2): drm/hisilicon

[PATCH drm/hisilicon v3 2/2] drm/hisilicon: Use the same style of variable type in hibmc_drm_drv

2020-10-15 Thread Tian Tao
Consistently Use the same style of variable type in hibmc_drm_drv.c and hibmc_drm_drv.h. Signed-off-by: Tian Tao Acked-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 13 ++--- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 8 2 files changed

[PATCH drm/hisilicon v3 1/2] drm/hisilicon: Use the same style of variable type in hibmc_drm_de

2020-10-15 Thread Tian Tao
Consistently Use the same style of variable type in hibmc_drm_de.c. Signed-off-by: Tian Tao Acked-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 59 +- 1 file changed, 29 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/hisilicon

[PATCH drm/hisilicon v3 0/2] hibmc clean up and code refactoring

2020-08-12 Thread Tian Tao
patch #1 and #3 is clean up, patch #2 is for code refactoring Changes since v1: - Rewrite the commits messages and patch name in #1 - Rewrite the commits message in #2. - Add the new patch #3 Changes since v2: - merge patch #3 into patch #2 Tian Tao (2): drm/hisilicon: Remove the unused

[PATCH drm/hisilicon v3 2/2] drm/hisilicon: Code refactoring for hibmc_drv_de

2020-08-12 Thread Tian Tao
hibmc_drm_private. The whole release problem has been resolved, because struct hibmc_drm_private is allocated with drmm_kzalloc and always released with the DRM device. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 55

[PATCH drm/hisilicon v3 1/2] drm/hisilicon: Remove the unused include statements

2020-08-12 Thread Tian Tao
Remove some unused include statements. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 3 --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 2 -- 3 files changed, 10

[PATCH] drm/hisilicon: Fix build error of no type of module_init

2020-08-12 Thread Tian Tao
(without types) in function of ‘module_exit’ [-Werror=implicit-int] hibmc_drm_drv.c:385:292:1: warning: parameter names (without types) in function declaration [enabled by default] Signed-off-by: Tian Tao Reported-by: kernel test robot --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 1 + 1

[PATCH drm/hisilicon v2 1/3] drm/hisilicon: Remove the unused include statements

2020-08-02 Thread Tian Tao
Remove some unused include statements. v2: edit patch name and commit message. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 3 --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 2 -- 3 files

[PATCH drm/hisilicon v2 0/3] hibmc clean up and code refactoring

2020-08-02 Thread Tian Tao
patch #1 and #3 is clean up, patch #2 is for code refactoring Changes since v1: - Rewrite the commits messages and patch name in #1 - Rewrite the commits message in #2. - Add the new patch #3 Tian Tao (3): drm/hisilicon: Remove the unused include statements drm/hisilicon: Code refactoring

[PATCH drm/hisilicon v2 2/3] drm/hisilicon: Code refactoring for hibmc_drv_de

2020-08-02 Thread Tian Tao
hibmc_drm_private. The whole release problem has been resolved, because struct hibmc_drm_private is allocated with drmm_kzalloc and always released with the DRM device. v2: edit commit message. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 55

[PATCH drm/hisilicon v2 3/3] drm/hisilicon: Rename variables to represent the correct meaning

2020-08-02 Thread Tian Tao
Rename plane to primary_plane in the structure hibmc_drm_private. so it's clear which plane it represents. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions

[PATCH] mmc: sd: Use kobj_to_dev() instead of container_of()

2020-08-23 Thread Tian Tao
Use kobj_to_dev() instead of container_of() Signed-off-by: Tian Tao --- drivers/mmc/core/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index 5a2210c..a0d2c34 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c

[PATCH] i2c: Switch to using the new API kobj_to_dev()

2020-09-14 Thread Tian Tao
Switch to using the new API kobj_to_dev(). Signed-off-by: Tian Tao --- include/linux/i2c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/i2c.h b/include/linux/i2c.h index fc55ea4..5662265 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -344,7

[PATCH drm/hisilicon 3/3] drm/hisilicon: Releasing Resources in the Destroy callback Function

2020-09-20 Thread Tian Tao
Rewrite the desrtoy callback function to release resources. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c b/drivers/gpu/drm/hisilicon

[PATCH drm/hisilicon 0/3] support reading resolutions from EDID

2020-09-20 Thread Tian Tao
patch #1 add a new file to implements i2c adapters, #2 read the resolution from the edid, if that fails, set the resolution to fixed. patch #3 update the destroy callback function to release the i2c adapters. Tian Tao (3): drm/hisilicon: Support i2c driver algorithms for bit-shift adapters

[PATCH drm/hisilicon 2/3] drm/hisilicon: Features to support reading resolutions from EDID

2020-09-20 Thread Tian Tao
Use drm_get_edid to get the resolution, if that fails, set it to a fixed resolution. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 35 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc

[PATCH drm/hisilicon 1/3] drm/hisilicon: Support i2c driver algorithms for bit-shift adapters

2020-09-20 Thread Tian Tao
Adding driver implementation to support i2c driver algorithms for bit-shift adapters, so hibmc will using the interface provided by drm to read edid. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/Makefile| 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 21

[PATCH] mailbox: pcc: remove the .owner when using the platform_create_bundle

2020-09-21 Thread Tian Tao
the platform_create_bundle is a macro that implements __platform_create_bundle has set he parameters module to THIS_MODULE. Signed-off-by: Tian Tao --- drivers/mailbox/pcc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c index ef9ecd1..4b1a2d2

[PATCH] drm/hisilicon: Add the CONFIG_PM_SLEEP

2020-12-10 Thread Tian Tao
add the CONFIG_PM_SLEEP to isolate the function of resume and suspend. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc

[PATCH] perf build: remove -Wnested-externs

2020-12-24 Thread Tian Tao
since commit c93e4aeed1be ("Makefile.extrawarn: remove -Wnested-externs warning") has removed this check, so it's not needed here. Signed-off-by: Tian Tao --- tools/perf/Makefile.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/Makefile.config b/

[PATCH] drm/hisilicon: Use simple encoder

2020-12-27 Thread Tian Tao
The hibmc driver uses empty implementations for its encoders. Replace the code with the generic simple encoder. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/hisilicon

[PATCH] phy: cpcap-usb: remove unneeded conversion to bool

2020-12-10 Thread Tian Tao
Fix the following warning: drivers/phy/motorola/phy-cpcap-usb.c:146:31-36: WARNING: conversion to bool not needed here. Signed-off-by: Tian Tao --- drivers/phy/motorola/phy-cpcap-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/phy/motorola/phy-cpcap-usb.c b

[PATCH] drm/hisilicon: Remove drm_dev_put in hibmc

2020-12-22 Thread Tian Tao
Hibmc use the devm_drm_dev_alloc function in hibmc_pci_probe, if hibmc_pci_probe returns non-zero, devm_drm_dev_alloc will call devm_drm_dev_init, which will call devm_drm_dev_init_release to release drm_dev_put. There is no need for hibmc to call drm_dev_put separately. Signed-off-by: Tian Tao

[PATCH] drm/hisilicon: Add load and unload callback functions

2020-12-22 Thread Tian Tao
Add the callback functions of drm_driver structure member functions load and unload, no need to call load in the hibmc_pci_probe function and unload in the hibmc_pci_remove function. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 17 +++-- 1 file

[PATCH v2] drm/hisilicon: Add load and unload callback functions

2020-12-24 Thread Tian Tao
Add the callback functions of drm_driver structure member functions load and unload, no need to call load in the hibmc_pci_probe function and unload in the hibmc_pci_remove function. v2: remove the hibmc_unload called from hibmc_pic_remove. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon

[PATCH] power: supply: ds2780: Switch to using the new API kobj_to_dev()

2020-12-14 Thread Tian Tao
() drivers/power/supply/ds2780_battery.c:685:60-61: WARNING opportunity for kobj_to_dev() Signed-off-by: Tian Tao --- drivers/power/supply/ds2780_battery.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/power/supply/ds2780_battery.c b/drivers/power/supply

[PATCH] drm/sun4i: hdmi: Use PTR_ERR_OR_ZERO() to simplify code

2020-12-14 Thread Tian Tao
Fixes coccicheck warning: drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c:281:1-3: WARNING: PTR_ERR_OR_ZERO can be used Signed-off-by: Tian Tao --- drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c b

[PATCH] dma-buf: system_heap: Use PTR_ERR_OR_ZERO() to simplify code

2020-12-14 Thread Tian Tao
Fixes coccicheck warning: drivers/dma-buf/heaps/system_heap.c:437:1-3: WARNING: PTR_ERR_OR_ZERO can be used Signed-off-by: Tian Tao --- drivers/dma-buf/heaps/system_heap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dma-buf/heaps/system_heap.c b/drivers/dma

[PATCH] drm/hisilicon: Fix rmmod hibmc_drm failed

2020-12-14 Thread Tian Tao
- not syncing: Oops - BUG: Fatal exception Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c index e3ab765b

[PATCH drm/hisilicon 2/2] drm/hisilicon: Use the new api devm_drm_msi_install

2020-12-15 Thread Tian Tao
Use devm_drm_msi_install to enable pci msi so that pci_disable_msi is not called when hibmc is removed. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc

[PATCH drm/hisilicon 0/2] Add the new api to enable msi

2020-12-15 Thread Tian Tao
patch #1 add the new api to enable pci mis. patch #2 is hibmc driver uses the newly added api to enable msi. Tian Tao (2): drm/irq: Add the new api to enable pci msi drm/hisilicon: Use the new api devm_drm_msi_install drivers/gpu/drm/drm_irq.c | 33

[PATCH drm/hisilicon 1/2] drm/irq: Add the new api to enable pci msi

2020-12-15 Thread Tian Tao
Add new api devm_drm_msi_install() to register interrupts, no need to call pci_disable_msi() when the drm module is removed. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_irq.c | 33 + include/drm/drm_irq.h | 1 + 2 files changed, 34 insertions(+) diff

[PATCH v2] drm/hisilicon: Fix rmmod hibmc_drm failed

2020-12-15 Thread Tian Tao
) ---[ end trace 310d94ee8abef44f ]--- Kernel panic - not syncing: Oops - BUG: Fatal exception v2: update the commit log to indicate the patch that needs to be revert. Signed-off-by: Tian Tao Acked-by: Daniel Vetter --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 6 +- 1 file changed, 5

[PATCH] vt: use flexible-array member instead of zero-length array

2020-12-31 Thread Tian Tao
Use flexible-array member introduced in C99 instead of zero-length array. Most of zero-length array was already taken care in previous patch [1]. Now modified few more cases which were not handled earlier. [1]. https://patchwork.kernel.org/patch/11394197/ Signed-off-by: Tian Tao --- drivers

[PATCH] pcmcia: Switch to using the new API kobj_to_dev()

2021-01-03 Thread Tian Tao
fixed the following coccicheck: drivers/pcmcia/cistpl.c:1557:54-55: WARNING opportunity for kobj_to_dev() drivers/pcmcia/cistpl.c:1584:53-54: WARNING opportunity for kobj_to_dev() Signed-off-by: Tian Tao --- drivers/pcmcia/cistpl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH] drm/nouveau: Use vmemdup_user()

2020-11-11 Thread Tian Tao
Replace alloc and copy with vmemdup_user() Signed-off-by: Tian Tao --- drivers/gpu/drm/nouveau/nouveau_gem.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 787d05e..df986d9

[PATCH] tty: serial: replace spin_lock_irqsave by spin_lock in hard IRQ

2020-11-19 Thread Tian Tao
The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao --- drivers/tty/serial/owl-uart.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/owl-uart.c b/drivers/tty/serial/owl

[PATCH] tty: serial: rad-uart: replace spin_lock_irqsave by spin_lock in hard IRQ

2020-11-19 Thread Tian Tao
The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao --- drivers/tty/serial/rda-uart.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/rda-uart.c b/drivers/tty/serial/rda

[PATCH] drm/ttm: remove unused varibles

2020-11-19 Thread Tian Tao
fixed the following warnings drivers/gpu/drm/nouveau/nouveau_bo.c:1227:17: warning: variable ‘dev’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/nouveau/nouveau_bo.c:1251:17: warning: variable ‘dev’ set but not used [-Wunused-but-set-variable] Signed-off-by: Tian Tao --- drivers

[PATCH] drm/tilcdc: Remove unnecessary THIS_MODULE

2020-11-12 Thread Tian Tao
As THIS_MODULE has been set in platform_driver_register(), so remove it. Signed-off-by: Tian Tao --- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c index 00efc30..4235780

[PATCH] power: supply: Fix missing IRQF_ONESHOT as only threaded handler

2020-11-15 Thread Tian Tao
Coccinelle noticed: drivers/power/supply/ab8500_btemp.c:1107:8-28: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT. Signed-off-by: Tian Tao --- drivers/power/supply/ab8500_btemp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/supply

[PATCH] skd: replace spin_lock_irqsave by spin_lock in hard IRQ

2020-10-20 Thread Tian Tao
The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao --- drivers/block/skd_main.c | 25 ++--- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/drivers/block/skd_main.c b/drivers/block

[PATCH] thermal: replace spin_lock_irqsave by spin_lock in hard IRQ

2020-10-20 Thread Tian Tao
The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao --- drivers/thermal/rcar_thermal.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal

[PATCH] thermal: rcar: replace spin_lock_irqsave by spin_lock in hard IRQ

2020-10-26 Thread Tian Tao
to acquire that lock from hard interrupt context either, so the irqsave() here is pointless in all cases. Signed-off-by: Tian Tao --- drivers/thermal/rcar_thermal.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c

[PATCH] tpm_tis_core: Add the error log when the chip startup failed

2020-10-27 Thread Tian Tao
TPM does not print any log when the startup fails, if there is a problem with the hardware, wait_wartup is the first place to go wrong, so add error log when wait_wartup fails to locate the problem. Signed-off-by: Tian Tao --- drivers/char/tpm/tpm_tis_core.c | 1 + 1 file changed, 1 insertion

[PATCH] mmc: moxart: replace spin_lock_irqsave by spin_lock in hard IRQ

2020-10-29 Thread Tian Tao
The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao --- drivers/mmc/host/moxart-mmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/moxart-mmc.c b/drivers/mmc/host/moxart

[PATCH] crypto: arm64 - move const after static

2020-10-30 Thread Tian Tao
Fixed the WARNING: Move const after static - use 'static const u8' Signed-off-by: Tian Tao --- arch/arm64/crypto/aes-ce-glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/crypto/aes-ce-glue.c b/arch/arm64/crypto/aes-ce-glue.c index 56a5f6f..8ba6f04 100644

[PATCH] drm/hisilicon: Remove redundant null check

2020-10-30 Thread Tian Tao
drm_irq_uninstall can handle the case where dev->irq_enable is false, so Remove redundant null check. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hi

[PATCH] net/core: use xx_zalloc instead xx_alloc and memset

2020-11-18 Thread Tian Tao
use kmem_cache_zalloc instead kmem_cache_alloc and memset. Signed-off-by: Tian Tao --- net/core/skbuff.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index c9a5a3c..3449c1c 100644 --- a/net/core/skbuff.c +++ b/net/core

[PATCH] drm/fsl-dcu: remove redundant platform_get_irq error message

2020-11-09 Thread Tian Tao
Function dev_err() after platform_get_irq() is redundant because platform_get_irq() already prints an error. Signed-off-by: Tian Tao --- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl

[PATCH] rtc: cpcap: Fix missing IRQF_ONESHOT as only threaded handler

2020-11-10 Thread Tian Tao
Coccinelle noticed: drivers/rtc/rtc-cpcap.c:271:7-32: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT drivers/rtc/rtc-cpcap.c:287:7-32: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Signed-off-by: Tian Tao --- drivers/rtc/rtc-cpcap.c | 6

[PATCH] drm/amd/pm: Use kmemdup instead of kmalloc and memcpy

2020-11-10 Thread Tian Tao
Fixes coccicheck warning: drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c:255: 36-43: WARNING opportunity for kmemdup Signed-off-by: Tian Tao --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega12_processpptables.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff

[PATCH] vhost_vdpa: switch to vmemdup_user()

2020-11-10 Thread Tian Tao
Replace opencoded alloc and copy with vmemdup_user() Signed-off-by: Tian Tao --- drivers/vhost/vdpa.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 2754f30..4c39583 100644 --- a/drivers/vhost/vdpa.c +++ b/drivers

[PATCH] drm/msm/dp: remove duplicate include statement

2020-11-10 Thread Tian Tao
linux/rational.h is included more than once, Remove the one that isn't necessary. Signed-off-by: Tian Tao --- drivers/gpu/drm/msm/dp/dp_catalog.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dp/dp_catalog.c b/drivers/gpu/drm/msm/dp/dp_catalog.c index b15b4ce..105fa65

[PATCH] usb: mtu3: replace spin_lock_irqsave by spin_lock in hard IRQ

2020-11-16 Thread Tian Tao
The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao --- drivers/usb/mtu3/mtu3_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/usb/mtu3/mtu3_core.c b/drivers/usb/mtu3/mtu3_core.c

[PATCH] power: supply: ab8500_charger: Fix missing IRQF_ONESHOT as only threaded handler

2020-11-30 Thread Tian Tao
Coccinelle noticed: drivers/power/supply/ab8500_charger.c:3605:8-28: ERROR: Threaded IRQ with no primary handler requested without IRQF_ONESHOT Signed-off-by: Tian Tao --- drivers/power/supply/ab8500_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power

[PATCH] spi: dw: fixed missing resource_size

2020-11-22 Thread Tian Tao
fixed the coccicheck: drivers/spi/spi-dw-bt1.c:220:27-30: ERROR: Missing resource_size with mem. Signed-off-by: Tian Tao --- drivers/spi/spi-dw-bt1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-dw-bt1.c b/drivers/spi/spi-dw-bt1.c index f382dfad..da4f4d8

[PATCH] drm/nouveau/fb/gp102-: use flexible-array member instead of zero-length array

2020-11-23 Thread Tian Tao
fixed the coccicheck: drivers/gpu/drm/nouveau/include/nvfw/hs.h:26:5-9: WARNING use flexible-array member instead. Signed-off-by: Tian Tao --- drivers/gpu/drm/nouveau/include/nvfw/hs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/include/nvfw/hs.h

[PATCH] firmware/psci: psci_checker: fix application of sizeof to pointer

2020-11-23 Thread Tian Tao
sizeof when applied to a pointer typed expression gives the size of the pointer. The proper fix in this particular case is to code sizeof(*cpu_groups) instead of sizeof(cpu_groups). This issue was detected with the help of Coccinelle. Signed-off-by: Tian Tao --- drivers/firmware/psci

[PATCH 1/2] drm/hisilicon: Use managed mode-config init

2020-12-03 Thread Tian Tao
Using drmm_mode_config_init() sets up managed release of modesetting resources. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b

[PATCH] drm/msm/dp: remove duplicate include statement

2020-12-03 Thread Tian Tao
linux/rational.h is included more than once, Remove the one that isn't necessary. Signed-off-by: Tian Tao --- drivers/gpu/drm/msm/dp/dp_catalog.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dp/dp_catalog.c b/drivers/gpu/drm/msm/dp/dp_catalog.c index b15b4ce..105fa65

[PATCH drm/hisilicon 0/3] support reading resolutions from EDID

2020-12-03 Thread Tian Tao
patch #1 add a new file to implements i2c adapters, #2 read the resolution from the edid, if that fails, set the resolution to fixed. patch #3 update the destroy callback function to release the i2c adapters. Tian Tao (3): drm/hisilicon: Support i2c driver algorithms for bit-shift adapters

[PATCH] drm/fsl-dcu: remove redundant platform_get_irq error message

2020-12-03 Thread Tian Tao
Function dev_err() after platform_get_irq() is redundant because platform_get_irq() already prints an error. Signed-off-by: Tian Tao --- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl

[PATCH] drm/nouveau: Use vmemdup_user()

2020-12-03 Thread Tian Tao
Replace alloc and copy with vmemdup_user() Signed-off-by: Tian Tao --- drivers/gpu/drm/nouveau/nouveau_gem.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c index 787d05e..df986d9

[PATCH] gpu: ipu-v3: replace spin_lock_irqsave by spin_lock in hard IRQ

2020-12-03 Thread Tian Tao
The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao --- drivers/gpu/ipu-v3/ipu-image-convert.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-image-convert.c b/drivers

[PATCH] drm/nouveau/fb/gp102-: use flexible-array member instead of zero-length array

2020-12-03 Thread Tian Tao
fixed the coccicheck: drivers/gpu/drm/nouveau/include/nvfw/hs.h:26:5-9: WARNING use flexible-array member instead. Signed-off-by: Tian Tao --- drivers/gpu/drm/nouveau/include/nvfw/hs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/include/nvfw/hs.h

[PATCH drm/hisilicon v3 0/2] support reading resolutions from EDID

2020-12-03 Thread Tian Tao
to I2C_SCL_MASK Tian Tao (2): drm/hisilicon: Support i2c driver algorithms for bit-shift adapters drm/hisilicon: Features to support reading resolutions from EDID drivers/gpu/drm/hisilicon/hibmc/Makefile | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 25 +- drivers/gpu/drm

[PATCH] drm/msm/dsi: Replace spin_lock_irqsave by spin_lock in hard IRQ

2020-12-03 Thread Tian Tao
It is redundant to do irqsave and irqrestore in hardIRQ context. Signed-off-by: Tian Tao --- drivers/gpu/drm/msm/dsi/dsi_host.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index b17ac6c

[PATCH] drm/tilcdc: Remove unnecessary THIS_MODULE

2020-12-03 Thread Tian Tao
As THIS_MODULE has been set in platform_driver_register(), so remove it. Signed-off-by: Tian Tao --- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c index 00efc30..4235780

[PATCH] drm/vc4: Deleted the drm_device declaration

2020-12-03 Thread Tian Tao
drm_modeset_lock.h already declares struct drm_device, so there's no need to declare it in vc4_drv.h Signed-off-by: Tian Tao --- drivers/gpu/drm/vc4/vc4_drv.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4/vc4_drv.h index 8c8d96b..8717a1c

[PATCH] drm/ttm: remove unused varibles

2020-12-03 Thread Tian Tao
fixed the following warnings drivers/gpu/drm/nouveau/nouveau_bo.c:1227:17: warning: variable ‘dev’ set but not used [-Wunused-but-set-variable] drivers/gpu/drm/nouveau/nouveau_bo.c:1251:17: warning: variable ‘dev’ set but not used [-Wunused-but-set-variable] Signed-off-by: Tian Tao --- drivers

[PATCH v2] drm/hisilicon: Delete the entire file hibmc_ttm.c

2020-12-03 Thread Tian Tao
Delete the entire file hibmc_ttm.c. drmm_vram_helper_init() can be called directly from hibmc_load(). hibmc_dumb_create() and hibmc_mode_funcs can go to hibmc_drm_drv.c v2: change Deletted to Delete Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc

[PATCH 2/2] drm/hisilicon: Deletted unused local parameters

2020-12-03 Thread Tian Tao
deletted unused variable ‘priv’. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c index 04fee18

[PATCH drm/hisilicon 0/3] support reading resolutions from EDID

2020-12-03 Thread Tian Tao
patch #1 add a new file to implements i2c adapters, #2 read the resolution from the edid, if that fails, set the resolution to fixed. patch #3 update the destroy callback function to release the i2c adapters. Tian Tao (3): drm/hisilicon: Support i2c driver algorithms for bit-shift adapters

[PATCH drm/hisilicon 2/2] drm/hisilicon: Delete unused local parameters

2020-12-06 Thread Tian Tao
delete unused variable ‘priv’ to avoid warning. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c

[PATCH drm/hisilicon 0/2] Code refactoring

2020-12-06 Thread Tian Tao
patch #1 is used drmm_mode_config_init() to do code refactoring. patch #2 is deleted unused variable ‘priv’ to avoid warning. Tian Tao (2): drm/hisilicon: Use managed mode-config init drm/hisilicon: Delete unused local parameters drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 18

[PATCH drm/hisilicon 1/2] drm/hisilicon: Use managed mode-config init

2020-12-06 Thread Tian Tao
Using drmm_mode_config_init() sets up managed release of modesetting resources. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b

[PATCH] drm/drv: switch to using devm_add_action_or_reset()

2020-12-06 Thread Tian Tao
switch to using devm_add_action_or_reset() instead of devm_add_action. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_drv.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 7343038..b92f7fd 100644

[PATCH drm/hisilicon v2 0/4] Add the new api to install irq

2020-12-01 Thread Tian Tao
the comment error in patch #3, and use devm_add_action_or_reset instead of devm_add_action. Tian Tao (4): drm/hisilicon: Assgin local variable to drm_device drm/hisilicon: Code refactoring for hibmc_drm_drv drm/irq: Add the new api to install irq drm/hisilicon: Use the new api

[PATCH drm/hisilicon v2 3/4] drm/irq: Add the new api to install irq

2020-12-01 Thread Tian Tao
Add new api devm_drm_irq_install() to register interrupts, no need to call drm_irq_uninstall() when the drm module is removed. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_irq.c | 35 +++ include/drm/drm_irq.h | 2 +- 2 files changed, 36 insertions(+), 1

[PATCH drm/hisilicon v2 1/4] drm/hisilicon: Assgin local variable to drm_device

2020-12-01 Thread Tian Tao
Assign local variable to struct drm_device *dev because they are used multiple times within a function. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 30 drivers/gpu/drm/hisilicon

[PATCH drm/hisilicon v2 2/4] drm/hisilicon: Code refactoring for hibmc_drm_drv

2020-12-01 Thread Tian Tao
Use the devm_drm_dev_alloc provided by the drm framework to alloc a struct hibmc_drm_private. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 16 ++-- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 2 +- 2 files changed, 7 insertions(+), 11

[PATCH drm/hisilicon v2 4/4] drm/hisilicon: Use the new api devm_drm_irq_install

2020-12-01 Thread Tian Tao
Use devm_drm_irq_install to register interrupts so that drm_irq_uninstall is not called when hibmc is removed. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[PATCH drm/hisilicon 2/3] drm/irq: Add the new api to install irq

2020-12-02 Thread Tian Tao
Add new api devm_drm_irq_install() to register interrupts, no need to call drm_irq_uninstall() when the drm module is removed. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_irq.c | 35 +++ include/drm/drm_irq.h | 2 +- 2 files changed, 36 insertions(+), 1

[PATCH drm/hisilicon 0/3] Add the new api to install irq

2020-12-02 Thread Tian Tao
patch #1 is code refactorings to use devm_drm_dev_alloc. patch #2 add the new api to install irq, patch #3 is hibmc driver uses the newly added api to register interrupts. Tian Tao (3): drm/hisilicon: Code refactoring for hibmc_drm_drv drm/irq: Add the new api to install irq drm/hisilicon

[PATCH drm/hisilicon 1/3] drm/hisilicon: Code refactoring for hibmc_drm_drv

2020-12-02 Thread Tian Tao
Use the devm_drm_dev_alloc provided by the drm framework to alloc a structure hibmc_drm_private. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 46 +++- drivers/gpu/drm/hisilicon/hibmc

[PATCH drm/hisilicon 3/3] drm/hisilicon: Use the new api devm_drm_irq_install

2020-12-02 Thread Tian Tao
Use devm_drm_irq_install to register interrupts so that drm_irq_uninstall is not called when hibmc is removed. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[PATCH drm/hisilicon v2 2/3] drm/irq: Add the new api to install irq

2020-12-02 Thread Tian Tao
Add new api devm_drm_irq_install() to register interrupts, no need to call drm_irq_uninstall() when the drm module is removed. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_irq.c | 32 include/drm/drm_irq.h | 2 +- 2 files changed, 33 insertions(+), 1

[PATCH drm/hisilicon v2 3/3] drm/hisilicon: Use the new api devm_drm_irq_install

2020-12-02 Thread Tian Tao
Use devm_drm_irq_install to register interrupts so that drm_irq_uninstall is not called when hibmc is removed. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

[PATCH drm/hisilicon v2 1/3] drm/hisilicon: Code refactoring for hibmc_drm_drv

2020-12-02 Thread Tian Tao
Use the devm_drm_dev_alloc provided by the drm framework to alloc a structure hibmc_drm_private. Signed-off-by: Tian Tao Acked-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 46

[PATCH drm/hisilicon v2 0/3] Add the new api to install irq

2020-12-02 Thread Tian Tao
that devm_add_action_or_reset returns the correct value. Tian Tao (3): drm/hisilicon: Code refactoring for hibmc_drm_drv drm/irq: Add the new api to install irq drm/hisilicon: Use the new api devm_drm_irq_install drivers/gpu/drm/drm_irq.c| 32 +++ drivers/gpu/drm

[PATCH] drm/hisilicon: Use managed VRAM-helper initialization

2020-12-02 Thread Tian Tao
updated to use drmm_vram_helper_init() Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 1 - drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c | 19 +++ 3 files changed, 3 insertions(+), 18

[PATCH] drm/hisilicon: Deletted the entire file hibmc_ttm.c

2020-12-03 Thread Tian Tao
Deletted the entire file hibmc_ttm.c. drmm_vram_helper_init() can be called directly from hibmc_load(). hibmc_dumb_create() and hibmc_mode_funcs can go to hibmc_drm_drv.c Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/Makefile| 2 +- drivers/gpu/drm/hisilicon/hibmc

  1   2   >