[PATCH] powerpc: Remove the static variable initialisations to 0

2022-07-23 Thread Jason Wang
Initialise global and static variable to 0 is always unnecessary. Remove the unnecessary initialisations. Signed-off-by: Jason Wang --- arch/powerpc/kexec/core_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kexec/core_64.c b/arch/powerpc/kexec/core_64.c

[PATCH] powerpc/ps3: Fix comment typo

2022-07-18 Thread Jason Wang
The double `when' is duplicated in line 1069, remove one. Signed-off-by: Jason Wang --- drivers/ps3/ps3-lpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ps3/ps3-lpm.c b/drivers/ps3/ps3-lpm.c index 65512b6cc6fd..200ad8751860 100644 --- a/drivers/ps3/ps3-lpm.c

[PATCH] powerpc/sysdev: Fix comment typo

2022-07-18 Thread Jason Wang
The double `is' is duplicated in line 110, remove one. Signed-off-by: Jason Wang --- arch/powerpc/sysdev/cpm2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/cpm2.c b/arch/powerpc/sysdev/cpm2.c index 3f130312b6e9..915f4d3991c3 100644 --- a/arch/powerpc

[PATCH] KVM: PPC: Book3S HV: Fix comment typo

2022-07-18 Thread Jason Wang
The double `that' is duplicated in line 1604, remove one. Signed-off-by: Jason Wang --- arch/powerpc/kvm/book3s_64_mmu_hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c index 514fd45c1994

[PATCH] Merge: Fix comment typo

2022-07-18 Thread Jason Wang
The double `that' is duplicated in line 1604, remove one. Signed-off-by: Jason Wang --- arch/powerpc/kvm/book3s_64_mmu_hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c index 514fd45c1994

[PATCH] powerpc/pseries/vas: Fix comment typo

2022-07-18 Thread Jason Wang
The double `the' in line 807 is duplicated, remove one. Signed-off-by: Jason Wang --- arch/powerpc/platforms/pseries/vas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/vas.c b/arch/powerpc/platforms/pseries/vas.c index 91e7eda0606c

[PATCH] KVM: PPC: Fix comment typo

2022-07-18 Thread Jason Wang
The double `that' in line 1604 is duplicated, removed one. Signed-off-by: Jason Wang --- arch/powerpc/kvm/book3s_64_mmu_hv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c index 514fd45c1994

[PATCH] KVM: PPC: Book3S HV: Fix typo in a comment

2022-05-07 Thread Jason Wang
The double `the' in the comment in line 212 is repeated. Remove one of them from the comment. Signed-off-by: Jason Wang --- arch/powerpc/kvm/book3s_xive_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/book3s_xive_native.c b/arch/powerpc/kvm

[PATCH] powerpc: use strscpy to copy strings

2021-12-19 Thread Jason Wang
trlcpy()'s. In addition, the implementation is robust to the string changing out from underneath it, unlike the current strlcpy() implementation. Thus, replace strlcpy with strscpy. Signed-off-by: Jason Wang --- arch/powerpc/platforms/pasemi/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] powerpc/kvm: no need to initialise statics to 0

2021-12-19 Thread Jason Wang
Static variables do not need to be initialised to 0, because compiler will initialise all uninitialised statics to 0. Thus, remove the unneeded initialization. Signed-off-by: Jason Wang --- arch/powerpc/kvm/book3s_64_mmu_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] soc: fsl: qe: fix typo in a comment

2021-12-11 Thread Jason Wang
The double `is' in the comment in line 150 is repeated. Remove one of them from the comment. Signed-off-by: Jason Wang --- drivers/soc/fsl/qe/qe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c index 4d38c80f8be8

[PATCH] powerpc: tsi108: make EXPORT_SYMBOL follow its function immediately

2021-11-14 Thread Jason Wang
EXPORT_SYMBOL(foo); should immediately follow its function/variable. Signed-off-by: Jason Wang --- arch/powerpc/sysdev/tsi108_dev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/tsi108_dev.c b/arch/powerpc/sysdev/tsi108_dev.c index 4c4a6efd5e5f

[PATCH] soc: fsl: qe: Fix typo in a comment

2021-11-12 Thread Jason Wang
The double `is' in a comment is repeated, thus one of them should be removed. Signed-off-by: Jason Wang --- drivers/soc/fsl/qe/qe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c index 4d38c80f8be8..b3c226eb5292 100644

[PATCH] mm: Remove a repeated word in a comment

2021-11-12 Thread Jason Wang
The double word `up' in a comment is repeated, thus one of them should be removed. Signed-off-by: Jason Wang --- drivers/macintosh/mediabay.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c index

[PATCH] macintosh: no need to initilise statics to 0

2021-08-17 Thread Jason Wang
Global static variables dont need to be initialised to 0. Because the compiler will initilise them. Signed-off-by: Jason Wang --- drivers/macintosh/mediabay.c | 10 ++--- drivers/macintosh/via-pmu.c | 78 ++-- 2 files changed, 44 insertions(+), 44 deletions

[PATCH] powerpc: use strscpy to replace strlcpy

2021-08-07 Thread Jason Wang
nt strlcpy() implementation. Thus, We prefer using strscpy instead of strlcpy. Signed-off-by: Jason Wang --- arch/powerpc/platforms/powermac/bootx_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/platforms/powermac/bootx_init.c b/arch/powerpc/platforms/powermac/bo

[PATCH] powerpc/perf/24x7: use 'unsigned int' instead of 'unsigned'

2021-07-29 Thread Jason Wang
Replace the 'unsigned' with 'unsigned int' which is more accurate. Signed-off-by: Jason Wang --- arch/powerpc/perf/hv-24x7.c | 38 ++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c

[PATCH] powerpc/xmon: use ARRAY_SIZE

2021-07-25 Thread Jason Wang
The ARRAY_SIZE is the macro definition of sizeof(a)/sizeof(a[0]) and it is more compact and formal to get a array size. Signed-off-by: Jason Wang --- arch/powerpc/xmon/ppc-opc.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/xmon/ppc-opc.c b/arch

[PATCH v2] sched: Use BUG_ON

2021-07-01 Thread Jason Wang
The BUG_ON macro simplifies the if condition followed by BUG, so that we can use BUG_ON instead of if condition followed by BUG. Signed-off-by: Jason Wang --- arch/powerpc/platforms/cell/spufs/sched.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms

[PATCH] sched: Use WARN_ON

2021-07-01 Thread Jason Wang
The BUG_ON macro simplifies the if condition followed by BUG, but it will lead to the kernel crashing. Therefore, we can try using WARN_ON instead of if condition followed by BUG. Signed-off-by: Jason Wang --- arch/powerpc/platforms/cell/spufs/sched.c | 4 ++-- 1 file changed, 2 insertions

[PATCH] powerpc/xmon: Use ARRAY_SIZE

2021-07-01 Thread Jason Wang
The ARRAY_SIZE macro is more compact and formal to get array size in linux kernel source. In addition, it is more readable for kernel developpers. Thus, we can replace all sizeof(arr)/sizeof(arr[0]) with ARRAY_SIZE. Signed-off-by: Jason Wang --- arch/powerpc/xmon/ppc-opc.c | 16

[PATCH] powerpc/sysfs: Replace sizeof(arr)/sizeof(arr[0]) with ARRAY_SIZE

2021-06-24 Thread Jason Wang
The ARRAY_SIZE macro is more compact and more formal in linux source. Signed-off-by: Jason Wang --- arch/powerpc/kernel/sysfs.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 2e08640bb3b4

Re: [PATCH] arm64: defconfig: enable modern virtio pci device

2021-02-17 Thread Jason Wang
On 2021/2/11 下午7:52, Arnd Bergmann wrote: On Wed, Feb 10, 2021 at 8:05 PM Anders Roxell wrote: Since patch ("virtio-pci: introduce modern device module") got added it is not possible to boot a defconfig kernel in qemu with a virtio pci device. Add CONFIG_VIRTIO_PCI_MODERN=y fragment makes

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Jason Wang
On 2020/4/17 下午5:38, Michael S. Tsirkin wrote: On Fri, Apr 17, 2020 at 05:33:56PM +0800, Jason Wang wrote: On 2020/4/17 下午5:01, Michael S. Tsirkin wrote: There could be some misunderstanding here. I thought it's somehow similar: a CONFIG_VHOST_MENU=y will be left in the defconfigs even

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Jason Wang
On 2020/4/17 下午5:01, Michael S. Tsirkin wrote: There could be some misunderstanding here. I thought it's somehow similar: a CONFIG_VHOST_MENU=y will be left in the defconfigs even if CONFIG_VHOST is not set. Thanks BTW do entries with no prompt actually appear in defconfig? Yes. I can

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Jason Wang
On 2020/4/17 下午5:25, Geert Uytterhoeven wrote: Hi Michael, On Fri, Apr 17, 2020 at 10:57 AM Michael S. Tsirkin wrote: On Fri, Apr 17, 2020 at 04:51:19PM +0800, Jason Wang wrote: On 2020/4/17 下午4:46, Michael S. Tsirkin wrote: On Fri, Apr 17, 2020 at 04:39:49PM +0800, Jason Wang wrote

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Jason Wang
On 2020/4/17 下午4:46, Michael S. Tsirkin wrote: On Fri, Apr 17, 2020 at 04:39:49PM +0800, Jason Wang wrote: On 2020/4/17 下午4:29, Michael S. Tsirkin wrote: On Fri, Apr 17, 2020 at 03:36:52PM +0800, Jason Wang wrote: On 2020/4/17 下午2:33, Michael S. Tsirkin wrote: On Fri, Apr 17, 2020 at 11:12

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Jason Wang
On 2020/4/17 下午4:29, Michael S. Tsirkin wrote: On Fri, Apr 17, 2020 at 03:36:52PM +0800, Jason Wang wrote: On 2020/4/17 下午2:33, Michael S. Tsirkin wrote: On Fri, Apr 17, 2020 at 11:12:14AM +0800, Jason Wang wrote: On 2020/4/17 上午6:55, Michael S. Tsirkin wrote: On Wed, Apr 15, 2020 at 10:43

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Jason Wang
On 2020/4/17 下午2:33, Michael S. Tsirkin wrote: On Fri, Apr 17, 2020 at 11:12:14AM +0800, Jason Wang wrote: On 2020/4/17 上午6:55, Michael S. Tsirkin wrote: On Wed, Apr 15, 2020 at 10:43:56AM +0800, Jason Wang wrote: We try to keep the defconfig untouched after decoupling CONFIG_VHOST out

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-16 Thread Jason Wang
On 2020/4/17 上午6:55, Michael S. Tsirkin wrote: On Wed, Apr 15, 2020 at 10:43:56AM +0800, Jason Wang wrote: We try to keep the defconfig untouched after decoupling CONFIG_VHOST out of CONFIG_VIRTUALIZATION in commit 20c384f1ea1a ("vhost: refine vhost and vringh kconfig") by enabling

[PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-14 Thread Jason Wang
eported-by: Geert Uytterhoeven Signed-off-by: Jason Wang --- Change since V1: - depends on EVENTFD for VHOST --- arch/mips/configs/malta_kvm_defconfig | 1 + arch/powerpc/configs/powernv_defconfig | 1 + arch/powerpc/configs/ppc64_defconfig | 1 + arch/powerpc/configs/pseries_defco

Re: [PATCH] vhost: do not enable VHOST_MENU by default

2020-04-14 Thread Jason Wang
, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Jason-Wang/vhost-do-not-enable-VHOST_MENU-by-default/20200414

Re: [PATCH] vhost: do not enable VHOST_MENU by default

2020-04-14 Thread Jason Wang
On 2020/4/14 下午3:26, Christian Borntraeger wrote: On 14.04.20 04:44, Jason Wang wrote: We try to keep the defconfig untouched after decoupling CONFIG_VHOST out of CONFIG_VIRTUALIZATION in commit 20c384f1ea1a ("vhost: refine vhost and vringh kconfig") by enabling VHOST_MENU

[PATCH] vhost: do not enable VHOST_MENU by default

2020-04-13 Thread Jason Wang
tly in defconfigs that enables CONFIG_VHOST_NET and CONFIG_VHOST_VSOCK. Cc: Thomas Bogendoerfer Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Reported-by: Geert Uytterhoeven Signed-off-by: Jason Wang --- arch/mips/con

Re: [PATCH 2/2] virtio_ring: Use DMA API if memory is encrypted

2019-10-16 Thread Jason Wang
On 2019/10/15 下午3:35, Christoph Hellwig wrote: On Fri, Oct 11, 2019 at 06:25:19PM -0700, Ram Pai wrote: From: Thiago Jung Bauermann Normally, virtio enables DMA API with VIRTIO_F_IOMMU_PLATFORM, which must be set by both device and guest driver. However, as a hack, when DMA API returns

Re: [PATCH net] vhost: flush dcache page when logging dirty pages

2019-04-10 Thread Jason Wang
On 2019/4/9 下午9:14, Michael S. Tsirkin wrote: On Tue, Apr 09, 2019 at 12:16:47PM +0800, Jason Wang wrote: We set dirty bit through setting up kmaps and access them through kernel virtual address, this may result alias in virtually tagged caches that require a dcache flush afterwards. Cc

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-01-29 Thread Jason Wang
On 2019/1/30 上午10:36, Michael S. Tsirkin wrote: On Wed, Jan 30, 2019 at 10:24:01AM +0800, Jason Wang wrote: On 2019/1/30 上午3:02, Michael S. Tsirkin wrote: On Tue, Jan 29, 2019 at 03:42:44PM -0200, Thiago Jung Bauermann wrote: Fixing address of powerpc mailing list. Thiago Jung Bauermann

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-01-29 Thread Jason Wang
On 2019/1/30 上午3:02, Michael S. Tsirkin wrote: On Tue, Jan 29, 2019 at 03:42:44PM -0200, Thiago Jung Bauermann wrote: Fixing address of powerpc mailing list. Thiago Jung Bauermann writes: Hello, With Christoph's rework of the DMA API that recently landed, the patch below is the only

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Jason Wang
On 2018年08月03日 04:55, Michael S. Tsirkin wrote: On Fri, Jul 20, 2018 at 09:29:37AM +0530, Anshuman Khandual wrote: This patch series is the follow up on the discussions we had before about the RFC titled [RFC,V2] virtio: Add platform specific DMA API translation for virito devices