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.
drivers/staging/lustre/lustre/fid/lproc_fid.c: In function 'ldebugfs_fid_write_common':
drivers/staging/lustre/lustre/fid/lproc_fid.c:67:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
int rc;
We fix it by *using* the return code to help bulletproof it. It says it's
test code - it should be *more* bulletproof than production, not less.
Valdis Kletnieks [Wed, 23 Dec 2015 00:36:49 +0000 (19:36 -0500)]
drivers/staging/lustre: Silence warning about 'inline'
Low-hanging fruit first:
CC [M] drivers/staging/lustre/lustre/fid/fid_request.o
In file included from drivers/staging/lustre/lustre/fid/../include/lustre_net.h:66:0,
from drivers/staging/lustre/lustre/fid/../include/lustre_lib.h:64,
from drivers/staging/lustre/lustre/fid/../include/obd.h:52,
from drivers/staging/lustre/lustre/fid/fid_request.c:48:
drivers/staging/lustre/lustre/fid/../include/lu_object.h:765:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
static const inline struct lu_device_operations *
^
So we just swap inline and const. 272 warnings gone. :)
James Simmons [Wed, 23 Dec 2015 21:24:45 +0000 (16:24 -0500)]
staging: lustre: convert kernelcomm group to unsigned int
The group variable was converted to an unsigned int in
libcfs_kkuc_group_add() to avoid a potential overflow.
The variable group is used in other kernelcomm functions
so it makes sense to convert the rest of the group
variables to unsigned int.
Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Hongchao Zhang [Wed, 23 Dec 2015 21:24:44 +0000 (16:24 -0500)]
staging: lustre: embed kr_data into kkuc_reg
In struct kkuc_reg, the "kr_data" is difficult to be freed
outside of libcfs, then it's better to change it to be
inline data instead of the data pointer.
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6485
Reviewed-on: http://review.whamcloud.com/14638 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Reviewed-by: frank zago <fzago@cray.com> Reviewed-by: Robert Read <robert.read@intel.com> Reviewed-by: Henri Doreau <henri.doreau@cea.fr> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
frank zago [Wed, 23 Dec 2015 21:24:43 +0000 (16:24 -0500)]
staging: lustre: split kernel comm between user and kernel
Split the kernel comm header in libcfs into two new headers
to handle both kernel space and user space for the lustre layer.
This is broken out of the original patch 14270. The part covered
by this change is as follows:
The original libcfs_kernelcomm.h header is split into three parts:
* lustre_kernelcomm.h, a new header for the kernel parts;
* uapi_kernelcomm.h, a new header for the data structures shared
between userspace and kernelspace;
* lustreapi_internal.h receives the private liblustreapi prototypes.
Various names and filenames have been harmonized to *kernelcomm*.
The unused symbol KUC_FL_BLOCK has been removed.
Signed-off-by: frank zago <fzago@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/14270 Reviewed-by: Nathan Rutman <nathan.rutman@seagate.com> Reviewed-by: James Simmons <uja.ornl@yahoo.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: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
frank zago [Wed, 23 Dec 2015 21:24:42 +0000 (16:24 -0500)]
staging: lustre: move kernel_user_comm.c from libcfs to lustre
Move the kernel portion from libcfs to obdclass. This code is
only used by lustre. This is broken out of the original patch
14270. The part covered by this change is as follows:
The original code in kernel_user_comm.c is split into two parts:
* obdclass/kernelcomm.c for the kernel part. filp_user_write() was
moved there, and linux-fs.c deleted;
* liblustreapi_kernelconn.c for the user part. The calls to CDEBUG
have been removed, and calls to CERROR have been transformed to
llapi_err_noerrno. The type lustre_kernelcomm has been removed and
replace by struct lustre_kernelcomm.
Various names and filenames have been harmonized to *kernelcomm*.
Signed-off-by: frank zago <fzago@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245
Reviewed-on: http://review.whamcloud.com/14270 Reviewed-by: Nathan Rutman <nathan.rutman@seagate.com> Reviewed-by: James Simmons <uja.ornl@yahoo.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: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Associate copytool registration to a given MDC import so that
multiple mounts of the same filesystem do not lead to having the
copytool registered multiple time.
Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3882
Reviewed-on: http://review.whamcloud.com/7612 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Wed, 23 Dec 2015 21:24:40 +0000 (16:24 -0500)]
staging: lustre: kg_sem semaphore handling is incorrectly
During the removal of the cfs wrappers the kg_sem semaphore
was handled incorrectly. We need to take a write lock when
writing data to the kkuc_groups. The libcfs_kkuc_group_foreach
needs to only take a read lock. This makes use match the
OpenSFS development branch.
Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cleanup the a style issues for the lu_object_header_flags
enum by adding a comma for the last field. This is
broken out of patch http://review.whamcloud.com/6321.
Signed-off-by: Fan Yong <fan.yong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2914
Reviewed-on: http://review.whamcloud.com/6321 Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Wed, 23 Dec 2015 17:32:09 +0000 (12:32 -0500)]
staging: lustre: Use kernel's strncasecmp and remove cfs_get_blocked_sigs
Remove libcfs function cfs_strncasecmp() since the kernel
already has its own strncasecmp(). Lastly remove from libcfs.h
cfs_get_blocked_sigs() since this function no longer exist.
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3963
Reviewed-on: http://review.whamcloud.com/13070 Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Patrick Farrell <paf@cray.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Wed, 23 Dec 2015 17:32:08 +0000 (12:32 -0500)]
staging: lustre: Handle nodemask on UMP machines
For UMP and SMP machines the struct cfs_cpt_table are
defined differently. In the case handled by this patch
nodemask is defined as a integer for the UMP case and
as a pointer for the SMP case. This will cause a problem
for ost_setup which reads the nodemask directly. Instead
we create a UMP version of cfs_cpt_nodemask and use that
in ost_setup.
Starting in 3.14 kernels nodemask_t was changed from a
a unsigned long to a linux bitmap so more than 32 cores
could be supported. Using set_bit in cfs_cpt_table_alloc
no longer compiles so this patch backports bits of the
node management function that use a linux bitmap back
end. Cleaned up libcfs bitmap.h to use the libcfs layers
memory allocation function. This was pulling in lustre
related code that was not defined.
Remove IOC_LIBCFS_MEMHOG ioctl functionality as it is no longer needed thereby
making functions like - kportal_memhog_alloc(), kportal_memhog_free() and type -
struct libcfs_device_userstate unused.
Signed-off-by: Niranjan Dighe <ndighe@visteon.com> Acked-by: James Simmons <jsimmons@infradead.org> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Merge tag 'iio-for-4.6a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
First round of new IIO device support, features and cleanups for the 4.6 cycle.
Device Support
* ad5761
- new driver
* at91_sama5d2 ADC.
- new driver and MAINTAINERS entry.
- minor cleanups followed.
* atlas pH-SM
- new driver (this has possibly the prettiest data sheet I've ever seen)
* mcp3422
- mcp3425 ADC added.
* mcp4725
- mcp4726 DAC added.
* mma8452
- mma8451q accelerometer added.
* mpl115
- mpl115a1 added (a lot bigger than it seems as this is an SPI part whereas
previous parts were i2c).
* si7005
- Hoperf th02 (seems to be a repackaged part)
* si7020
- Hoperf th06 (seems to be a repackaged part)
New features
* Core
- IIO_PH type. Does what it says on the tin.
* max30100
- LED current configuration support.
* mcp320x
- more differential measurement combinations.
* mma8452
- free fall deteciton
- opt3001
- enable operation without a IRQ line.
- device tree docs. Somehow the original docs have disappeared down
a rabbit hole, so here is a new set.
* st-sensors
- Support active-low interrupts.
Cleanups and minor / not so minor reworks
* Documentation
- drop some defunct ABI from the docs in staging.
* presure / Kconfig
- white space cleanup.
* ad7150
- BIT macro usage
- Alignment fixes
* ad7192
- false indent fixed.
* ak8975
- constify the ak_def structures
* axp288
- drop a redundant double const.
* dht11
- substantial reliability improvements by being more tolerant
of missing start bits.
- simplify the decoding algorithm
* mma8452
- whitespace cleanup
* mpl115
- don't bother setting i2c_client_data as nothing uses it.
* mpu6050
- drop unused function parameter.
* opt3001
- extract integration time as constants.
- trivial refactoring.
Linus Torvalds [Mon, 1 Feb 2016 01:36:45 +0000 (17:36 -0800)]
Merge tag 'usb-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB driver fixes from Greg KH:
"Here are some small USB fixes and new device ids for 4.5-rc2. Nothing
major here, full details are in the shortlog, and all of these have
been in linux-next successfully"
* tag 'usb-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
USB: option: fix Cinterion AHxx enumeration
USB: mxu11x0: fix memory leak on usb_serial private data
USB: serial: ftdi_sio: add support for Yaesu SCU-18 cable
USB: serial: option: Adding support for Telit LE922
USB: serial: visor: fix crash on detecting device without write_urbs
USB: visor: fix null-deref at probe
USB: cp210x: add ID for IAI USB to RS485 adaptor
usb: hub: do not clear BOS field during reset device
cdc-acm:exclude Samsung phone 04e8:685d
usb: cdc-acm: send zero packet for intel 7260 modem
usb: cdc-acm: handle unlinked urb in acm read callback