Staging: comedi: s626: Remove all unused functions
Remove all #ifdef'ed static functions as they are not used anywhere
in the kernel. Some functions were detected using Coccinelle but removed by
hand and some were removed as the functions in which they were getting
used were also unused functions.
Script:
The newly added Hi6220 Ion code fails to build when the ION_OF helpers
are not present:
drivers/staging/android/ion/hisilicon/hi6220_ion.o: In function `hi6220_ion_remove':
hi6220_ion.c:(.text.hi6220_ion_remove+0x4c): undefined reference to `ion_destroy_platform_data'
drivers/staging/android/ion/hisilicon/hi6220_ion.o: In function `hi6220_ion_probe':
hi6220_ion.c:(.text.hi6220_ion_probe+0x5c): undefined reference to `ion_parse_dt'
hi6220_ion.c:(.text.hi6220_ion_probe+0xf8): undefined reference to `ion_destroy_platform_data'
This selects the symbol when needed.
Fixes: 2b40182a19bc ("staging: android: ion: Add ion driver for Hi6220 SoC platform") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Laura Abbott <labbott@redhat.com> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: android: ion: Fix return value check in hi6220_ion_probe()
In case of error, the function ion_device_create() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().
Instead of storing the return value of a function call into a variable and
then returning it, we can club the two into a single return statement. This
change was made using the following semantic patch by Coccinelle:
add braces to if/else clause to fix the checkpatch issue braces {}
should be used on all arms of if/else block. Does not affect flow
because only single statement inside if/else block.
staging: gs_fpgaboot: Remove FSF address from GPL notice
This patch fixes the checkpatch.pl warning:
CHECK: Do not include the paragraph about writing to the Free Software
Foundation's mailing address from the sample GPL notice. The FSF has
changed addresses in the past, and may do so again. Linux already
includes a copy of the GPL.
The function xlr_wakeup_queue is not used anywhere in the kernel.
Therefore, remove it. The static unused functions were detected
using Coccinelle but the change was done by hand.
Script used:
staging: ks7010: Remove the explicit cast on kmalloc
The assignment operator implicitly converts a void pointer to the type of the
pointer it is assigned to. Hence an explicit cast on the result of the kmalloc
function is not required.
Moshe Green [Thu, 15 Sep 2016 20:16:11 +0000 (23:16 +0300)]
staging: sm750fb: fix block comment style and spelling issues in ddk750_chip.c
Fix the following warning types:
- line length
- block comment line * prefix
- trailing */ on a separate line
found by the checkpatch.pl tool in multiple block comments.
Fix a single spelling error in a comment.
Signed-off-by: Moshe Green <mgmoshes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: lustre: clean function declarations in class_obd.c up
We get 2 warnings when building kernel with W=1:
drivers/staging/lustre/lustre/obdclass/linux/linux-module.c:413:5: warning: no previous prototype for 'class_procfs_init' [-Wmissing-prototypes]
drivers/staging/lustre/lustre/obdclass/linux/linux-module.c:449:5: warning: no previous prototype for 'class_procfs_clean' [-Wmissing-prototypes]
In fact, both functions are declared in
drivers/staging/lustre/lustre/obdclass/class_obd.c,but should be
declared in a header file, thus can be recognized in other file.
So this patch moves the declarations into
drivers/staging/lustre/lustre/include/obd_class.h.
staging: lustre: Change 'seq_printf' to 'seq_puts'
Fixes checkpatch.pl warning: Prefer seq_puts to seq_printf.
This can be done as both have same type of first two arguments in their
function definition.
This patch implements a workaround for a DIM2 issue where the device
macro, in case the asynchronous channel sends data (to MOST), sporadically
duplicates the synchronous blocks with a size of half the synchronous DBR
buffer.
The patch monitors the size of the unused asynchronous Tx DBR memory
(that includes the ping and pong sizes) to prevent the potential DBR
overflow for the asynchronous Tx DBR buffer.
The patched DIM2 HDM expects that the platform driver delivers the 2nd
platform irq (index 1) as the mlb_int of the DIM2 macro.
staging: most: hdm-dim2: round up DBR memory for async/ctrl
As the DBR memory is allocated in units of DBR_BLOCK_SIZE, it is more
efficient to configure the DIM2 IP to use whole blocks of the DBR memory.
This patch ceils the DBR memory size used by the DIM2 IP for async/ctrl
channels.
staging: most: hdm-dim2: double size of DBR buffer
This patch increases the size of the asynchronous and control DBR buffers
in the Tx path to twice the max. message size. This patch is needed to
increase the throughput for big messages.
The DIM2 HDM checks the parameters passed to the function
configure_channel() and adapts the buffer sizes of the configuration
according to the hardware limitation. This patch is needed to init
the HAL layer with the correct values.
Laura Abbott [Wed, 14 Sep 2016 15:33:58 +0000 (08:33 -0700)]
staging: android: ion: Make ION_OF depend on OF_ADDRESS
The Ion platform code uses of_platform_device_create which has
dependencies on OF_ADDRESS. Depending on OF is not sufficient
Building sparc64:allmodconfig ... failed
--------------
Error log:
...
drivers/built-in.o: In function `ion_parse_dt':
(.text+0x11aa2c): undefined reference to `of_platform_device_create'
Merge tag 'iio-for-4.9b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
Second set of iio new device support, features and cleanups for the 4.9 cycle.
New device support
* ad8801 dac
- new driver supporting ad8801 and ad8803 DACs.
* adc12138
- new driver supporting TI adc12130/adc12132 and adc12138 ADCs.
* ltc2485 adc
- new driver
* mxc6255
- add support for the mxc6225 part name and fixup the ID check so it works.
* vz89x VOC sensor
- add support for the vz89te part which drops the voc_short channel and adds
CRCs compared to other supported parts.
New features
* core
- immutable triggers. These effectively grant exclusive control over a
trigger. The typical usecase is a device representing an analog part
(perhaps a MUX) that needs to control the sampling of a downstream
ADC.
- resource managed trigger registration and triggered_buffer_init.
- iio_push_event now protected against case of the event interface
registration not having yet occured. Only matters if an interrupt
can occur during this window - might happen on shared interrupt lines.
- helper to let a driver query if the trigger it is using is provided by
itself (using the convention of both device and trigger having the same
parent).
* tools
- iio-utils. Used channel modifier scaling in preference to generic scaling
when both exist.
* at91-adc
- Add support for touchscreen switches closure time needed by some newer
parts.
* stx104
- support the ADC channels on this ADC/DAC board. As these are the primary
feature of the board also move the driver to the iio/adc directory.
* sx9500
- device tree bindings.
Cleanups / Fixes
* ad5755
- fix an off-by-one on devnr limit check (introduced earlier this cycle)
* ad7266
- drop NULL check on devm_regulator_get_optional as it can't return NULL.
* ak8974
- avoid an unused functional warning due to rework in PM core code.
- remove .owner field setting as done by i2c_core.
* ina2xx
- clear out a left over debug field from chip global data.
* hid-sensors
- avoid an unused functional warning due to rework in PM core code.
* maxim-thermocouple
- fix non static symbol warnings.
* ms5611
- fetch and enable regulators unconditionally when they aren't optional.
* sca3000
- whitespace cleanup.
* st_sensors
- fetch and enable regulators unconditionally rather than having them
supported as optional regulators (missunderstanding on my part amongst
others a while back)
- followup to previous patch fixes error checking on the regulators.
- mark symbols static where possible.
- use the 'is it my trigger' help function. This prevents the odd case
of another device triggering from the st-sensors trigger whilst the
st-sensors trigger is itself not using it but rather using say an hrtimer.
* ti-ads1015
- add missing of_node_put.
* vz89x
- rework to all support of new devices.
- prevent reading of a corrupted buffer.
- fixup a return value of 0/1 in a bool returning function.
Staging: vt6655: Remove unused function vnt_key_init_table
The function vnt_key_init_table is not used anywhere in the kernel.
Therefore, remove the function definition and prototype.
Grepped to find occurences.
This patch adds the const qualifier to the declaration of the member
name_suffix of structure most_channel_capability. It is needed since it
points to string literals.
Christian Gromm [Mon, 12 Sep 2016 14:26:13 +0000 (16:26 +0200)]
staging: most: core: show all linked channels
This patch is needed to have all linked channels being reported by the
show() function of the attribute file add_link. Currently user space can
only read back the latest link that has been established to a certain
channel.
Staging: comedi: drivers: Delete NULL check before pci_dev_put
The function pci_dev_put checks whether its argument is NULL and returns
immediately. Therefore, NULL test before the call if not needed.
Found using coccinelle:
@@
expression x;
@@
staging: rtl8712: fix coding style error reported from checkpatch
removed the following:
ERROR: code indent should use tabs where possible
WARNING: please, no spaces at the start of a line
WARNING: Statements should start on a tabstop
Hans de Goede [Sun, 11 Sep 2016 16:29:16 +0000 (18:29 +0200)]
iio: accel: mxc6255: Fix chip-id check
The initial commit adding support for the mxc6225 assumed the
mxc6225 has a chip-id of 0xe5 based on testing on a single Allwinner
A23 tablet with a mxc6225. Testing on a bunch of other Allwinner
tablets have shown that the chip-id for the mxc6225 is not constant.
A datasheet for the MXC6255 which I've found online says that bits
7 and 6 of the chip-id register are undefined (for the mxc6255), testing
on 5 different tablets with a mxc6225 has found the following ids:
0x25, 0x45, 0x65, 0x85, 0xe5. So it seems that for the mxc6225 bits
7, 6 and 5 of the chip-id register are undefined.
This commit adjusts the chip-id check so that the mxc6255 driver
properly recognizes the mxc6225 in all these tablets.
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
David Kershner [Fri, 2 Sep 2016 20:41:38 +0000 (16:41 -0400)]
staging: unisys: visorbus: Reorder functions to avoid including header
Visorchannel does not need to include visorbus_private.h; all it was
using it for was function prototypes. A simple reorder causes it to
no longer need to include 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>
staging: unisys: Move vbushelper.h contents to visorbus_private.h
The contents of vbushelper.h are now only used by visorbus, so it no longer
needs to be a general include file and it can be incorporated in the
visorbus private header.
Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <Timothy.Sell@unisys.com> Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Staging: wlan-ng: changed definition of DIDmib_dot11smt_dot11WEPDefaultKeysTable_key() macro
This patch changes definition of
DIDmib_dot11smt_dot11WEPDefaultKeysTable_key()
macro and uses DIDmib_dot11smt_dot11WEPDefaultKeysTable instead of
using directly (P80211DID_MKSECTION(1) | P80211DID_MKGROUP(4)).