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

2018-09-18 Thread Gao Xiang
Hi Chengguang, On 2018/9/19 0:58, Gao Xiang wrote: > 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: Che

[PATCH 29/29] staging: wilc1000: return exact error of register_netdev() from wilc_netdev_init()

2018-09-18 Thread Ajay Singh
Modified wilc_netdev_init() to return the error code received from register_netdev() during the failure condition. Earlier discussion link [1]. https://www.spinics.net/lists/linux-wireless/msg177304.html Suggested-by: Claudiu Beznea Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_

[PATCH 27/29] staging: wilc1000: use usleep_range() in place of udelay()

2018-09-18 Thread Ajay Singh
Changes to avoid the below checkpatch warning: 'usleep_range is preferred over udelay; see Documentation/timers/timers-howto.txt;' Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc

[PATCH 28/29] staging: wilc1000: avoid spaces preferred around checkpatch issue

2018-09-18 Thread Ajay Singh
Cleanup patch to add extra spaces around the '/' to avoid the below checkpatch warning. 'spaces preferred around that '/' (ctx:VxV)' Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/l

[PATCH 21/29] staging: wilc1000: avoid use of 'g_sdio' static variable

2018-09-18 Thread Ajay Singh
Instead of using static variable 'g_sdio' move it as part of 'wilc' struct. Also allocating the memory in the probe function and free during deinitialization. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 1 + drivers/staging/wilc1000/wilc_sdio.c | 54 ++

[PATCH 24/29] staging: wilc1000: remove p2p related static variables to wilc_vif struct

2018-09-18 Thread Ajay Singh
Avoid use of static variable and move them as part of private data(wilc_priv) struct. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 2 + drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 60 +++ drivers/staging/wilc1000/wilc_wfi_netdevic

[PATCH 25/29] staging: wilc1000: remove wilc_debugfs.c file as its not used

2018-09-18 Thread Ajay Singh
Deleted wilc_debugfs.c file as it's not used. Earlier discussion link: [1]. https://www.spinics.net/lists/linux-wireless/msg176076.html Suggested-by: Greg KH Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/Makefile | 5 +- drivers/staging/wilc1000/wilc_debugfs.c | 115 --

[PATCH 19/29] staging: wilc1000: avoid the use of 'hif_driver_comp' completion variable

2018-09-18 Thread Ajay Singh
Instead of using extra completion variable to handle the sync call now using msg->is_sync flag to handle the sync call. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 23 +++ drivers/staging/wilc1000/host_interface.h | 2 +- drivers

[PATCH 22/29] staging: wilc1000: avoid use of 'g_spi' static variable

2018-09-18 Thread Ajay Singh
Instead of using static variable 'g_spi' move it as part of 'wilc' struct. Also allocating the memory in the probe function and free is taken care in wilc_netdev_cleanup(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_spi.c | 58 +++-- 1 file change

[PATCH 20/29] staging: wilc1000: remove use of unnecessary 'wilc_connected_ssid' variable

2018-09-18 Thread Ajay Singh
'wilc_connected_ssid' actually used to store the BSSID information for connected BSSID. 'wilc_vif' already has 'bssid' variable to store the same information. So refactor code to remove 'wilc_connected_ssid' and instead used 'wilc_vif' struct 'bssid' element. Signed-off-by: Ajay Singh --- driver

[PATCH 18/29] staging: wilc1000: rename 'wilc_mac_cfg' struct to 'wilc_cfg_str_vals'

2018-09-18 Thread Ajay Singh
Rename 'wilc_mac_cfg' struct to 'wilc_cfg_str_vals' as its more appropriate for structure to store the values of string configuration. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_cfg.c | 14 +++--- drivers/staging/wilc1000/wilc_wlan_cfg.h | 4 ++-- 2 files changed,

[PATCH 17/29] staging: wilc1000: refactor code to avoid static variables for config parameters

2018-09-18 Thread Ajay Singh
Refactor the code in wilc_wlan_cfg.c file to avoid the use of static variables. Move the static variables as part of wilc struct and also dynamically allocating memory for keeping those variables. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 12 +- drivers/stagi

[PATCH 26/29] staging: wilc1000: remove unnecessary option used with ccflags-y in Makefile

2018-09-18 Thread Ajay Singh
Cleanup patch to remove -I(src) and -DWILC_ASIC_A0 option used in ccflag-y in Makefile. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/wilc1000/Makefile b/drivers/staging/wilc1000/Makefile index 5718bc4..37e85

[PATCH 15/29] staging: wilc1000: remove unused wid from cfg struct

2018-09-18 Thread Ajay Singh
Cleanup patch to remove the unused element stored in cfg struct. Removed those wid from the cfg variables whose value is not fetched(GET_CFG) from the code. In case the wid is only set to the firmware then there is need to store them as part of cfg variables, so removed the unused code. Signed-off

[PATCH 23/29] staging: wilc1000: remove unnecessary memset in sdio_init() & wilc_spi_init()

2018-09-18 Thread Ajay Singh
Cleanup changes to avoid unnecessary setting 'wilc->bus_data' value to zero as the buffer was allocated using kzalloc(). Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_sdio.c | 4 +--- drivers/staging/wilc1000/wilc_spi.c | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) dif

[PATCH 16/29] staging: wilc1000: refactor code to remove 'mac_status' from 'wilc_mac_cfg' struct

2018-09-18 Thread Ajay Singh
Refactor the code by removing use of 'mac_status' from 'wilc_mac_cfg' and only have the string type configuration values in 'wilc_mac_cfg' struct. Now fetch the value 'WID_STATUS' configuration from 'g_cfg_byte' array. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c |

[PATCH 13/29] staging: wilc1000: changes 'val' type to u8 in wilc_cfg_byte struct

2018-09-18 Thread Ajay Singh
Use the correct datatype for storing the byte value in 'wilc_cfg_byte' struct. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_cfg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.h b/drivers/staging/wilc1000/wilc_wlan

[PATCH 11/29] staging: wilc1000: refactor wilc_wlan_parse_info_frame() function

2018-09-18 Thread Ajay Singh
Return 'void' from wilc_wlan_parse_info_frame() as same constant value is returned always. Also removed the 'size' from input parameter as its not used in the function. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_cfg.c | 12 1 file changed, 4 insertions(+), 8 de

[PATCH 14/29] staging: wilc1000: remove unused wid type values

2018-09-18 Thread Ajay Singh
Cleanup patch to remove the wid type not used in the code. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_if.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index b81a73b..ce2066b 100644

[PATCH 12/29] staging: wilc1000: set default value of cfg response type in wilc_wlan_cfg_indicate_rx()

2018-09-18 Thread Ajay Singh
Handle the setting of default value for 'wilc_cfg_rsp' type for all cases in wilc_wlan_cfg_indicate_rx() as the caller make use of this value to know the type of the received message. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_cfg.c | 3 +-- 1 file changed, 1 insertion(+),

[PATCH 08/29] staging: wilc1000: change return type to 'void' tcp ack filter functions

2018-09-18 Thread Ajay Singh
Use 'void' return type for below functions as they always return '0' and their return value is not used by caller. add_tcp_pending_ack() update_tcp_session() add_tcp_pending_ack() Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c | 15 ++- 1 file changed, 6 insertion

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

2018-09-18 Thread Ajay Singh
Cleanup patch to use 'void' return type for wilc_wlan_cfg_indicate_rx(), as its return value is not used in caller. The value set in 'rsp' argument is used to get the success status. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_cfg.c | 8 ++-- drivers/staging/wilc1000/wil

[PATCH 09/29] staging: wilc1000: use 'void' return for wilc_wlan_txq_filter_dup_tcp_ack()

2018-09-18 Thread Ajay Singh
Use 'void' return for wilc_wlan_txq_filter_dup_tcp_ack() as it always return value '1' and its not used by the caller. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b

[PATCH 03/29] staging: wilc1000: change return type to 'void' for lock init & deinit functions

2018-09-18 Thread Ajay Singh
Cleanup patch to use 'void' return type for wlan_deinit_locks() & wlan_init_locks(), as same value is return. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/linux_wlan.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/linux_wlan.c b/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

[PATCH 00/29] staging: wilc1000: avoid static variables and cleanup changes

2018-09-18 Thread Ajay Singh
This patch series contains changes to avoid the use of static variables. Cleanup changes to fix some checkpatch issues and return void for function if their return value is not used. Also deleted 'wilc_debugfs.c' file as it's not used. Ajay Singh (29): staging: wilc1000: change return type to 'v

[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 06/29] staging: wilc1000: use 'void' return type for host_int_get_assoc_res_info()

2018-09-18 Thread Ajay Singh
Change return type to 'void' for host_int_get_assoc_res_info() as its return value is not used. 'rcvd_assoc_resp_info_len' parameter value is used to know the status. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 11 +-- 1 file changed, 5 insertions(+), 6 dele

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

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

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

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

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

[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

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

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

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

[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

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

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

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

[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

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

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

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

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

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

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

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

[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

[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

  1   2   >