Ioana Radulescu [Tue, 6 Mar 2018 17:43:46 +0000 (11:43 -0600)]
staging: fsl-mc/dpio: Use __leXX types where needed
Structures that are mapped to hardware registers should explicitly
specify the expected endianness for fields larger than 1 byte.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ioana Radulescu [Tue, 6 Mar 2018 17:43:45 +0000 (11:43 -0600)]
staging: fsl-mc/dpio: Fix cast truncate warning
Sparse reports the following warning:
drivers/staging/fsl-mc/include/dpaa2-fd.h:421:30:
warning: cast truncates bits from constant value (
ffff7fff becomes 7fff)
Fix this by explicitly masking the value with 0xffff.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Wed, 7 Mar 2018 10:39:09 +0000 (16:09 +0530)]
staging: rtl8192u: Replace printk() with more standardize output format.
printk() is the raw way to print output and should be avoided.
For drivers with defined "struct device object", dev_*macro() is
prefer and for "struct netdevice object", netdev_*macro() is prefer over
dev_*macro() to standardize the output format within the subsystem.
If no "struct device object" is defined prefer pr_*macro() over printk().
This patch Replace printk having a log level with the appropriate output
format according to the order of preference.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ioana Radulescu [Tue, 6 Mar 2018 17:43:44 +0000 (11:43 -0600)]
staging: fsl-mc/dpio: Fix incorrect cast
Move the cast in dpaa2_sg_get_addr() to the right place.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Santha Meena Ramamoorthy [Wed, 7 Mar 2018 07:54:51 +0000 (23:54 -0800)]
staging: rtl8188eu: use __func__ instead of function name
Replace occurrence of the function name in a string by reference to
__func__, to improve robustness and to conform to the Linux kernel coding
style. Issue found using checkpatch.
Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Santha Meena Ramamoorthy [Wed, 7 Mar 2018 07:55:50 +0000 (23:55 -0800)]
staging: rtl8188eu: fix typo in comment
Fix typo in the words 'transmitted' and 'failure' in the comment. Issue
found using checkpatch.
Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Reviewed-by: Vaishali Thakkar <vthakkar@vaishalithakkar.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Quytelda Kahja [Wed, 7 Mar 2018 01:31:41 +0000 (17:31 -0800)]
staging: most: Remove unnecessary usage of BUG_ON().
There is no need for the calls to BUG_ON() in this driver, which are
used to check if mbo or mbo->context are NULL; mbo is never NULL, and
if mbo->context is NULL it would have already been dereferenced and
oopsed before reaching the BUG_ON().
Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Acked-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kees Cook [Wed, 7 Mar 2018 20:54:44 +0000 (12:54 -0800)]
staging: lustre: Remove VLA usage
The kernel would like to have all stack VLA usage removed[1]. This switches
to a simple kasprintf() instead, and in the process fixes an off-by-one
between the allocation and the sprintf (allocation did not include NULL
byte in calculation).
[1] https://lkml.org/lkml/2018/3/7/621
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Thomas Avery [Mon, 5 Mar 2018 19:33:49 +0000 (14:33 -0500)]
staging: lustre: Remove yield() call
Remove yield() call. In this case it's use is considered broken, since
it is being assumed that yield() will let another process run that will
make the event true.
Signed-off-by: Thomas Avery <tavery321@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Valentin Vidic [Mon, 5 Mar 2018 07:02:19 +0000 (08:02 +0100)]
staging: pi433: fix CamelCase for paRamp enum
Fixes checkpatch warning:
CHECK: Avoid CamelCase: <paRamp>
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Valentin Vidic [Mon, 5 Mar 2018 07:02:18 +0000 (08:02 +0100)]
staging: pi433: fix CamelCase for Address variables
Fixes checkpatch warnings:
CHECK: Avoid CamelCase: <nodeAddress>
CHECK: Avoid CamelCase: <broadcastAddress>
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Valentin Vidic [Mon, 5 Mar 2018 07:02:17 +0000 (08:02 +0100)]
staging: pi433: fix CamelCase for address_filtering enum
Fixes checkpatch warnings:
CHECK: Avoid CamelCase: <filteringOff>
CHECK: Avoid CamelCase: <nodeAddress>
CHECK: Avoid CamelCase: <nodeOrBroadcastAddress>
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Valentin Vidic [Mon, 5 Mar 2018 07:02:16 +0000 (08:02 +0100)]
staging: pi433: fix CamelCase for afterSyncInterrupt
Fixes checkpatch warning:
CHECK: Avoid CamelCase: <afterSyncInterrupt>
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Valentin Vidic [Mon, 5 Mar 2018 07:02:15 +0000 (08:02 +0100)]
staging: pi433: fix CamelCase for flag enum
Fixes checkpatch warnings:
CHECK: Avoid CamelCase: <modeSwitchCompleted>
CHECK: Avoid CamelCase: <readyToReceive>
CHECK: Avoid CamelCase: <readyToSend>
CHECK: Avoid CamelCase: <pllLocked>
CHECK: Avoid CamelCase: <rssiExceededThreshold>
CHECK: Avoid CamelCase: <syncAddressMatch>
CHECK: Avoid CamelCase: <packetSent>
CHECK: Avoid CamelCase: <crcOk>
CHECK: Avoid CamelCase: <batteryLow>
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Valentin Vidic [Mon, 5 Mar 2018 07:02:14 +0000 (08:02 +0100)]
staging: pi433: fix CamelCase for packetFormat enum
Fixes checkpatch warnings:
CHECK: Avoid CamelCase: <packetFormat>
CHECK: Avoid CamelCase: <packetLengthFix>
CHECK: Avoid CamelCase: <packetLengthVar>
Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
Revert "staging: Disable lustre file system for MIPS, SH, and XTENSA"
This reverts commit
16f1eeb660bd2bfd223704ee6350706b39c55a7a.
The reason for this patch was that lustre used copy_from_user_page.
Commit
76133e66b141 ("staging/lustre: Replace jobid acquiring with per
node setting") removed that usage.
So the arch restrictions can go.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
staging: lustre: allow monolithic builds
Remove restriction the lustre must be built
as modules. It now works as a monolithic build.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
staging: lustre: ptlrpc: move thread creation out of module initialization
When the ptlrpc module is loaded, it starts the pinger thread and
calls LNetNIInit which starts various threads.
We don't need these threads until the module is actually being
used, such as when a lustre filesystem is mounted.
So move the thread creation into new ptlrpc_inc_ref() (modeled on
ptlrpcd_inc_ref()), and call that when needed, such as at mount time.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
staging: lustre: change sai_thread to sai_task.
Rather than allocating a ptlrpc_thread for the
stat-ahead thread, just use the task_struct provided
by kthreads directly.
As nothing ever waits for the sai_task, it must call do_exit()
directly rather than simply return from the function.
Also it cannot use kthread_should_stop() to know when to stop.
There is one caller which can ask it to stop so we need a simple
signaling mechanism. I've chosen to set ->sai_task to NULL
when the thread should finish up. The thread notices this and
cleans up and exits.
lli_sa_lock is used to avoid races between waking up the process
and the process exiting.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
staging: lustre: remove 'ptlrpc_thread usage' for sai_agl_thread
Lustre has a 'struct ptlrpc_thread' which provides
control functionality wrapped around kthreads.
None of the functionality used in statahead.c requires
ptlrcp_thread - it can all be done directly with kthreads.
So discard the ptlrpc_thread and just use a task_struct directly.
One particular change worth noting is that in the current
code, the thread performs some start-up actions and then
signals that it is ready to go. In the new code, the thread
is first created, then the startup actions are perform, then
the thread is woken up. This means there is no need to wait
any more than kthread_create() already waits.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
staging: lustre: remove unused flag from ptlrpc_thread
SVC_EVENT is no longer used.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
staging: lustre: ptlrpc: use workqueue for pinger
lustre has a "Pinger" kthread which periodically pings peers
to ensure all hosts are functioning.
This can more easily be done using a work queue.
As maintaining contact with other peers is import for
keeping the filesystem running, and as the filesystem might
be involved in freeing memory, it is safest to have a
separate WQ_MEM_RECLAIM workqueue.
The SVC_EVENT functionality to wake up the thread can be
replaced with mod_delayed_work().
Also use round_jiffies_up_relative() rather than setting a
minimum of 1 second delay. The PING_INTERVAL is measured in
seconds so this meets the need is allow the workqueue to
keep wakeups synchronized.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
staging: lustre: ptlrpc: use delayed_work in sec_gc
The garbage collection for security contexts currently
has a dedicated kthread which wakes up every 30 minutes
to discard old garbage.
Replace this with a simple delayed_work item on the
system work queue.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
staging: lustre: ldlm: use delayed_work for pools_recalc
ldlm currenty has a kthread which wakes up every so often
and calls ldlm_pools_recalc().
The thread is started and stopped, but no other external interactions
happen.
This can trivially be replaced by a delayed_work if we have
ldlm_pools_recalc() reschedule the work rather than just report
when to do that.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
staging: lustre: obdclass: use workqueue for zombie management.
obdclass currently maintains two lists of data structures
(imports and exports), and a kthread which will free
anything on either list. The thread is woken whenever
anything is added to either list.
This is exactly the sort of thing that workqueues exist for.
So discard the zombie kthread and the lists and locks, and
create a single workqueue. Each obd_import and obd_export
gets a work_struct to attach to this workqueue.
This requires a small change to import_sec_validate_get()
which was testing if an obd_import was on the zombie
list. This cannot have every safely found it to be
on the list (as it could be freed asynchronously)
so it must be dead code.
We could use system_wq instead of creating a dedicated
zombie_wq, but as we occasionally want to flush all pending
work, it is a little nicer to only have to wait for our own
work items.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
staging: lustre: ptlrpc: change GFP_NOFS to GFP_KERNEL
These allocations are performed during initialization,
so they don't need GFP_NOFS.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
staging: lustre: get entropy from nid when nid set.
When the 'lustre' module is loaded, it gets a list of
net devices and uses the node ids to add entropy
to the prng. This means that the network interfaces need
to be configured before the module is loaded, which prevents
the module from being compiled into a monolithic kernel.
So move this entropy addition to the moment when
the interface is imported to LNet and the node id is first known.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
staging: lustre: lnet: keep ln_nportals consistent
ln_nportals should be zero when no portals have
been allocated. This ensures that memory allocation failure
is handled correctly elsewhere.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
staging: lustre: obdclass: don't require lct_owner to be non-NULL.
Some places in lu_object.c allow lct_owner to be NULL, implying
that the code is built in to the kernel (not a module), but
two places don't. This prevents us from building lustre into
the kernel.
So remove the requirement and always allow lct_owner to be NULL.
This requires removing an "assert" that the module count is positive,
but this is redundant as module_put() already does the necessary test.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
staging: lustre: statahead: remove incorrect test on agl_list_empty()
Including agl_list_empty() in the wait_event_idle() condition
is pointless as the body of the loop doesn't do anything
about the agl list.
So if the list wasn't empty, the while loop would spin
indefinitely.
The test was removed in the lustre-release commit
672ab0e00d61 ("LU-3270 statahead: small fixes and cleanup"),
but not in the Linux commit
5231f7651c55 ("staging: lustre:
statahead: small fixes and cleanup").
Fixes: 5231f7651c55 ("staging: lustre: statahead: small fixes and cleanup")
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
staging: lustre: fix bug in osc_enter_cache_try
The lustre-release patch commit
bdc5bb52c554 ("LU-4933 osc:
Automatically increase the max_dirty_mb") changed
- if (cli->cl_dirty + PAGE_CACHE_SIZE <= cli->cl_dirty_max &&
+ if (cli->cl_dirty_pages < cli->cl_dirty_max_pages &&
When this patch landed in Linux a couple of years later, it landed as
- if (cli->cl_dirty + PAGE_SIZE <= cli->cl_dirty_max &&
+ if (cli->cl_dirty_pages <= cli->cl_dirty_max_pages &&
which is clearly different ('<=' vs '<'), and allows cl_dirty_pages to
increase beyond cl_dirty_max_pages - which causes a latter assertion
to fails.
Fixes: 3147b268400a ("staging: lustre: osc: Automatically increase the max_dirty_mb")
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
NeilBrown [Thu, 1 Mar 2018 23:31:25 +0000 (10:31 +1100)]
staging: lustre: obd_mount: use correct niduuid suffix.
Commit
4f016420d368 ("Staging: lustre: obdclass: Use kasprintf") moved
some sprintf() calls earlier in the code to combine them with
memory allocation and create kasprintf() calls.
In one case, this code movement moved the sprintf to a location where the
values being formatter were different.
In particular
sprintf(niduuid, "%s_%x", mgcname, i);
was move from *after* the line
i = 0;
to a location where the value of 'i' was at least 1.
This cause the wrong name to be formatted, and triggers
CERROR("del MDC UUID %s failed: rc = %d\n",
niduuid, rc);
at unmount time.
So use '0' instead of 'i'.
Fixes: 4f016420d368 ("Staging: lustre: obdclass: Use kasprintf")
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Santha Meena Ramamoorthy [Sat, 24 Feb 2018 22:56:36 +0000 (14:56 -0800)]
staging: lustre: remove else after return statement
Remove else after a return statement as it is not useful. Issue found
using checkpatch.
Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anders Roxell [Tue, 6 Mar 2018 09:11:50 +0000 (10:11 +0100)]
staging: fsl-mc/dpio: remove unused function
gcc warns that function 'qbman_pull_desc_set_token' is not used.
drivers/staging/fsl-mc/bus/dpio/qbman-portal.c:525:13: warning: ‘qbman_pull_desc_set_token’ defined but not used [-Wunused-function]
In the current code we remove that function.
Fixes: 321eecb06bfb ("bus: fsl-mc: dpio: add QBMan portal APIs for DPAA2")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Fri, 2 Mar 2018 14:22:49 +0000 (19:52 +0530)]
staging: wilc1000: rename u16DummyReasonCode to avoid camelCase
Fix 'Avoid camelCase' issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Fri, 2 Mar 2018 14:22:48 +0000 (19:52 +0530)]
staging: wilc1000: fix line over 80 char in handle_rcvd_ntwrk_info()
Fix 'line over 80 character' issues found by checkpatch.pl script by
use of temporary variable and avoided leading tab.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Fri, 2 Mar 2018 14:22:47 +0000 (19:52 +0530)]
staging: wilc1000: rename handle_connect_timeout() variables to avoid camelCase
Fix 'Avoid camelCase' issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Fri, 2 Mar 2018 14:22:46 +0000 (19:52 +0530)]
staging: wilc1000: fix line over 80 char in wilc_scan_complete_received()
Fix 'line over 80 character' issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Fri, 2 Mar 2018 14:22:45 +0000 (19:52 +0530)]
staging: wilc1000: fix line over 80 char in wilc_del_allstation() & wilc_deinit()
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>
Ajay Singh [Fri, 2 Mar 2018 14:22:44 +0000 (19:52 +0530)]
staging: wilc1000: fix line over 80 char in wilc_add_ptk()
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>
Ajay Singh [Fri, 2 Mar 2018 14:22:43 +0000 (19:52 +0530)]
staging: wilc1000: rename pstrHostIFkeyAttr to avoid camelCase issue
Fix 'Avoid camelCase' issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Fri, 2 Mar 2018 14:22:42 +0000 (19:52 +0530)]
staging: wilc1000: fix line over 80 char in host_int_parse_join_bss_param()
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>
Ajay Singh [Fri, 2 Mar 2018 14:22:41 +0000 (19:52 +0530)]
staging: wilc1000: fix line over 80 char for wilc_gnrl_async_info_received()
Fix 'line over 80 char' issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Fri, 2 Mar 2018 14:22:40 +0000 (19:52 +0530)]
staging: wilc1000: fix line over 80 char in wilc_network_info_received()
Fix 'line over 80 character' issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Fri, 2 Mar 2018 14:22:39 +0000 (19:52 +0530)]
staging: wilc1000: fix line over 80 char in handle_cfg_param()
Fix 'line over 80 char' issues found by checkpatch.pl script in
handle_cfg_param(). Rename variables and used temporary variables
to fix the line over 80 characters issue.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Fri, 2 Mar 2018 14:22:38 +0000 (19:52 +0530)]
staging: wilc1000: remove always 'true' check from 'if' statement
Fix few smatch warning related to 'warn: always true condition'.
handle_cfg_param() warn: always true condition
'(cfg_param_attr->auth_timeout < 65536) => (0-u16max < 65536)'
handle_cfg_param() warn: always true condition
'(cfg_param_attr->rts_threshold < 65536) => (0-u16max < 65536)'
handle_cfg_param() warn: always true condition
'(cfg_param_attr->beacon_interval < 65536) => (0-u16max < 65536)'
handle_cfg_param() warn: always true condition
'(cfg_param_attr->site_survey_scan_time < 65536) => (0-u16max <
65536)'
handle_cfg_param() warn: always true condition
'(cfg_param_attr->active_scan_time < 65536) => (0-u16max < 65536)'
handle_cfg_param() warn: always true condition
'(cfg_param_attr->passive_scan_time < 65536) => (0-u16max < 65536)'
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Fri, 2 Mar 2018 14:22:37 +0000 (19:52 +0530)]
staging: wilc1000: rename enuEvent to avoid camelCase
Fix "Avoid camelCase" issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Fri, 2 Mar 2018 14:17:20 +0000 (19:47 +0530)]
staging: wilc1000: fix line over 80 char in wilc_wlan_handle_rxq()
Refactor wilc_wlan_handle_rxq() to fix line over 80 character issue
found by checkpatch.pl script. Added a new function to split
'wilc_wlan_handle_rxq' function code.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Fri, 2 Mar 2018 14:17:19 +0000 (19:47 +0530)]
staging: wilc1000: fix line over 80 char in wilc_wlan_cfg_set()
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>
Ajay Singh [Fri, 2 Mar 2018 14:17:18 +0000 (19:47 +0530)]
staging: wilc1000: fix open parenthesis mismatch in wilc_wlan_cfg_get()
Fix 'Alignment should match open parenthesis' issue found by
checkpatch.pl script. Reduce the leading tab, to make space for open
parenthesis match.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Quytelda Kahja [Tue, 6 Mar 2018 09:34:08 +0000 (01:34 -0800)]
staging: most: Indent function parameter.
Indent the parameters for a function call that extends past 80 characters.
Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Quytelda Kahja [Tue, 6 Mar 2018 09:18:02 +0000 (01:18 -0800)]
staging: most: Add a blank line.
Use a blank line after components_show() function declaration.
Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Quytelda Kahja [Tue, 6 Mar 2018 10:00:04 +0000 (02:00 -0800)]
staging: ks7010: Replace literal with constant.
Replace literal bytestring with CIPHER_ID_WPA_WEP40 constant.
Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter [Tue, 6 Mar 2018 10:03:56 +0000 (13:03 +0300)]
staging: emxx_udc: Remove unnecessary NULL checks
These pointers can't be NULL so I have removed the checks.
The checking was sort of problematic as well because it didn't make
sense. In _nbu2ss_read_request_data() the && should have been ||. In
nbu2ss_gad_get_frame() we know that "pgadget" is non-NULL and "udc" is
an offset from "pgadget" so it can't be NULL.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Eric Anholt [Mon, 5 Mar 2018 20:28:02 +0000 (12:28 -0800)]
staging: vc04_services: Remove dead FRAGMENTS_T
It's not used in-tree, or in the downstream tree.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Santha Meena Ramamoorthy [Mon, 5 Mar 2018 18:56:13 +0000 (10:56 -0800)]
staging: rtl8188eu: replace NULL comparison with variable
Replace NULL comparison of the variable with the variable name or
!variable to conform to the Linux kernel coding style. Issue found using
checkpatch.
Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Santha Meena Ramamoorthy [Mon, 5 Mar 2018 18:37:59 +0000 (10:37 -0800)]
staging: rtl8188eu: place constant on the right side of test
Place constants on the right side of the test during comparisons to
conform to the Linux kernel coding style. Issue found using checkpatch.
Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Sat, 3 Mar 2018 21:11:42 +0000 (02:41 +0530)]
staging: rtl8723bs: Replace memset with eth_zero_addr
Use eth_zero_addr to assign zero address to the given address array
instead of memset when the second argument in memset is address
of zero. Coccinelle was used to do the replacement and add the
header file linux/etherdevice.h if not already present.
The Coccinelle semantic patch that makes this change is as follows:
@header@
@@
#include <linux/etherdevice.h>
@r1@
expression e;
@@
-memset(e,0x00,ETH_ALEN);
+eth_zero_addr(e);
@includeheader depends on r1 && !header@
@@
+ #include <linux/etherdevice.h>
#include <...>
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Sat, 3 Mar 2018 19:17:26 +0000 (00:47 +0530)]
staging: rtl8723bs: Remove unnecessary semicolon.
Remove unnecessary semicolon using semicolon.cocci Coccinelle script.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dafna Hirschfeld [Fri, 2 Mar 2018 13:09:58 +0000 (15:09 +0200)]
staging: rtl8192e: Add spaces around operators.
Add spaces around arithmetic and bitwise operators to improve
readability of the code.
Issues found with checkpatch.pl
Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dafna Hirschfeld [Fri, 2 Mar 2018 13:09:57 +0000 (15:09 +0200)]
staging: rtl8192e: Remove unnecessary parentheses
Remove unnecessary parentheses between 'address-of' operators
and a struct members.
Issues found with checkpatch.pl
Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dafna Hirschfeld [Fri, 2 Mar 2018 13:09:56 +0000 (15:09 +0200)]
staging: rtl8192e: Fix issues regarding blank lines
Fix multiple blank lines and blank lines after braces.
Issues found with checkpatch.pl
Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Sat, 3 Mar 2018 05:32:36 +0000 (11:02 +0530)]
staging: rtl8712: remove unnecessary parentheses
Remove unnecessary parentheses around variables to conform to the Linux
kernel coding style. Issue found using checkpatch.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Sat, 3 Mar 2018 05:32:35 +0000 (11:02 +0530)]
staging: rtl8712: Add spaces around '|'
Add spaces around '|' to conform to the Linux
kernel coding style. Issue found using checkpatch.
CHECK: spaces preferred around that '|'.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Sat, 3 Mar 2018 05:32:34 +0000 (11:02 +0530)]
staging: rtl8712: Added spaces around '+'
Add spaces around arithmetic operator '+', to conform to the Linux
kernel coding style. Issue found using checkpatch.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Sat, 3 Mar 2018 05:32:33 +0000 (11:02 +0530)]
staging: rtl8712: Remove multiple blank line(s)
Remove extra blank line(s) to conform to the Linux
kernel coding style. Issue found using checkpatch.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Sat, 3 Mar 2018 05:32:32 +0000 (11:02 +0530)]
staging: rtl8712: match alignment with open parenthesis
Delete/Add tabs and spaces to align the code to fix the
checkpatch issue: "CHECK: Alignment should match open parenthesis".
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Sat, 3 Mar 2018 05:32:31 +0000 (11:02 +0530)]
staging: rtl8712: Fixed 'tabstop' coding style warning
Replace a mix of tabs and spaces indentation by tabs only.
Fixed checkpatch warning "Statements should start on a tabstop".
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nishka Dasgupta [Sat, 3 Mar 2018 19:12:44 +0000 (00:42 +0530)]
staging: vc04_services: bcm2835-audio: Change to unsigned int *
Change 'unsigned *' to 'unsigned int *'. Issue found with checkpatch.
Signed-off-by: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nishka Dasgupta [Sat, 3 Mar 2018 18:54:28 +0000 (00:24 +0530)]
staging: vc04_services: bcm2835-audio Format multiline comment
Format multiline comment by moving '*/' to a new line. Issue found with
checkpatch.
Signed-off-by: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nishka Dasgupta [Thu, 1 Mar 2018 19:38:27 +0000 (01:08 +0530)]
staging: vc04_services: bcm2835-audio: Add blank line after declaration
Add blank line after declaration. Issue found with checkpatch.
Signed-off-by: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Sat, 3 Mar 2018 19:09:13 +0000 (00:39 +0530)]
staging: rtlwifi: Remove nonessential semicolon
Remove non-essential semicolon after 'else' and 'switch' statements. Issue
found using semicolon.cocci Coccinelle script.
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Santha Meena Ramamoorthy [Fri, 2 Mar 2018 14:14:39 +0000 (06:14 -0800)]
staging: rtlwifi: remove unneeded semicolon
Remove unneeded semicolon after 'while' and 'switch' statements. Issue
found using semicolon.cocci Coccinelle script.
Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Santha Meena Ramamoorthy [Fri, 2 Mar 2018 10:34:03 +0000 (02:34 -0800)]
staging: rtlwifi: remove condition where it has no effect
Remove condition where if and else branch are identical.
Issue found using cond_no_effect.cocci Coccinelle script.
Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rinkle Jain [Sun, 4 Mar 2018 07:22:25 +0000 (12:52 +0530)]
staging: vt6655: Fix style violation for line ending in '('
Replace line ending with '(' with function parameters to resolve
style issue found by checkpath.
Signed-off-by: Rinkle Jain <rinklejain96@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Santha Meena Ramamoorthy [Fri, 2 Mar 2018 14:05:52 +0000 (06:05 -0800)]
staging: vt6655: remove unnecessary parentheses
Remove unnecessary parentheses around variables to conform to the Linux
kernel coding style. Issue found using checkpatch.
Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dafna Hirschfeld [Sun, 4 Mar 2018 20:09:34 +0000 (22:09 +0200)]
staging: lustre: obdclass: Replace 'unsigned' with 'unsigned int'
Replace 'unsigned' with 'unsigned int' to improve readability.
Issues found with checkpatch.pl
Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dafna Hirschfeld [Sun, 4 Mar 2018 20:09:33 +0000 (22:09 +0200)]
staging: lustre: obdclass: Add 'const' to char* array
Replace 'const char*' arrays with 'const char * const'
since the values in the arrays are not changed.
Issues found with checkpatch.pl
Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dafna Hirschfeld [Sun, 4 Mar 2018 20:09:32 +0000 (22:09 +0200)]
staging: lustre: obdclass: Fix comparison to NULL
Replace comparison to NULL with a 'not' operator.
Issue found with checkpatch.
Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Sun, 4 Mar 2018 14:16:08 +0000 (19:46 +0530)]
staging: lustre: Replace "dont" with "don't"
Replace "dont" with "don't".
"Dont" is not same as "Do not" or "Don't".
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Sun, 4 Mar 2018 14:16:07 +0000 (19:46 +0530)]
staging: lustre: Replace "to to" with "to"
This patch replace "to to" with "to".
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Sun, 4 Mar 2018 14:16:06 +0000 (19:46 +0530)]
staging: lustre: Replace "be be" with "be"
This patch replace "be be" with "be".
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arushi Singhal [Mon, 5 Mar 2018 04:28:08 +0000 (09:58 +0530)]
staging: comedi: Replace "dont" with "don't
Replace "dont" with "don't".
"Dont" is not same as "Do not" or "Don't".
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Santha Meena Ramamoorthy [Mon, 5 Mar 2018 17:34:13 +0000 (09:34 -0800)]
staging: speakup: match alignment with open parenthesis
Match alignment with the open parenthesis to conform to the Linux kernel
coding style. Issue found using checkpatch.
Signed-off-by: Santha Meena Ramamoorthy <santhameena13@gmail.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Bogdan Purcareata [Thu, 1 Mar 2018 17:47:10 +0000 (11:47 -0600)]
staging: fsl-mc: Cleanup dpbp and dpcon API
Some functions and associated structures are not used by current code,
so remove them.
Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Quytelda Kahja [Thu, 1 Mar 2018 05:19:11 +0000 (21:19 -0800)]
staging: ks7010: Replace local frame type constants with kernel constants.
This driver defined constants FRAME_TYPE_* to represent frame control
field codes; however, these constants are already defined in the header
'linux/ieee80211.h' as IEEE80211_STYPE_*. This change removes the locally
defined constants and substitutes the kernel's constants.
Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Reviewed-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Quytelda Kahja [Thu, 1 Mar 2018 05:19:10 +0000 (21:19 -0800)]
staging: ks7010: Replace local capability constants with kernel constants.
This driver defined constants BSS_CAP_* to represent WLAN capability
codes; however, these constants are already defined in the header
'linux/ieee80211.h' as WLAN_CAPABILITY_*. This change removes the locally
defined constants and substitutes the kernel's constants.
Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Reviewed-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Quytelda Kahja [Thu, 1 Mar 2018 05:19:09 +0000 (21:19 -0800)]
staging: ks7010: Factor out repeated code into function 'ks_wlan_cap()'.
The code that generates a WLAN capability mask is repeated in five
functions. This change refactors that code into a new function, which is
called now in each of those functions.
Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Reviewed-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Quytelda Kahja [Thu, 1 Mar 2018 05:19:08 +0000 (21:19 -0800)]
staging: ks7010: Replace SSID_MAX_SIZE with IEEE80211_MAX_SSID_LEN.
SSID_MAX_SIZE is a constant defined locally in ks_hostif.h, but it should
be replaced with IEEE80211_MAX_SSID_LEN from the kernel's 802.11 header,
of which it is just a copy.
Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Reviewed-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Quytelda Kahja [Thu, 1 Mar 2018 05:19:07 +0000 (21:19 -0800)]
staging: ks7010: Use constants from ieee80211_eid instead of literal ints.
The case statement in get_ap_information() should not use literal integers
to parse information element IDs when these values are provided by name
in 'enum ieee80211_eid' in the header 'linux/ieee80211.h'.
Signed-off-by: Quytelda Kahja <quytelda@tamalin.org>
Reviewed-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ivan Safonov [Fri, 23 Feb 2018 14:57:42 +0000 (17:57 +0300)]
staging:r8188eu: use lib80211 CCMP decrypt
Custom AES decrypt implementation replaced with lib80211 library.
Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Fri, 23 Feb 2018 15:00:08 +0000 (15:00 +0000)]
staging: rtl8723bs: fix u8 less than zero check
The error variable ret is currently a u8 and so two comparisons
to see if an error return is less than zero will always be false
because ret is unsigned. Fix this by making ret an int.
Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jeremy Fertic [Sat, 24 Feb 2018 00:55:52 +0000 (17:55 -0700)]
staging: vt6655: remove unnecessary blank lines
Remove unnecessary blank lines found using checkpatch.pl script.
Signed-off-by: Jeremy Fertic <jeremyfertic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fengguang Wu [Wed, 28 Feb 2018 02:55:50 +0000 (10:55 +0800)]
staging: fsl-mc/dpio: qbman_pull_desc_set_token() can be static
Fixes: 1628e2e4dc76 ("staging: fsl-mc/dpio: allow the driver to compile multi-arch")
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ioana Radulescu [Mon, 26 Feb 2018 16:28:06 +0000 (10:28 -0600)]
staging: fsl-dpaa2/eth: Fix incorrect casts
The DPAA2 Ethernet driver incorrectly assumes virtual addresses
are always 64b long, which causes compiler errors when building
for a 32b platform.
Fix this by using explicit casts to uintptr_t where necessary.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ioana Radulescu [Mon, 26 Feb 2018 16:28:05 +0000 (10:28 -0600)]
staging: fsl-mc/dpio: allow the driver to compile multi-arch
Drop dependency on ARCH_LAYERSCAPE (which in turn depends on ARM64),
thus allowing this driver to compile on all architectures supported
by the fsl-mc bus driver.
This was compile tested on:
- powerpc (corenet_basic_defconfig, ppc64_defconfig)
- x86 (i386_defconfig, x86_64_defconfig, needs CONFIG_OF)
- arm64 (defconfig)
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Thu, 1 Mar 2018 16:27:50 +0000 (17:27 +0100)]
staging: fsl-mc: dpio: remove foolish -Werror Makefile addtion
With the zillion different compilers out there, never use -Werror,
otherwise your code will end up breaking the build for odd reasons.
Like now, if this driver is enabled, it breaks the build due to a
function that could be marked static. So it's obvious no one is even
paying attention to this driver :(
Cc: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ioana Radulescu [Mon, 26 Feb 2018 16:28:04 +0000 (10:28 -0600)]
staging: fsl-mc/dpio: Fix incorrect casts
The DPIO driver incorrectly assumes virtual addresses are always
64b long, which causes compiler errors when building for a 32b
platform.
Fix this by using explicit casts to uintptr_t where necessary.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Colin Ian King [Wed, 28 Feb 2018 11:28:49 +0000 (11:28 +0000)]
staging: rtl8192u: return -ENOMEM on failed allocation of priv->oldaddr
Currently the allocation of priv->oldaddr is not null checked which will
lead to subsequent errors when accessing priv->oldaddr. Fix this with
a null pointer check and a return of -ENOMEM on allocation failure.
Detected with Coccinelle:
drivers/staging/rtl8192u/r8192U_core.c:1708:2-15: alloc with no test,
possible model on line 1723
Fixes: 8fc8598e61f6 ("Staging: Added Realtek rtl8192u driver to staging")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ajay Singh [Mon, 26 Feb 2018 16:31:59 +0000 (22:01 +0530)]
staging: wilc1000: rename WILC_WFI_mgmt_rx() to avoid camelCase
Fix "Avoid camelCase" issue found by checkpatch.pl script.
Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>