[PATCH RESEND] mm: fix some typos and code style problems

2021-04-19 Thread Shijie Luo
zsmalloc.c: s/of/or, s/give/given Signed-off-by: Shijie Luo Signed-off-by: Miaohe Lin --- include/linux/gfp.h| 2 +- include/linux/mmzone.h | 2 +- mm/rmap.c | 2 +- mm/swap.c | 4 ++-- mm/swap_state.c| 2 +- mm/z3fold.c| 2 +- mm/zsmalloc.c

[PATCH] mm: fix some typos and code style problems

2021-04-19 Thread Shijie Luo
zsmalloc.c: s/of/or, s/give/given Signed-off-by: Shijie Luo Signed-off-by: Miaohe Lin --- include/linux/gfp.h| 2 +- include/linux/mmzone.h | 2 +- mm/rmap.c | 2 +- mm/swap.c | 4 ++-- mm/swap_state.c| 2 +- mm/z3fold.c| 2 +- mm/zsmalloc.c

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

Re: [PATCH v3] fs/locks: print full locks information

2021-03-10 Thread Luo Longjun
在 2021/3/9 21:37, Jeff Layton 写道: On Thu, 2021-02-25 at 22:58 -0500, Luo Longjun wrote: Commit fd7732e033e3 ("fs/locks: create a tree of dependent requests.") has put blocked locks into a tree. So, with a for loop, we can't check all locks information. To solve this pro

[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 v3] fs/locks: print full locks information

2021-02-25 Thread Luo Longjun
Commit fd7732e033e3 ("fs/locks: create a tree of dependent requests.") has put blocked locks into a tree. So, with a for loop, we can't check all locks information. To solve this problem, we should traverse the tree. Signed-off-by: Luo Longjun ---

[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] 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/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 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 v2 02/24] fs/locks: print full locks information

2021-02-24 Thread Luo Longjun
Commit fd7732e033e3 ("fs/locks: create a tree of dependent requests.") has put blocked locks into a tree. So, with a for loop, we can't check all locks information. To solve this problem, we should traverse the tree by non-recursion DFS. Signed-off-by: Luo Longjun ---

[PATCH] fs/locks: print full locks information

2021-02-20 Thread Luo Longjun
Commit fd7732e033e3 ("fs/locks: create a tree of dependent requests.") has put blocked locks into a tree. So, with a for loop, we can't check all locks information. To solve this problem, we should traverse the tree by DFS. Signed-off-by: Luo Longjun ---

[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 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 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 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 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 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 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 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 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 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 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 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] 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 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] 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 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 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 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] fail_function: remove a redundant mutex unlock

2020-11-10 Thread Luo Meng
Fix a mutex_unlock() issue where before copy_from_user() is not called mutex_locked. Fixes: 4b1a29a7f542 ("error-injection: Support fault injection framework") Reported-by: Hulk Robot Signed-off-by: Luo Meng --- kernel/fail_function.c | 5 +++-- 1 file changed, 3 insertions(+), 2

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

Re: [selftest/bpf] 472547778d: WARNING:at_kernel/bpf/verifier.c:#resolve_pseudo_ldimm64

2020-11-02 Thread Hao Luo
May I ask what's the map that fd 0 is mapped to? IIUC, it looks like the tests (of tracing programs) access the map of fd 0 and the verifier complains the map is not preallocated. I think it's faster just ask here. Thanks, Hao On Thu, Oct 29, 2020 at 1:49 PM Hao Luo wrote: > > S

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

Re: [selftest/bpf] 472547778d: WARNING:at_kernel/bpf/verifier.c:#resolve_pseudo_ldimm64

2020-10-29 Thread Hao Luo
Sure, let me take a look at it. On Thu, Oct 29, 2020 at 1:43 PM Andrii Nakryiko wrote: > > Hao, > > This seems to be coming from resolve_pseudo_ldimm64(), could you > please take a look? Thanks! > > -- Andrii > > On Thu, Oct 29, 2020 at 5:58 AM kernel test robot wrote: > > > > Greeting, > > > >

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

Re: Segfault in pahole 1.18 when building kernel 5.9.1 for arm64

2020-10-20 Thread Hao Luo
On Tue, Oct 20, 2020 at 10:10 AM Andrii Nakryiko wrote: > > On Tue, Oct 20, 2020 at 10:05 AM Hao Luo wrote: > > > > Thanks for reporting this and cc'ing me. I forgot to update the error > > messages when renaming the flags. I will send a patch to fix the error &g

Re: Segfault in pahole 1.18 when building kernel 5.9.1 for arm64

2020-10-20 Thread Hao Luo
Thanks for reporting this and cc'ing me. I forgot to update the error messages when renaming the flags. I will send a patch to fix the error message. The commit commit f3d9054ba8ff1df0fc44e507e3a01c0964cabd42 Author: Hao Luo AuthorDate: Wed Jul 8 13:44:10 2020 -0700 btf_encoder:

[PATCH] mm: mempolicy: fix potential pte_unmap_unlock pte error

2020-10-19 Thread Shijie Luo
to lock the pte resp. page_table_lock again.. Fixes: a7f40cfe3b7a ("mm: mempolicy: make mbind() return -EIO when MPOL_MF_STRICT is specified") Signed-off-by: Shijie Luo Signed-off-by: Miaohe Lin --- mm/mempolicy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) di

Re: [PATCH V2] mm: fix potential pte_unmap_unlock pte error

2020-10-19 Thread Shijie Luo
On 2020/10/19 14:59, Michal Hocko wrote: On Fri 16-10-20 22:11:51, Shijie Luo wrote: When flags don't have MPOL_MF_MOVE or MPOL_MF_MOVE_ALL bits, code breaks and passing origin pte - 1 to pte_unmap_unlock seems like not a good idea. This would really benefit from some improvements.

[PATCH V2] mm: fix potential pte_unmap_unlock pte error

2020-10-16 Thread Shijie Luo
When flags don't have MPOL_MF_MOVE or MPOL_MF_MOVE_ALL bits, code breaks and passing origin pte - 1 to pte_unmap_unlock seems like not a good idea. Signed-off-by: Shijie Luo Signed-off-by: Michal Hocko Signed-off-by: Miaohe Lin --- mm/mempolicy.c | 6 +++--- 1 file changed, 3 inser

Re: [PATCH] mm: fix potential pte_unmap_unlock pte error

2020-10-16 Thread Shijie Luo
On 2020/10/16 22:05, osalva...@suse.de wrote: On 2020-10-16 15:42, Michal Hocko wrote: OK, I finally managed to convince my friday brain to think and grasped what the code is intended to do. The loop is hairy and we want to prevent from spurious EIO when all the pages are on a proper node. So th

Re: [PATCH] mm: fix potential pte_unmap_unlock pte error

2020-10-15 Thread Shijie Luo
On 2020/10/15 20:58, osalva...@suse.de wrote: On 2020-10-15 14:15, Shijie Luo wrote: When flags don't have MPOL_MF_MOVE or MPOL_MF_MOVE_ALL bits, code breaks  and passing origin pte - 1 to pte_unmap_unlock seems like not a good idea. Signed-off-by: Shijie Luo Signed-off-by: linm

[PATCH] mm: fix potential pte_unmap_unlock pte error

2020-10-15 Thread Shijie Luo
When flags don't have MPOL_MF_MOVE or MPOL_MF_MOVE_ALL bits, code breaks and passing origin pte - 1 to pte_unmap_unlock seems like not a good idea. Signed-off-by: Shijie Luo Signed-off-by: linmiaohe --- mm/mempolicy.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v2] selftests/bpf: Fix test_verifier after introducing resolve_pseudo_ldimm64

2020-10-06 Thread Hao Luo
Ack. Sent one with just deletion. Hao On Tue, Oct 6, 2020 at 7:04 PM Alexei Starovoitov wrote: > > On Tue, Oct 06, 2020 at 06:23:13PM -0700, Hao Luo wrote: > > Commit 4976b718c355 ("bpf: Introduce pseudo_btf_id") switched > > the order of check_subprogs() a

[PATCH v3] selftests/bpf: Fix test_verifier after introducing resolve_pseudo_ldimm64

2020-10-06 Thread Hao Luo
k for subprogs comes first. It's now pointless to validate that half of ldimm64 won't be the last instruction. Tested: # ./test_verifier Summary: 1129 PASSED, 537 SKIPPED, 0 FAILED and the full set of bpf selftests. Fixes: 4976b718c355 ("bpf: Introduce pseudo_btf_id") Sig

[PATCH v2] selftests/bpf: Fix test_verifier after introducing resolve_pseudo_ldimm64

2020-10-06 Thread Hao Luo
k for subprogs comes first. It's now pointless to validate that half of ldimm64 won't be the last instruction. Tested: # ./test_verifier Summary: 1129 PASSED, 537 SKIPPED, 0 FAILED and the full set of bpf selftests. Fixes: 4976b718c355 ("bpf: Introduce pseudo_btf_id") Sig

Re: [PATCH] bpf: Fix test_verifier after introducing resolve_pseudo_ldimm64

2020-10-06 Thread Hao Luo
On Tue, Oct 6, 2020 at 5:43 PM Andrii Nakryiko wrote: > > On Tue, Oct 6, 2020 at 4:45 PM Hao Luo wrote: > > > > Commit 4976b718c355 ("bpf: Introduce pseudo_btf_id") switched > > the order of check_subprogs() and resolve_pseudo_ldimm() in > > the verif

[PATCH] bpf: Fix test_verifier after introducing resolve_pseudo_ldimm64

2020-10-06 Thread Hao Luo
k for subprogs comes first. Fix the expection of the error message. Tested: # ./test_verifier Summary: 1130 PASSED, 538 SKIPPED, 0 FAILED and the full set of bpf selftests. Fixes: 4976b718c355 ("bpf: Introduce pseudo_btf_id") Signed-off-by: Hao Luo --- tools/testing/selftests/bpf/ver

Re: [PATCH bpf-next v4 1/6] bpf: Introduce pseudo_btf_id

2020-10-06 Thread Hao Luo
Ack. Will do. On Tue, Oct 6, 2020 at 12:05 PM Alexei Starovoitov wrote: > > On Tue, Sep 29, 2020 at 4:50 PM Hao Luo wrote: > > > > - ret = replace_map_fd_with_map_ptr(env); > > - if (ret < 0) > > - goto skip_full_check; > > - &g

Re: [PATCH bpf-next v4 0/6] bpf: BTF support for ksyms

2020-10-02 Thread Hao Luo
Thanks, Alexei and Andrii and other reviewers for the comments. It's a pleasure to work with you and contribute to bpf. Hao On Fri, Oct 2, 2020 at 3:16 PM Alexei Starovoitov wrote: > > On Tue, Sep 29, 2020 at 11:48 PM Hao Luo wrote: > > > > Ah, this is the bug in pahole

Re: [PATCH bpf-next v4 0/6] bpf: BTF support for ksyms

2020-09-29 Thread Hao Luo
PM Alexei Starovoitov wrote: > > On Tue, Sep 29, 2020 at 4:50 PM Hao Luo wrote: > > > > v3 -> v4: > > - Rebasing > > - Cast bpf_[per|this]_cpu_ptr's parameter to void __percpu * before > >passing into per_cpu_ptr. > &g

Re: [PATCH bpf-next v3 4/6] bpf: Introduce bpf_per_cpu_ptr()

2020-09-29 Thread Hao Luo
On Mon, Sep 21, 2020 at 11:11 AM Andrii Nakryiko wrote: > > On Thu, Sep 17, 2020 at 12:14 PM Hao Luo wrote: > > > > I need to cast the pointer to "const void __percpu *" before passing > > into per_cpu_ptr. I will update and resend. > > You can try jus

Re: [PATCH bpf-next v3 4/6] bpf: Introduce bpf_per_cpu_ptr()

2020-09-29 Thread Hao Luo
Hi, Andrii, Thanks for taking a look. Sorry for the late reply. Spent some time on rebasing and fixing a build issue in my development environment that started happening in v5.9. On Mon, Sep 21, 2020 at 11:09 AM Andrii Nakryiko wrote: > > On Wed, Sep 16, 2020 at 3:39 PM Hao Luo

[PATCH bpf-next v4 3/6] selftests/bpf: ksyms_btf to test typed ksyms

2020-09-29 Thread Hao Luo
: Hao Luo --- .../testing/selftests/bpf/prog_tests/ksyms.c | 38 -- .../selftests/bpf/prog_tests/ksyms_btf.c | 70 +++ .../selftests/bpf/progs/test_ksyms_btf.c | 23 ++ tools/testing/selftests/bpf/trace_helpers.c | 27 +++ tools/testing/selftests/bpf

[PATCH bpf-next v4 1/6] bpf: Introduce pseudo_btf_id

2020-09-29 Thread Hao Luo
y: Andrii Nakryiko Signed-off-by: Hao Luo --- include/linux/bpf_verifier.h | 7 ++ include/linux/btf.h| 15 include/uapi/linux/bpf.h | 36 +++--- kernel/bpf/btf.c | 15 kernel/bpf/verifier.c | 125 +

  1   2   3   4   >