[PATCH] init/version.c: remove unused including

2021-04-08 Thread Tian Tao
Remove including that don't need it. Signed-off-by: Tian Tao Signed-off-by: Zhiqi Song --- init/version.c | 1 - 1 file changed, 1 deletion(-) diff --git a/init/version.c b/init/version.c index 92afc78..b1329f1 100644 --- a/init/version.c +++ b/init/version.c @@ -13,7 +13,6 @@ #include

[PATCH] sched/fair: Remove the redundant check in numa_id_core

2021-03-27 Thread Tian Tao
the following discussion: https://lore.kernel.org/lkml/20210322101556.gk15...@suse.de/ Signed-off-by: Tian Tao --- kernel/sched/fair.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 6d73bdbb..fbff7f1 100644 --- a/kernel

[PATCH] dma-mapping: make map_benchmark compile into module

2021-03-23 Thread Tian Tao
-by: Tian Tao --- kernel/dma/Kconfig | 2 +- kernel/kthread.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/dma/Kconfig b/kernel/dma/Kconfig index 77b4055..0468293 100644 --- a/kernel/dma/Kconfig +++ b/kernel/dma/Kconfig @@ -223,7 +223,7 @@ config DMA_API_DEBUG_SG

[PATCH] w1: ds2708 and ds2781 use the new API kobj_to_dev()

2021-03-02 Thread Tian Tao
fix the below warnning which reported by coccicheck. /drivers/w1/slaves/w1_ds2780.c:93:60-61: WARNING opportunity for kobj_to_dev(). /drivers/w1/slaves/w1_ds2781.c:90:60-61: WARNING opportunity for kobj_to_dev(). Signed-off-by: Tian Tao --- drivers/w1/slaves/w1_ds2780.c | 2 +- drivers/w1

[PATCH] w1: ds2708 and ds2781 use the new API kobj_to_dev()

2021-03-01 Thread Tian Tao
fix the below warnning: /drivers/w1/slaves/w1_ds2780.c:93:60-61: WARNING opportunity for kobj_to_dev() Signed-off-by: Tian Tao --- drivers/w1/slaves/w1_ds2780.c | 3 ++- drivers/w1/slaves/w1_ds2781.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/w1/slaves

[PATCH] drm/hisilicon: Use drm_crtc_mask()

2021-01-10 Thread Tian Tao
Use drm_crtc_mask() where appropriate. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c index

[PATCH] drm/hisilicon: Delete the empty function mode_valid

2021-01-08 Thread Tian Tao
Based on the drm_connector_mode_valid, if the hibmc implementation of mode_valid only returns MODE_OK, then we can not implement the mode_valid function. Signed-off-by: Tian Tao --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 7 --- 1 file changed, 7 deletions(-) diff --git

[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] 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] 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] 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 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] 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] 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 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 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] 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] 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/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] 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/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] 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/tidss: Use the new api devm_drm_irq_install

2020-12-07 Thread Tian Tao
Use devm_drm_irq_install to register interrupts so that drm_irq_uninstall is not needed to be called. Signed-off-by: Tian Tao --- drivers/gpu/drm/tidss/tidss_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss

[PATCH] iommu/arm-smmu-v3: Fix not checking return value about devm_add_action

2020-12-07 Thread Tian Tao
Use devm_add_action_or_reset to avoid the situation where the release function is not called when devm_add_action returns an error. Signed-off-by: Tian Tao v2: check the return value about evm_add_action_or_reset() --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 5 +++-- 1 file changed, 3

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

2020-12-07 Thread Tian Tao
delete unused variable ‘priv’ to avoid warning. 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 a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm

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

2020-12-07 Thread Tian Tao
Using drmm_mode_config_init() sets up managed release of modesetting resources. v2: Remove the unused structure member variable mode_config_initialized. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 14 +++--- drivers/gpu

[PATCH drm/hisilicon v2 0/2] Code refactoring

2020-12-07 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. Changes since v1: patch #1 is removed the unused structure member variable mode_config_initialized. Tian Tao (2): drm/hisilicon: Use managed mode-config init drm

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

2020-12-07 Thread Tian Tao
delete unused variable ‘priv’ to avoid warning. 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 a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c b/drivers/gpu/drm

[PATCH drm/hisilicon v2 0/2] Code refactoring

2020-12-07 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. Changes since v1: Remove the unused structure member variable mode_config_initialized. Tian Tao (2): drm/hisilicon: Use managed mode-config init drm/hisilicon: Delete

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

2020-12-07 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 | 14 +++--- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 1 - 2 files changed, 3 insertions(+), 12 deletions(-) diff --git

[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 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/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 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] 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] 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 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/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/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/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 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/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 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] 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

[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 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 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 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 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 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 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 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 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] 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] leds: lm3533: Switch to using the new API kobj_to_dev()

2020-11-29 Thread Tian Tao
fixed the following coccicheck: drivers/leds/leds-lm3533.c:611:60-61: WARNING opportunity for kobj_to_dev(). Signed-off-by: Tian Tao --- drivers/leds/leds-lm3533.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/leds/leds-lm3533.c b/drivers/leds/leds-lm3533.c index

[PATCH] hwmon: (pwm-fan): Switch to using the new API kobj_to_dev()

2020-11-27 Thread Tian Tao
fixed the following coccicheck: drivers/hwmon//pwm-fan.c:152:60-61: WARNING opportunity for kobj_to_dev(). Signed-off-by: Tian Tao --- drivers/hwmon/pwm-fan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c index 1f63807

[PATCH] drm/vboxvideo: Used the vram helper

2020-11-26 Thread Tian Tao
if the driver uses drmm_vram_helper_init, there is no need to call drm_vram_helper_release_mm when the drm module get unloaded, as this will done automagically. Signed-off-by: Tian Tao --- drivers/gpu/drm/vboxvideo/vbox_ttm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff

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

2020-11-26 Thread Tian Tao
patch #1 is code refactorings to use devm_drm_dev_alloc and devm_drm_irq_install. 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

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

2020-11-26 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 --- 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

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

2020-11-26 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 | 34 ++ include/drm/drm_irq.h | 2 +- 2 files changed, 35 insertions(+), 1

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

2020-11-26 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_de.c | 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 51 +++- drivers/gpu/drm/hisilicon/hibmc

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

2020-11-25 Thread Tian Tao
fixed the following coccicheck: drivers/hwmon/abx500.c:266:60-61: WARNING opportunity for kobj_to_dev(). Signed-off-by: Tian Tao --- drivers/hwmon/abx500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/abx500.c b/drivers/hwmon/abx500.c index 50e67cd..4b96488

[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] 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] 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/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] 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] 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] 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] 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: 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] 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] 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] 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] 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/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] 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/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] mmc: dw_mmc: replace spin_lock_irqsave by spin_lock in hard IRQ

2020-11-05 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/dw_mmc.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host

[PATCH] mmc: meson-mx-sdio: replace spin_lock_irqsave by spin_lock in hard IRQ

2020-11-02 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/meson-mx-sdio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/meson-mx-sdio.c b/drivers/mmc/host/meson

[PATCH v2] drm: Add the new api to install irq

2020-11-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. v2: fixed the wrong parameter. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_drv.c | 23 +++ include/drm/drm_drv.h | 3 ++- 2 files changed

[PATCH] drm: Add the new api to install irq

2020-11-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_drv.c | 23 +++ include/drm/drm_drv.h | 3 ++- 2 files changed, 25 insertions(+), 1 deletion

[PATCH] drm/irq: Modify the return value type of drm_irq_uninstall

2020-11-02 Thread Tian Tao
There is no driver to use the return value of drm_irq_uninstal, so modify the return value type of drm_irq_uninstal to void. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_irq.c | 13 ++--- include/drm/drm_irq.h | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git

[PATCH] drm/irq: Add irq as false detection

2020-11-02 Thread Tian Tao
Add the detection of false for irq, so that the EINVAL is not returned when dev->irq_enabled is false. Signed-off-by: Tian Tao --- drivers/gpu/drm/drm_irq.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index 09d6e9e..7537a3d 100

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

2020-11-01 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/owl-mmc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/owl-mmc.c b/drivers/mmc/host/owl-mmc.c index

[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

  1   2   >