Shraddha Barke [Wed, 7 Oct 2015 20:06:07 +0000 (01:36 +0530)]
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.
Shraddha Barke [Wed, 7 Oct 2015 20:06:05 +0000 (01:36 +0530)]
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.
Shraddha Barke [Wed, 7 Oct 2015 20:06:04 +0000 (01:36 +0530)]
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.
Shraddha Barke [Mon, 5 Oct 2015 00:02:39 +0000 (05:32 +0530)]
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.
Shraddha Barke [Mon, 5 Oct 2015 00:02:38 +0000 (05:32 +0530)]
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.
Shraddha Barke [Mon, 5 Oct 2015 00:02:36 +0000 (05:32 +0530)]
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.
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);
^
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.
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.
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.
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 6bc2b856bb7c ("staging: android: lowmemorykiller:
set TIF_MEMDIE before send kill sig"), for oom_kill_process() was updated
to send SIGKILL before setting TIF_MEMDIE.
Shraddha Barke [Sun, 4 Oct 2015 07:30:16 +0000 (13:00 +0530)]
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.
Shraddha Barke [Sun, 4 Oct 2015 07:30:14 +0000 (13:00 +0530)]
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
Shraddha Barke [Sun, 4 Oct 2015 07:30:12 +0000 (13:00 +0530)]
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.
Itai Katz [Sun, 4 Oct 2015 07:09:52 +0000 (10:09 +0300)]
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
Tim Sell [Fri, 2 Oct 2015 17:19:19 +0000 (13:19 -0400)]
staging: unisys: visorinput: make structs & arrays const where possible
This also gave me a warning with the assignment:
visorinput_dev->keycode = visorkbd_keycode;
because input_dev->keycode is NOT static but visorkbd_keycode now is, so
I went ahead and also added logic to stash away non-static copies of
visorkbd_keycode[] and visorkbd_ext_keycode[] within visorinput_devdata,
and use the copy to assign to visorinput_dev->keycode. This change is
also technically required, because user-space can remap keys, and we
don't want this to be shared with the other keyboard devices running on
the same system.
Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tim Sell [Fri, 2 Oct 2015 17:19:17 +0000 (13:19 -0400)]
staging: unisys: visorinput: re-order declarations for consistency
In order to be more consistent with kernel conventions used elsewhere,
I have re-ordered declarations in visorinput.c to follow this general
order (where possible):
* #defines
* struct/enum/union declarations
* static declarations (const if possible for all of them)
* forward function declarations where absolutely necessary
Exceptions were made for the static declarations like the driver
declaration, given that it depends on previously-defined callbacks.
So such declarations are at the end of visorinput.c.
Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tim Sell [Fri, 2 Oct 2015 17:19:15 +0000 (13:19 -0400)]
staging: unisys: visorhid: rename to visorinput
This visorhid driver provides a Human Interface Device, but is not at all
using HID, the protocol. It's a plain input driver, so for clarity, it is
being renamed to visorinput.
Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Fri, 2 Oct 2015 12:44:53 +0000 (21:44 +0900)]
staging: wilc1000: fix return type of host_int_wait_msg_queue_idle
This patch changes return type of host_int_wait_msg_queue_idle from s32
to int. s32Error gets return value from wilc_mq_send that has return
type of int. It should be changed return type of
host_int_wait_msg_queue_idle by int as well as data type of s32Error.
Chaehyun Lim [Fri, 2 Oct 2015 12:44:47 +0000 (21:44 +0900)]
staging: wilc1000: fix return type of host_int_set_mac_chnl_num
This patch changes return type of host_int_set_mac_chnl_num from s32 to
int. s32Error gets return value from wilc_mq_send function that
has return type of int. It should be changed return type of
host_int_set_mac_chnl_num function by int as well as data type of
s32Error.
Shraddha Barke [Sat, 3 Oct 2015 12:01:30 +0000 (17:31 +0530)]
Staging: most: Use module_platform_driver
Use module_platform_driver for drivers whose init and exit functions
only register and unregister, respectively. Thus remove some
boilerplate code.
A simplified version of Coccinelle patch -
@a@
identifier f, x;
@@
-static f(...) { return platform_driver_register(&x); }
@b depends on a@
identifier e, a.x;
@@
-static e(...) { platform_driver_unregister(&x); }
@c depends on a && b@
identifier a.f;
declarer name module_init;
@@
-module_init(f);
@d depends on a && b && c@
identifier b.e, a.x;
declarer name module_exit;
declarer name module_platform_driver;
@@
-module_exit(e);
+module_platform_driver(x);
Staging: comedi: Use mutex instead of semaphore in ni_usb6501.c
Replace binary semaphore with mutex because mutex gives better
performance.
This change is safe because the thread that decrements the value of semaphore
is also the one that increments it, and acts like a mutex where owner of the
lock is the only one that can release the lock.
Staging: comedi: Use mutex instead of semaphore in usbduxfast.c
Replace binary semaphore with mutex because mutex gives better
performance.
This change is safe because the thread that decrements the value of semaphore
is also the one that increments it, and acts like a mutex where owner of the
lock is the only one that can release the lock.
Staging: comedi: Use mutex instead of semaphore in usbdux.c
Replace binary semaphore with mutex because mutex gives better
performance.
This change is safe because the thread that decrements the value of semaphore
is also the one that increments it, and acts like a mutex where owner of the
lock is the only one that can release the lock.
Staging: comedi: Use mutex instead of semaphore in usbduxsigma.c
Replace binary semaphore with mutex because mutex gives better
performance.
This change is safe because the thread that decrements the value of semaphore
is also the one that increments it, and acts like a mutex where owner of the
lock is the only one that can release the lock.
Struct timespec will overflow in year 2038, here it will not cause an
overflow because it is used with timespec_sub, but still has to be
removed as part of y2038 changes. Replace it with ktime_t. Also use
monotonic instead of real-time by replacing functions getnstimeofday
with ktime_get.
Sudip Mukherjee [Sat, 3 Oct 2015 15:22:49 +0000 (20:52 +0530)]
staging: dgnc: remove dgnc_init_globals function
The dgnc_init_globals() function is only initializing the timer so
initialize it directly and remove dgnc_init_globals() and change the
comment appropriately.
Rocco Folino [Fri, 2 Oct 2015 21:54:26 +0000 (23:54 +0200)]
staging/lustre: Make nrs_policy_get_info_locked() static
This patch fixes the warning generated by sparse: "symbol 'nrs_policy_get_info_locked' was not
declared. Should it be static?" by declaring the function static.
Shraddha Barke [Fri, 2 Oct 2015 17:49:13 +0000 (23:19 +0530)]
Staging: lustre: obdclass: genops: Declare as static
Declare class_get_type and class_search_type as static since they
are used only in this particular file. Also remove the declaration
from header files.
Shraddha Barke [Fri, 2 Oct 2015 17:49:12 +0000 (23:19 +0530)]
Staging: lustre: obdclass: obd_config: Declare as static
Declare class_add_conn, class_add_profile, class_cleanup,
class_config_parse_rec, class_del_conn, class_detach, class_match_param,
class_attach, class_setup as static since they are used only in this
particular file. Also remove the corresponding declarations from
header files.
Shraddha Barke [Fri, 2 Oct 2015 17:49:10 +0000 (23:19 +0530)]
Staging: lustre: obdclass: cl_io: Declare as static
Declare cl_page_list_assume, cl_io_cancel, cl_io_rw_advance,
cl_page_list_del, cl_page_list_discard, cl_page_list_fini as
static since they are used only in this particular file.
Also remove them from corresponding header files
Cristina Moraru [Sat, 3 Oct 2015 15:20:47 +0000 (18:20 +0300)]
staging: android: Remove kernel-doc typo
Fix 'No description found for parameter 'prot_mask'' and 'Excess
struct/union/enum/typedef member 'prot_masks' description in
'ashmem_area'' warnings by removing typo
Ioana Ciornei [Fri, 2 Oct 2015 10:37:50 +0000 (13:37 +0300)]
staging: iio: resolver: replace iio_device_register by devm_iio_device_register
Use devm_iio_device_register instead of iio_device_register when the remove
function is only used to call iio_device_unregister in order to ease the error path.
Since resource managed functions implicitly call unregister at driver detach also remove
iio_device_unregister
Ioana Ciornei [Fri, 2 Oct 2015 10:37:49 +0000 (13:37 +0300)]
staging: iio: light: use devm_iio_device_register instead iio_device_register
Replace iio_device_register with resource managed devm_iio_device_register in order
to ease the error path. Also delete the remove function since there is no need after
this change.
Ioana Ciornei [Fri, 2 Oct 2015 10:37:48 +0000 (13:37 +0300)]
staging: iio: cdc: use devm_iio_device_register instead iio_device_register
Replace iio_device_register with resource managed devm_iio_device_register in order
to ease the error path. Also delete de remove function since there is no need after
this change.
Maciek Borzecki [Sat, 3 Oct 2015 14:01:36 +0000 (16:01 +0200)]
staging: wlan-ng: prism2sta: replace memcmp with ether_addr_equal
Replace memcmp() with ether_addr_equal(). In every location where the
replacement was done, the addresses accessed are
__aligned(2). Structures accessed either stack or heap allocated, no
direct memory casts to possibly unaligned structs are used.