openwrt/staging/blogic.git
6 years agostaging: wilc1000: fix line over 80 chars in wilc_wlan_cfg_indicate_rxi()
Ajay Singh [Fri, 16 Feb 2018 15:11:44 +0000 (20:41 +0530)]
staging: wilc1000: fix line over 80 chars in wilc_wlan_cfg_indicate_rxi()

Cleanup patch to fix "line over 80 characters" issue reported by
checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove blank line before close brace in wilc_wlan_cfg_get_wid_value()
Ajay Singh [Fri, 16 Feb 2018 15:11:43 +0000 (20:41 +0530)]
staging: wilc1000: remove blank line before close brace in wilc_wlan_cfg_get_wid_value()

Cleanup patch to remove "Blank lines aren't necessary before a close
brace '}'" issue reported by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 char in wilc_wlan_cfg_set_str()
Ajay Singh [Fri, 16 Feb 2018 15:11:42 +0000 (20:41 +0530)]
staging: wilc1000: fix line over 80 char in wilc_wlan_cfg_set_str()

Fix "line over 80 characters" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix open parenthesis alignment mismatch in wilc_parse_network_info()
Ajay Singh [Fri, 16 Feb 2018 15:11:41 +0000 (20:41 +0530)]
staging: wilc1000: fix open parenthesis alignment mismatch in wilc_parse_network_info()

Fix "Alignment should match open parenthesis" issue found by
checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 characters in sdio_clear_int_ext()
Ajay Singh [Fri, 16 Feb 2018 15:11:40 +0000 (20:41 +0530)]
staging: wilc1000: fix line over 80 characters in sdio_clear_int_ext()

Fix "line over 80 characters" issue found by checkpatch.pl script by
modifying the comment description.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix too many leading tabs warning in sdio_clear_int_ext()
Ajay Singh [Fri, 16 Feb 2018 15:11:39 +0000 (20:41 +0530)]
staging: wilc1000: fix too many leading tabs warning in sdio_clear_int_ext()

Refactor sdio_clear_int_ext() function to remove "Too many leading tabs"
warning reported by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: remove unnecessary comments to avoid line over 80 char issue
Ajay Singh [Fri, 16 Feb 2018 15:11:38 +0000 (20:41 +0530)]
staging: wilc1000: remove unnecessary comments to avoid line over 80 char issue

Fix "line over 80 characters" issue reported by checkpatch.pl script by
removing unnecessary comments.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Combine cache and uncache pools
Yisheng Xie [Mon, 12 Feb 2018 10:43:14 +0000 (18:43 +0800)]
staging: android: ion: Combine cache and uncache pools

Now we call dma_map in the dma_buf API callbacks and handle explicit
caching by the dma_buf sync API, which make cache and uncache pools
in the same handling flow, which can be combined.

Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Cleanup ion_page_pool_alloc_pages
Yisheng Xie [Mon, 12 Feb 2018 10:43:13 +0000 (18:43 +0800)]
staging: android: ion: Cleanup ion_page_pool_alloc_pages

ion_page_pool_alloc_pages calls alloc_pages to allocate pages for page
pools. If alloc_pages return NULL, it will return NULL, or it will
return the pages allocate from alloc_pages. So we can just return
alloc_pages without any judgement.

Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Return void instead of int
Yisheng Xie [Mon, 12 Feb 2018 10:43:12 +0000 (18:43 +0800)]
staging: android: ion: Return void instead of int

Now, nobody care about the return value of ion_page_pool_add, therefore
we can just make it return void.

Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Remove dead code in ion_page_pool_free
Yisheng Xie [Mon, 12 Feb 2018 10:43:11 +0000 (18:43 +0800)]
staging: android: ion: Remove dead code in ion_page_pool_free

ion_page_pool_add will always return 0, however ion_page_pool_free will
call ion_page_pool_free_pages when ion_page_pool_add's return value is
not 0, so it is a dead code which can be removed.

Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Remove lable debugfs_done
Yisheng Xie [Mon, 12 Feb 2018 10:43:10 +0000 (18:43 +0800)]
staging: android: ion: Remove lable debugfs_done

When failed to create debug_root, we will go on initail other part of
ion, so we can just info this message to user and do not need a lable
to jump.

Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Avoid NULL point in error path
Yisheng Xie [Mon, 12 Feb 2018 10:43:09 +0000 (18:43 +0800)]
staging: android: ion: Avoid NULL point in error path

If we failed to create debugfs for ion at ion_device_create, the
debug_root of ion_device will be NULL, and then when try to create debug
file for shrinker of heap it will be create on the top of debugfs. If we
also failed to create this the debug file, it call dentry_path to found
the path of debug_root, then a NULL point will occur.

Fix this by avoiding call dentry_path, but show the debug name only when
failed to create debug file for shrinker.

Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Nuke ion_page_pool_init
Yisheng Xie [Mon, 12 Feb 2018 10:43:08 +0000 (18:43 +0800)]
staging: android: ion: Nuke ion_page_pool_init

ion_page_pool.c now is used to apply pool APIs for system heap, which do
not need do any initial at device_initcall. Therefore ion_page_pool_init
can be nuked.

Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Remove unused include files for ion_page_pool.c
Yisheng Xie [Mon, 12 Feb 2018 10:43:07 +0000 (18:43 +0800)]
staging: android: ion: Remove unused include files for ion_page_pool.c

After rewrite of ion_page_pool, some of its include file is no need
anymore, just remove it.

Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: android: ion: Remove unused declaration ion_buffer_fault_user_mappings
Yisheng Xie [Mon, 12 Feb 2018 10:43:06 +0000 (18:43 +0800)]
staging: android: ion: Remove unused declaration ion_buffer_fault_user_mappings

ion_buffer_fault_user_mappings's definition has been removed and not be
used anymore, just remove its useless declaration.

Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:r8188eu: Remove unused struct pkt_file
Ivan Safonov [Sun, 4 Feb 2018 19:27:39 +0000 (22:27 +0300)]
staging:r8188eu: Remove unused struct pkt_file

Struct pkt_file is unused now, so remove it and correponding functions.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:r8188eu: Remove struct pkt_file from rtw_xmitframe_coalesce()
Ivan Safonov [Sun, 4 Feb 2018 19:27:38 +0000 (22:27 +0300)]
staging:r8188eu: Remove struct pkt_file from rtw_xmitframe_coalesce()

Struct pkt_file is a base to simple wrapper for skb_copy_bits().
Eliminate struct pkt_file usage in rtw_xmitframe_coalesce().

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:r8188eu: Remove struct pkt_file from update_attrib()
Ivan Safonov [Sun, 4 Feb 2018 19:27:37 +0000 (22:27 +0300)]
staging:r8188eu: Remove struct pkt_file from update_attrib()

Struct pkt_file is a base to simple wrapper for skb_copy_bits().
Do not use struct pkt_file in update_attrib().

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging:r8188eu: Remove struct pkt_file from set_qos()
Ivan Safonov [Sun, 4 Feb 2018 19:27:36 +0000 (22:27 +0300)]
staging:r8188eu: Remove struct pkt_file from set_qos()

Struct pkt_file is a base to simple wrapper for skb_copy_bits().
Use skb_copy_bits() without wrappers.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorinput: use the full 80 characters of the screen
David Kershner [Wed, 31 Jan 2018 16:41:17 +0000 (11:41 -0500)]
staging: unisys: visorinput: use the full 80 characters of the screen

Several of the comments in the code were not using the full 80 characters
of the screen. This patch combines the lines to make full use of the
screen.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorinput: Fix spacing after open paranthesis
David Kershner [Wed, 31 Jan 2018 16:41:16 +0000 (11:41 -0500)]
staging: unisys: visorinput: Fix spacing after open paranthesis

Checkpatch was giving errors about an open parenthesis being the last thing
on a line. This patch cleans up some names and removes the checkpatch
warnings.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorinput: combine ultrainputreport.h with visorinput.c
David Kershner [Wed, 31 Jan 2018 16:41:15 +0000 (11:41 -0500)]
staging: unisys: visorinput: combine ultrainputreport.h with visorinput.c

The file ultrainputreport.h was just being used by visorinput.c. Move the
definitions into visorinput.c and get rid of the file.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorinput: remove duplicate comments
David Kershner [Wed, 31 Jan 2018 16:41:14 +0000 (11:41 -0500)]
staging: unisys: visorinput: remove duplicate comments

Comments were based on individual entries, if we group the entries, we can
get rid of duplicate comments.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorinput: Clean up Makefile includes
David Kershner [Wed, 31 Jan 2018 16:41:13 +0000 (11:41 -0500)]
staging: unisys: visorinput: Clean up Makefile includes

The driver no longer needs to include drivers/staging/unisys/include, so we
can get rid of it.

Signed-off-by: David Kershner <david.kershner@unisys.com>
Reviewed-by: Tim Sell <timothy.sell@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: unisys: visorinput: remove need for 'depends on FB'
Tim Sell [Wed, 31 Jan 2018 16:41:12 +0000 (11:41 -0500)]
staging: unisys: visorinput: remove need for 'depends on FB'

Previously, we used a hack to determine the max x,y resolution of the
visor virtual mouse: we just looked at the resolution of the
first-registered framebuffer device, using the currently-valid assumption
that in a Unisys s-Par guest environment the video will be provided by an
efifb framebuffer device.

This hack has been removed, by instead determining the default mouse
resolution by looking at fields within the visor mouse channel memory,
mouse.x_res and mouse.y_res.  If these fields are 0, a default resolution
of 1024x768 is assumed.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: sm750fb: Remove typedefs from enums
Christian Luetke-Stetzkamp [Sun, 11 Feb 2018 17:23:17 +0000 (18:23 +0100)]
staging: sm750fb: Remove typedefs from enums

Fixes checkpatch.pl warning: do not add new typedefs.

Signed-off-by: Christian Luetke-Stetzkamp <christian@lkamp.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vt6656: Remove unnecessary 'out of memory' message
Dileep Sankhla [Mon, 12 Feb 2018 11:34:27 +0000 (17:04 +0530)]
staging: vt6656: Remove unnecessary 'out of memory' message

This patch removes the unnecessary out of memory message fixing the
following checkpatch.pl warning in usbpipe.c:
WARNING: Possible unnecessary 'out of memory' message

Signed-off-by: Dileep Sankhla <sankhla.dileep96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8723bs: make 'myid' function to follow kernel coding rules
Maciek Fijalkowski [Tue, 13 Feb 2018 00:03:14 +0000 (01:03 +0100)]
staging: rtl8723bs: make 'myid' function to follow kernel coding rules

Checkpatch.pl produced errors regarding inline keyword placement and
parenthesis around returned value in 'myid'.
Place inline after static keyword and remove mentioned parenthesis.

Signed-off-by: Maciek Fijalkowski <macfij7@wp.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtlwifi: add identifier names to function definition arguments
Erik Liodden [Sun, 28 Jan 2018 14:05:34 +0000 (15:05 +0100)]
staging: rtlwifi: add identifier names to function definition arguments

Add identifier names to function definition arguments to comply with
the kernel coding style and the naming convention in the rest of the
file.

Issues found by checkpatch.

Signed-off-by: Erik Liodden <erik.liodden@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: fsl-dpaa2: ethernet: dpaa2-eth.c: Fixed a style issue
Santha Meena Ramamoorthy [Thu, 15 Feb 2018 18:15:48 +0000 (10:15 -0800)]
Staging: fsl-dpaa2: ethernet: dpaa2-eth.c: Fixed a style issue

Fixed the checkpatch warning "Please don't use multiple blank lines"

Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoStaging: wlan-ng: fix unnecessary parantheses in prism2mgmt.c
Yash Omer [Fri, 16 Feb 2018 07:35:20 +0000 (13:05 +0530)]
Staging: wlan-ng: fix unnecessary parantheses in prism2mgmt.c

This patch fixes up a unncessary paratheses warning found by checkpatch.pl script.

Signed-off-by: Yash Omer <yashomer0007@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: fix CamelCase for regValue
Valentin Vidic [Sat, 27 Jan 2018 09:42:16 +0000 (10:42 +0100)]
staging: pi433: fix CamelCase for regValue

Local variable storing the new value for dio register
so replace with dio_value.  Update regaddr to dio_addr
to match.

Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <regValue>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: fix CamelCase for newValue
Valentin Vidic [Sat, 27 Jan 2018 09:42:15 +0000 (10:42 +0100)]
staging: pi433: fix CamelCase for newValue

Local variable storing the new value for bandwidth register
so replace with bandwidth.

Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <newValue>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: fix CamelCase for currentValue
Valentin Vidic [Sat, 27 Jan 2018 09:42:14 +0000 (10:42 +0100)]
staging: pi433: fix CamelCase for currentValue

Local variable storing the value for modulation register so replace
with modulation_reg.

Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <currentValue>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: fix CamelCase for Ohm identifiers
Valentin Vidic [Sat, 27 Jan 2018 09:42:13 +0000 (10:42 +0100)]
staging: pi433: fix CamelCase for Ohm identifiers

Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <fiftyOhm>
  CHECK: Avoid CamelCase: <twohundretOhm>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: fix CamelCase for antennaImpedance
Valentin Vidic [Sat, 27 Jan 2018 09:42:12 +0000 (10:42 +0100)]
staging: pi433: fix CamelCase for antennaImpedance

Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <antennaImpedance>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: fix CamelCase for powerLevel
Valentin Vidic [Sat, 27 Jan 2018 09:42:11 +0000 (10:42 +0100)]
staging: pi433: fix CamelCase for powerLevel

Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <powerLevel>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: pi433: fix CamelCase for syncValues
Valentin Vidic [Sat, 27 Jan 2018 09:42:10 +0000 (10:42 +0100)]
staging: pi433: fix CamelCase for syncValues

Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <syncValues>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: ccree: fixed pointer signedness warnings.
Jeremy Sowden [Sat, 20 Jan 2018 15:08:27 +0000 (15:08 +0000)]
staging: ccree: fixed pointer signedness warnings.

The driver uses a mixture of signed and unsigned integer variables for
holding arrays lengths and indices, which gives rise to the following
sparse warnings when the addresses of signed variables are passed to
functions expecting pointers to unsigned integers:

  drivers/staging/ccree/cc_buffer_mgr.c:1050:46: warning: incorrect type in argument 4 (different signedness)
  drivers/staging/ccree/cc_buffer_mgr.c:1050:46:    expected unsigned int [usertype] *lbytes
  drivers/staging/ccree/cc_buffer_mgr.c:1050:46:    got int *<noident>
  drivers/staging/ccree/cc_buffer_mgr.c:1083:62: warning: incorrect type in argument 7 (different signedness)
  drivers/staging/ccree/cc_buffer_mgr.c:1083:62:    expected unsigned int [usertype] *lbytes
  drivers/staging/ccree/cc_buffer_mgr.c:1083:62:    got int *<noident>
  drivers/staging/ccree/cc_buffer_mgr.c:1092:46: warning: incorrect type in argument 4 (different signedness)
  drivers/staging/ccree/cc_buffer_mgr.c:1092:46:    expected unsigned int [usertype] *lbytes
  drivers/staging/ccree/cc_buffer_mgr.c:1092:46:    got int *<noident>
  drivers/staging/ccree/cc_buffer_mgr.c:1120:49: warning: incorrect type in argument 4 (different signedness)
  drivers/staging/ccree/cc_buffer_mgr.c:1120:49:    expected unsigned int [usertype] *src_last_bytes
  drivers/staging/ccree/cc_buffer_mgr.c:1120:49:    got int *<noident>
  drivers/staging/ccree/cc_buffer_mgr.c:1121:49: warning: incorrect type in argument 5 (different signedness)
  drivers/staging/ccree/cc_buffer_mgr.c:1121:49:    expected unsigned int [usertype] *dst_last_bytes
  drivers/staging/ccree/cc_buffer_mgr.c:1121:49:    got int *<noident>
  drivers/staging/ccree/cc_buffer_mgr.c:1124:49: warning: incorrect type in argument 2 (different signedness)
  drivers/staging/ccree/cc_buffer_mgr.c:1124:49:    expected unsigned int [usertype] *src_last_bytes
  drivers/staging/ccree/cc_buffer_mgr.c:1124:49:    got int *<noident>
  drivers/staging/ccree/cc_buffer_mgr.c:1125:44: warning: incorrect type in argument 3 (different signedness)
  drivers/staging/ccree/cc_buffer_mgr.c:1125:44:    expected unsigned int [usertype] *dst_last_bytes
  drivers/staging/ccree/cc_buffer_mgr.c:1125:44:    got int *<noident>
  drivers/staging/ccree/cc_cipher.c:697:67: warning: incorrect type in argument 6 (different signedness)
  drivers/staging/ccree/cc_cipher.c:697:67:    expected unsigned int *seq_size
  drivers/staging/ccree/cc_cipher.c:697:67:    got int *<noident>
  drivers/staging/ccree/cc_cipher.c:700:31: warning: incorrect type in argument 8 (different signedness)
  drivers/staging/ccree/cc_cipher.c:700:31:    expected unsigned int *seq_size
  drivers/staging/ccree/cc_cipher.c:700:31:    got int *<noident>
  drivers/staging/ccree/cc_hash.c:480:57: warning: incorrect type in argument 6 (different signedness)
  drivers/staging/ccree/cc_hash.c:480:57:    expected unsigned int *seq_size
  drivers/staging/ccree/cc_hash.c:480:57:    got int *<noident>
  drivers/staging/ccree/cc_hash.c:530:57: warning: incorrect type in argument 6 (different signedness)
  drivers/staging/ccree/cc_hash.c:530:57:    expected unsigned int *seq_size
  drivers/staging/ccree/cc_hash.c:530:57:    got int *<noident>
  drivers/staging/ccree/cc_hash.c:1305:43: warning: incorrect type in argument 3 (different signedness)
  drivers/staging/ccree/cc_hash.c:1305:43:    expected unsigned int *seq_size
  drivers/staging/ccree/cc_hash.c:1305:43:    got int *<noident>
  drivers/staging/ccree/cc_hash.c:1307:43: warning: incorrect type in argument 3 (different signedness)
  drivers/staging/ccree/cc_hash.c:1307:43:    expected unsigned int *seq_size
  drivers/staging/ccree/cc_hash.c:1307:43:    got int *<noident>
  drivers/staging/ccree/cc_hash.c:1317:69: warning: incorrect type in argument 6 (different signedness)
  drivers/staging/ccree/cc_hash.c:1317:69:    expected unsigned int *seq_size
  drivers/staging/ccree/cc_hash.c:1317:69:    got int *<noident>
  drivers/staging/ccree/cc_hash.c:1390:43: warning: incorrect type in argument 3 (different signedness)
  drivers/staging/ccree/cc_hash.c:1390:43:    expected unsigned int *seq_size
  drivers/staging/ccree/cc_hash.c:1390:43:    got int *<noident>
  drivers/staging/ccree/cc_hash.c:1393:43: warning: incorrect type in argument 3 (different signedness)
  drivers/staging/ccree/cc_hash.c:1393:43:    expected unsigned int *seq_size
  drivers/staging/ccree/cc_hash.c:1393:43:    got int *<noident>
  drivers/staging/ccree/cc_hash.c:1404:69: warning: incorrect type in argument 6 (different signedness)
  drivers/staging/ccree/cc_hash.c:1404:69:    expected unsigned int *seq_size
  drivers/staging/ccree/cc_hash.c:1404:69:    got int *<noident>
  drivers/staging/ccree/cc_hash.c:1469:43: warning: incorrect type in argument 3 (different signedness)
  drivers/staging/ccree/cc_hash.c:1469:43:    expected unsigned int *seq_size
  drivers/staging/ccree/cc_hash.c:1469:43:    got int *<noident>
  drivers/staging/ccree/cc_hash.c:1472:43: warning: incorrect type in argument 3 (different signedness)
  drivers/staging/ccree/cc_hash.c:1472:43:    expected unsigned int *seq_size
  drivers/staging/ccree/cc_hash.c:1472:43:    got int *<noident>
  drivers/staging/ccree/cc_hash.c:1483:69: warning: incorrect type in argument 6 (different signedness)
  drivers/staging/ccree/cc_hash.c:1483:69:    expected unsigned int *seq_size
  drivers/staging/ccree/cc_hash.c:1483:69:    got int *<noident>
  drivers/staging/ccree/cc_aead.c:2011:37: warning: incorrect type in argument 3 (different signedness)
  drivers/staging/ccree/cc_aead.c:2011:37:    expected unsigned int *seq_size
  drivers/staging/ccree/cc_aead.c:2011:37:    got int *<noident>
  drivers/staging/ccree/cc_aead.c:2017:45: warning: incorrect type in argument 3 (different signedness)
  drivers/staging/ccree/cc_aead.c:2017:45:    expected unsigned int *seq_size
  drivers/staging/ccree/cc_aead.c:2017:45:    got int *<noident>
  drivers/staging/ccree/cc_aead.c:2020:45: warning: incorrect type in argument 3 (different signedness)
  drivers/staging/ccree/cc_aead.c:2020:45:    expected unsigned int *seq_size
  drivers/staging/ccree/cc_aead.c:2020:45:    got int *<noident>
  drivers/staging/ccree/cc_aead.c:2024:44: warning: incorrect type in argument 3 (different signedness)
  drivers/staging/ccree/cc_aead.c:2024:44:    expected unsigned int *seq_size
  drivers/staging/ccree/cc_aead.c:2024:44:    got int *<noident>
  drivers/staging/ccree/cc_aead.c:2026:44: warning: incorrect type in argument 3 (different signedness)
  drivers/staging/ccree/cc_aead.c:2026:44:    expected unsigned int *seq_size
  drivers/staging/ccree/cc_aead.c:2026:44:    got int *<noident>

This patch fixes those warnings by converting those signed variables to
unsigned as follows:

  * changed the types of a number of index and length variables from
    signed to unsigned integer types.

  * changed the return-types of a couple of functions that return length
    values which are assigned to one of these variables from signed to
    unsigned integer types.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 chars in wilc_spi_clear_int_ext()
Ajay Singh [Wed, 14 Feb 2018 11:10:15 +0000 (16:40 +0530)]
staging: wilc1000: fix line over 80 chars in wilc_spi_clear_int_ext()

Refactor wilc_spi_clear_int_ext() to fix the "line over 80 char" issue
reported by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 characters in wilc_spi_read_int()
Ajay Singh [Wed, 14 Feb 2018 11:10:14 +0000 (16:40 +0530)]
staging: wilc1000: fix line over 80 characters in wilc_spi_read_int()

Refactor wilc_spi_read_int() to fix the line over 80 char issues reported
by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 characters in wilc_spi_init()
Ajay Singh [Wed, 14 Feb 2018 11:10:13 +0000 (16:40 +0530)]
staging: wilc1000: fix line over 80 characters in wilc_spi_init()

Modified wilc_spi_init() to fix the line over 80 char issues reported
by checkpatch.pl script.
To overcome the checkpatch.pl reported issue modified debug logs and
comments used in wilc_spi_init().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: fix line over 80 characters in spi_cmd_complete()
Ajay Singh [Wed, 14 Feb 2018 11:10:12 +0000 (16:40 +0530)]
staging: wilc1000: fix line over 80 characters in spi_cmd_complete()

Refactor spi_cmd_complete() to fix the line over 80 char issues reported
by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: removed the unnecessary commented code
Ajay Singh [Wed, 14 Feb 2018 11:10:11 +0000 (16:40 +0530)]
staging: wilc1000: removed the unnecessary commented code

Cleanup patch to remove the unused commented code.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: modified code comments as per linux coding style
Ajay Singh [Wed, 14 Feb 2018 11:10:10 +0000 (16:40 +0530)]
staging: wilc1000: modified code comments as per linux coding style

Cleanup patch to follow the comments style as per the Linux coding
style.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename Handle_Key() and Handle_ConnectTimeout()
Ajay Singh [Tue, 30 Jan 2018 16:50:33 +0000 (22:20 +0530)]
staging: wilc1000: rename Handle_Key() and Handle_ConnectTimeout()

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename Handle_ScanDone function to avoid camelCase
Ajay Singh [Tue, 30 Jan 2018 16:50:32 +0000 (22:20 +0530)]
staging: wilc1000: rename Handle_ScanDone function to avoid camelCase

Fix "Avoid camelCase" issue reported by checkpatch.pl.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename pu8CurrByte variable to avoid camelCase
Ajay Singh [Tue, 30 Jan 2018 16:50:31 +0000 (22:20 +0530)]
staging: wilc1000: rename pu8CurrByte variable to avoid camelCase

Fix "Avoid camelCase" issue reported by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename u32WidsCount to avoid camelCase
Ajay Singh [Tue, 30 Jan 2018 16:50:30 +0000 (22:20 +0530)]
staging: wilc1000: rename u32WidsCount to avoid camelCase

Fix "Avoid camleCase" issue reported by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename strWIDList variable to avoid camelCase
Ajay Singh [Tue, 30 Jan 2018 16:50:29 +0000 (22:20 +0530)]
staging: wilc1000: rename strWIDList variable to avoid camelCase

Fix "Avoid camelCase" issue found by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename Handle_DelAllSta() and its variable using camelCase
Ajay Singh [Tue, 30 Jan 2018 16:50:28 +0000 (22:20 +0530)]
staging: wilc1000: rename Handle_DelAllSta() and its variable using camelCase

Fix "Avoid camelCase" issue reported by checkpatch.pl script.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: wilc1000: rename variables using camelCase in host_int_ParseJoinBssParam()
Ajay Singh [Tue, 30 Jan 2018 16:50:27 +0000 (22:20 +0530)]
staging: wilc1000: rename variables using camelCase in host_int_ParseJoinBssParam()

Fix "Avoid CamelCase:" issue reported by checkpatch.pl script.
Rename host_int_ParseJoinBssParam() & its variables using camelCase.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: merge vchiq_kern_lib.c into vchiq_arm.c
Arnd Bergmann [Fri, 2 Feb 2018 15:01:46 +0000 (16:01 +0100)]
staging: vc04_services: merge vchiq_kern_lib.c into vchiq_arm.c

There are two incompatible definitions of 'vchiq_instance_struct', so
passing them through vchiq_initialise(), vchiq_connect() or another
such interface is broken, as shown by building the driver with link-time
optimizations:

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h:129:0: error: type of 'vchiq_initialise' does not match original declaration [-Werror=lto-type-mismatch]
 extern VCHIQ_STATUS_T vchiq_initialise(VCHIQ_INSTANCE_T *pinstance);

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c:68:0: note: 'vchiq_initialise' was previously declared here
 VCHIQ_STATUS_T vchiq_initialise(VCHIQ_INSTANCE_T *instance_out)

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c:68:0: note: code may be misoptimized unless -fno-strict-aliasing is used
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_if.h:131:0: error: type of 'vchiq_connect' does not match original declaration [-Werror=lto-type-mismatch]
 extern VCHIQ_STATUS_T vchiq_connect(VCHIQ_INSTANCE_T instance);

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c:168:0: note: 'vchiq_connect' was previously declared here
 VCHIQ_STATUS_T vchiq_connect(VCHIQ_INSTANCE_T instance)

It's possible that only one of the two sides actually access the members,
but it's clear that they need to agree on the layout. The easiest way
to achieve this appears to be to merge the two files into one. I tried
moving the structure definition into a shared header first, but ended
up running into too many interdependencies that way.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: vc04_services: remove unused files
Corentin Labbe [Thu, 1 Feb 2018 20:39:03 +0000 (20:39 +0000)]
staging: vc04_services: remove unused files

All thoses files are not used by anybody.
Lets just remove them.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: remove l_wait_event() and related code
NeilBrown [Mon, 12 Feb 2018 23:47:59 +0000 (10:47 +1100)]
staging: lustre: remove l_wait_event() and related code

These macros are no longer used, so they can
be removed.

Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: replace l_wait_event_exclusive_head() with wait_event_idle_exclusive
NeilBrown [Mon, 12 Feb 2018 23:47:59 +0000 (10:47 +1100)]
staging: lustre: replace l_wait_event_exclusive_head() with wait_event_idle_exclusive

This l_wait_event_exclusive_head() will wait indefinitely
if the timeout is zero.  If it does wait with a timeout
and times out, the timeout for next time is set to zero.

The can be mapped to a call to either
 wait_event_idle_exclusive()
or
 wait_event_idle_exclusive_timeout()
depending in the timeout setting.

The current code arranges for LIFO queuing of waiters,
but include/event.h doesn't support that yet.
Until it does, fall back on FIFO with
wait_event_idle_exclusive{,_timeout}().

Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: remove l_wait_event from ptlrpc_set_wait
NeilBrown [Mon, 12 Feb 2018 23:47:59 +0000 (10:47 +1100)]
staging: lustre: remove l_wait_event from ptlrpc_set_wait

This is the last remaining use of l_wait_event().
It is the only use of LWI_TIMEOUT_INTR_ALL() which
has a meaning that timeouts can be interrupted.
Only interrupts by "fatal" signals are allowed, so
introduce l_wait_event_abortable_timeout() to
support this.

Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: use explicit poll loop in ptlrpc_unregister_reply
NeilBrown [Mon, 12 Feb 2018 23:47:59 +0000 (10:47 +1100)]
staging: lustre: use explicit poll loop in ptlrpc_unregister_reply

replace l_wait_event() with wait_event_idle_timeout() and explicit
loop.  This approach is easier to understand.

Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: use explicit poll loop in ptlrpc_service_unlink_rqbd
NeilBrown [Mon, 12 Feb 2018 23:47:59 +0000 (10:47 +1100)]
staging: lustre: use explicit poll loop in ptlrpc_service_unlink_rqbd

Rather an using l_wait_event(), use wait_event_idle_timeout()
with an explicit loop so it is easier to see what is happening.

Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: improve waiting in sptlrpc_req_refresh_ctx
NeilBrown [Mon, 12 Feb 2018 23:47:59 +0000 (10:47 +1100)]
staging: lustre: improve waiting in sptlrpc_req_refresh_ctx

Replace l_wait_event with wait_event_idle_timeout() and call the
handler function explicitly.  This makes it more clear
what is happening.

Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: use wait_event_idle_timeout in ptlrpcd()
NeilBrown [Mon, 12 Feb 2018 23:47:59 +0000 (10:47 +1100)]
staging: lustre: use wait_event_idle_timeout in ptlrpcd()

We can replace l_wait_event() with
wait_event_idle_timeout() here providing we call the
timeout function when wait_event_idle_timeout() returns zero.

As ptlrpc_expired_set() returns 1, the l_wait_event() aborts of the
first timeout.

Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: make polling loop in ptlrpc_unregister_bulk more obvious
NeilBrown [Mon, 12 Feb 2018 23:47:59 +0000 (10:47 +1100)]
staging: lustre: make polling loop in ptlrpc_unregister_bulk more obvious

This use of l_wait_event() is a polling loop that re-checks
every second.  Make this more obvious with a while loop
and wait_event_idle_timeout().

Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: remove back_to_sleep()
NeilBrown [Mon, 12 Feb 2018 23:47:59 +0000 (10:47 +1100)]
staging: lustre: remove back_to_sleep()

When 'back_to_sleep()' is passed as the 'timeout' function,
the effect is to wait indefinitely for the event, polling
once after the timeout.
If LWI_ON_SIGNAL_NOOP is given, then after the timeout
we allow fatal signals to interrupt the wait.

Make this more obvious in both places "back_to_sleep()" is
used but using two explicit sleeps.

The code in ptlrpcd_add_req() looks odd - why not just have one
wait_event_idle()?  However I believe this is a faithful
transformation of the existing code.

Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: simplify waiting in ptlrpc_invalidate_import()
NeilBrown [Mon, 12 Feb 2018 23:47:59 +0000 (10:47 +1100)]
staging: lustre: simplify waiting in ptlrpc_invalidate_import()

This waiter currently wakes up every second to re-test if
imp_flight is zero.  If we ensure wakeup is called whenever
imp_flight is decremented to zero, we can just have a simple
wait_event_idle_timeout().

So add a wake_up_all to the one place it is missing, and simplify
the wait_event.

Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: open code polling loop instead of using l_wait_event()
NeilBrown [Mon, 12 Feb 2018 23:47:59 +0000 (10:47 +1100)]
staging: lustre: open code polling loop instead of using l_wait_event()

Two places that LWI_TIMEOUT_INTERVAL() is used, the outcome is a
simple polling loop that polls every second for some event (with a
limit).

So write a simple loop to make this more apparent.

Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: simplify waiting in ldlm_completion_ast()
NeilBrown [Tue, 13 Feb 2018 20:17:30 +0000 (07:17 +1100)]
staging: lustre: simplify waiting in ldlm_completion_ast()

If a signal-callback (lwi_on_signal) is set without lwi_allow_intr, as
is the case in ldlm_completion_ast(), the behavior depends on the
timeout set.

If a timeout is set, then signals are ignored.  If the timeout is
reached, the timeout handler is called.  If the timeout handler
return 0, which ldlm_expired_completion_wait() always does, the
l_wait_event() switches to exactly the behavior if no timeout was set.

If no timeout is set, then "fatal" signals are not ignored.  If one
arrives the callback is run, but as the callback is empty in this
case, that is not relevant.

This can be simplified to:
 if a timeout is wanted
     wait_event_idle_timeout()
     if that timed out, call the timeout handler
 l_wait_event_abortable()

i.e. the code always waits indefinitely.  Sometimes it performs a
non-abortable wait first.  Sometimes it doesn't.  But it only
aborts before the condition is true if it is signaled.
This doesn't quite agree with the comments and debug messages.

Now that we call the timeout handler (ldlm_expired_completion_wait())
wait directly, we can pass the two args directly rather then
using a special-purpose struct.

Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: simplify l_wait_event when intr handler but no timeout.
NeilBrown [Mon, 12 Feb 2018 21:22:36 +0000 (08:22 +1100)]
staging: lustre: simplify l_wait_event when intr handler but no timeout.

If l_wait_event() is given a function to be called on a signal,
but no timeout or timeout handler, then the intr function is simply
called at the end if the wait was aborted by a signal.
So a simpler way to write the code (in the one place this case is
used) it to open-code the body of the function after the
wait_event, if -ERESTARTSYS was returned.

Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: introduce and use l_wait_event_abortable()
NeilBrown [Mon, 12 Feb 2018 21:22:36 +0000 (08:22 +1100)]
staging: lustre: introduce and use l_wait_event_abortable()

lustre sometimes wants to wait for an event, but abort if
one of a specific list of signals arrives.  This is a little
bit like wait_event_killable(), except that the signals are
identified a different way.

So introduce l_wait_event_abortable() which provides this
functionality.
Having separate functions for separate needs is more in line
with the pattern set by include/linux/wait.h, than having a
single function which tries to include all possible needs.

Also introduce l_wait_event_abortable_exclusive().

Note that l_wait_event() return -EINTR on a signal, while
Linux wait_event functions return -ERESTARTSYS.
l_wait_event_{abortable_,}exclusive follow the Linux pattern.

Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: use wait_event_idle_timeout() where appropriate.
NeilBrown [Mon, 12 Feb 2018 21:22:36 +0000 (08:22 +1100)]
staging: lustre: use wait_event_idle_timeout() where appropriate.

When the lwi arg has a timeout, but no timeout
callback function, l_wait_event() acts much the same as
wait_event_idle_timeout() - the wait is not interruptible and
simply waits for the event or the timeouts.

The most noticable difference is that the return value is
-ETIMEDOUT or 0, rather than 0 or non-zero.

Another difference is that if the timeout is zero, l_wait_event()
will not time out at all.  In the one case where that is possible
we need to conditionally use wait_event_idle().

So replace all such calls with wait_event_idle_timeout(), being
careful of the return value.

In one case, there is no event expected, only the timeout
is needed.  So use schedule_timeout_uninterruptible().

Note that the presence or absence of LWI_ON_SIGNAL_NOOP
has no effect in these cases.  It only has effect if the timeout
callback is non-NULL, or the timeout is zero, or
LWI_TIMEOUT_INTR_ALL() is used.

Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: discard cfs_time_seconds()
NeilBrown [Mon, 12 Feb 2018 21:22:36 +0000 (08:22 +1100)]
staging: lustre: discard cfs_time_seconds()

cfs_time_seconds() converts a number of seconds to the
matching number of jiffies.
The standard way to do this in Linux is  "* HZ".
So discard cfs_time_seconds() and use "* HZ" instead.

Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: replace simple cases of l_wait_event() with wait_event().
NeilBrown [Mon, 12 Feb 2018 21:22:36 +0000 (08:22 +1100)]
staging: lustre: replace simple cases of l_wait_event() with wait_event().

When the lwi arg is full of zeros, l_wait_event() behaves almost
identically to the standard wait_event_idle() interface, so use that
instead.

l_wait_event() uses TASK_INTERRUPTIBLE, but blocks all signals.
wait_event_idle() uses the new TASK_IDLE and so avoids adding
to the load average without needing to block signals.

In one case, wait_event_idle_exclusive() is needed.

Also remove all l_wait_condition*() macros which were short-cuts
for setting lwi to {0}.

Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: discard SVC_SIGNAL and related functions
NeilBrown [Mon, 12 Feb 2018 21:22:36 +0000 (08:22 +1100)]
staging: lustre: discard SVC_SIGNAL and related functions

This flag is never set, so remove checks and remove
the flag.

Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agosched/wait: add wait_event_idle() functions.
NeilBrown [Mon, 12 Feb 2018 21:22:36 +0000 (08:22 +1100)]
sched/wait: add wait_event_idle() functions.

The new TASK_IDLE state (TASK_UNINTERRUPTIBLE | __TASK_NOLOAD)
is not much used.  One way to make it easier to use is to
add wait_event*() family functions that make use of it.
This patch adds:
  wait_event_idle()
  wait_event_idle_timeout()
  wait_event_idle_exclusive()
  wait_event_idle_exclusive_timeout()

This set was chosen because lustre needs them before
it can discard its own l_wait_event() macro.

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: NeilBrown <neilb@suse.com>
Reviewed-by: Patrick Farrell <paf@cray.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: llite: refine ll_find_alias based on d_exact_alias
NeilBrown [Mon, 12 Feb 2018 21:30:48 +0000 (08:30 +1100)]
staging: lustre: llite: refine ll_find_alias based on d_exact_alias

The task of ll_find_alias() is now very similar to d_exact_alias().
We cannot use that function directly, but we can copy much of
the structure so that the similarities and differences are more
obvious.
Examining d_exact_alias() shows that the d_lock spinlock does not
need to be held in ll_find_alias as much as it currently is.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: llite: simplify ll_find_alias()
NeilBrown [Mon, 12 Feb 2018 21:30:48 +0000 (08:30 +1100)]
staging: lustre: llite: simplify ll_find_alias()

Now that ll_find_alias is only searching for one type
of dentry, we can return as soon as we find it.
This allows substantial simplification, and brings the
bonus that we don't need to take the d_lock again just
to increment the ref-count.  We can increment it immediately
that the dentry is found.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: llite: remove directory-specific code from ll_find_alias()
NeilBrown [Mon, 12 Feb 2018 21:30:48 +0000 (08:30 +1100)]
staging: lustre: llite: remove directory-specific code from ll_find_alias()

Now that ll_find_alias() is never called for directories,
we can remove code that only applies to directories.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: llite: use d_splice_alias for directories.
NeilBrown [Mon, 12 Feb 2018 21:30:48 +0000 (08:30 +1100)]
staging: lustre: llite: use d_splice_alias for directories.

In the Linux dcache a directory only ever has one dentry,
so d_splice_alias() can be used by ll_splice_alias() for directories.
It will find the one dentry whether it is DCACHE_DISCONNECTED or
IS_ROOT() or d_lustre_invalid().
Separating out the directories from non-directories will allow us
to simplify the non-directory code.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: llite: handle DCACHE_PAR_LOOKUP in ll_dcompare
NeilBrown [Mon, 12 Feb 2018 21:30:47 +0000 (08:30 +1100)]
staging: lustre: llite: handle DCACHE_PAR_LOOKUP in ll_dcompare

ll_dcompare is used in two slightly different contexts.
It is called (from __d_lookup, __d_lookup_rcu, and d_exact_alias)
to compare a name against a dentry that is already in the dcache.
It is also called (from d_alloc_parallel) to compare a name against
a dentry that is not in the dcache yet, but is part of an active
"lookup" or "atomic_open" call.

In the first case we need to avoid matching against "invalid" dentries
as a match implies something about ldlm locks which is not accurate.
In the second case we need to allow matching against "invalid" dentries
as the dentry will always be invalid (set by ll_d_init()) but we still
want to guard against multiple concurrent lookups of the same name.
d_alloc_parallel() will repeat the call to ll_dcompare() after
the lookup has finished, and if the dentry is still invalid, the whole
d_alloc_parallel() process is repeated.  This assures us that it is safe
to report success whenever d_in_lookup().

With this patch, there will never be two threads concurrently in
ll_lookup_nd(), looking up the same name in the same directory.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: honor error code from ll_iget().
NeilBrown [Mon, 12 Feb 2018 21:09:25 +0000 (08:09 +1100)]
staging: lustre: honor error code from ll_iget().

Commit 020ecc6f3229 ("staging: lustre: llite: Remove IS_ERR tests")
changed ll_prep_inode to assume any error from ll_iget() meant
-ENOMEM because at that time it only returned NULL for errors.
Commit c3397e7e677b ("staging: lustre: llite: add error handler in
inode prepare phase") changed ll_iget() to once again return
meaningful codes, but nobody told ll_prep_inode().

So change ll_prep_inode() back to using PTR_ERR(*inode).

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: fix inverted test on strcmp
NeilBrown [Mon, 12 Feb 2018 21:09:25 +0000 (08:09 +1100)]
staging: lustre: fix inverted test on strcmp

This code tests various fields to see if they are different, except
for one where there test is if they are the same.
This is clearly wrong for a function that is tesding for equality.

So change "!strcmp()" which I always find hard to read, to
"strcmp() != 0" which obviously means that the strings are not equal.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: update the TODO list
James Simmons [Sun, 11 Feb 2018 23:00:08 +0000 (18:00 -0500)]
staging: lustre: update the TODO list

As more people become involved with the progression of the lustre
client it needs to more clear what needs to be done to leave
staging. Update the TODO list with the various bugs and changes
to accomplish this. Some are simple bugs and others are far more
complex task that will change many lines of code. Some even cover
updating the user land utilities to meet the kernel requirements.
Several bugs have already been addressed and just need to be
pushed to the staging tree.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: lustre: lnet: return of an error code should be negative
Sumit Pundir [Sun, 28 Jan 2018 05:24:55 +0000 (10:54 +0530)]
staging: lustre: lnet: return of an error code should be negative

Return value of error codes should typically be negative.
Issue reported by checkpatch.pl

Signed-off-by: Sumit Pundir <pundirsumit11@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agostaging: rtl8188eu: Move a blank line
Dafna Hirschfeld [Thu, 15 Feb 2018 22:36:52 +0000 (00:36 +0200)]
staging: rtl8188eu: Move a blank line

Move a blank line from in the middle of a declaration list to
after the declaration list, to improve readability.

Issue found by checkpatch.

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
6 years agoLinux 4.16-rc1
Linus Torvalds [Sun, 11 Feb 2018 23:04:29 +0000 (15:04 -0800)]
Linux 4.16-rc1

6 years agounify {de,}mangle_poll(), get rid of kernel-side POLL...
Al Viro [Thu, 1 Feb 2018 20:13:18 +0000 (15:13 -0500)]
unify {de,}mangle_poll(), get rid of kernel-side POLL...

except, again, POLLFREE and POLL_BUSY_LOOP.

With this, we finally get to the promised end result:

 - POLL{IN,OUT,...} are plain integers and *not* in __poll_t, so any
   stray instances of ->poll() still using those will be caught by
   sparse.

 - eventpoll.c and select.c warning-free wrt __poll_t

 - no more kernel-side definitions of POLL... - userland ones are
   visible through the entire kernel (and used pretty much only for
   mangle/demangle)

 - same behavior as after the first series (i.e. sparc et.al. epoll(2)
   working correctly).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
6 years agovfs: do bulk POLL* -> EPOLL* replacement
Linus Torvalds [Sun, 11 Feb 2018 22:34:03 +0000 (14:34 -0800)]
vfs: do bulk POLL* -> EPOLL* replacement

This is the mindless scripted replacement of kernel use of POLL*
variables as described by Al, done by this script:

    for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
        L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
        for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
    done

with de-mangling cleanups yet to come.

NOTE! On almost all architectures, the EPOLL* constants have the same
values as the POLL* constants do.  But they keyword here is "almost".
For various bad reasons they aren't the same, and epoll() doesn't
actually work quite correctly in some cases due to this on Sparc et al.

The next patch from Al will sort out the final differences, and we
should be all done.

Scripted-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
6 years agoMerge branch 'work.poll2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Sun, 11 Feb 2018 21:57:19 +0000 (13:57 -0800)]
Merge branch 'work.poll2' of git://git./linux/kernel/git/viro/vfs

Pull more poll annotation updates from Al Viro:
 "This is preparation to solving the problems you've mentioned in the
  original poll series.

  After this series, the kernel is ready for running

      for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
            L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
            for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
      done

  as a for bulk search-and-replace.

  After that, the kernel is ready to apply the patch to unify
  {de,}mangle_poll(), and then get rid of kernel-side POLL... uses
  entirely, and we should be all done with that stuff.

  Basically, that's what you suggested wrt KPOLL..., except that we can
  use EPOLL... instead - they already are arch-independent (and equal to
  what is currently kernel-side POLL...).

  After the preparations (in this series) switch to returning EPOLL...
  from ->poll() instances is completely mechanical and kernel-side
  POLL... can go away. The last step (killing kernel-side POLL... and
  unifying {de,}mangle_poll() has to be done after the
  search-and-replace job, since we need userland-side POLL... for
  unified {de,}mangle_poll(), thus the cherry-pick at the last step.

  After that we will have:

   - POLL{IN,OUT,...} *not* in __poll_t, so any stray instances of
     ->poll() still using those will be caught by sparse.

   - eventpoll.c and select.c warning-free wrt __poll_t

   - no more kernel-side definitions of POLL... - userland ones are
     visible through the entire kernel (and used pretty much only for
     mangle/demangle)

   - same behavior as after the first series (i.e. sparc et.al. epoll(2)
     working correctly)"

* 'work.poll2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  annotate ep_scan_ready_list()
  ep_send_events_proc(): return result via esed->res
  preparation to switching ->poll() to returning EPOLL...
  add EPOLLNVAL, annotate EPOLL... and event_poll->event
  use linux/poll.h instead of asm/poll.h
  xen: fix poll misannotation
  smc: missing poll annotations

6 years agoMerge tag 'xtensa-20180211' of git://github.com/jcmvbkbc/linux-xtensa
Linus Torvalds [Sun, 11 Feb 2018 21:54:52 +0000 (13:54 -0800)]
Merge tag 'xtensa-20180211' of git://github.com/jcmvbkbc/linux-xtensa

Pull xtense fix from Max Filippov:
 "Build fix for xtensa architecture with KASAN enabled"

* tag 'xtensa-20180211' of git://github.com/jcmvbkbc/linux-xtensa:
  xtensa: fix build with KASAN

6 years agoMerge tag 'nios2-v4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan...
Linus Torvalds [Sun, 11 Feb 2018 21:52:32 +0000 (13:52 -0800)]
Merge tag 'nios2-v4.16-rc1' of git://git./linux/kernel/git/lftan/nios2

Pull nios2 update from Ley Foon Tan:

 - clean up old Kconfig options from defconfig

 - remove leading 0x and 0s from bindings notation in dts files

* tag 'nios2-v4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2:
  nios2: defconfig: Cleanup from old Kconfig options
  nios2: dts: Remove leading 0x and 0s from bindings notation

6 years agoxtensa: fix build with KASAN
Max Filippov [Sun, 11 Feb 2018 09:07:54 +0000 (01:07 -0800)]
xtensa: fix build with KASAN

The commit 917538e212a2 ("kasan: clean up KASAN_SHADOW_SCALE_SHIFT
usage") removed KASAN_SHADOW_SCALE_SHIFT definition from
include/linux/kasan.h and added it to architecture-specific headers,
except for xtensa. This broke the xtensa build with KASAN enabled.
Define KASAN_SHADOW_SCALE_SHIFT in arch/xtensa/include/asm/kasan.h

Reported by: kbuild test robot <fengguang.wu@intel.com>
Fixes: 917538e212a2 ("kasan: clean up KASAN_SHADOW_SCALE_SHIFT usage")
Acked-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
6 years agonios2: defconfig: Cleanup from old Kconfig options
Krzysztof Kozlowski [Sun, 11 Feb 2018 15:01:17 +0000 (23:01 +0800)]
nios2: defconfig: Cleanup from old Kconfig options

Remove old, dead Kconfig option INET_LRO. It is gone since
commit 7bbf3cae65b6 ("ipv4: Remove inet_lro library").

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Ley Foon Tan <ley.foon.tan@intel.com>
6 years agonios2: dts: Remove leading 0x and 0s from bindings notation
Mathieu Malaterre [Sun, 11 Feb 2018 14:59:18 +0000 (22:59 +0800)]
nios2: dts: Remove leading 0x and 0s from bindings notation

Improve the DTS files by removing all the leading "0x" and zeros to fix the
following dtc warnings:

Warning (unit_address_format): Node /XXX unit name should not have leading "0x"

and

Warning (unit_address_format): Node /XXX unit name should not have leading 0s

Converted using the following command:

find . -type f \( -iname *.dts -o -iname *.dtsi \) -exec sed -E -i -e "s/@0x([0-9a-fA-F\.]+)\s?\{/@\L\1 \{/g" -e "s/@0+([0-9a-fA-F\.]+)\s?\{/@\L\1 \{/g" {} +

For simplicity, two sed expressions were used to solve each warnings separately.

To make the regex expression more robust a few other issues were resolved,
namely setting unit-address to lower case, and adding a whitespace before the
the opening curly brace:

https://elinux.org/Device_Tree_Linux#Linux_conventions

This is a follow up to commit 4c9847b7375a ("dt-bindings: Remove leading 0x from bindings notation")

Reported-by: David Daney <ddaney@caviumnetworks.com>
Suggested-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mathieu Malaterre <malat@debian.org>
Acked-by: Ley Foon Tan <ley.foon.tan@intel.com>
6 years agoMerge tag 'pci-v4.16-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
Linus Torvalds [Sat, 10 Feb 2018 22:08:26 +0000 (14:08 -0800)]
Merge tag 'pci-v4.16-fixes-1' of git://git./linux/kernel/git/helgaas/pci

Pull PCI fix from Bjorn Helgaas:
 "Fix a POWER9/powernv INTx regression from the merge window (Alexey
  Kardashevskiy)"

* tag 'pci-v4.16-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  powerpc/pci: Fix broken INTx configuration via OF

6 years agoMerge tag 'for-linus-20180210' of git://git.kernel.dk/linux-block
Linus Torvalds [Sat, 10 Feb 2018 22:05:11 +0000 (14:05 -0800)]
Merge tag 'for-linus-20180210' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "A few fixes to round off the merge window on the block side:

   - a set of bcache fixes by way of Michael Lyle, from the usual bcache
     suspects.

   - add a simple-to-hook-into function for bpf EIO error injection.

   - fix blk-wbt that mischarectized flushes as reads. Improve the logic
     so that flushes and writes are accounted as writes, and only reads
     as reads. From me.

   - fix requeue crash in BFQ, from Paolo"

* tag 'for-linus-20180210' of git://git.kernel.dk/linux-block:
  block, bfq: add requeue-request hook
  bcache: fix for data collapse after re-attaching an attached device
  bcache: return attach error when no cache set exist
  bcache: set writeback_rate_update_seconds in range [1, 60] seconds
  bcache: fix for allocator and register thread race
  bcache: set error_limit correctly
  bcache: properly set task state in bch_writeback_thread()
  bcache: fix high CPU occupancy during journal
  bcache: add journal statistic
  block: Add should_fail_bio() for bpf error injection
  blk-wbt: account flush requests correctly

6 years agoMerge tag 'platform-drivers-x86-v4.16-3' of git://github.com/dvhart/linux-pdx86
Linus Torvalds [Sat, 10 Feb 2018 21:55:33 +0000 (13:55 -0800)]
Merge tag 'platform-drivers-x86-v4.16-3' of git://github.com/dvhart/linux-pdx86

Pull x86 platform driver updates from Darren Hart:
 "Mellanox fixes and new system type support.

  Mostly data for new system types with a correction and an
  uninitialized variable fix"

[ Pulling from github because git.infradead.org currently seems to be
  down for some reason, but Darren had a backup location    - Linus ]

* tag 'platform-drivers-x86-v4.16-3' of git://github.com/dvhart/linux-pdx86:
  platform/x86: mlx-platform: Add support for new 200G IB and Ethernet systems
  platform/x86: mlx-platform: Add support for new msn201x system type
  platform/x86: mlx-platform: Add support for new msn274x system type
  platform/x86: mlx-platform: Fix power cable setting for msn21xx family
  platform/x86: mlx-platform: Add define for the negative bus
  platform/x86: mlx-platform: Use defines for bus assignment
  platform/mellanox: mlxreg-hotplug: Fix uninitialized variable

6 years agoMerge tag 'chrome-platform-for-linus-4.16' of git://git.kernel.org/pub/scm/linux...
Linus Torvalds [Sat, 10 Feb 2018 21:50:23 +0000 (13:50 -0800)]
Merge tag 'chrome-platform-for-linus-4.16' of git://git./linux/kernel/git/bleung/chrome-platform

Pull chrome platform updates from Benson Leung:

 - move cros_ec_dev to drivers/mfd

 - other small maintenance fixes

[ The cros_ec_dev movement came in earlier through the MFD tree  - Linus ]

* tag 'chrome-platform-for-linus-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform:
  platform/chrome: Use proper protocol transfer function
  platform/chrome: cros_ec_lpc: Add support for Google Glimmer
  platform/chrome: cros_ec_lpc: Register the driver if ACPI entry is missing.
  platform/chrome: cros_ec_lpc: remove redundant pointer request
  cros_ec: fix nul-termination for firmware build info
  platform/chrome: chromeos_laptop: make chromeos_laptop const

6 years agoMerge tag 'kvm-4.16-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Sat, 10 Feb 2018 21:16:35 +0000 (13:16 -0800)]
Merge tag 'kvm-4.16-1' of git://git./virt/kvm/kvm

Pull KVM updates from Radim Krčmář:
 "ARM:

   - icache invalidation optimizations, improving VM startup time

   - support for forwarded level-triggered interrupts, improving
     performance for timers and passthrough platform devices

   - a small fix for power-management notifiers, and some cosmetic
     changes

  PPC:

   - add MMIO emulation for vector loads and stores

   - allow HPT guests to run on a radix host on POWER9 v2.2 CPUs without
     requiring the complex thread synchronization of older CPU versions

   - improve the handling of escalation interrupts with the XIVE
     interrupt controller

   - support decrement register migration

   - various cleanups and bugfixes.

  s390:

   - Cornelia Huck passed maintainership to Janosch Frank

   - exitless interrupts for emulated devices

   - cleanup of cpuflag handling

   - kvm_stat counter improvements

   - VSIE improvements

   - mm cleanup

  x86:

   - hypervisor part of SEV

   - UMIP, RDPID, and MSR_SMI_COUNT emulation

   - paravirtualized TLB shootdown using the new KVM_VCPU_PREEMPTED bit

   - allow guests to see TOPOEXT, GFNI, VAES, VPCLMULQDQ, and more
     AVX512 features

   - show vcpu id in its anonymous inode name

   - many fixes and cleanups

   - per-VCPU MSR bitmaps (already merged through x86/pti branch)

   - stable KVM clock when nesting on Hyper-V (merged through
     x86/hyperv)"

* tag 'kvm-4.16-1' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (197 commits)
  KVM: PPC: Book3S: Add MMIO emulation for VMX instructions
  KVM: PPC: Book3S HV: Branch inside feature section
  KVM: PPC: Book3S HV: Make HPT resizing work on POWER9
  KVM: PPC: Book3S HV: Fix handling of secondary HPTEG in HPT resizing code
  KVM: PPC: Book3S PR: Fix broken select due to misspelling
  KVM: x86: don't forget vcpu_put() in kvm_arch_vcpu_ioctl_set_sregs()
  KVM: PPC: Book3S PR: Fix svcpu copying with preemption enabled
  KVM: PPC: Book3S HV: Drop locks before reading guest memory
  kvm: x86: remove efer_reload entry in kvm_vcpu_stat
  KVM: x86: AMD Processor Topology Information
  x86/kvm/vmx: do not use vm-exit instruction length for fast MMIO when running nested
  kvm: embed vcpu id to dentry of vcpu anon inode
  kvm: Map PFN-type memory regions as writable (if possible)
  x86/kvm: Make it compile on 32bit and with HYPYERVISOR_GUEST=n
  KVM: arm/arm64: Fixup userspace irqchip static key optimization
  KVM: arm/arm64: Fix userspace_irqchip_in_use counting
  KVM: arm/arm64: Fix incorrect timer_is_pending logic
  MAINTAINERS: update KVM/s390 maintainers
  MAINTAINERS: add Halil as additional vfio-ccw maintainer
  MAINTAINERS: add David as a reviewer for KVM/s390
  ...

6 years agopowerpc/pci: Fix broken INTx configuration via OF
Alexey Kardashevskiy [Fri, 9 Feb 2018 06:23:58 +0000 (17:23 +1100)]
powerpc/pci: Fix broken INTx configuration via OF

59f47eff03a0 ("powerpc/pci: Use of_irq_parse_and_map_pci() helper")
replaced of_irq_parse_pci() + irq_create_of_mapping() with
of_irq_parse_and_map_pci(), but neglected to capture the virq
returned by irq_create_of_mapping(), so virq remained zero, which
caused INTx configuration to fail.

Save the virq value returned by of_irq_parse_and_map_pci() and correct
the virq declaration to match the of_irq_parse_and_map_pci() signature.

Fixes: 59f47eff03a0 "powerpc/pci: Use of_irq_parse_and_map_pci() helper"
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
[bhelgaas: changelog]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
6 years agoMerge tag 'kbuild-v4.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
Linus Torvalds [Sat, 10 Feb 2018 03:32:41 +0000 (19:32 -0800)]
Merge tag 'kbuild-v4.16-2' of git://git./linux/kernel/git/masahiroy/linux-kbuild

Pull more Kbuild updates from Masahiro Yamada:
 "Makefile changes:
   - enable unused-variable warning that was wrongly disabled for clang

  Kconfig changes:
   - warn about blank 'help' and fix existing instances
   - fix 'choice' behavior to not write out invisible symbols
   - fix misc weirdness

  Coccinell changes:
   - fix false positive of free after managed memory alloc detection
   - improve performance of NULL dereference detection"

* tag 'kbuild-v4.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (21 commits)
  kconfig: remove const qualifier from sym_expand_string_value()
  kconfig: add xrealloc() helper
  kconfig: send error messages to stderr
  kconfig: echo stdin to stdout if either is redirected
  kconfig: remove check_stdin()
  kconfig: remove 'config*' pattern from .gitignnore
  kconfig: show '?' prompt even if no help text is available
  kconfig: do not write choice values when their dependency becomes n
  coccinelle: deref_null: avoid useless computation
  coccinelle: devm_free: reduce false positives
  kbuild: clang: disable unused variable warnings only when constant
  kconfig: Warn if help text is blank
  nios2: kconfig: Remove blank help text
  arm: vt8500: kconfig: Remove blank help text
  MIPS: kconfig: Remove blank help text
  MIPS: BCM63XX: kconfig: Remove blank help text
  lib/Kconfig.debug: Remove blank help text
  Staging: rtl8192e: kconfig: Remove blank help text
  Staging: rtl8192u: kconfig: Remove blank help text
  mmc: kconfig: Remove blank help text
  ...