[PATCH v3 0/2] scsi: pm8001: tiny clean up patches

2021-04-08 Thread Luo Jiaxing
Several error is reported by checkpatch.pl, here are two patches to clean them up. --- v1->v2: 1. modify AAP1_MEMMAP() to inline function 2. set flash_command_table and flash_error_table as const v2->v3: 1. use lower case names for AAP1_MEMMAP --- Luo J

[PATCH v3 1/2] scsi: pm8001: clean up for white space

2021-04-08 Thread Luo Jiaxing
Some errors are found like below when run checkpatch.pl ERROR: space prohibited before that ',' (ctx:WxW) +int pm8001_mpi_general_event(struct pm8001_hba_info *pm8001_ha , void *piomb); It all about white space, so fix them. Signed-off-by: Jianqin Xie Signed-off-by: Luo Jiaxing --

[PATCH v3 2/2] scsi: pm8001: clean up for open brace

2021-04-08 Thread Luo Jiaxing
There are few error about open brace is reported by checkpatch.pl: ERROR: that open brace { should be on the previous line +static struct error_fw flash_error_table[] = +{ So fix them all. Signed-off-by: Jianqin Xie Signed-off-by: Luo Jiaxing --- drivers/scsi/pm8001/pm8001_ctl.c | 6

[PATCH v1 1/2] drm/nouveau/kms/nv50-: Remove several set but not used variables "ret" in disp.c

2021-02-24 Thread Luo Jiaxing
/gpu/drm/nouveau/dispnv50/disp.c: In function ‘nv50_mstm_prepare’: drivers/gpu/drm/nouveau/dispnv50/disp.c:1413:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] 1413 | int ret; | ^~~ Signed-off-by: Luo Jiaxing --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 8

[PATCH v1] drm/nouveau/kms: delete an useless function call in nouveau_framebuffer_new()

2021-02-24 Thread Luo Jiaxing
nouveau_framebuffer_new() call drm_format_info_plane_width() to get a width of plane, but width is not used then, so it's a useless function call here. Signed-off-by: Luo Jiaxing --- drivers/gpu/drm/nouveau/nouveau_display.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff

[PATCH v1] drm/nouveau: delete unused variables "dev" in nouveau_ttm_tt_populate()

2021-02-25 Thread Luo Jiaxing
After switch to new allocator, dev is no longer used here and should be deleted. Fixes: 461619f5c324 ("drm/nouveau: switch to new allocator") Signed-off-by: Luo Jiaxing --- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/d

[PATCH v1] drm/nouveau/device: append a NUL-terminated character for the string which filled by strncpy()

2021-02-25 Thread Luo Jiaxing
stination, and no NUL-terminated is automatically added. There are some potential risks. Signed-off-by: Luo Jiaxing --- drivers/gpu/drm/nouveau/nvkm/engine/device/user.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/user

[PATCH v1] gpio: hisi: delete some unused variables in hisi_gpio_probe()

2020-12-21 Thread Luo Jiaxing
kernel test rebot report that dat, set and clr in hisi_gpio_probe() is unused variables. So delete it. Reported-by: kernel test robot Signed-off-by: Luo Jiaxing --- drivers/gpio/gpio-hisi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpio/gpio-hisi.c b/drivers/gpio/gpio-hisi.c

[PATCH v1 0/2] scsi: libsas: few clean up patches

2021-03-25 Thread Luo Jiaxing
Two types of errors are detected by the checkpatch. 1. Alignment between switches and cases 2. Improper use of some spaces Here are the clean up patches. Luo Jiaxing (2): scsi: libsas: make switch and case at the same indent in sas_to_ata_err() scsi: libsas: clean up for white spaces

[PATCH v1 1/2] scsi: libsas: make switch and case at the same indent in sas_to_ata_err()

2021-03-25 Thread Luo Jiaxing
One checkpatch error is found in sas_to_ata_err() that switch and case is not at the same indent. So fix it. Signed-off-by: Luo Jiaxing --- drivers/scsi/libsas/sas_ata.c | 74 --- 1 file changed, 34 insertions(+), 40 deletions(-) diff --git a/drivers

[PATCH v1 2/2] scsi: libsas: clean up for white spaces

2021-03-25 Thread Luo Jiaxing
Some checkpatch errors are found that some white spaces are missing or being used inappropriately. So fix them all. Signed-off-by: Luo Jiaxing --- drivers/scsi/libsas/sas_discover.c | 2 +- drivers/scsi/libsas/sas_expander.c | 15 --- 2 files changed, 9 insertions(+), 8 deletions

[PATCH v2 0/2] scsi: pm8001: tiny clean up patches

2021-04-07 Thread Luo Jiaxing
Several error is reported by checkpatch.pl, here are two patches to clean them up. --- v1->v2: 1. modify AAP1_MEMMAP() to inline function 2. set flash_command_table and flash_error_table as const --- Luo Jiaxing (2): scsi: pm8001: clean up for white space scsi: pm8

[PATCH v2 2/2] scsi: pm8001: clean up for open brace

2021-04-07 Thread Luo Jiaxing
There are few error about open brace is reported by checkpatch.pl: ERROR: that open brace { should be on the previous line +static struct error_fw flash_error_table[] = +{ So fix them all. Signed-off-by: Jianqin Xie Signed-off-by: Luo Jiaxing --- drivers/scsi/pm8001/pm8001_ctl.c | 6

[PATCH v2 1/2] scsi: pm8001: clean up for white space

2021-04-07 Thread Luo Jiaxing
Some errors are found like below when run checkpatch.pl ERROR: space prohibited before that ',' (ctx:WxW) +int pm8001_mpi_general_event(struct pm8001_hba_info *pm8001_ha , void *piomb); It all about white space, so fix them. Signed-off-by: Jianqin Xie Signed-off-by: Luo Jiaxing --

[PATCH v1 2/2] scsi: pm8001: clean up for open brace

2021-04-02 Thread Luo Jiaxing
There are few error about open brace is reported by checkpatch.pl: ERROR: that open brace { should be on the previous line +static struct error_fw flash_error_table[] = +{ So fix them all. Signed-off-by: Jianqin Xie Signed-off-by: Luo Jiaxing --- drivers/scsi/pm8001/pm8001_ctl.c | 6

[PATCH v1 0/2] scsi: pm8001: tiny clean up patches

2021-04-02 Thread Luo Jiaxing
Several error is reported by checkpatch.pl, here are two patches to clean them up. Luo Jiaxing (2): scsi: pm8001: clean up for white space scsi: pm8001: clean up for open brace drivers/scsi/pm8001/pm8001_ctl.c | 8 +++- drivers/scsi/pm8001/pm8001_hwi.c | 14 +++--- drivers/scsi

[PATCH v1 1/2] scsi: pm8001: clean up for white space

2021-04-02 Thread Luo Jiaxing
Many error are found like below when run checkpatch.pl ERROR: space prohibited before that ',' (ctx:WxW) +int pm8001_mpi_general_event(struct pm8001_hba_info *pm8001_ha , void *piomb); It all about white space, so fix them. Signed-off-by: Jianqin Xie Signed-off-by: Luo Jiaxing --

[PATCH v1 7/8] scsi: megaraid: clean up for trailing statements

2021-04-09 Thread Luo Jiaxing
Following error is reported by checkpatch.pl: ERROR: trailing statements should be on next line + if (iterator++ == adapno) break; So fix them. Signed-off-by: Luo Jiaxing --- drivers/scsi/megaraid/megaraid_mbox.c | 30 -- drivers/scsi/megaraid

[PATCH v1 3/8] scsi: megaraid: clean up for blank lines

2021-04-09 Thread Luo Jiaxing
There are some blank line alerts when running checkpatch.pl, so fix them together here. Signed-off-by: Luo Jiaxing --- drivers/scsi/megaraid/mbox_defs.h| 1 - drivers/scsi/megaraid/megaraid_ioctl.h | 4 --- drivers/scsi/megaraid/megaraid_mm.h | 1 - drivers/scsi

[PATCH v1 1/8] scsi: megaraid: clean up for white space

2021-04-09 Thread Luo Jiaxing
;buf_vaddr, $ ERROR: need consistent spacing around '*' (ctx:WxV) + u32 reply_q_sz = sizeof(u32) *(instance->max_mfi_cmds + 1); so fix them together here. Signed-off-by: Luo Jiaxing --- drivers/scsi/megaraid/mbox_defs.h | 20 +-- drivers/scsi/megaraid

[PATCH v1 5/8] scsi: megaraid: clean up for "foo * bar"

2021-04-09 Thread Luo Jiaxing
Following error is reported by checkpatch.pl: "foo * bar" should be "foo *bar" + struct megasas_iocpacket __user * user_ioc, The format of the pointer variable must be "foo *bar", so fix them. Signed-off-by: Luo Jiaxing --- drivers/scsi/me

[PATCH v1 0/8] scsi: megaraid: some misc clean up patches

2021-04-09 Thread Luo Jiaxing
There are several kinds of error are reported by checkpatch.pl. So fix them together. Luo Jiaxing (8): scsi: megaraid: clean up for white space scsi: megaraid_sas: use parentheses to enclose macros with complex values scsi: megaraid: clean up for blank lines scsi: megaraid: clean up

[PATCH v1 8/8] scsi: megaraid: clean up for static variable initialise to 0

2021-04-09 Thread Luo Jiaxing
Following error is reported by checkpatch.pl: ERROR: do not initialise statics to 0 +static int megaraid_expose_unconf_disks = 0; So fix them. Signed-off-by: Luo Jiaxing --- drivers/scsi/megaraid/megaraid_mbox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH v1 4/8] scsi: megaraid: clean up for open/close brace

2021-04-09 Thread Luo Jiaxing
} + else So fix them all. Signed-off-by: Jianqin Xie Signed-off-by: Luo Jiaxing --- drivers/scsi/megaraid/megaraid_mbox.c | 57 ++--- drivers/scsi/megaraid/megaraid_mm.c | 10 ++--- drivers/scsi/megaraid/megaraid_sas_base.c | 7 ++-- d

[PATCH v1 6/8] scsi: megaraid: clean up for code indent

2021-04-09 Thread Luo Jiaxing
Following error is reported by checkpatch.pl ERROR: code indent should use tabs where possible +^I^Iunsigned long arg)$ So fix them all. Signed-off-by: Luo Jiaxing --- drivers/scsi/megaraid/mega_common.h | 2 +- drivers/scsi/megaraid/megaraid_mm.c | 2 +- drivers/scsi

[PATCH v1 2/8] scsi: megaraid_sas: use parentheses to enclose macros with complex values

2021-04-09 Thread Luo Jiaxing
pter_t *)SCSIHOST2ADAP(SCP2HOST(scp)) So fix those by enclosed by parentheses. Signed-off-by: Jianqin Xie Signed-off-by: Luo Jiaxing --- drivers/scsi/megaraid/mbox_defs.h| 2 +- drivers/scsi/megaraid/mega_common.h | 16 drivers/scsi/megaraid/megaraid_sas.h | 6 +++--- 3

[PATCH v1] gpio: dwapb: mask/unmask IRQ when disable/enable it

2020-11-30 Thread Luo Jiaxing
h it's irq_data too. For example, in __irq_enable(), IRQD_IRQ_DISABLED and IRQD_IRQ_MASKED are both clear, but GPIO controller do not perform unmask. Signed-off-by: Luo Jiaxing --- drivers/gpio/gpio-dwapb.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpio/gpio-dwapb.c b/d

[PATCH v1] gpio: dwapb: fix NULL pointer dereference at dwapb_gpio_suspend()

2020-11-25 Thread Luo Jiaxing
uot;gpio: dwapb: Use resource managed GPIO-chip add data method") Signed-off-by: Luo Jiaxing --- drivers/gpio/gpio-dwapb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c index 2a9046c..4275c18 100644 --- a/drivers/gpio/gpio-dwapb.c

[PATCH v1 3/3] arm64: defconfig: enable GPIO_HISI

2020-12-02 Thread Luo Jiaxing
Enable GPIO controller for HiSilicon's ARM SoC. GPIO is common driver for HiSilicon's ARM SoC and it provide support for some function of I2C and SPI. Signed-off-by: Luo Jiaxing --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/d

[PATCH v1 0/3] gpio: gpio-hisi: Add HiSilicon GPIO support

2020-12-02 Thread Luo Jiaxing
This series is the GPIO driver for HiSilicon's ARM SoC. It provide patches for device driver, MAINTAINER file, and enable gpio-hisi at defconfig. Thanks Jiaxing Luo Jiaxing (3): gpio: gpio-hisi: Add HiSilicon GPIO support MAINTAINERS: Add maintainer for HiSilicon GPIO driver

[PATCH v1 2/3] MAINTAINERS: Add maintainer for HiSilicon GPIO driver

2020-12-02 Thread Luo Jiaxing
Here add maintainer information for HiSilicon GPIO driver. Signed-off-by: Luo Jiaxing --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2daa6ee..8d13419a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7896,6 +7896,13 @@ L: dmaeng

[PATCH v1 1/3] gpio: gpio-hisi: Add HiSilicon GPIO support

2020-12-02 Thread Luo Jiaxing
0x20 } }) } } Signed-off-by: Luo Jiaxing --- drivers/gpio/Kconfig | 11 ++ drivers/gpio/Makefile| 1 + drivers/gpio/gpio-hisi.c | 356 +++ 3 files changed, 368 insertions(+) create mode 100644 drivers/gpio/gpio-hisi.c diff

[PATCH v1] ata: ahci: Disable SXS for Hisilicon Kunpeng920

2021-03-12 Thread Luo Jiaxing
to prevent users from mistakenly considering non-removable disks as removable disks and performing related operations. Signed-off-by: Xingui Yang Signed-off-by: Luo Jiaxing Reviewed-by: John Garry --- drivers/ata/ahci.c| 5 + drivers/ata/ahci.h| 1 + drivers/ata/libahci.c | 5

[PATCH v1] drm/nouveau/device: use snprintf() to replace strncpy() to avoid NUL-terminated string loss

2021-03-08 Thread Luo Jiaxing
stination, and no NUL-terminated string is automatically added. There are some potential risks. So use snprintf() to replace strncpy(). Signed-off-by: Luo Jiaxing --- drivers/gpu/drm/nouveau/nvkm/engine/device/user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/dr

[PATCH for next v1 0/2] gpio: few clean up patches to replace spin_lock_irqsave with spin_lock

2021-02-08 Thread Luo Jiaxing
There is no need to use API with _irqsave in hard IRQ handler, So replace those with spin_lock. Luo Jiaxing (2): gpio: omap: Replace raw_spin_lock_irqsave with raw_spin_lock in omap_gpio_irq_handler() gpio: grgpio: Replace spin_lock_irqsave with spin_lock in grgpio_irq_handler

[PATCH for next v1 0/2] gpio: few clean up patches to replace spin_lock_irqsave with spin_lock

2021-02-08 Thread Luo Jiaxing
There is no need to use API with _irqsave in hard IRQ handler, So replace those with spin_lock. Luo Jiaxing (2): gpio: omap: Replace raw_spin_lock_irqsave with raw_spin_lock in omap_gpio_irq_handler() gpio: grgpio: Replace spin_lock_irqsave with spin_lock in grgpio_irq_handler

[PATCH for next v1 1/2] gpio: omap: Replace raw_spin_lock_irqsave with raw_spin_lock in omap_gpio_irq_handler()

2021-02-08 Thread Luo Jiaxing
There is no need to use API with _irqsave in omap_gpio_irq_handler(), because it already be in a irq-disabled context. Signed-off-by: Luo Jiaxing --- drivers/gpio/gpio-omap.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/gpio/gpio-omap.c b/drivers

[PATCH for next v1 2/2] gpio: grgpio: Replace spin_lock_irqsave with spin_lock in grgpio_irq_handler()

2021-02-08 Thread Luo Jiaxing
There is no need to use API with _irqsave in grgpio_irq_handler(), because it already be in a irq-disabled context. Signed-off-by: Luo Jiaxing --- drivers/gpio/gpio-grgpio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-grgpio.c b/drivers/gpio/gpio

[PATCH for next v1 1/2] gpio: omap: Replace raw_spin_lock_irqsave with raw_spin_lock in omap_gpio_irq_handler()

2021-02-08 Thread Luo Jiaxing
There is no need to use API with _irqsave in omap_gpio_irq_handler(), because it already be in a irq-disabled context. Signed-off-by: Luo Jiaxing --- drivers/gpio/gpio-omap.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/gpio/gpio-omap.c b/drivers

[PATCH v1 2/2] genirq/msi: add an error print when __irq_domain_alloc_irqs() failed

2021-02-08 Thread Luo Jiaxing
(). Signed-off-by: Luo Jiaxing --- kernel/irq/msi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index b338d62..f8729b0 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -418,6 +418,7 @@ int __msi_domain_alloc_irqs(struct irq_domain *domain, struct

[PATCH v1 1/2] irqchip/gic-v3-its: don't set bitmap for LPI which user didn't allocate

2021-02-08 Thread Luo Jiaxing
allocate the same numbers of interrupts next time. Therefore, clear the redundant bits set in LPI bitmap. Fixes: 4615fbc3788d ("genirq/irqdomain: Don't try to free an interrupt that has no mapping") Signed-off-by: Luo Jiaxing --- drivers/irqchip/irq-gic-v3-its.c | 4 1

[PATCH v1 0/2] irqchip/gic-v3-its: don't set bitmap for LPI which user didn't allocate

2021-02-08 Thread Luo Jiaxing
patch set contains a bugfix patch and a patch for appending debugging information. Luo Jiaxing (2): irqchip/gic-v3-its: don't set bitmap for LPI which user didn't allocate genirq/msi: add an error print when __irq_domain_alloc_irqs() failed drivers/irqchip/irq-gic-v3-its.c | 4 ++

[PATCH v2 3/3] arm64: defconfig: enable GPIO_HISI

2020-12-14 Thread Luo Jiaxing
Enable GPIO controller for HiSilicon's ARM SoC. GPIO is common driver for HiSilicon's ARM SoC and it provide support for some function of I2C and SPI. Signed-off-by: Luo Jiaxing --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/d

[PATCH v2 2/3] MAINTAINERS: Add maintainer for HiSilicon GPIO driver

2020-12-14 Thread Luo Jiaxing
Here add maintainer information for HiSilicon GPIO driver. Signed-off-by: Luo Jiaxing --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 2daa6ee..8d13419a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7896,6 +7896,13 @@ L: dmaeng

[PATCH v2 1/3] gpio: gpio-hisi: Add HiSilicon GPIO support

2020-12-14 Thread Luo Jiaxing
0x20 } }) } } Signed-off-by: Luo Jiaxing --- drivers/gpio/Kconfig | 11 ++ drivers/gpio/Makefile| 1 + drivers/gpio/gpio-hisi.c | 328 +++ 3 files changed, 340 insertions(+) create mode 100644 drivers/gpio/gpio-hisi.c diff

[PATCH v2 0/3] gpio: gpio-hisi: Add HiSilicon GPIO support

2020-12-14 Thread Luo Jiaxing
3. Replace "hisi-ngpio" with "ngpios", fix firmware too 4. Direction setting is modified to be handle by generic GPIO 5. Add error code print 6. Some tiny clean up --- Luo Jiaxing (3): gpio: gpio-hisi: Add HiSilicon GPIO support MAINTAINER

[PATCH v2] gpio: dwapb: fix NULL pointer dereference at dwapb_gpio_suspend()

2020-11-27 Thread Luo Jiaxing
managed GPIO-chip add data method") Signed-off-by: Luo Jiaxing Acked-by: Serge Semin Reviewed-by: Andy Shevchenko --- v1->v2: 1. reduce calltrace log 2. delete blank line in tag block --- --- drivers/gpio/gpio-dwapb.c | 2 ++ 1 file changed, 2 insertions(

[PATCH v1] scsi: libsas: set data_dir as DMA_NONE if libata mark qc as NODATA

2020-08-26 Thread Luo Jiaxing
1] ARRE0 [cha: n, def: 0] PER 0 [cha: n, def: 0] Caching (SBC) mode page: WCE 0 [cha: y, def: 0] RCD 0 [cha: n, def: 0] Control mode page: SWP 0 [cha: n, def: 0] Fixes: fa1c1e8f1ece ("[SCSI] Add SATA support to libsas") Sig

[PATCH -next] fs_parse: mark fs_param_bad_value() as static

2020-09-28 Thread Luo Jiaxing
header file define a prototype for this function, so we should mark it as static. Signed-off-by: Luo Jiaxing --- fs/fs_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fs_parser.c b/fs/fs_parser.c index ab53e42..68b0148 100644 --- a/fs/fs_parser.c +++ b/fs/fs_parser.c

[PATCH v1 0/5] Introduce a new helper marco DEFINE_STORE_ATTRIBUTE at seq_file.c

2020-10-22 Thread Luo Jiaxing
We already own DEFINE_SHOW_ATTRIBUTE() helper macro for defining attribute for read-only file, but we found many of drivers also want a helper marco for read-write file too. So we try to add this macro to help decrease code duplication. Luo Jiaxing (5): seq_file: Introduce

[PATCH v1 3/5] scsi: qla2xxx: Introduce DEFINE_STORE_ATTRIBUTE for debugfs

2020-10-22 Thread Luo Jiaxing
Seq instroduce a new helper marco DEFINE_STORE_ATTRIBUTE for Read-Write file, So we apply it at qla2xxx to reduce some duplicate code. Signed-off-by: Luo Jiaxing --- drivers/scsi/qla2xxx/qla_dfs.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers

[PATCH v1 2/5] scsi: hisi_sas: Introduce DEFINE_STORE_ATTRIBUTE for debugfs

2020-10-22 Thread Luo Jiaxing
Seq instroduce a new helper marco DEFINE_STORE_ATTRIBUTE for Read-Write file, So we use it at our code to reduce some duplicate code. Signed-off-by: Luo Jiaxing --- drivers/scsi/hisi_sas/hisi_sas_main.c | 135 -- 1 file changed, 16 insertions(+), 119 deletions

[PATCH v1 5/5] drm/i915/display: Introduce DEFINE_STORE_ATTRIBUTE for debugfs

2020-10-22 Thread Luo Jiaxing
Seq instroduce a new helper marco DEFINE_STORE_ATTRIBUTE for Read-Write file, So we apply it at drm/i915/display to reduce some duplicate code. Signed-off-by: Luo Jiaxing --- .../gpu/drm/i915/display/intel_display_debugfs.c | 55 ++ 1 file changed, 4 insertions(+), 51

[PATCH v1 1/5] seq_file: Introduce DEFINE_STORE_ATTRIBUTE() helper macro

2020-10-22 Thread Luo Jiaxing
We already own DEFINE_SHOW_ATTRIBUTE() helper macro for defining attribute for read-only file, but we found many of drivers want a helper marco for read-write file too. So we try to make one to decrease code duplication. Signed-off-by: Luo Jiaxing --- include/linux/seq_file.h | 15

[PATCH v1 4/5] usb: dwc3: debugfs: Introduce DEFINE_STORE_ATTRIBUTE

2020-10-22 Thread Luo Jiaxing
Seq instroduce a new helper marco DEFINE_STORE_ATTRIBUTE for Read-Write file, So we apply it at dwc3 debugfs to reduce some duplicate code. Signed-off-by: Luo Jiaxing --- drivers/usb/dwc3/debugfs.c | 52 -- 1 file changed, 4 insertions(+), 48

[PATCH v2 5/5] drm/i915/display: Introduce DEFINE_SHOW_STORE_ATTRIBUTE for debugfs

2020-10-30 Thread Luo Jiaxing
Seq instroduce a new helper marco DEFINE_SHOW_STORE_ATTRIBUTE for Read-Write file, So we apply it at drm/i915/display to reduce some duplicate code. Signed-off-by: Luo Jiaxing --- .../gpu/drm/i915/display/intel_display_debugfs.c | 55 ++ 1 file changed, 4 insertions(+), 51

[PATCH v2 0/5] Introduce a new helper marco DEFINE_SHOW_STORE_ATTRIBUTE at seq_file.c

2020-10-30 Thread Luo Jiaxing
We already own DEFINE_SHOW_ATTRIBUTE() helper macro for defining attribute for read-only file, but we found many of drivers also want a helper marco for read-write file too. So we try to add this macro to help decrease code duplication. Luo Jiaxing (5): seq_file: Introduce

[PATCH v2 4/5] usb: dwc3: debugfs: Introduce DEFINE_SHOW_STORE_ATTRIBUTE

2020-10-30 Thread Luo Jiaxing
Seq instroduce a new helper marco DEFINE_SHOW_STORE_ATTRIBUTE for Read-Write file, So we apply it at dwc3 debugfs to reduce some duplicate code. Signed-off-by: Luo Jiaxing --- drivers/usb/dwc3/debugfs.c | 52 -- 1 file changed, 4 insertions(+), 48

[PATCH v2 1/5] seq_file: Introduce DEFINE_SHOW_STORE_ATTRIBUTE() helper macro

2020-10-30 Thread Luo Jiaxing
We already own DEFINE_SHOW_ATTRIBUTE() helper macro for defining attribute for read-only file, but we found many of drivers want a helper marco for read-write file too. So we try to make one to decrease code duplication. Signed-off-by: Luo Jiaxing --- include/linux/seq_file.h | 15

[PATCH v2 2/5] scsi: hisi_sas: Introduce DEFINE_SHOW_STORE_ATTRIBUTE for debugfs

2020-10-30 Thread Luo Jiaxing
Seq instroduce a new helper marco DEFINE_SHOW_STORE_ATTRIBUTE for Read-Write file, So we use it at our code to reduce some duplicate code. Signed-off-by: Luo Jiaxing --- drivers/scsi/hisi_sas/hisi_sas_main.c | 135 -- 1 file changed, 16 insertions(+), 119

[PATCH v2 3/5] scsi: qla2xxx: Introduce DEFINE_SHOW_STORE_ATTRIBUTE for debugfs

2020-10-30 Thread Luo Jiaxing
Seq instroduce a new helper marco DEFINE_SHOW_STORE_ATTRIBUTE for Read-Write file, So we apply it at qla2xxx to reduce some duplicate code. Signed-off-by: Luo Jiaxing --- drivers/scsi/qla2xxx/qla_dfs.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a

[PATCH v4 2/5] scsi: hisi_sas: Introduce DEFINE_SHOW_STORE_ATTRIBUTE for debugfs

2020-11-11 Thread Luo Jiaxing
Seq introduce a new helper macro DEFINE_SHOW_STORE_ATTRIBUTE for Read-Write file, so we use it at our code to reduce some duplicated code. Signed-off-by: Luo Jiaxing --- drivers/scsi/hisi_sas/hisi_sas_main.c | 135 -- 1 file changed, 16 insertions(+), 119

[PATCH v4 5/5] drm/i915/display: Introduce DEFINE_SHOW_STORE_ATTRIBUTE for debugfs

2020-11-11 Thread Luo Jiaxing
Seq introduce a new helper macro DEFINE_SHOW_STORE_ATTRIBUTE for Read-Write file, so we apply it at drm/i915/display to reduce some duplicated code. Signed-off-by: Luo Jiaxing --- .../gpu/drm/i915/display/intel_display_debugfs.c | 55 ++ 1 file changed, 4 insertions(+), 51

[PATCH v4 1/5] seq_file: Introduce DEFINE_SHOW_STORE_ATTRIBUTE() helper macro

2020-11-11 Thread Luo Jiaxing
We already own DEFINE_SHOW_ATTRIBUTE() helper macro for defining attribute for read-only file, but many of drivers want a helper macro for read-write file too. So we make one to decrease code duplication. Signed-off-by: Luo Jiaxing --- include/linux/seq_file.h | 15 +++ 1 file

[PATCH v4 0/5] Introduce a new helper macro DEFINE_SHOW_STORE_ATTRIBUTE at seq_file.c

2020-11-11 Thread Luo Jiaxing
o's comment to v1->v2's revision description. 2.Fixed a spelling mistakes of "marco" to "macro". --- Luo Jiaxing (5): seq_file: Introduce DEFINE_SHOW_STORE_ATTRIBUTE() helper macro scsi: hisi_sas: Introduce DEFINE_SHOW_STORE_ATTRIBUTE for debugfs scsi:

[PATCH v4 3/5] scsi: qla2xxx: Introduce DEFINE_SHOW_STORE_ATTRIBUTE for debugfs

2020-11-11 Thread Luo Jiaxing
Seq introduce a new helper macro DEFINE_SHOW_STORE_ATTRIBUTE for Read-Write file, so we apply it at qla2xxx to reduce some duplicated code. Signed-off-by: Luo Jiaxing --- drivers/scsi/qla2xxx/qla_dfs.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a

[PATCH v4 4/5] usb: dwc3: debugfs: Introduce DEFINE_SHOW_STORE_ATTRIBUTE

2020-11-11 Thread Luo Jiaxing
Seq introduce a new helper macro DEFINE_SHOW_STORE_ATTRIBUTE for Read-Write file, so we apply it at dwc3 debugfs to reduce some duplicated code. While at that, also use DEFINE_SHOW_ATTRIBUTE() where possible. Signed-off-by: Luo Jiaxing Acked-by: Felipe Balbi --- drivers/usb/dwc3/debugfs.c

[PATCH v3 4/5] usb: dwc3: debugfs: Introduce DEFINE_SHOW_STORE_ATTRIBUTE

2020-11-03 Thread Luo Jiaxing
Seq introduce a new helper macro DEFINE_SHOW_STORE_ATTRIBUTE for Read-Write file, so we apply it at dwc3 debugfs to reduce some duplicated code. While at that, also use DEFINE_SHOW_ATTRIBUTE() where possible. Signed-off-by: Luo Jiaxing Acked-by: Felipe Balbi --- drivers/usb/dwc3/debugfs.c

[PATCH v3 1/5] seq_file: Introduce DEFINE_SHOW_STORE_ATTRIBUTE() helper macro

2020-11-03 Thread Luo Jiaxing
We already own DEFINE_SHOW_ATTRIBUTE() helper macro for defining attribute for read-only file, but many of drivers want a helper macro for read-write file too. So we make one to decrease code duplication. Signed-off-by: Luo Jiaxing --- include/linux/seq_file.h | 15 +++ 1 file

[PATCH v3 2/5] scsi: hisi_sas: Introduce DEFINE_SHOW_STORE_ATTRIBUTE for debugfs

2020-11-03 Thread Luo Jiaxing
Seq introduce a new helper macro DEFINE_SHOW_STORE_ATTRIBUTE for Read-Write file, so we use it at our code to reduce some duplicated code. Signed-off-by: Luo Jiaxing --- drivers/scsi/hisi_sas/hisi_sas_main.c | 135 -- 1 file changed, 16 insertions(+), 119

[PATCH v3 0/5] Introduce a new helper marco DEFINE_SHOW_STORE_ATTRIBUTE at seq_file.c

2020-11-03 Thread Luo Jiaxing
to DEFINE_SHOW_STORE_ATTRIBUTE(). v2->v3: 1.Fixed some spelling mistakes in commit. 2.Revised resumes are added for easy tracing. --- Luo Jiaxing (5): seq_file: Introduce DEFINE_SHOW_STORE_ATTRIBUTE() helper macro scsi: hisi_sas: Introduce DEFINE_SHOW_STORE_ATTRIBUTE for debugfs

[PATCH v3 3/5] scsi: qla2xxx: Introduce DEFINE_SHOW_STORE_ATTRIBUTE for debugfs

2020-11-03 Thread Luo Jiaxing
Seq introduce a new helper macro DEFINE_SHOW_STORE_ATTRIBUTE for Read-Write file, so we apply it at qla2xxx to reduce some duplicated code. Signed-off-by: Luo Jiaxing --- drivers/scsi/qla2xxx/qla_dfs.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a

[PATCH v3 5/5] drm/i915/display: Introduce DEFINE_SHOW_STORE_ATTRIBUTE for debugfs

2020-11-03 Thread Luo Jiaxing
Seq introduce a new helper macro DEFINE_SHOW_STORE_ATTRIBUTE for Read-Write file, so we apply it at drm/i915/display to reduce some duplicated code. Signed-off-by: Luo Jiaxing --- .../gpu/drm/i915/display/intel_display_debugfs.c | 55 ++ 1 file changed, 4 insertions(+), 51

[PATCH v2 2/2] scsi: libsas: check link status at ATA prereset() ops

2020-07-25 Thread Luo Jiaxing
value of it. We check status of phy and disk at prereset(). If disk is already offline or phy is disabled, we return -ENOENT to libata to skip disk reset. As prereset() should be best-effort, we should continue to try disk reset beyond the situation we mentioned before. Signed-off-by: Luo

[PATCH v2 1/2] scsi: libsas: delete postreset at sas_sata_ops

2020-07-25 Thread Luo Jiaxing
drop ata_std_postreset() at sas_sata_ops. Signed-off-by: Luo Jiaxing Reviewed-by: John Garry Reviewed-by: Jason Yan --- drivers/scsi/libsas/sas_ata.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index 5d716d3..a7d16d2 100644

[PATCH v2 0/2] scsi: libsas: An improvement on error handle and tidy-up

2020-07-25 Thread Luo Jiaxing
traffic(reduce about 30s depending on the delay setting of libata). Both John garry and Jason Yan participated in the review of the solution and provided good suggestions during the development. Change since v1: - Removed an unnecessary tag from subject. Luo Jiaxing (2): scsi: libsas: delete

[PATCH v1 1/2] {topost} scsi: libsas: delete postreset at sas_sata_ops

2020-07-22 Thread Luo Jiaxing
drop ata_std_postreset() at sas_sata_ops. Signed-off-by: Luo Jiaxing Reviewed-by: John Garry --- drivers/scsi/libsas/sas_ata.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index 5d716d3..a7d16d2 100644 --- a/drivers/scsi/l

[PATCH v1 2/2] {topost} scsi: libsas: check link status at ATA prereset() ops

2020-07-22 Thread Luo Jiaxing
value of it. We check status of phy and disk at prereset(). If disk is already offline or phy is disabled, we return -ENOENT to libata to skip disk reset. As prereset() should be best-effort, we should continue to try disk reset beyond the situation we mentioned before. Signed-off-by: Luo

[PATCH v1 0/2] scsi: libsas: An improvement on error handle and tidy-up

2020-07-22 Thread Luo Jiaxing
traffic(reduce about 30s depending on the delay setting of libata). Both John garry and Jason Yan participated in the review of the solution and provided good suggestions during the development. Luo Jiaxing (2): {topost} scsi: libsas: delete postreset at sas_sata_ops {topost} scsi: libsas: check

[PATCH net-next] net: stmmac: Remove unused variable 'ret' at stmmac_rx_buf1_len()

2020-09-09 Thread Luo Jiaxing
() and dwxgmac2_get_rx_header_len() return 0 by default. Therefore, ret do not need to check the error value and can be directly deleted. Signed-off-by: Luo Jiaxing --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drive

[PATCH net-next] net: stmmac: set get_rx_header_len() as void for it didn't have any error code to return

2020-09-10 Thread Luo Jiaxing
() and dwxgmac2_get_rx_header_len() return 0 only, without any error code to report. Therefore, it's better to define get_rx_header_len() as void. Signed-off-by: Luo Jiaxing --- drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c | 3 +-- drivers/net/ethernet/stmicro/stmmac/dwxgmac2_

[PATCH net-next] net: ethernet: mlx4: Avoid assigning a value to ring_cons but not used it anymore in mlx4_en_xmit()

2020-09-12 Thread Luo Jiaxing
e398 ("net/mlx4_en: Wake TX queues only when there's enough room") Signed-off-by: Luo Jiaxing --- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx

[PATCH] drm/msm/dpu: remove unused variables new_cnt and old_cnt in dpu_encoder_phys_vid_vblank_irq()

2020-09-16 Thread Luo Jiaxing
We found two unused variables new_cnt and old_cnt when build kernel with W=1. So delete it. Signed-off-by: Luo Jiaxing --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1