Chaehyun Lim [Wed, 30 Dec 2015 12:15:42 +0000 (21:15 +0900)]
staging: wilc1000: remove argument hif_drv in host_int_get_ipaddress
This patch removes hif_drv argument of host_int_get_ipaddress.
There is no need to pass hif_drv in this function because hif_drv is a
member of vif. It is removed struct host_if_drv and use hif_drv of vif.
Chaehyun Lim [Wed, 30 Dec 2015 12:15:41 +0000 (21:15 +0900)]
staging: wilc1000: fix return type of host_int_get_ipaddress
This patch changes return type of host_int_get_ipaddress from s32 to
int. The result variable gets return value from wilc_mq_send that has
data type of int. It should be changed return type of this function as
well as data type of result variable.
Chaehyun Lim [Wed, 30 Dec 2015 12:15:38 +0000 (21:15 +0900)]
staging: wilc1000: fix return type of wilc_setup_ipaddress
This patch changes return type of wilc_setup_ipaddress from s32 to int.
The result variable gets return value from wilc_mq_send that has data
type of int. It should be changed return type of this function as well
as data type of result variable.
Chaehyun Lim [Wed, 30 Dec 2015 12:15:34 +0000 (21:15 +0900)]
staging: wilc1000: fix return type of wilc_setup_multicast_filter
This patch changes return type of wilc_setup_multicast_filter from s32
to int. The result variable gets return value from wilc_mq_send that has
return type of int. It should be changed return type of this function as
well as data type of result variable.
Chaehyun Lim [Wed, 30 Dec 2015 12:15:30 +0000 (21:15 +0900)]
staging: wilc1000: fix return type of wilc_set_power_mgmt
This patch changes return type of wilc_set_power_mgmt from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.
Chaehyun Lim [Wed, 30 Dec 2015 12:15:28 +0000 (21:15 +0900)]
staging: wilc1000: fix return type of wilc_listen_state_expired
This patch changes return type of wilc_listen_state_expired from s32 to
int. The result variable gets return value from wilc_mq_send that has
return type of int. It should be changed return type of this function as
well as data type of result variable.
Chaehyun Lim [Wed, 30 Dec 2015 12:15:25 +0000 (21:15 +0900)]
staging: wilc1000: fix return type of wilc_frame_register
This patch changes return type of wilc_frame_register from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.
Chaehyun Lim [Thu, 24 Dec 2015 07:52:38 +0000 (16:52 +0900)]
staging: wilc1000: fix return type of wilc_get_statistics
This patch changes return type of wilc_get_statistics from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.
Chaehyun Lim [Thu, 24 Dec 2015 07:52:36 +0000 (16:52 +0900)]
staging: wilc1000: fix return type of wilc_get_rssi
This patch changes return type of wilc_get_rssi from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.
Chaehyun Lim [Thu, 24 Dec 2015 07:52:33 +0000 (16:52 +0900)]
staging: wilc1000: fix return type of wilc_disconnect
This patch changes return type of wilc_disconnect from s32 to int.
The result variable gets return value from wilc_disconnect that has
return type of int. It should be changed return type of this function as
well as data type of result variable.
Chaehyun Lim [Thu, 24 Dec 2015 07:52:20 +0000 (16:52 +0900)]
staging: wilc1000: fix return type of wilc_set_join_req
This patch changes return type of wilc_set_join_req from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.
Chaehyun Lim [Thu, 24 Dec 2015 07:52:19 +0000 (16:52 +0900)]
staging: wilc1000: fix return type of wilc_flush_join_req
This patch changes return type of wilc_flush_join_req from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.
Chaehyun Lim [Tue, 22 Dec 2015 00:49:08 +0000 (09:49 +0900)]
staging: wilc1000: fix return type of wilc_set_mac_address
This patch changes return type of wilc_set_mac_address from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.
Chaehyun Lim [Tue, 22 Dec 2015 00:49:06 +0000 (09:49 +0900)]
staging: wilc1000: fix return type of wilc_get_mac_address
This patch changes return type of wilc_get_mac_address from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.
Chaehyun Lim [Tue, 22 Dec 2015 00:49:04 +0000 (09:49 +0900)]
staging: wilc1000: replace u32 with int
The data type of variable i changes u32 to int.
It is used as array index to copy some data with memcpy function
so that it is better to use data type of int.
Chaehyun Lim [Tue, 22 Dec 2015 00:49:03 +0000 (09:49 +0900)]
staging: wilc1000: fix return type of wilc_set_pmkid_info
This patch changes return type of wilc_set_pmkid_info from s32 to int.
The result variable gets return value from wilc_mq_send that has return
type of int. It should be changed return type of this function as well
as data type of result variable.
Chaehyun Lim [Tue, 22 Dec 2015 00:49:00 +0000 (09:49 +0900)]
staging: wilc1000: match argument name of wilc_add_rx_gtk declaration
Some argument name of wilc_add_rx_gtk declaration is different to those
of this function definition. It is changed as same name of this function
declaration and definition.
Chaehyun Lim [Tue, 22 Dec 2015 00:48:59 +0000 (09:48 +0900)]
staging: wilc1000: fix return type of wilc_add_rx_gtk declaration
This patch changes return type of wilc_add_rx_gtk declaration from s32
to int. The return type of this function declaration and definition
should be same as data type of int.
Chaehyun Lim [Tue, 22 Dec 2015 00:48:58 +0000 (09:48 +0900)]
staging: wilc1000: match argument name of wilc_add_ptk declaration
Some arguments name of wilc_add_pkt declaration is different to those of
this function definition. It is changed as same name of this function
declaration and definition.
Chaehyun Lim [Tue, 22 Dec 2015 00:48:57 +0000 (09:48 +0900)]
staging: wilc1000: fix return type of wilc_add_pkt declaration
This patch changes return type of wilc_add_pkt declaration from s32 to
int. The return type of this function declaration and definition should
be same as data type of int.
staging:lustre: remove obsolete comment in libcfs_ioctl.h
The libcfs_ioctl.h header has a comment about a snapshot ioctl
which has been removed for years. Lets remove the comment to
avoid confusion. Broken out of patch 17492.
Signed-off-by: Parinay Kondekar <parinay.kondekar@seagate.com> Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5844
Reviewed-on: http://review.whamcloud.com/17492 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Oleg Drokin [Sun, 3 Jan 2016 17:05:59 +0000 (12:05 -0500)]
staging/lustre/llite: Update ll_dir_ioctl pointer casts with __user
When casting unsingned long userspace pointer from ioctl argument to
a pointer suitable for use with userspace access functions, need
to remember to add __user attribute, to make sparse happy.
Oleg Drokin [Sun, 3 Jan 2016 17:05:46 +0000 (12:05 -0500)]
staging/lustre/osc: Do not use lprocfs_write_helper in sysfs store methods
sysfs store methods provide us with a kernel buffer already, but
lprocfs_write_helper is expecting a user buffer.
Replace lprocfs_write_helper with kstrto[u]int() calls instead in
contention_seconds_store() and lockless_truncate_store()
Oleg Drokin [Sun, 3 Jan 2016 17:05:42 +0000 (12:05 -0500)]
staging/lustre: Get rid of an ugly statfs hack in lov_iocontrol
For some crazy reason ll_obd_statfs decided to decode async flag
passed from userspace and then pass it via a userspace pointer
argument to lov_iocontrol.
This patch moves flags decoding to lov_iocontrol where it belongs.
Oleg Drokin [Sun, 3 Jan 2016 17:05:39 +0000 (12:05 -0500)]
staging/lustre: Update user pointers in struct obd_ioctl_data
Make them void __user * instead of char * (or char __user *),
void * removes the necessity of explicit casts to proper type
where people also need to remember __user qualifiers, so I think
it works better here.
Oleg Drokin [Sun, 3 Jan 2016 17:05:38 +0000 (12:05 -0500)]
staging/lustre: Change ioctl user pointers in libcfs_ioctl_data
Make them void __user * instead of char * (or char __user *),
void * removes the necessity of explicit casts to proper type
where people also need to remember __user qualifiers, so I think
it works better here.
In lustre/obdecho/echo_client.c, remove handling of lov_stripe_md
passed from userspace (since userspace never passes it). Remove the
LOV specific code (ed_next_islov) from the echo client (since it
doesn't work).
Remove echo_get_stripe_off_id() and all calls to it since the stripe
count of the passed in lsm is always 0 and the funciton does nothing
in this case. Remove the then unused lsm parameters of
echo_client_page_debug_setup() and echo_client_page_debug_check().
In the OBD_IOC_GETATTR and OBD_IOC_SETATTR cases of
echo_client_iocontrol() do not set the oi_md member of struct obd_info
since only LOV OBD methods access it.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Reviewed-on: http://review.whamcloud.com/12446
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5814 Reviewed-by: Bobi Jam <bobijam@gmail.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Oleg Drokin [Sun, 3 Jan 2016 17:05:33 +0000 (12:05 -0500)]
staging/lustre/lnet: Get rid of IOC_LIBCFS_DEBUG_PEER hack
IOC_LIBCFS_DEBUG_PEER was added back in the stone ages to print debug
statistics on a peer when peer timeout happens.
Redo it properly as a separate LNet API call,
also get rid of "ioctl" forwarding into the underlying LNDs,
since no current LNDs implement this function anymore.
Julia Lawall [Fri, 1 Jan 2016 08:37:03 +0000 (09:37 +0100)]
staging: lustre: obdecho: constify lu_device_operations and cl_device_operations structures
These lu_device_operations and cl_device_operations structures are never
modified, so declare them as const. Other structures of these types are
already const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Joshua Clayton [Sun, 27 Dec 2015 06:47:36 +0000 (22:47 -0800)]
staging: lustre: fix lock imbalance
nrs_resource_put_safe() might hold a lock one one struct
while operating on the other.
There are 2 levels of structures.
Use nrs_policy_put(), which has locking baked in.
sparse gives the following warning:
drivers/staging/lustre//lustre/ptlrpc/nrs.c:498:39:
warning: context imbalance in 'nrs_resource_put_safe' -
different lock contexts for basic block
Valdis Kletnieks [Wed, 23 Dec 2015 00:36:52 +0000 (19:36 -0500)]
drivers/staging/lustre: Fix another C compiler whine: set but not used
CC [M] drivers/staging/lustre/lustre/libcfs/module.o
drivers/staging/lustre/lustre/libcfs/module.c: In function 'lustre_insert_debugfs':
drivers/staging/lustre/lustre/libcfs/module.c:670:17: warning: variable 'entry' set but not used [-Wunused-but-set-variable]
struct dentry *entry;
^
Just ignore the dentry returned, and add a comment that we *know*
we're not really leaking the dentry because something else will be able
to reap it via recursion.
Valdis Kletnieks [Wed, 23 Dec 2015 00:36:51 +0000 (19:36 -0500)]
drivers/staging/lustre: Clean up another C warnining: set but not used
drivers/staging/lustre/lustre/fid/../include/lustre_cfg.h: In function 'lustre_cfg_free':
drivers/staging/lustre/lustre/fid/../include/lustre_cfg.h:253:6: warning: variable 'len' set but not used [-Wunused-but-set-variable]
int len;
Yep, we're just gonna call kfree, no need to calculate len. Bye-bye.