Yisheng Xie [Thu, 22 Feb 2018 10:58:39 +0000 (18:58 +0800)]
staging: android: ion: Remove check of debug_file
There's no need to check the return value of debug_file for it is just a
debugfs and we will go on the following process if we failed to create
debug_file. So just remove it.
Merge tag 'iio-for-4.17a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
First round of new devices, features and cleanups for IIO in the 4.17 cycle.
Outside of IIO
* Strongly typed 64bit int_sqrt function needed by the mlx90632
New device support
* adc081s
- New driver supporting adc081s, adc101s and adc121s TI ADCs.
* ad5272
- New driver supproting the ad5272 and ad5274 ADI digital potentiometers
with DT bindings.
* axp20x_adc
- support the AXP813 ADC - includes rework patches to prepare for this.
* mlx90632
- New driver with dt bindings for this IR temperature sensor.
Features
* axp20x_adc
- Add DT bindings and probing.
* dht11
- The sensor has a wider range than advertised in the datasheet - support it.
* st_lsm6dsx
- Add hardware timestamp su9pport.
Cleanups
* ABI docs
- Update email contact for Matt Ranostay
* SPDX changes
- Matt Ranostay has moved his drivers over to SPDX. Currently we are making
this an author choice in IIO.
* ad7192
- Disable burnout current on misconfiguration. No actually effect as
they simply won't work otherwise.
* ad7476
- Drop a license definition that was replicating information in SPDX tag.
* ade7758
- Expand buf_lock to cover both buffer and state protection allowing
unintented uses of mlock in the core to be removed.
* ade7759
- Align parameters to opening parenthesis.
* at91_adc
- Depend on sysfs instead of selecting it - for try wide consistency.
* ccs811
- trivial naming type for a define.
* ep93xx
- Drop a redundant return as a result checking platform_get_resource.
* hts221
- Regmap conversion which simplifies the driver somewhat.
- Clean up some restricted endian cast warnings.
- Drop a trailing whitespace from a comment
- Drop an unnecessary get_unaligned by changing to the right 16bit data type.
* ms5611
- Fix coding style in the probe function (whitespace)
* st_accel
- Use strlcpy instead of strncpy to avoid potentially truncating a string.
Remove the macro 'gdm_tty_send_control' which adds unnecessary complexity,
is unused, and has arguments that could mistakenly be evaluated multiple
times.
Stefano Manni [Sun, 18 Feb 2018 19:52:13 +0000 (20:52 +0100)]
staging: rtl8712: fix signedness of length to rtl8717_set_ie
rtl8717_set_it() takes an unsigned int pointer as length,
fixed signedness in code using it.
Sparse warnings:
drivers/staging/rtl8712/ieee80211.c:191:53: warning: incorrect type in argument 5 (different signedness)
drivers/staging/rtl8712/ieee80211.c:191:53: expected unsigned int [usertype] *frlen
drivers/staging/rtl8712/ieee80211.c:191:53: got int *<noident>
drivers/staging/rtl8712/ieee80211.c:197:57: warning: incorrect type in argument 5 (different signedness)
drivers/staging/rtl8712/ieee80211.c:197:57: expected unsigned int [usertype] *frlen
drivers/staging/rtl8712/ieee80211.c:197:57: got int *<noident>
drivers/staging/rtl8712/ieee80211.c:199:63: warning: incorrect type in argument 5 (different signedness)
drivers/staging/rtl8712/ieee80211.c:199:63: expected unsigned int [usertype] *frlen
drivers/staging/rtl8712/ieee80211.c:199:63: got int *<noident>
drivers/staging/rtl8712/ieee80211.c:202:67: warning: incorrect type in argument 5 (different signedness)
drivers/staging/rtl8712/ieee80211.c:202:67: expected unsigned int [usertype] *frlen
drivers/staging/rtl8712/ieee80211.c:202:67: got int *<noident>
drivers/staging/rtl8712/ieee80211.c:206:73: warning: incorrect type in argument 5 (different signedness)
drivers/staging/rtl8712/ieee80211.c:206:73: expected unsigned int [usertype] *frlen
drivers/staging/rtl8712/ieee80211.c:206:73: got int *<noident>
drivers/staging/rtl8712/ieee80211.c:209:75: warning: incorrect type in argument 5 (different signedness)
drivers/staging/rtl8712/ieee80211.c:209:75: expected unsigned int [usertype] *frlen
drivers/staging/rtl8712/ieee80211.c:209:75: got int *<noident>
Stefano Manni [Sun, 18 Feb 2018 19:52:12 +0000 (20:52 +0100)]
staging: rtl8712: make unsigned length for rtl8717_get{_wpa_, _wpa2_, _}ie
Fixed r8712_get_ie, r8712_get_wpa_ie, r8712_get_wpa2_ie
to have a length as unsigned int pointer instead of signed.
Sparse warnings:
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:173:27: warning: incorrect type in argument 3 (different signedness)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:173:27: expected signed int *len
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:173:27: got unsigned int *<noident>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:613:35: warning: incorrect type in argument 3 (different signedness)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:613:35: expected signed int *len
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:613:35: got unsigned int *<noident>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1411:67: warning: incorrect type in argument 3 (different signedness)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1411:67: expected signed int *len
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1411:67: got unsigned int *<noident>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1992:33: warning: incorrect type in argument 2 (different signedness)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1992:33: expected int *rsn_ie_len
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1992:33: got unsigned int *<noident>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1998:33: warning: incorrect type in argument 2 (different signedness)
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1998:33: expected int *rsn_ie_len
drivers/staging/rtl8712/rtl871x_ioctl_linux.c:1998:33: got unsigned int *<noident>
drivers/staging/rtl8712/rtl871x_mlme.c:1701:59: warning: incorrect type in argument 3 (different signedness)
drivers/staging/rtl8712/rtl871x_mlme.c:1701:59: expected signed int *len
drivers/staging/rtl8712/rtl871x_mlme.c:1701:59: got unsigned int *<noident>
Dafna Hirschfeld [Sun, 18 Feb 2018 16:43:04 +0000 (18:43 +0200)]
staging: rtl8723bs: clean up conditionals
Move all closing braces and parentheses to the end of the line.
Remove braces from 'if' statements with a single 'then' line.
Move logical operators to the end of lines in multiline conditional.
Remove unnecessary parentheses.
Issues found with checkpatch.pl
Dafna Hirschfeld [Sun, 18 Feb 2018 20:08:34 +0000 (22:08 +0200)]
staging: rtl8188eu: Replace function name in string with __func__
Replace hard coded function name FillH2CCmd_88E with __func__
and break the line to avoid more then 80 characters line.
Issue found using checkpatch.pl
staging: comedi: Remove a newline inside a dereference
Remove a new line inside a dereference so that it is not on
multiple lines.
And avoid making the line go over 80 columns by moving the whole
dma_alloc_coherent() call back 4 columns. Problem found with
checkpatch.
Richard Lai [Tue, 13 Feb 2018 22:36:57 +0000 (22:36 +0000)]
iio: chemical: ccs811: Typo correction in HW_ID_VALUE constant define naming
This particular constant was named with prefix "CCS881", which should be
"CCS811" instead, just like the rest of constant names in the file, as this
driver implementation is for AMS CCS811 sensor. "CCS881" could literally be
referring to another sensor product unrelated to AMS CCS811 sensor.
Signed-off-by: Richard Lai <richard@richardman.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
rodrigosiqueira [Fri, 16 Feb 2018 19:44:41 +0000 (17:44 -0200)]
iio:pressure:ms5611: Fix coding style in probe function
This patch fixes the checkpatch.pl warning and error:
iio/pressure/ms5611.h:66: ERROR: code indent should use tabs where possible
iio/pressure/ms5611.h:66: WARNING: please, no spaces at the start of a line
iio/pressure/ms5611.h:66: ERROR: "foo* bar" should be "foo *bar"
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Harald Geyer [Sun, 11 Feb 2018 11:09:40 +0000 (11:09 +0000)]
iio: dht11: Improve detection of sensor type
The old code was based on a DHT11 datasheet which specifies a measurement
range of 20%-90% RH. Turns out the sensor actually reports values outside
this range, so we should support it as far as possible.
Reported-by: Edward Attfield <edward@attfield.ca> Signed-off-by: Harald Geyer <harald@ccbib.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
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.
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.
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.
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.
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.
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>
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>
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
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.
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>
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().
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.