Re: [PATCH v3] scsi: Introduce sdev_printk_ratelimited to throttle frequent printk

2018-04-03 Thread Jason Yan
an Hu Reviewed-by: Bart Van Assche CC: BartVanAssche CC: Petr Mladek CC: Sergey Senozhatsky CC: Martin K. Petersen CC: "James E.J. Bottomley" CC: Tejun Heo CC: JasonYan In my machine it works fine. Tested-by: Jason Yan

[PATCH 0/8] libsas: Support swapping disks and SATA phy link rate matching the pathway

2018-05-28 Thread Jason Yan
a devices class and id to ensure the same device after flutter and so on. Jason Yan (8): scsi: libsas: delete dead code in scsi_transport_sas.c scsi: libsas: check the lldd callback correctly scsi: libsas: always unregister the old device if going to discover new scsi: libsas: trig

[PATCH 4/8] scsi: libsas: trigger a new revalidation to discover the device

2018-05-28 Thread Jason Yan
sysfs complain of creating duplicate filename. Fix this by doing the replacement in two steps. The first revalidation only delete the old device and trigger a new revalidation. The second revalidation discover the new device. Signed-off-by: Jason Yan CC: chenxiang CC: John Garry CC: Johannes

[PATCH 2/8] scsi: libsas: check the lldd callback correctly

2018-05-28 Thread Jason Yan
We are using lldd_port_deformed so we'd better check if lldd_port_deformed is NULL. Signed-off-by: Jason Yan CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams CC: Hannes Reinecke --- drivers/scsi/libsas/sas_discover.c | 2

[PATCH 1/8] scsi: libsas: delete dead code in scsi_transport_sas.c

2018-05-28 Thread Jason Yan
This code is dead and no clue implies that it will be back again. Signed-off-by: Jason Yan CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams CC: Hannes Reinecke --- drivers/scsi/scsi_transport_sas.c | 2 -- 1 file changed, 2

[PATCH 3/8] scsi: libsas: always unregister the old device if going to discover new

2018-05-28 Thread Jason Yan
e. We cannot just leave the device there and bring up the new. Signed-off-by: Jason Yan CC: chenxiang CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams CC: Hannes Reinecke --- drivers/scsi/libsas/sas_expander.c | 13 + 1

[PATCH 6/8] scsi: libsas: reset the phy state and address if discover failed

2018-05-28 Thread Jason Yan
reset the phy state and address to the initial value. Then in the next revalidation the device will be discovered agian. Signed-off-by: Jason Yan CC: Xiaofei Tan CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams CC: Hannes Reinecke

[PATCH 7/8] scsi: libsas: fix issue of swapping two sas disks

2018-05-28 Thread Jason Yan
can all phys, and then unregisterring devices. Only when no devices need to be unregisterred, go to the next step to discover new devices. If there are devices need unregister, unregister those devices and raise a new bcast. The next revalidation will process the discovering of the new devices. Signe

[PATCH 8/8] scsi: libsas: support SATA phy link rate unmatch the pathway

2018-05-28 Thread Jason Yan
may pass through. Remember the minimum linkrate of the pathway and set the SATA phy linkrate to it using the SMP PHY CONTROL function. Signed-off-by: Jason Yan CC: chenxiang CC: John Garry CC: chenqilin CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Wil

[PATCH 5/8] scsi: libsas: check if the same sata device when flutter

2018-05-28 Thread Jason Yan
d-off-by: Jason Yan Reviewed-by: John Garry CC: chenxiang CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams CC: Tejun Heo CC: Hannes Reinecke --- drivers/ata/libata-core.c | 3 ++- drivers/scsi/libsas/sas_ata.c

[PATCH] ata: ahci: fix race between EH and ahci interrupt

2019-04-02 Thread Jason Yan
host_eh_scheduled is 0 and scsi EH thread will not be scheduled again, and the ata port remain freeze and will never be enabled. If EH thread is already running, no need to freeze port and schedule EH again. Reported-by: luojian Signed-off-by: Jason Yan --- drivers/ata/libahci.c | 10 -- 1 file

Re: [PATCH 00/11] scsi: libsas: Remove in_interrupt() check

2020-12-22 Thread Jason Yan
在 2020/12/21 18:13, John Garry 写道: On 18/12/2020 20:43, Ahmed S. Darwish wrote: Folks, In the discussion about preempt count consistency across kernel configurations:    https://lkml.kernel.org/r/20200914204209.256266...@linutronix.de it was concluded that the usage of in_interrupt() and re

Re: [PATCH v2] scsi: libsas: Reset num_scatter if libata mark qc as NODATA

2021-03-18 Thread Jason Yan
在 2021/3/19 6:56, Jolly Shah 写道: When the cache_type for the scsi device is changed, the scsi layer issues a MODE_SELECT command. The caching mode details are communicated via a request buffer associated with the scsi command with data direction set as DMA_TO_DEVICE (scsi_mode_select). When th

Re: [PATCH] scsi: libsas: Reset num_scatter if libata mark qc as NODATA

2021-03-16 Thread Jason Yan
nctional errors? The code looks good to me, Reviewed-by: Jason Yan

Re: [PATCH v6 00/12] implement KASLR for powerpc/fsl_booke/32

2019-09-09 Thread Jason Yan
Hi Scott, On 2019/8/28 12:05, Scott Wood wrote: On Fri, 2019-08-09 at 18:07 +0800, Jason Yan wrote: This series implements KASLR for powerpc/fsl_booke/32, as a security feature that deters exploit attempts relying on knowledge of the location of kernel internals. Since CONFIG_RELOCATABLE has

Re: [PATCH v6 00/12] implement KASLR for powerpc/fsl_booke/32

2019-08-28 Thread Jason Yan
On 2019/8/28 12:05, Scott Wood wrote: On Fri, 2019-08-09 at 18:07 +0800, Jason Yan wrote: This series implements KASLR for powerpc/fsl_booke/32, as a security feature that deters exploit attempts relying on knowledge of the location of kernel internals. Since CONFIG_RELOCATABLE has already

Re: [PATCH v6 00/12] implement KASLR for powerpc/fsl_booke/32

2019-08-28 Thread Jason Yan
On 2019/8/28 12:59, Scott Wood wrote: On Tue, 2019-08-27 at 23:05 -0500, Scott Wood wrote: On Fri, 2019-08-09 at 18:07 +0800, Jason Yan wrote: Freescale Book-E parts expect lowmem to be mapped by fixed TLB entries(TLB1). The TLB1 entries are not suitable to map the kernel directly in a

Re: [PATCH v6 06/12] powerpc/fsl_booke/32: implement KASLR infrastructure

2019-08-28 Thread Jason Yan
On 2019/8/28 13:47, Christophe Leroy wrote: Le 28/08/2019 à 06:54, Scott Wood a écrit : On Fri, Aug 09, 2019 at 06:07:54PM +0800, Jason Yan wrote: This patch add support to boot kernel from places other than KERNELBASE. Since CONFIG_RELOCATABLE has already supported, what we need to do is

[PATCH] soc/fsl/qbman: fix return value error in bm_shutdown_pool()

2019-08-21 Thread Jason Yan
as initialized prior to bootup") Signed-off-by: Jason Yan --- drivers/soc/fsl/qbman/bman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/fsl/qbman/bman.c b/drivers/soc/fsl/qbman/bman.c index f4fb527d8301..c5dd026fe889 100644 --- a/drivers/soc/fsl/qbman/bman.c +

[PATCH -next] moxtet: remove set but not used variable 'dummy'

2019-08-21 Thread Jason Yan
Fixes gcc '-Wunused-but-set-variable' warning: drivers/bus/moxtet.c: In function moxtet_remove: drivers/bus/moxtet.c:822:6: warning: variable dummy set but not used [-Wunused-but-set-variable] Signed-off-by: Jason Yan --- drivers/bus/moxtet.c | 3 +-- 1 file changed, 1 inser

Re: [PATCH v6 04/12] powerpc/fsl_booke/32: introduce create_tlb_entry() helper

2019-08-27 Thread Jason Yan
Hi Scott, Thanks for your reply. On 2019/8/28 6:07, Scott Wood wrote: On Fri, Aug 09, 2019 at 06:07:52PM +0800, Jason Yan wrote: Add a new helper create_tlb_entry() to create a tlb entry by the virtual and physical address. This is a preparation to support boot kernel at a randomized address

Re: [PATCH v6 06/12] powerpc/fsl_booke/32: implement KASLR infrastructure

2019-08-28 Thread Jason Yan
On 2019/8/28 12:54, Scott Wood wrote: On Fri, Aug 09, 2019 at 06:07:54PM +0800, Jason Yan wrote: This patch add support to boot kernel from places other than KERNELBASE. Since CONFIG_RELOCATABLE has already supported, what we need to do is map or copy kernel to a proper place and relocate

Re: [PATCH v6 00/12] implement KASLR for powerpc/fsl_booke/32

2019-08-26 Thread Jason Yan
A polite ping :) What else should I do now? Thanks On 2019/8/19 14:12, Jason Yan wrote: Hi Michael, Is there anything more I should do to get this feature meeting the requirements of the mainline? Thanks, Jason On 2019/8/9 18:07, Jason Yan wrote: This series implements KASLR for powerpc

[PATCH 1/2] reiserfs: remove set but not used variable in journal.c

2019-08-26 Thread Jason Yan
Fix the following gcc warning: fs/reiserfs/journal.c: In function flush_used_journal_lists: fs/reiserfs/journal.c:1791:6: warning: variable ret set but not used [-Wunused-but-set-variable] Signed-off-by: Jason Yan --- fs/reiserfs/journal.c | 7 +++ 1 file changed, 3 insertions(+), 4

[PATCH 2/2] reiserfs: remove set but not used variable in do_balan.c

2019-08-26 Thread Jason Yan
Fix the following gcc warning: fs/reiserfs/do_balan.c: In function balance_leaf_insert_right: fs/reiserfs/do_balan.c:629:6: warning: variable ret set but not used [-Wunused-but-set-variable] Signed-off-by: Jason Yan --- fs/reiserfs/do_balan.c | 3 +-- 1 file changed, 1 insertion(+), 2

Re: [PATCH v7 00/12] implement KASLR for powerpc/fsl_booke/32

2019-10-08 Thread Jason Yan
Hi Scott, Would you please take sometime to test this? Thank you so much. On 2019/9/24 13:52, Jason Yan wrote: Hi Scott, Can you test v7 to see if it works to load a kernel at a non-zero address? Thanks, On 2019/9/20 17:45, Jason Yan wrote: This series implements KASLR for powerpc

Re: [PATCH v7 00/12] implement KASLR for powerpc/fsl_booke/32

2019-10-09 Thread Jason Yan
Hi Scott, On 2019/10/9 15:13, Scott Wood wrote: On Wed, 2019-10-09 at 14:10 +0800, Jason Yan wrote: Hi Scott, Would you please take sometime to test this? Thank you so much. On 2019/9/24 13:52, Jason Yan wrote: Hi Scott, Can you test v7 to see if it works to load a kernel at a non-zero

[PATCH v7 06/12] powerpc/fsl_booke/32: implement KASLR infrastructure

2019-09-20 Thread Jason Yan
suitable to map the kernel directly in a randomized region, so we chose to copy the kernel to a proper place and restart to relocate. The offset of the kernel was not randomized yet(a fixed 64M is set). We will randomize it in the next patch. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael

[PATCH v7 01/12] powerpc: unify definition of M_IF_NEEDED

2019-09-20 Thread Jason Yan
M_IF_NEEDED is defined too many times. Move it to a common place and rename it to MAS2_M_IF_NEEDED which is much readable. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook

[PATCH v7 07/12] powerpc/fsl_booke/32: randomize the kernel image offset

2019-09-20 Thread Jason Yan
/kaslr.c such as rotate_xor(). Credit goes to Kees and Ard. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook Reviewed-by: Diana Craciun Tested-by: Diana Craciun Reviewed-by

[PATCH v7 09/12] powerpc/fsl_booke/kaslr: support nokaslr cmdline parameter

2019-09-20 Thread Jason Yan
One may want to disable kaslr when boot, so provide a cmdline parameter 'nokaslr' to support this. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook Reviewed

[PATCH v7 08/12] powerpc/fsl_booke/kaslr: clear the original kernel if randomized

2019-09-20 Thread Jason Yan
The original kernel still exists in the memory, clear it now. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook Reviewed-by: Christophe Leroy Reviewed-by: Diana Craciun

[PATCH v7 04/12] powerpc/fsl_booke/32: introduce create_kaslr_tlb_entry() helper

2019-09-20 Thread Jason Yan
Add a new helper create_kaslr_tlb_entry() to create a tlb entry by the virtual and physical address. This is a preparation to support boot kernel at a randomized address. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul

[PATCH v7 10/12] powerpc/fsl_booke/kaslr: dump out kernel offset information on panic

2019-09-20 Thread Jason Yan
When kaslr is enabled, the kernel offset is different for every boot. This brings some difficult to debug the kernel. Dump out the kernel offset when panic so that we can easily debug the kernel. This code is derived from x86/arm64 which has similar functionality. Signed-off-by: Jason Yan Cc

[PATCH v7 05/12] powerpc/fsl_booke/32: introduce reloc_kernel_entry() helper

2019-09-20 Thread Jason Yan
Add a new helper reloc_kernel_entry() to jump back to the start of the new kernel. After we put the new kernel in a randomized place we can use this new helper to enter the kernel and begin to relocate again. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy

[PATCH v7 02/12] powerpc: move memstart_addr and kernstart_addr to init-common.c

2019-09-20 Thread Jason Yan
These two variables are both defined in init_32.c and init_64.c. Move them to init-common.c and make them __ro_after_init. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook

[PATCH v7 03/12] powerpc: introduce kernstart_virt_addr to store the kernel base

2019-09-20 Thread Jason Yan
Now the kernel base is a fixed value - KERNELBASE. To support KASLR, we need a variable to store the kernel base. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook Reviewed

[PATCH v7 11/12] powerpc/fsl_booke/kaslr: export offset in VMCOREINFO ELF notes

2019-09-20 Thread Jason Yan
Like all other architectures such as x86 or arm64, include KASLR offset in VMCOREINFO ELF notes to assist in debugging. After this, we can use crash --kaslr option to parse vmcore generated from a kaslr kernel. Note: The crash tool needs to support --kaslr too. Signed-off-by: Jason Yan Cc

[PATCH v7 12/12] powerpc/fsl_booke/32: Document KASLR implementation

2019-09-20 Thread Jason Yan
Add document to explain how we implement KASLR for fsl_booke32. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook --- Documentation/powerpc/kaslr-booke32.rst | 42

[PATCH v7 00/12] implement KASLR for powerpc/fsl_booke/32

2019-09-20 Thread Jason Yan
command_line - Do not print kaslr offset if kaslr is disabled Jason Yan (12): powerpc: unify definition of M_IF_NEEDED powerpc: move memstart_addr and kernstart_addr to init-common.c powerpc: introduce kernstart_virt_addr to store the kernel base powerpc/fsl_booke/32: introduce create_ka

Re: [PATCH v7 00/12] implement KASLR for powerpc/fsl_booke/32

2019-09-23 Thread Jason Yan
Hi Scott, Can you test v7 to see if it works to load a kernel at a non-zero address? Thanks, On 2019/9/20 17:45, Jason Yan wrote: This series implements KASLR for powerpc/fsl_booke/32, as a security feature that deters exploit attempts relying on knowledge of the location of kernel internals

Re: [PATCH v6 00/12] implement KASLR for powerpc/fsl_booke/32

2019-08-18 Thread Jason Yan
Hi Michael, Is there anything more I should do to get this feature meeting the requirements of the mainline? Thanks, Jason On 2019/8/9 18:07, Jason Yan wrote: This series implements KASLR for powerpc/fsl_booke/32, as a security feature that deters exploit attempts relying on knowledge of

[RFC PATCH 02/10] powerpc: move memstart_addr and kernstart_addr to init-common.c

2019-07-17 Thread Jason Yan
These two variables are both defined in init_32.c and init_64.c. Move them to init-common.c. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook --- arch/powerpc/mm/init

[RFC PATCH 01/10] powerpc: unify definition of M_IF_NEEDED

2019-07-17 Thread Jason Yan
M_IF_NEEDED is defined too many times. Move it to a common place. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook --- arch/powerpc/include/asm/nohash/mmu-book3e.h | 10

[RFC PATCH 10/10] powerpc/fsl_booke/kaslr: dump out kernel offset information on panic

2019-07-17 Thread Jason Yan
When kaslr is enabled, the kernel offset is different for every boot. This brings some difficult to debug the kernel. Dump out the kernel offset when panic so that we can easily debug the kernel. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin

[RFC PATCH 08/10] powerpc/fsl_booke/kaslr: clear the original kernel if randomized

2019-07-17 Thread Jason Yan
The original kernel still exists in the memory, clear it now. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook --- arch/powerpc/kernel/kaslr_booke.c | 11 +++ arch

[RFC PATCH 05/10] powerpc/fsl_booke/32: introduce reloc_kernel_entry() helper

2019-07-17 Thread Jason Yan
Add a new helper reloc_kernel_entry() to jump back to the start of the new kernel. After we put the new kernel in a randomized place we can use this new helper to enter the kernel and begin to relocate again. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy

[RFC PATCH 03/10] powerpc: introduce kimage_vaddr to store the kernel base

2019-07-17 Thread Jason Yan
Now the kernel base is a fixed value - KERNELBASE. To support KASLR, we need a variable to store the kernel base. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook --- arch

[RFC PATCH 06/10] powerpc/fsl_booke/32: implement KASLR infrastructure

2019-07-17 Thread Jason Yan
suitable to map the kernel directly in a randomized region, so we chose to copy the kernel to a proper place and restart to relocate. The offset of the kernel was not randomized yet(a fixed 64M is set). We will randomize it in the next patch. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael

[RFC PATCH 00/10] implement KASLR for powerpc/fsl_booke/32

2019-07-17 Thread Jason Yan
area. If we cannot find a proper area, kaslr will be disabled and boot from the original kernel. Jason Yan (10): powerpc: unify definition of M_IF_NEEDED powerpc: move memstart_addr and kernstart_addr to init-common.c powerpc: introduce kimage_vaddr to store the kernel base powerpc/

[RFC PATCH 04/10] powerpc/fsl_booke/32: introduce create_tlb_entry() helper

2019-07-17 Thread Jason Yan
Add a new helper create_tlb_entry() to create a tlb entry by the virtual and physical address. This is a preparation to support boot kernel at a randomized address. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul

[RFC PATCH 07/10] powerpc/fsl_booke/32: randomize the kernel image offset

2019-07-17 Thread Jason Yan
igned-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook --- arch/powerpc/kernel/kaslr_booke.c | 335 +- 1 file changed, 333 insertions(+), 2 deletions(-)

[RFC PATCH 09/10] powerpc/fsl_booke/kaslr: support nokaslr cmdline parameter

2019-07-17 Thread Jason Yan
One may want to disable kaslr when boot, so provide a cmdline parameter 'nokaslr' to support this. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Nicholas Piggin Cc: Kees Cook --- arch/powe

[PATCH] drm/amd/display: remove unused variable 'ret' in dm_suspend()

2020-05-04 Thread Jason Yan
Fix the following coccicheck warning: drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:1574:5-8: Unneeded variable: "ret". Return "0" on line 1586 Signed-off-by: Jason Yan --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +-- 1 file changed, 1 insertion(+), 2 dele

[PATCH] drm/vc4: make vc4_queue_seqno_cb() return void

2020-05-04 Thread Jason Yan
No one uses the return value of this function, so make it return void. This fixes the following coccicheck warning: drivers/gpu/drm/vc4/vc4_gem.c:1029:5-8: Unneeded variable: "ret". Return "0" on line 1044 Signed-off-by: Jason Yan --- drivers/gpu/drm/vc4/vc4_drv.h | 6 +++

[PATCH] drm/zte: remove unneeded semicolon

2020-05-04 Thread Jason Yan
Fix the following coccicheck warning: drivers/gpu/drm/zte/zx_vga.c:158:2-3: Unneeded semicolon drivers/gpu/drm/zte/zx_vga.c:171:2-3: Unneeded semicolon drivers/gpu/drm/zte/zx_vga.c:179:2-3: Unneeded semicolon Signed-off-by: Jason Yan --- drivers/gpu/drm/zte/zx_vga.c | 6 +++--- 1 file changed

[PATCH] drm/msm/dpu: make _dpu_core_perf_crtc_update_bus() void

2020-05-04 Thread Jason Yan
This function does not need to return an error so make it return void. This fixes the following coccicheck warning: drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:178:5-8: Unneeded variable: "ret". Return "0" on line 193 Signed-off-by: Jason Yan --- drivers/gpu/drm/msm/disp/

[PATCH] drm/nouveau/mmu: remove unneeded semicolon

2020-05-04 Thread Jason Yan
Fix the following coccicheck warning: drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h:307:2-3: Unneeded semicolon drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:583:2-3: Unneeded semicolon Signed-off-by: Jason Yan --- drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 2 +- drivers/gpu/drm/nouveau

[PATCH] b43: remove Comparison of 0/1 to bool variable in pio.c

2020-05-04 Thread Jason Yan
Fix the following coccicheck warning: drivers/net/wireless/broadcom/b43/pio.c:768:10-25: WARNING: Comparison of 0/1 to bool variable Signed-off-by: Jason Yan --- drivers/net/wireless/broadcom/b43/pio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless

[PATCH] staging: rtl8723bs: remove conversion to bool in halbtcoutsrc_Get()

2020-05-04 Thread Jason Yan
Fix the following coccicheck warning: drivers/staging/rtl8723bs/hal/hal_btcoex.c:410:59-64: WARNING: conversion to bool not needed here Signed-off-by: Jason Yan --- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging

[PATCH] b43: remove Comparison of 0/1 to bool variable in phy_n.c

2020-05-04 Thread Jason Yan
Fix the following coccicheck warning: drivers/net/wireless/broadcom/b43/phy_n.c:5510:19-32: WARNING: Comparison of 0/1 to bool variable Signed-off-by: Jason Yan --- drivers/net/wireless/broadcom/b43/phy_n.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net

[PATCH] ath11k: use true,false for bool variables

2020-05-04 Thread Jason Yan
Fix the following coccicheck warning: drivers/net/wireless/ath/ath11k/dp_rx.c:2964:1-39: WARNING: Assignment of 0/1 to bool variable drivers/net/wireless/ath/ath11k/dp_rx.c:2965:1-38: WARNING: Assignment of 0/1 to bool variable Signed-off-by: Jason Yan --- drivers/net/wireless/ath/ath11k

[PATCH] rtlwifi: rtl8188ee: remove Comparison to bool in rf.c

2020-05-04 Thread Jason Yan
Fix the following coccicheck warning: drivers/net/wireless/realtek/rtlwifi/rtl8188ee/rf.c:476:6-14: WARNING: Comparison to bool drivers/net/wireless/realtek/rtlwifi/rtl8188ee/rf.c:54:5-22: WARNING: Comparison to bool Signed-off-by: Jason Yan --- drivers/net/wireless/realtek/rtlwifi/rtl8188ee

[PATCH] brcmfmac: remove Comparison to bool in brcmf_p2p_send_action_frame()

2020-05-04 Thread Jason Yan
Fix the following coccicheck warning: drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:1781:9-12: WARNING: Comparison to bool drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c:1785:5-8: WARNING: Comparison to bool Signed-off-by: Jason Yan --- drivers/net/wireless/broadcom/brcm80211

[PATCH] brcmsmac: remove Comparison to bool in brcms_b_txstatus()

2020-05-04 Thread Jason Yan
Fix the following coccicheck warning: drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c:1060:6-12: WARNING: Comparison to bool Signed-off-by: Jason Yan --- drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH] dmaengine: qcom_hidma: use true,false for bool variable

2020-05-04 Thread Jason Yan
Fix the following coccicheck warning: drivers/dma/qcom/hidma.c:553:1-17: WARNING: Assignment of 0/1 to bool variable Signed-off-by: Jason Yan --- drivers/dma/qcom/hidma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c

[PATCH] scsi: fnic: use true,false for fnic->internal_reset_inprogress

2020-04-30 Thread Jason Yan
Fix the following coccicheck warning: drivers/scsi/fnic/fnic_scsi.c:2627:5-36: WARNING: Comparison of 0/1 to bool variable Signed-off-by: Jason Yan --- drivers/scsi/fnic/fnic_scsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/fnic/fnic_scsi.c b

[PATCH] scsi: qedi: remove Comparison of 0/1 to bool variable

2020-04-30 Thread Jason Yan
Fix the following coccicheck warning: drivers/scsi/qedi/qedi_main.c:1309:5-25: WARNING: Comparison of 0/1 to bool variable drivers/scsi/qedi/qedi_main.c:1315:5-25: WARNING: Comparison of 0/1 to bool variable Signed-off-by: Jason Yan --- drivers/scsi/qedi/qedi_main.c | 4 ++-- 1 file changed, 2

[PATCH] scsi: vmw_pvscsi: use true,false for adapter->use_msg

2020-04-30 Thread Jason Yan
Fix the following coccicheck warning: drivers/scsi/vmw_pvscsi.c:911:2-18: WARNING: Assignment of 0/1 to bool variable Signed-off-by: Jason Yan --- drivers/scsi/vmw_pvscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c

[PATCH] scsi: mpt3sas: use true,false for ioc->use_32bit_dma

2020-04-30 Thread Jason Yan
Fix the following coccicheck warning: drivers/scsi/mpt3sas/mpt3sas_base.c:7202:1-19: WARNING: Assignment of 0/1 to bool variable Signed-off-by: Jason Yan --- drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/mpt3sas

[PATCH] scsi: qla2xxx: use true,false for ha->fw_dumped

2020-04-30 Thread Jason Yan
Fix the following coccicheck warning: drivers/scsi/qla2xxx/qla_tmpl.c:1120:2-20: WARNING: Assignment of 0/1 to bool variable Signed-off-by: Jason Yan --- drivers/scsi/qla2xxx/qla_attr.c | 2 +- drivers/scsi/qla2xxx/qla_dbg.c | 4 ++-- drivers/scsi/qla2xxx/qla_nx.c | 4 ++-- drivers/scsi

[PATCH] scsi: qla2xxx: use true,false for need_mpi_reset

2020-04-30 Thread Jason Yan
Fix the following coccicheck warning: drivers/scsi/qla2xxx/qla_tmpl.c:1031:6-20: WARNING: Assignment of 0/1 to bool variable drivers/scsi/qla2xxx/qla_tmpl.c:1062:3-17: WARNING: Assignment of 0/1 to bool variable Signed-off-by: Jason Yan --- drivers/scsi/qla2xxx/qla_tmpl.c | 4 ++-- 1 file

Re: [PATCH] pinctrl: remove unused 'pwm37_pins'

2020-04-28 Thread Jason Yan
在 2020/4/28 19:30, Manivannan Sadhasivam 写道: On Tue, Apr 28, 2020 at 11:58:01AM +0200, Linus Walleij wrote: On Fri, Apr 17, 2020 at 10:54 AM Jason Yan wrote: Fix the following gcc warning: drivers/pinctrl/pinctrl-bm1880.c:263:27: warning: ‘pwm37_pins’ defined but not used [-Wunused-const

Re: [PATCH 2/7] staging: rtl8723bs: os_dep: remove set but not used 'size'

2020-04-28 Thread Jason Yan
在 2020/4/28 20:28, Greg KH 写道: On Mon, Apr 27, 2020 at 11:23:37AM +0800, Jason Yan wrote: And also remove the NULL check before kfree() because kfree() can handle NULL pointers correctly. Fix the following gcc warning: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:157:6: warning

[PATCH] staging: rtl8723bs: os_dep: remove rtw_spt_band_free()

2020-04-28 Thread Jason Yan
Now that rtw_spt_band_free() is only a direct wrapper of kfree, we can remove it and just use kfree(). Signed-off-by: Jason Yan --- drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/rtl8723bs/os_dep

[PATCH] drm/ast: remove duplicate assignment of ast_crtc_funcs member

2020-04-29 Thread Jason Yan
ond one is which we use now in fact, we can remove the first one. This fixes the following coccicheck warning: drivers/gpu/drm/ast/ast_mode.c:932:50-51: set_config: first occurrence line 934, second occurrence line 937 Signed-off-by: Jason Yan --- drivers/gpu/drm/ast/ast_mode.c | 1 - 1 file

[PATCH] net: dsa: mv88e6xxx: remove duplicate assignment of struct members

2020-04-29 Thread Jason Yan
xx/chip.c:4184:48-49: phylink_validate: first occurrence line 4238, second occurrence line 4242 Signed-off-by: Jason Yan --- drivers/net/dsa/mv88e6xxx/chip.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index dd8a5666a584.

[PATCH] rtlwifi: remove comparison of 0/1 to bool variable

2020-04-29 Thread Jason Yan
The variable 'rtlpriv->rfkill.rfkill_state' is bool and can directly assigned to bool values. Fix the following coccicheck warning: drivers/net/wireless/realtek/rtlwifi/core.c:1725:14-42: WARNING: Comparison of 0/1 to bool variable Signed-off-by: Jason Yan --- drivers/net/wir

[PATCH] video: fbdev: valkyriefb.c: fix warning comparing pointer to 0

2020-04-29 Thread Jason Yan
Fix the following coccicheck warning: drivers/video/fbdev/valkyriefb.c:348:10-11: WARNING comparing pointer to 0, suggest !E drivers/video/fbdev/valkyriefb.c:334:12-13: WARNING comparing pointer to 0 drivers/video/fbdev/valkyriefb.c:348:10-11: WARNING comparing pointer to 0 Signed-off-by: Jason

[PATCH] KVM: MIPS: use true,false for bool variable

2020-04-29 Thread Jason Yan
Fix the following coccicheck warning: arch/mips/kvm/mips.c:82:1-28: WARNING: Assignment of 0/1 to bool variable arch/mips/kvm/mips.c:88:1-28: WARNING: Assignment of 0/1 to bool variable Signed-off-by: Jason Yan --- arch/mips/kvm/mips.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[PATCH] scsi: qla2xxx: Make qla_set_ini_mode() return void

2020-04-29 Thread Jason Yan
quot;0" on line 2180 Signed-off-by: Jason Yan --- drivers/scsi/qla2xxx/qla_attr.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 4cfebf34ad7c..ca7118982c12 100644 --- a/drivers/scsi/qla2x

Re: [PATCH v7 00/12] implement KASLR for powerpc/fsl_booke/32

2019-10-20 Thread Jason Yan
On 2019/10/10 2:46, Scott Wood wrote: On Wed, 2019-10-09 at 16:41 +0800, Jason Yan wrote: Hi Scott, On 2019/10/9 15:13, Scott Wood wrote: On Wed, 2019-10-09 at 14:10 +0800, Jason Yan wrote: Hi Scott, Would you please take sometime to test this? Thank you so much. On 2019/9/24 13:52

Re: [RFC PATCH 04/10] powerpc/fsl_booke/32: introduce create_tlb_entry() helper

2019-07-29 Thread Jason Yan
On 2019/7/29 19:05, Christophe Leroy wrote: Le 17/07/2019 à 10:06, Jason Yan a écrit : Add a new helper create_tlb_entry() to create a tlb entry by the virtual and physical address. This is a preparation to support boot kernel at a randomized address. Signed-off-by: Jason Yan Cc: Diana

Re: [RFC PATCH 05/10] powerpc/fsl_booke/32: introduce reloc_kernel_entry() helper

2019-07-29 Thread Jason Yan
On 2019/7/29 19:08, Christophe Leroy wrote: Le 17/07/2019 à 10:06, Jason Yan a écrit : Add a new helper reloc_kernel_entry() to jump back to the start of the new kernel. After we put the new kernel in a randomized place we can use this new helper to enter the kernel and begin to relocate

Re: [RFC PATCH 07/10] powerpc/fsl_booke/32: randomize the kernel image offset

2019-07-29 Thread Jason Yan
On 2019/7/29 19:33, Christophe Leroy wrote: Le 17/07/2019 à 10:06, Jason Yan a écrit : After we have the basic support of relocate the kernel in some appropriate place, we can start to randomize the offset now. Entropy is derived from the banner and timer, which will change every build and

Re: [RFC PATCH 08/10] powerpc/fsl_booke/kaslr: clear the original kernel if randomized

2019-07-29 Thread Jason Yan
On 2019/7/29 19:19, Christophe Leroy wrote: Le 17/07/2019 à 10:06, Jason Yan a écrit : The original kernel still exists in the memory, clear it now. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc

Re: [RFC PATCH 09/10] powerpc/fsl_booke/kaslr: support nokaslr cmdline parameter

2019-07-29 Thread Jason Yan
On 2019/7/29 19:38, Christophe Leroy wrote: Le 17/07/2019 à 10:06, Jason Yan a écrit : One may want to disable kaslr when boot, so provide a cmdline parameter 'nokaslr' to support this. Signed-off-by: Jason Yan Cc: Diana Craciun Cc: Michael Ellerman Cc: Christophe Leroy Cc

Re: [RFC PATCH 10/10] powerpc/fsl_booke/kaslr: dump out kernel offset information on panic

2019-07-29 Thread Jason Yan
On 2019/7/29 19:43, Christophe Leroy wrote: Le 17/07/2019 à 10:06, Jason Yan a écrit : When kaslr is enabled, the kernel offset is different for every boot. This brings some difficult to debug the kernel. Dump out the kernel offset when panic so that we can easily debug the kernel. Signed

Re: [PATCH] scsi: libsas: Fix rphy phy_identifier for PHYs with end devices attached

2019-02-14 Thread Jason Yan
Good, I had a quick test and the issue is fixed, thanks. Reviewed-by: Jason Yan

Re: [RFC PATCH] scsi: fix oops in scsi_uninit_cmd()

2019-02-21 Thread Jason Yan
Hi, Christoph On 2019/2/20 23:18, Christoph Hellwig wrote: [fullquote removed, please follow proper mail etiquette] On Tue, Feb 19, 2019 at 08:56:28AM -0800, Bart Van Assche wrote: regression in the SCSI sd driver due to the switch from the legacy block layer to scsi-mq. The above patch introd

[PATCH v2 4/7] scsi: libsas: split the replacement of sas disks in two steps

2019-01-30 Thread Jason Yan
original event, we wrapped a loop and added a new parameter to see if we should revalidate again. Signed-off-by: Jason Yan CC: chenxiang CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams CC: Hannes Reinecke --- drivers/scsi/libsas

[PATCH v2 1/7] scsi: libsas: reset the negotiated_linkrate when phy is down

2019-01-30 Thread Jason Yan
If the device is unplugged or disconnected, the negotiated_linkrate still can be seen from the userspace by sysfs. This makes people confused and leaks information of the device last used. So let's reset the negotiated_linkrate after the phy is down. Signed-off-by: Jason Yan CC: John Garr

[PATCH v2 6/7] scsi: libsas: reset the phy address if discover failed

2019-01-30 Thread Jason Yan
address to the initial value. Then in the next revalidation the device will be discovered agian. Tested-by: Chen Liangfei Signed-off-by: Jason Yan CC: Xiaofei Tan CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams CC: Hannes Reinecke

[PATCH v2 2/7] scsi: libsas: only clear phy->in_shutdown after shutdown event done

2019-01-30 Thread Jason Yan
d") Signed-off-by: Jason Yan CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams CC: Hannes Reinecke --- drivers/scsi/libsas/sas_phy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/libsas/sas_p

[PATCH v2 0/7] libsas: fix issue of swapping or replacing disks

2019-01-30 Thread Jason Yan
. 5. Fix an issue when event in queue reached the limit. Jason Yan (7): scsi: libsas: reset the negotiated_linkrate when phy is down scsi: libsas: only clear phy->in_shutdown after shutdown event done scsi: libsas: optimize the debug print of the revalidate process scsi: libsas: spl

[PATCH v2 7/7] scsi: libsas: fix issue of swapping two sas disks

2019-01-30 Thread Jason Yan
he discovering of the new devices. Tested-by: Chen Liangfei Signed-off-by: Jason Yan CC: Xiaofei Tan CC: chenxiang CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams CC: Hannes Reinecke --- drivers/scsi/libsas/sas_expander.c | 146 ++

[PATCH v2 5/7] scsi: libsas: check if the same device when flutter

2019-01-30 Thread Jason Yan
ed-by: Chen Liangfei Signed-off-by: Jason Yan Reviewed-by: John Garry CC: chenxiang CC: John Garry CC: Johannes Thumshirn CC: Ewan Milne CC: Christoph Hellwig CC: Tomas Henzl CC: Dan Williams CC: Tejun Heo CC: Hannes Reinecke --- drivers/ata/libata-core.c | 3 +- drivers/scsi/l

[PATCH v2 3/7] scsi: libsas: optimize the debug print of the revalidate process

2019-01-30 Thread Jason Yan
r not. We just know the last bcast phy revalidation succeeded or not. No need to return a error code for sas_ex_revalidate_domain() and sas_rediscover(), and just print the debug log for each bcast phy directly in sas_rediscover(). Signed-off-by: Jason Yan CC: John Garry CC: Johannes Thumshir

[PATCH] scsi: libsas: no need to join wide port again in sas_ex_discover_dev()

2019-05-18 Thread Jason Yan
error when discover failed because we need to continue to discover other phys if one phy discover failed. So let's keep that logic as before and just add a debug log to detect the failure. Signed-off-by: Jason Yan --- drivers/scsi/libsas/sas_expander.c | 24 +++- 1

Re: [PATCH] scsi: libsas: no need to join wide port again in sas_ex_discover_dev()

2019-05-20 Thread Jason Yan
On 2019/5/20 18:54, John Garry wrote: On 18/05/2019 10:40, Jason Yan wrote: Since we are processing events synchronously now, the second call of sas_ex_join_wide_port() in sas_ex_discover_dev() is not needed. There will be no races with other works in disco workqueue. So remove the second

  1   2   3   4   >