Commit graph

548500 commits

Author SHA1 Message Date
Punit Vara
0c9968ef9b Staging: rtl8712: drv_types.h:Coding style warnings fix for block comments
This is patch to the drv_types.h file that fixes up following warning
reported by checkpatch.pl :

-Block comments use * on subsequent lines
-Block comments use a trailing */ on a separate line

Signed-off-by: Punit Vara <punitvara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:34:46 +01:00
Amitoj Kaur Chawla
8d2884ace7 staging: rtl8712: Remove NULL comparison
Remove NULL comparison by using '!' operator. Problem found using
checkpatch.pl
CHECK: Comparison to NULL could be written "!padapter->halpriv.hal_bus_init"

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:25:32 +01:00
Amitoj Kaur Chawla
2a1283606f staging: rtl8712: Remove NULL comparison
Remove NULL comparison by using '!' operator. Problem found
using checkpatch.pl
CHECK: Comparison to NULL could be written "!ptmpchar"

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:25:32 +01:00
Alison Schofield
29b1b61435 staging: rtl8712: Move constant to right of test or replace with "!"
Move constant to the right side of comparison operator or replace
equality operator (==) with the unary negation operator (!) if the
comparison is to zero.

Addesses multiple instances of the checkpatch.pl warning:
WARNING: Comparisons should place the constant on the right side of the
test

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:25:32 +01:00
Amitoj Kaur Chawla
335b9efa72 staging: rtl8712: Add space around '&'
Add space around operator '&'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '&' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:25:32 +01:00
Amitoj Kaur Chawla
7ab4609a5d staging: rtl8712: Add spaces around '|'
Add space around operator '|'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '|' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:25:32 +01:00
Amitoj Kaur Chawla
b3845d0239 staging: rtl8712: Add space around '+'
Add space around operator '+'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '+' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:25:32 +01:00
Amitoj Kaur Chawla
137e37d0ed staging: vt6655: Remove true comparison
Remove comparison to true in if statement. Problem found using
checkpatch.pl
CHECK: Using comparison to true is error prone

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:25:32 +01:00
Shraddha Barke
b438000683 Staging: lustre: obdclass: obdo: Declare iattr_from_obdo as static
Declare iattr_from_obdo as static since it is used only in this
particular file.Also remove the corresponding declaration from
header file.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:21:08 +01:00
Shraddha Barke
230a8da1c5 Staging: lustre: ptlrpc: service: Declare local functions as static
Declare ptlrpc_server_drop_request and ptlrpc_stop_all_threads
as static since they are used only in this particular file.Also
remove the corresponding declaration from header files.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:21:08 +01:00
Shraddha Barke
9dd7d427ab Staging: lustre: ptlrpc: import: Declare deuuidify as static
Declare function deuuidify as static since it is used only in this
particular file.Also remove the corresponding declaration from header
files.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:21:08 +01:00
Shraddha Barke
fcdf51c179 Staging: lustre: ptlrpc: pack_generic: Declare local functions as static
Declare lustre_swab_ldlm_resource_desc, lustre_swab_obdo,
lustre_swab_ldlm_res_id, lustre_swab_ldlm_policy_data as static since
they are used only in this particular file. Also remove the corresponding
declarations from header file.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:21:08 +01:00
Shraddha Barke
17ad0ce605 Staging: lustre: obdclass: llog_cat: Declare local functions as static
Declare llog_cat_id2handle and llog_cat_process_or_fork as static
since they are used only in this particular file. Also remove the
corresponding declarations from header files.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:21:08 +01:00
Shraddha Barke
be23ce1dfb Staging: lustre: ptlrcpc: sec: Declare local functions as static
Declare functions sptlrpc_secflags2str, sptlrpc_sec_get and
sptlrpc_svc_install_rvs_ctx as static since they are used only
in this particular file. Also remove them from corresponding
header files.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:21:08 +01:00
Shraddha Barke
09eb98b356 Staging: lustre: ptlrpc: pack_generic: Declare local functions as static
Declare functions lustre_swab_ldlm_lock_desc and dump_obdo as static since
they are used only in this particular file. Also remove them from
corresponding header files.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:21:08 +01:00
Shraddha Barke
38a70c9b62 Staging: lustre: obdclass: llog_swab: Declare local functions as static
Declare functions lustre_swab_llog_id and lustre_swab_ll_fid as static
since they are used only in this particular file. Also remove them from
corresponding header files.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 10:21:08 +01:00
Amitoj Kaur Chawla
0ce5fdb14b staging: sm750fb: Remove multiple blank lines
Remove multiple blank lines. Problem found using checkpatch.pl
CHECK: Please don't use multiple blank lines

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 09:50:08 +01:00
Amitoj Kaur Chawla
07387cba81 staging: sm750fb: Add space around ':'
Add space around operator ':'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that ':' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 09:43:18 +01:00
Amitoj Kaur Chawla
31418e3701 staging: sm750fb: Add space around '?'
Add space around operator '?'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '?' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 09:43:18 +01:00
Amitoj Kaur Chawla
f40917ea0b staging: sm750fb: Add space around '*'
Add space around operator '*'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '*' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 09:43:18 +01:00
Amitoj Kaur Chawla
c18c331193 staging: sm750fb: Add space around '/'
Add space around operator '/'. Problem found using
checkpatch.pl
CHECK: spaces preferred around that '/' (ctx:VxV)

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08 09:43:18 +01:00
Dmitry Kalinkin
d3337eb1e1 vme: tsi148: silence uninitialized variable warning
The warning is a false positive.

drivers/vme/bridges/vme_tsi148.c: In function 'tsi148_master_write':
drivers/vme/bridges/vme_tsi148.c:1358:31: warning: 'handler' may be used uninitialized in this function [-Wmaybe-uninitialized]
   vme_unregister_error_handler(handler);
                               ^
drivers/vme/bridges/vme_tsi148.c: In function 'tsi148_master_read':
drivers/vme/bridges/vme_tsi148.c:1260:31: warning: 'handler' may be used uninitialized in this function [-Wmaybe-uninitialized]
   vme_unregister_error_handler(handler);
                               ^

Fixes: 0b04966257 ("vme: change bus error handling scheme")
Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-05 10:59:34 +01:00
Dmitry Kalinkin
448535a350 vme: print unhandled VME access errors
This will enable error messages for accesses done through mmap.

Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Acked-by: Martyn Welch <martyn@welchs.me.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 19:50:57 +01:00
Dmitry Kalinkin
0b04966257 vme: change bus error handling scheme
The current VME bus error handler adds errors to the bridge error list.
vme_master_{read,write} then traverses that list to look for relevant
errors.

Such scheme didn't work well for accesses going through vme_master_mmap
because they would also allocate a vme_bus_error, but have no way to do
vme_clear_errors call to free that memory.

This changes the error handling process to be other way around: now
vme_master_{read,write} defines a window in VME address space that will
catch possible errors.  VME bus error interrupt only traverses these
windows and marks those that had errors in them.

Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Cc: Igor Alekseev <igor.alekseev@itep.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 19:50:57 +01:00
Dmitry Kalinkin
472f16f33c vme: include address space in error filtering
Also changes vme_bus_error_handler to take generic address modifier code
instead of raw contents of a device-specific attribute register.

Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Cc: Igor Alekseev <igor.alekseev@itep.ru>
Acked-by: Martyn Welch <martyn@welchs.me.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 19:50:57 +01:00
Dmitry Kalinkin
e2c6393fda vme: move tsi148 error handling into VME subsystem
Error handling code found in tsi148 is not device specific. In fact it
already relies on shared vme_bus_error struct and vme_bridge.vme_errors
field. The other bridge driver could reuse this code if it is shared.

This introduces a slight behavior change: vme error message won't be
triggered in a rare case when err_chk=1 and kmalloc fails.

Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Cc: Igor Alekseev <igor.alekseev@itep.ru>
Acked-by: Martyn Welch <martyn@welchs.me.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 19:50:57 +01:00
Dmitry Kalinkin
da5ae8a991 vme: lower alignment requirement in pci bridge drivers
Universe II allows PCI address grannularity of 4K or 64K depending on
the window id. tsi148 only supports 64K. Existing driver implementations
are validating window size against this grannularity and then use that
very size as alignment parameter to pci_bus_alloc_resource.  This
constraint is excessive, alignment by granularity should be enough.

This changes alignment constraint from size to a fixed constraint of
64K.

Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 19:50:05 +01:00
Andrzej Hajda
43b2ec01d2 IB/ehca: fix handling idr_alloc result
The function can return negative value.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2038576

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Acked-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 19:50:05 +01:00
Geliang Tang
0bc2763f56 RDMA/amso1100: use offset_in_page macro
Use offset_in_page macro instead of (addr & ~PAGE_MASK).

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 13:11:19 +01:00
Geliang Tang
e1ab75dd62 IB/ipath: use offset_in_page macro
Use offset_in_page macro instead of (addr & ~PAGE_MASK).

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 13:11:19 +01:00
Geliang Tang
e260e404ba IB/hfi1: use offset_in_page macro
Use offset_in_page macro instead of (addr & ~PAGE_MASK).

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 13:11:19 +01:00
Tetsuo Handa
3a81fc20ea android, lmk: Send SIGKILL before setting TIF_MEMDIE.
It was observed that setting TIF_MEMDIE before sending SIGKILL at
oom_kill_process() allows memory reserves to be depleted by allocations
which are not needed for terminating the OOM victim.

This patch reverts commit 6bc2b856bb ("staging: android: lowmemorykiller:
set TIF_MEMDIE before send kill sig"), for oom_kill_process() was updated
to send SIGKILL before setting TIF_MEMDIE.

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 13:07:52 +01:00
Shraddha Barke
5cc95cd81b Staging: lustre: obdclass: Remove unused function obd_export_nid2str
Remove obd_export_nid2str as it is defined but not used anymore.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 11:14:24 +01:00
H Hartley Sweeten
54a5e02abb staging: comedi: 8255: prefer using the BIT macro
Fix the checkpatch.pl issues.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 10:07:15 +01:00
Shraddha Barke
fa9df8e31a Staging: lustre: obdclass: obd_mount: Declare as static
Declare lustre_fs_type, do_lcfg, lustre_fill_super, lustre_put_lsi,
lustre_init_lsi, lustre_start_simple, server_name2index and
server_name2fsname as static since they are used only in this
particular file.Also remove corresponding declarations from header
files.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 09:59:35 +01:00
Shraddha Barke
28fcc6626f Staging: lustre: obdclass: class_obd: Declare as static
Declare obd_init_checks as static since it is used only in this
particular file.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 09:59:35 +01:00
Shraddha Barke
63e9a7485d Staging: lustre: obdclass: genops: Declare as static
Declare obd_export_nid2str and obd_zombie_impexp_cull as static
since they are used only in this particular file. Also remove the
corresponding declarations from header file

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 09:59:35 +01:00
Shraddha Barke
12d0be620f Staging: lustre: ptlrpc: niobuf: Declare as static
Declare ptlrpc_register_bulk as static since it is used only in this
particular file.Also remove the declaration from header file

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 09:59:35 +01:00
Shraddha Barke
98e0a28818 Staging: lustre: ptlrpc: layout: Declare as static
Declare req_capsule_init_area and req_capsule_field_present as static
since they are used only in this particular file. Also remove the
corresponding declarations from header files.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 09:59:35 +01:00
Shraddha Barke
4ed50b0316 Staging: lustre: ptlrpc: pinger: Declare as static
Declare ptlrpc_pinger_remove_timeouts as static since it is used
only in this particular file.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 09:59:35 +01:00
Shraddha Barke
e4ec6d23df Staging: lustre: ptlrpc: events: Declare as static
Declare ptl_get_pid as static since it is used only in this particular
file. Also remove declaration from corresponding header file

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 09:59:35 +01:00
Shraddha Barke
53856b2320 Staging: lustre: ptlrpc: nrs: Declare as static
Declare ptlrpc_nrs_policy_register as static since it is used
only in this particular file. Also remove corresponding declaration
from header files.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 09:59:35 +01:00
Itai Katz
757e0cb5f1 staging: fsl-mc: remove references to dev_root
The dev_root field in the bus type struct has been replaced by a
new mechanism to identify the root dprc.  Remove all references
to dev_root.

Signed-off-by: Itai Katz <itai.katz@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 09:55:45 +01:00
Itai Katz
565b94506f staging: fsl-mc: add counter to track number of root DPRCs
Add a counter to track the number of root DPRCs.
When this counter is greater then 0 it means that at least
one root DPRC device exists.

Signed-off-by: Itai Katz <itai.katz@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 09:55:45 +01:00
Itai Katz
e4ea40f98d staging: fsl-mc: add function to return pointer to root dprc
To support multiple root dprcs, instead of relying on the
dev_root field of the bus type struct, instead create a
function to traverse to the root dprc and return a pointer
to the device struct

Signed-off-by: Itai Katz <itai.katz@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 09:55:45 +01:00
Itai Katz
b55f00c6ed staging: fsl-mc: abstract test for whether a dprc is a root dprc
Instead of relying on assumptions about fields in data
structures, abstract the test for whether a dprc is a root
dprc into a function.

Signed-off-by: Itai Katz <itai.katz@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 09:55:45 +01:00
Itai Katz
14f928054a staging: fsl-mc: abstract test for existence of fsl-mc bus
Add function to test for existence of an fsl-mc bus instance
instead of doing this by looking directly at a field in the
bus type struct.

Signed-off-by: Itai Katz <itai.katz@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 09:55:45 +01:00
Malcolm Priestley
9f31b69559 staging: vt6655: device_tx_srv rename pTD
Following the convention elsewhere for vnt_tx_desc rename
desc.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 09:54:51 +01:00
Malcolm Priestley
12f2ee356e staging: vt6655: device_main replace pTDInfo with td_info.
Removing camel case.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 09:54:51 +01:00
Malcolm Priestley
480fc5b8f6 staging: vt6655: device_main replace pRD with rd.
Removing camel case.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-04 09:54:51 +01:00