Re: [PATCH v2 2/6] staging: erofs: code cleanup for option parsing of fault_injection

2018-09-18 Thread Gao Xiang
Hi Chengguang, On 2018/9/17 23:34, Chengguang Xu wrote: > Define a dummpy function of erofs_build_fault_attr() when macro > CONFIG_EROFS_FAULT_INJECTION is disabled, so that we don't have to > check the macro in calling place. Based on above adjustment, > do proper code cleanup for option parsing

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Thomas Gleixner
On Mon, 17 Sep 2018, John Stultz wrote: > On Mon, Sep 17, 2018 at 12:25 PM, Andy Lutomirski wrote: > > Also, I'm not entirely convinced that this "last" thing is needed at > > all. John, what's the scenario under which we need it? > > So my memory is probably a bit foggy, but I recall that as we

[PATCH v2 1/8] staging: rtl8188eu: simplify calculation

2018-09-18 Thread Michael Straube
Simplify calcualation: * 10 / 2 can be reduced to * 5 Also cleans missing spaces checkpatch issues. Signed-off-by: Michael Straube --- changes in v2: fixed typo in patch 1/8 commit message Simpliy -> Simplify drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 2 +- 1 file change

[PATCH v2 7/8] staging: rtl8188eu: fix lines over 80 characters

2018-09-18 Thread Michael Straube
Wrap lines over 80 characters where appropriate to clear checkpatch warnings. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/d

[PATCH v2 4/8] staging: rtl8188eu: fix comparsions to true

2018-09-18 Thread Michael Straube
Use if(x) instead of if(x == true). Signed-off-by: Michael Straube --- .../staging/rtl8188eu/core/rtw_ioctl_set.c| 26 +-- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/drivers/staging/rtl8188eu/core/rtw_ioct

[PATCH v2 5/8] staging: rtl8188eu: fix comparsions to false

2018-09-18 Thread Michael Straube
Use if(!x) instead of if(x == false). Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c index b

[PATCH v2 8/8] staging: rtl8188eu: simplify function comments

2018-09-18 Thread Michael Straube
Simplify function comments to a single line. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/drivers/staging/rtl8188eu/core/rtw

[PATCH v2 6/8] staging: rtl8188eu: add missing spaces around operators

2018-09-18 Thread Michael Straube
Add missing spaces around '|', '-', and '&' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/r

[PATCH v2 2/8] staging: rtl8188eu: remove unnecessary parentheses

2018-09-18 Thread Michael Straube
Remove unnecessary parentheses as reported by checkpatch and from conditionals. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/core/rtw_ioctl_set.c| 50 +-- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.

[PATCH v2 3/8] staging: rtl8188eu: remove whitespace

2018-09-18 Thread Michael Straube
Replace tabs with spaces or just remove spaces in declarations. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/core/rtw_ioctl_set.c| 34 +-- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/drivers/sta

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Peter Zijlstra
On Tue, Sep 18, 2018 at 09:52:26AM +0200, Thomas Gleixner wrote: > On Mon, 17 Sep 2018, John Stultz wrote: > > On Mon, Sep 17, 2018 at 12:25 PM, Andy Lutomirski wrote: > > > Also, I'm not entirely convinced that this "last" thing is needed at > > > all. John, what's the scenario under which we ne

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Thomas Gleixner
On Tue, 18 Sep 2018, Peter Zijlstra wrote: > On Tue, Sep 18, 2018 at 09:52:26AM +0200, Thomas Gleixner wrote: > > On Mon, 17 Sep 2018, John Stultz wrote: > > > On Mon, Sep 17, 2018 at 12:25 PM, Andy Lutomirski wrote: > > > > Also, I'm not entirely convinced that this "last" thing is needed at > >

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Thomas Gleixner
On Tue, 18 Sep 2018, Thomas Gleixner wrote: > On Tue, 18 Sep 2018, Peter Zijlstra wrote: > > > Your memory serves you right. That's indeed observable on CPUs which > > > lack TSC_ADJUST. > > > > But, if the gtod code can observe this, then why doesn't the code that > > checks the sync? > > Becaus

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Thomas Gleixner
On Tue, 18 Sep 2018, Thomas Gleixner wrote: > On Tue, 18 Sep 2018, Thomas Gleixner wrote: > > On Tue, 18 Sep 2018, Peter Zijlstra wrote: > > > > Your memory serves you right. That's indeed observable on CPUs which > > > > lack TSC_ADJUST. > > > > > > But, if the gtod code can observe this, then wh

Re: [PATCH v2 1/6] staging: erofs: code cleanup for erofs_kmalloc()

2018-09-18 Thread Chao Yu
On 2018/9/17 23:34, Chengguang Xu wrote: > Define a dummy function of time_to_inject()/erofs_show_injection_info(), > so that we don't have to check macro CONFIG_EROFS_FAULT_INJECTION in > calling place. > > Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Thanks, ___

Re: [PATCH v2 2/6] staging: erofs: code cleanup for option parsing of fault_injection

2018-09-18 Thread Chao Yu
On 2018/9/17 23:34, Chengguang Xu wrote: > Define a dummpy function of erofs_build_fault_attr() when macro > CONFIG_EROFS_FAULT_INJECTION is disabled, so that we don't have to > check the macro in calling place. Based on above adjustment, > do proper code cleanup for option parsing of fault_injecti

Re: [PATCH v2 2/6] staging: erofs: code cleanup for option parsing of fault_injection

2018-09-18 Thread cgxu519
On 09/18/2018 03:07 PM, Gao Xiang wrote: Hi Chengguang, On 2018/9/17 23:34, Chengguang Xu wrote: Define a dummpy function of erofs_build_fault_attr() when macro CONFIG_EROFS_FAULT_INJECTION is disabled, so that we don't have to check the macro in calling place. Based on above adjustment, do pro

Re: [PATCH v2 3/6] staging: erofs: introduce a new helper __erofs_build_fault_attr()

2018-09-18 Thread Chao Yu
On 2018/9/17 23:34, Chengguang Xu wrote: > Introduce a new helper __erofs_build_fault_attr() to handle set/clear > erofs_fault_info, we need this funciton for internal use case. > for example, reset fault_injection option in remount. > > Signed-off-by: Chengguang Xu Since this patch is related t

Re: [PATCH v2 4/6] staging: erofs: introduce a new helper erofs_get_fault_rate()

2018-09-18 Thread Chao Yu
On 2018/9/17 23:34, Chengguang Xu wrote: > Introduce a new helper for getting fault rate, so that we > don't have to check macro in calling place. > > Signed-off-by: Chengguang Xu Can you fold this patch into [5/6]? Thanks, ___ devel mailing list de.

Re: [PATCH v2 6/6] staging: erofs: option validation in remount

2018-09-18 Thread Chao Yu
On 2018/9/17 23:34, Chengguang Xu wrote: > Add option validation in remount. After this patch, remount > can change recognized options, and for unknown options remount > will fail and report error. > > Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Thanks, _

Re: [PATCH 0/8] staging: erofs: error handing and more tracepoints

2018-09-18 Thread Greg Kroah-Hartman
On Fri, Sep 14, 2018 at 10:40:22PM +0800, Gao Xiang wrote: > In order to avoid conflicts with cleanup patches, Chao and I think > it is better to send reviewed preview patches in the erofs mailing list > to the community in time. > > So here is reviewed & tested patches right now, which clean up a

Re: [PATCH] staging: mt7621-mmc: Remove do {} while (0) loop for single statement macro

2018-09-18 Thread Greg Kroah-Hartman
On Sat, Sep 15, 2018 at 06:47:51PM +0530, Nishad Kamdar wrote: > This patch removes do {} while (0) loop for single statement macros. > Issue found by checkpatch. > > Signed-off-by: Nishad Kamdar > --- > drivers/staging/mt7621-mmc/sd.c | 28 +++- > 1 file changed, 7 inser

Re: [PATCH v7 1/1] staging: mt7621-mmc: Delete IRQ_MSG() and its users.

2018-09-18 Thread Greg Kroah-Hartman
On Sat, Sep 15, 2018 at 08:28:03AM +0530, Nishad Kamdar wrote: > This patch removes IRQ_MSG() and its users as currently it is a no-op. > > Signed-off-by: Nishad Kamdar > --- > Changes in v7: > - Delete IRQ_MSG() and all its users > Changes in v6: > - No change > Changes in v5: > - No chang

[PATCH v1 1/6] mm/memory_hotplug: make remove_memory() take the device_hotplug_lock

2018-09-18 Thread David Hildenbrand
remove_memory() is exported right now but requires the device_hotplug_lock, which is not exported. So let's provide a variant that takes the lock and only export that one. The lock is already held in arch/powerpc/platforms/pseries/hotplug-memory.c drivers/acpi/acpi_memhotplug.c So,

[PATCH v1 2/6] mm/memory_hotplug: make add_memory() take the device_hotplug_lock

2018-09-18 Thread David Hildenbrand
add_memory() currently does not take the device_hotplug_lock, however is aleady called under the lock from arch/powerpc/platforms/pseries/hotplug-memory.c drivers/acpi/acpi_memhotplug.c to synchronize against CPU hot-remove and similar. In general, we should hold the device_hotplug

[PATCH v1 0/6] mm: online/offline_pages called w.o. mem_hotplug_lock

2018-09-18 Thread David Hildenbrand
Reading through the code and studying how mem_hotplug_lock is to be used, I noticed that there are two places where we can end up calling device_online()/device_offline() - online_pages()/offline_pages() without the mem_hotplug_lock. And there are other places where we call device_online()/device_o

[PATCH v1 3/6] mm/memory_hotplug: fix online/offline_pages called w.o. mem_hotplug_lock

2018-09-18 Thread David Hildenbrand
There seem to be some problems as result of 30467e0b3be ("mm, hotplug: fix concurrent memory hot-add deadlock"), which tried to fix a possible lock inversion reported and discussed in [1] due to the two locks a) device_lock() b) mem_hotplug_lock While add_memory() first takes b), f

[PATCH v1 6/6] memory-hotplug.txt: Add some details about locking internals

2018-09-18 Thread David Hildenbrand
Let's document the magic a bit, especially why device_hotplug_lock is required when adding/removing memory and how it all play together with requests to online/offline memory from user space. Cc: Jonathan Corbet Cc: Michal Hocko Cc: Andrew Morton Reviewed-by: Pavel Tatashin Signed-off-by: Davi

[PATCH v1 5/6] powerpc/powernv: hold device_hotplug_lock in memtrace_offline_pages()

2018-09-18 Thread David Hildenbrand
Let's perform all checking + offlining + removing under device_hotplug_lock, so nobody can mess with these devices via sysfs concurrently. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Rashmica Gupta Cc: Balbir Singh Cc: Michael Neuling Reviewed-by: Pavel Tatashin S

[PATCH v1 4/6] powerpc/powernv: hold device_hotplug_lock when calling device_online()

2018-09-18 Thread David Hildenbrand
device_online() should be called with device_hotplug_lock() held. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Rashmica Gupta Cc: Balbir Singh Cc: Michael Neuling Reviewed-by: Pavel Tatashin Signed-off-by: David Hildenbrand --- arch/powerpc/platforms/powernv/memt

Re: [PATCH 0/8] staging: erofs: error handing and more tracepoints

2018-09-18 Thread Gao Xiang
Hi Greg, On 2018/9/18 19:19, Greg Kroah-Hartman wrote: > On Fri, Sep 14, 2018 at 10:40:22PM +0800, Gao Xiang wrote: >> In order to avoid conflicts with cleanup patches, Chao and I think >> it is better to send reviewed preview patches in the erofs mailing list >> to the community in time. >> >> So

Re: [PATCH 0/8] staging: erofs: error handing and more tracepoints

2018-09-18 Thread Greg Kroah-Hartman
On Tue, Sep 18, 2018 at 08:02:30PM +0800, Gao Xiang wrote: > Hi Greg, > > On 2018/9/18 19:19, Greg Kroah-Hartman wrote: > > On Fri, Sep 14, 2018 at 10:40:22PM +0800, Gao Xiang wrote: > >> In order to avoid conflicts with cleanup patches, Chao and I think > >> it is better to send reviewed preview

Re: [PATCH 0/8] staging: erofs: error handing and more tracepoints

2018-09-18 Thread Gao Xiang
Hi Greg, On 2018/9/18 20:14, Greg Kroah-Hartman wrote: > On Tue, Sep 18, 2018 at 08:02:30PM +0800, Gao Xiang wrote: >> Hi Greg, >> >> On 2018/9/18 19:19, Greg Kroah-Hartman wrote: >>> On Fri, Sep 14, 2018 at 10:40:22PM +0800, Gao Xiang wrote: In order to avoid conflicts with cleanup patches,

[PATCH] staging: olpc_dcon: add a missing dependency

2018-09-18 Thread Lubomir Rintel
WARNING: unmet direct dependencies detected for BACKLIGHT_CLASS_DEVICE Depends on [n]: HAS_IOMEM [=y] && BACKLIGHT_LCD_SUPPORT [=n] Selected by [y]: - FB_OLPC_DCON [=y] && STAGING [=y] && X86 [=y] && OLPC [=y] && FB [=y] && I2C [=y] && (GPIO_CS5535 [=n] || GPIO

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Peter Zijlstra
On Tue, Sep 18, 2018 at 12:41:57PM +0200, Thomas Gleixner wrote: > On Tue, 18 Sep 2018, Thomas Gleixner wrote: > > On Tue, 18 Sep 2018, Thomas Gleixner wrote: > > > On Tue, 18 Sep 2018, Peter Zijlstra wrote: > > > > > Your memory serves you right. That's indeed observable on CPUs which > > > > > la

Re: [PATCH 0/8] staging: erofs: error handing and more tracepoints

2018-09-18 Thread Dan Carpenter
On Tue, Sep 18, 2018 at 08:31:22PM +0800, Gao Xiang wrote: > (I have no clang environment to build kernel yet... :( I will try later, but > I have no idea why it happens, > and it seems a false warning). > > Thanks, > Gao Xiang > > > > > Or is gcc just being "dumb" here? What about clang, have

Re: [PATCH 0/8] staging: erofs: error handing and more tracepoints

2018-09-18 Thread Greg Kroah-Hartman
On Tue, Sep 18, 2018 at 04:03:37PM +0300, Dan Carpenter wrote: > On Tue, Sep 18, 2018 at 08:31:22PM +0800, Gao Xiang wrote: > > (I have no clang environment to build kernel yet... :( I will try later, > > but I have no idea why it happens, > > and it seems a false warning). > > > > Thanks, > > Ga

Re: [PATCH 0/8] staging: erofs: error handing and more tracepoints

2018-09-18 Thread Gao Xiang
On 2018/9/18 21:09, Greg Kroah-Hartman wrote: > On Tue, Sep 18, 2018 at 04:03:37PM +0300, Dan Carpenter wrote: >> On Tue, Sep 18, 2018 at 08:31:22PM +0800, Gao Xiang wrote: >>> (I have no clang environment to build kernel yet... :( I will try later, >>> but I have no idea why it happens, >>> an

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Thomas Gleixner
On Tue, 18 Sep 2018, Peter Zijlstra wrote: > On Tue, Sep 18, 2018 at 12:41:57PM +0200, Thomas Gleixner wrote: > > I still have one of the machines which is affected by this. > > Are we sure this isn't a load vs rdtsc reorder? Because if I look at the > current code: The load order of last vs. rdt

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Peter Zijlstra
On Tue, Sep 18, 2018 at 03:23:08PM +0200, Thomas Gleixner wrote: > On Tue, 18 Sep 2018, Peter Zijlstra wrote: > > On Tue, Sep 18, 2018 at 12:41:57PM +0200, Thomas Gleixner wrote: > > > I still have one of the machines which is affected by this. > > > > Are we sure this isn't a load vs rdtsc reorde

[PATCH] staging: erofs: initialize `pblk' with 0 first in `z_erofs_map_blocks_iter'

2018-09-18 Thread Gao Xiang
This commit message helps to understand why `pblk' is assigned with 0 here. [ Greg reported a warning raised by gcc. ] In file included from drivers/staging/erofs/unzip_vle.h:16:0, from drivers/staging/erofs/unzip_vle.c:13: drivers/staging/erofs/unzip_vle.c: In function ‘z_erofs_m

Re: [PATCH v2 1/6] staging: erofs: code cleanup for erofs_kmalloc()

2018-09-18 Thread Gao Xiang
On 2018/9/18 18:41, Chao Yu wrote: > On 2018/9/17 23:34, Chengguang Xu wrote: >> Define a dummy function of time_to_inject()/erofs_show_injection_info(), >> so that we don't have to check macro CONFIG_EROFS_FAULT_INJECTION in >> calling place. >> >> Signed-off-by: Chengguang Xu > > Reviewed-by

Re: [PATCH v2 2/6] staging: erofs: code cleanup for option parsing of fault_injection

2018-09-18 Thread Gao Xiang
Hi Chengguang, On 2018/9/18 18:47, cgxu519 wrote: > On 09/18/2018 03:07 PM, Gao Xiang wrote: >> Hi Chengguang, >> >> On 2018/9/17 23:34, Chengguang Xu wrote: >>> Define a dummpy function of erofs_build_fault_attr() when macro >>> CONFIG_EROFS_FAULT_INJECTION is disabled, so that we don't have to >

Re: [PATCH] staging: erofs: initialize `pblk' with 0 first in `z_erofs_map_blocks_iter'

2018-09-18 Thread Greg Kroah-Hartman
On Tue, Sep 18, 2018 at 09:44:36PM +0800, Gao Xiang wrote: > This commit message helps to understand why `pblk' is assigned with 0 here. > > [ Greg reported a warning raised by gcc. ] > In file included from drivers/staging/erofs/unzip_vle.h:16:0, > from drivers/staging/erofs/unzi

Re: [PATCH] staging: erofs: initialize `pblk' with 0 first in `z_erofs_map_blocks_iter'

2018-09-18 Thread Gao Xiang
Hi Greg, On 2018/9/18 21:57, Greg Kroah-Hartman wrote: > On Tue, Sep 18, 2018 at 09:44:36PM +0800, Gao Xiang wrote: >> This commit message helps to understand why `pblk' is assigned with 0 here. >> >> [ Greg reported a warning raised by gcc. ] >> In file included from drivers/staging/erofs/unzip_v

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Andy Lutomirski
> On Sep 18, 2018, at 12:52 AM, Thomas Gleixner wrote: > >> On Mon, 17 Sep 2018, John Stultz wrote: >>> On Mon, Sep 17, 2018 at 12:25 PM, Andy Lutomirski wrote: >>> Also, I'm not entirely convinced that this "last" thing is needed at >>> all. John, what's the scenario under which we need it? >

[PATCH v2 1/8] staging: erofs: fix a missing endian conversion

2018-09-18 Thread Gao Xiang
This patch fixes a missing endian conversion in vle_get_logical_extent_head. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/erofs/unzip_vle.c b/drivers/staging/erofs

[PATCH v2 2/8] staging: erofs: clean up z_erofs_map_blocks_iter

2018-09-18 Thread Gao Xiang
This patch mainly introduces `vle_map_blocks_iter_ctx' to clean up z_erofs_map_blocks_iter and vle_get_logical_extent_head. It changes the return value of `vle_get_logical_extent_head' to int for the later error handing. In addition, it also renames `pcn' to `pblk' since only `pblk' exists in erof

[PATCH v2 0/8] staging: erofs: error handing and more tracepoints

2018-09-18 Thread Gao Xiang
change log v2: - fix a gcc warning reported by Greg for the patch staging: erofs: clean up z_erofs_map_blocks_iter In order to avoid conflicts with cleanup patches, Chao and I think it is better to send reviewed preview patches in the erofs mailing list to the community in time. So her

[PATCH v2 3/8] staging: erofs: complete error handing of z_erofs_map_blocks_iter

2018-09-18 Thread Gao Xiang
This patch completes error handing of z_erofs_map_blocks_iter and vle_get_logical_extent_head, including no memory and io error cases. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 35 ++- 1 file changed, 26 insertions(+),

[PATCH v2 4/8] staging: erofs: fix a bug when appling cache strategy

2018-09-18 Thread Gao Xiang
As described in Kconfig, the last compressed pack should be cached for further reading for either `EROFS_FS_ZIP_CACHE_UNIPOLAR' or `EROFS_FS_ZIP_CACHE_BIPOLAR' by design. However, there is a bug in z_erofs_do_read_page, it will switch `initial' to `false' at the very beginning before it decides to

[PATCH v2 6/8] staging: erofs: avoid magic constants when initializing clusterbits

2018-09-18 Thread Gao Xiang
Currently erofs only supports clustersize == blocksize. and clustersize == 2^n * blocksize will be supported in the future. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/super.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/er

[PATCH v2 5/8] staging: erofs: complete error handing of z_erofs_do_read_page

2018-09-18 Thread Gao Xiang
This patch completes error handing code of z_erofs_do_read_page. PG_error will be set when some read error happens, therefore z_erofs_onlinepage_endio will unlock this page without setting PG_uptodate. Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 20

[PATCH v2 7/8] staging: erofs: add trace points for reading zipped data

2018-09-18 Thread Gao Xiang
From: Chen Gong This patch adds trace points for reading zipped data. Signed-off-by: Chen Gong Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Signed-off-by: Gao Xiang --- drivers/staging/erofs/include/trace/events/erofs.h | 20 ++-- drivers/staging/erofs/unzip_vle.c

[PATCH v2 8/8] staging: erofs: replace BUG_ON with DBG_BUGON in data.c

2018-09-18 Thread Gao Xiang
From: Chen Gong This patch replace BUG_ON with DBG_BUGON in data.c, and add necessary error handler. Signed-off-by: Chen Gong Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Gao Xiang --- drivers/staging/erofs/data.c | 31 --- 1 file changed, 20 insert

Re: [PATCH v2 0/8] staging: erofs: error handing and more tracepoints

2018-09-18 Thread Greg Kroah-Hartman
On Tue, Sep 18, 2018 at 10:25:32PM +0800, Gao Xiang wrote: > change log v2: > - fix a gcc warning reported by Greg for the patch > staging: erofs: clean up z_erofs_map_blocks_iter > > > In order to avoid conflicts with cleanup patches, Chao and I think > it is better to send reviewed pr

Re: [PATCH v2 0/8] staging: erofs: error handing and more tracepoints

2018-09-18 Thread Gao Xiang
Hi Greg, On 2018/9/18 22:36, Greg Kroah-Hartman wrote: > On Tue, Sep 18, 2018 at 10:25:32PM +0800, Gao Xiang wrote: >> change log v2: >> - fix a gcc warning reported by Greg for the patch >> staging: erofs: clean up z_erofs_map_blocks_iter >> >> >> In order to avoid conflicts with cleanu

[PATCH v3 1/4] staging: erofs: code cleanup for erofs_kmalloc()

2018-09-18 Thread Chengguang Xu
Define a dummy function of time_to_inject()/erofs_show_injection_info(), so that we don't have to check macro CONFIG_EROFS_FAULT_INJECTION in calling place. Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu Reviewed-by: Gao Xiang --- drivers/staging/erofs/internal.h | 13 ++--- 1 file

[PATCH v3 4/4] staging: erofs: option validation in remount

2018-09-18 Thread Chengguang Xu
Add option validation in remount. After this patch, remount can change recognized options, and for unknown options remount will fail and report error. Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu --- drivers/staging/erofs/super.c | 38 --- 1 file changed, 31

[PATCH v3 2/4] staging: erofs: code cleanup for option parsing of fault_injection

2018-09-18 Thread Chengguang Xu
Define a dummpy function of erofs_build_fault_attr() when macro CONFIG_EROFS_FAULT_INJECTION is disabled, so that we don't have to check the macro in calling place. Based on above adjustment, do proper code cleanup for option parsing of fault_injection. Signed-off-by: Chengguang Xu Reviewed-by: C

[PATCH v3 0/4] staging: erofs: option validation for remount and some code cleanups

2018-09-18 Thread Chengguang Xu
This patch set mainly does option validation for remount and at the same time does related code cleanups. Currently when we call fault injection related code we have to surround it with macro CONFIG_EROFS_FAULT_INJECTION in every calling place, after this patch set we don't have to do that, so the

[PATCH v3 3/4] staging: erofs: code cleanup for erofs_show_options()

2018-09-18 Thread Chengguang Xu
Add new helper erofs_get_fault_rate() to get fault rate instead of directly getting it from sbi, so we can remove the macro check surrounding it. Signed-off-by: Chengguang Xu Reviewed-by: Chao Yu --- drivers/staging/erofs/super.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletion

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Thomas Gleixner
On Tue, 18 Sep 2018, Thomas Gleixner wrote: > So if the TSC on CPU1 is slightly behind the TSC on CPU0 then now1 can be > smaller than cycle_last. The TSC sync stuff does not catch the small delta > for unknown raisins. I'll go and find that machine and test that again. Of course it does not trigg

Re: [PATCH v3 2/4] staging: erofs: code cleanup for option parsing of fault_injection

2018-09-18 Thread Gao Xiang
Hi Chengguang, On 2018/9/18 23:10, Chengguang Xu wrote: > Define a dummpy function of erofs_build_fault_attr() when macro > CONFIG_EROFS_FAULT_INJECTION is disabled, so that we don't have to > check the macro in calling place. Based on above adjustment, > do proper code cleanup for option parsing

Re: [PATCH v3 3/4] staging: erofs: code cleanup for erofs_show_options()

2018-09-18 Thread Gao Xiang
On 2018/9/18 23:10, Chengguang Xu wrote: > Add new helper erofs_get_fault_rate() to get fault rate instead of > directly getting it from sbi, so we can remove the macro check > surrounding it. > > Signed-off-by: Chengguang Xu > Reviewed-by: Chao Yu Reviewed-by: Gao Xiang Thanks, Gao Xiang

Re: [PATCH v3 4/4] staging: erofs: option validation in remount

2018-09-18 Thread Gao Xiang
Hi Chengguang, On 2018/9/18 23:10, Chengguang Xu wrote: > Add option validation in remount. After this patch, remount > can change recognized options, and for unknown options remount > will fail and report error. > > Signed-off-by: Chengguang Xu > Reviewed-by: Chao Yu > --- > drivers/staging/e

[PATCH 00/12] staging: vboxvideo: Preparation work for moving to atomic modesetting

2018-09-18 Thread Hans de Goede
Hi Greg, Here is a series of various cleanups and other prep. work for moving the vboxvideo driver over to atomic modesetting so that it can be moved out of staging. Regards, Hans ___ devel mailing list de...@linuxdriverproject.org http://driverdev.li

[PATCH 02/12] staging: vboxvideo: Move setup of modesetting from driver_load to mode_init

2018-09-18 Thread Hans de Goede
Move the setup of drm modesetting config from vbox_driver_load() to vbox_mode_init(). Signed-off-by: Hans de Goede --- drivers/staging/vboxvideo/vbox_main.c | 45 --- drivers/staging/vboxvideo/vbox_mode.c | 62 --- 2 files changed, 57 insertions(+), 50 del

[PATCH 03/12] staging: vboxvideo: Fold driver_load/unload into probe/remove functions

2018-09-18 Thread Hans de Goede
Fold the driver_load / unload functions into the probe / remove functions now that we are no longer using the deprecated drm_get_pci_dev() mechanism. Signed-off-by: Hans de Goede --- drivers/staging/vboxvideo/vbox_drv.c | 71 +-- drivers/staging/vboxvideo/vbox_drv.h |

[PATCH 05/12] staging: vboxvideo: Fold vbox_drm_resume() into vbox_pm_resume()

2018-09-18 Thread Hans de Goede
vbox_pm_resume() is the only caller of vbox_drm_resume(), so squash the 2 functions into 1. Signed-off-by: Hans de Goede --- drivers/staging/vboxvideo/vbox_drv.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/drivers/staging/vboxvideo/vbox_drv.

[PATCH 07/12] staging: vboxvideo: Expose creation of universal primary plane

2018-09-18 Thread Hans de Goede
Let's expose the primary plane initialization inside the vboxvideo driver in preparation for universal planes and atomic. Signed-off-by: Hans de Goede --- drivers/staging/vboxvideo/vbox_mode.c | 78 +-- 1 file changed, 74 insertions(+), 4 deletions(-) diff --git a/driver

[PATCH 06/12] staging: vboxvideo: Add fl_flag argument to vbox_fb_pin() helper

2018-09-18 Thread Hans de Goede
Allow specifying where to pin the framebuffer bo, so that this helper can be used from the cursor code too. Signed-off-by: Hans de Goede --- drivers/staging/vboxvideo/vbox_mode.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/vboxvideo/vbox_mode.c b/dr

[PATCH 01/12] staging: vboxvideo: Let DRM core handle connector registering

2018-09-18 Thread Hans de Goede
Registering the connector explicitly right after creation is not necessary for modesetting drivers, because drm_dev_register already takes care of this on the core side, by calling drm_modeset_register_all. Signed-off-by: Hans de Goede --- drivers/staging/vboxvideo/vbox_mode.c | 1 - 1 file chan

[PATCH 09/12] staging: vboxvideo: Move pin / unpin of fb out of vbox_crtc_set_base_and_mode

2018-09-18 Thread Hans de Goede
Move pin / unpin of fb out of vbox_crtc_set_base_and_mode() so that it can be used to implement the atomic_update drm_plane_helper_func for the primary plane. Signed-off-by: Hans de Goede --- drivers/staging/vboxvideo/vbox_drv.h | 5 +++ drivers/staging/vboxvideo/vbox_mode.c | 52 +

[PATCH 08/12] staging: vboxvideo: Init fb_info.fix.smem once from fbdev_create

2018-09-18 Thread Hans de Goede
The fbdev compat fb gets pinned into VRAM at creation and then gets pinned a second time when set as scanout buffer and unpinned when replaced, this means its pin count never becomes less then 1, so it is always at the same address and there is no need for the vbox_fbdev_set_base() call. Signed-of

[PATCH 10/12] staging: vboxvideo: Fix NULL ptr deref in vbox_set_up_input_mapping()

2018-09-18 Thread Hans de Goede
When vbox_set_up_input_mapping() gets called the first crtc might be disable and not have a fb at all, triggering a NUL ptr deref at: vbox->input_mapping_width = CRTC_FB(crtci)->width; Instead of using the fb from the crtc with id 0, just use the fb from the first crtc wit

[PATCH 04/12] staging: vboxvideo: Embed drm_device into driver structure

2018-09-18 Thread Hans de Goede
This is the recommended way to create the drm_device structure, according to DRM documentation. Signed-off-by: Hans de Goede --- drivers/staging/vboxvideo/vbox_drv.c | 110 +++--- drivers/staging/vboxvideo/vbox_drv.h | 17 ++-- drivers/staging/vboxvideo/vbox_fb.c | 19 +

[PATCH 11/12] staging: vboxvideo: Move bo_[un]resere calls into vbox_bo_[un]pin

2018-09-18 Thread Hans de Goede
We always need to reserve the bo around a pin / unpin, so move the reservation there. This allows removing the vbox_fb_[un]pin helpers. Note this means that we now no longer hold the bo reserved while k[un]mapping it in vbox_fb.c this is fine as it is not necessary to hold it reserved for this.

[PATCH 12/12] staging: vboxvideo: Add vbox_bo_k[un]map helper functions

2018-09-18 Thread Hans de Goede
Add vbox_bo_k[un]map helper functions instead of having code directly poking struct vbox_bo internals. While touch neighboring code anyways also fix a return -PTR_ERR(info), which should be return PTR_ERR(info). Signed-off-by: Hans de Goede --- drivers/staging/vboxvideo/vbox_drv.h | 2 ++ driv

Re: [PATCH v3] staging: android: ion: Add per-heap counters

2018-09-18 Thread Greg KH
On Tue, Sep 11, 2018 at 02:29:19PM +0300, Alexey Skidanov wrote: > Heap statistics have been removed and currently even basics statistics > are missing. > > This patch creates per heap debugfs directory /sys/kernel/debug/ > and adds the following counters: > - the number of allocated buffers; > -

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-18 Thread Darren Hart
On Fri, Sep 14, 2018 at 09:57:48PM +0100, Al Viro wrote: > On Fri, Sep 14, 2018 at 01:35:06PM -0700, Darren Hart wrote: > > > Acked-by: Darren Hart (VMware) > > > > As for a longer term solution, would it be possible to init fops in such > > a way that the compat_ioctl call defaults to generic_

Re: [PATCH v2 05/17] compat_ioctl: move more drivers to generic_compat_ioctl_ptrarg

2018-09-18 Thread Jason Gunthorpe
On Tue, Sep 18, 2018 at 10:51:08AM -0700, Darren Hart wrote: > On Fri, Sep 14, 2018 at 09:57:48PM +0100, Al Viro wrote: > > On Fri, Sep 14, 2018 at 01:35:06PM -0700, Darren Hart wrote: > > > > > Acked-by: Darren Hart (VMware) > > > > > > As for a longer term solution, would it be possible to in

Re: [PATCH v1 1/6] mm/memory_hotplug: make remove_memory() take the device_hotplug_lock

2018-09-18 Thread Rafael J. Wysocki
On Tue, Sep 18, 2018 at 1:48 PM David Hildenbrand wrote: > > remove_memory() is exported right now but requires the > device_hotplug_lock, which is not exported. So let's provide a variant > that takes the lock and only export that one. > > The lock is already held in > arch/powerpc/platfo

Re: [PATCH v1 2/6] mm/memory_hotplug: make add_memory() take the device_hotplug_lock

2018-09-18 Thread Rafael J. Wysocki
On Tue, Sep 18, 2018 at 1:48 PM David Hildenbrand wrote: > > add_memory() currently does not take the device_hotplug_lock, however > is aleady called under the lock from > arch/powerpc/platforms/pseries/hotplug-memory.c > drivers/acpi/acpi_memhotplug.c > to synchronize against CPU

[PATCH] x86/hyperv: suppress "PCI: Fatal: No config space access function found"

2018-09-18 Thread Dexuan Cui
A Generatin-2 Linux VM on Hyper-V doesn't have the legacy PCI bus, and users always see the scary warning, which is actually harmless. The patch is made to suppress the warning. Signed-off-by: Dexuan Cui Cc: K. Y. Srinivasan Cc: Haiyang Zhang Cc: Stephen Hemminger --- arch/x86/hyperv/hv_ini

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Thomas Gleixner
On Tue, 18 Sep 2018, Andy Lutomirski wrote: > > On Sep 18, 2018, at 12:52 AM, Thomas Gleixner wrote: > > > >> On Mon, 17 Sep 2018, John Stultz wrote: > >>> On Mon, Sep 17, 2018 at 12:25 PM, Andy Lutomirski wrote: > >>> Also, I'm not entirely convinced that this "last" thing is needed at > >>> al

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Andy Lutomirski
> On Sep 18, 2018, at 3:46 PM, Thomas Gleixner wrote: > > On Tue, 18 Sep 2018, Andy Lutomirski wrote: >>> On Sep 18, 2018, at 12:52 AM, Thomas Gleixner wrote: >>> > On Mon, 17 Sep 2018, John Stultz wrote: > On Mon, Sep 17, 2018 at 12:25 PM, Andy Lutomirski wrote: > Also, I'm not

Re: [patch 09/11] x86/vdso: Simplify the invalid vclock case

2018-09-18 Thread Thomas Gleixner
On Tue, 18 Sep 2018, Andy Lutomirski wrote: > > On Sep 18, 2018, at 3:46 PM, Thomas Gleixner wrote: > > On Tue, 18 Sep 2018, Andy Lutomirski wrote: > >> Do we do better if we use signed arithmetic for the whole calculation? > >> Then a small backwards movement would result in a small backwards res

Re: [PATCH v1 0/6] mm: online/offline_pages called w.o. mem_hotplug_lock

2018-09-18 Thread Balbir Singh
On Tue, Sep 18, 2018 at 01:48:16PM +0200, David Hildenbrand wrote: > Reading through the code and studying how mem_hotplug_lock is to be used, > I noticed that there are two places where we can end up calling > device_online()/device_offline() - online_pages()/offline_pages() without > the mem_hotp

[PATCH 2/6] staging: erofs: fold in `__update_workgrp_llen'

2018-09-18 Thread Gao Xiang
There is the only one user to use `__update_workgrp_llen'. Fold it in `z_erofs_vle_work_iter_begin' and cleanup related code. Signed-off-by: Gao Xiang --- drivers/staging/erofs/unzip_vle.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/staging/e

[PATCH 1/6] staging: erofs: remove redundant CONFIG_EROFS_FS_XATTRs

2018-09-18 Thread Gao Xiang
some CONFIG_EROFS_FS_XATTR conditions were added because of the historial Linux kernel compatibility, which are unneeded now. Signed-off-by: Gao Xiang --- Hi all, These are cleanup patches in Chao's erofs-dev test tree for a while. Many of them are trivial. In order for all preview patche

[PATCH 3/6] staging: erofs: drop multiref support temporarily

2018-09-18 Thread Gao Xiang
Multiref support means that a compressed page could have more than one reference, which is designed for on-disk data deduplication. However, mkfs doesn't support this mode at this moment, and the kernel implementation is also broken. Let's drop multiref support. If it is fully implemented in the f

[PATCH 4/6] staging: erofs: cleanup `z_erofs_vle_normalaccess_readpages'

2018-09-18 Thread Gao Xiang
This patch introduces `__should_decompress_synchronously' to cleanup `z_erofs_vle_normalaccess_readpages'. Signed-off-by: Gao Xiang --- drivers/staging/erofs/internal.h | 11 +++ drivers/staging/erofs/super.c | 5 + drivers/staging/erofs/unzip_vle.c | 20 ++-- 3

[PATCH 5/6] staging: erofs: add some comments for xattr subsystem

2018-09-18 Thread Gao Xiang
As Dan Carpenter pointed out, it is better to document what return values of these callbacks in `struct xattr_iter_handlers' mean and why it->ofs is increased regardless of success or failure in `xattr_foreach'. Suggested-by: Dan Carpenter Signed-off-by: Gao Xiang --- drivers/staging/erofs/xatt

[PATCH 6/6] staging: erofs: simplify return value of `xattr_foreach'

2018-09-18 Thread Gao Xiang
As Dan Carpenter pointed out, there is no need to propagate positive return values back to its callers. Suggested-by: Dan Carpenter Signed-off-by: Gao Xiang --- drivers/staging/erofs/xattr.c | 24 +--- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/drivers/st

[PATCH 07/29] staging: wilc1000: use 'void' return for wilc_wlan_txq_add_to_head()

2018-09-18 Thread Ajay Singh
Use 'void' return for wilc_wlan_txq_add_to_head() as its always return '0' value. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wi

[PATCH 04/29] staging: wilc1000: change return type to 'void' for wilc_deinit_host_int()

2018-09-18 Thread Ajay Singh
Cleanup patch to use 'void' return type for wilc_deinit_host_int(), as its return value is not used in caller. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 +--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +- 2 files changed, 2 insertions(+), 4 d

[PATCH 02/29] staging: wilc1000: change return type to 'void' for wilc_wlan_set_bssid()

2018-09-18 Thread Ajay Singh
Cleanup patch to use 'void' return type for wilc_wlan_set_bssid(), as its always returns the same value. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 4 +--- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) d

[PATCH 05/29] staging: wilc1000: change return type to 'void' for wilc_wfi_deinit_mon_interface()

2018-09-18 Thread Ajay Singh
Use 'void' return type for wilc_wfi_deinit_mon_interface(), as same value always return. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_mon.c | 3 +-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git

[PATCH 01/29] staging: wilc1000: change return type to 'void' for wilc_frame_register()

2018-09-18 Thread Ajay Singh
Cleanup patch to use 'void' return type for wilc_frame_register(), as its return value is not used. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 6 ++ drivers/staging/wilc1000/host_interface.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a

  1   2   >