James Simmons [Thu, 11 Jun 2015 19:18:12 +0000 (15:18 -0400)]
staging:lustre: separate kernel and user land defines in the LNet headers
Currently the lnet headers used by user land contain various internal
LNet structures that are only used by kernel space. Move the user land
structures to headers used by user land. The kernel structures are
relocated to headers that are never exposed to user land.
Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Thu, 11 Jun 2015 19:18:11 +0000 (15:18 -0400)]
staging:lustre: move LNet NID macros to LNet layer
Currently several special macros LNet NID macros exist
in libcfs.h and libcfs_private.h. Move those macros
out to the lnet header types.h. The new lnet header
nidstr.h contains LNet NID string data that can be
used by user land LNet utilities and the LNet kernel
drivers.
Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
John L. Hammond [Thu, 11 Jun 2015 19:18:10 +0000 (15:18 -0400)]
staging:lustre: merge socklnd_lib-linux.h into socklnd.h
Originally socklnd_lib-linux.h contained linux specific
wrappers and defines but since the linux kernel is the
only supported platform now we can merge what little
remains in the header into socklnd.h. This is broken
out of the original patch 12932 that was merged to the
Intel/OpenSFS branch.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-on: http://review.whamcloud.com/12932 Reviewed-by: Isaac Huang <he.huang@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.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>
John L. Hammond [Thu, 11 Jun 2015 19:18:09 +0000 (15:18 -0400)]
staging:lustre: rename socklnd_lib-linux.c
With the move to support only the linux kernel their is
no need to keep "linux" in the socklnd source file names.
This is broken out of the original patch 12932 that was
merged to the Intel/OpenSFS branch.
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2675
Reviewed-on: http://review.whamcloud.com/12932 Reviewed-by: Isaac Huang <he.huang@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.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>
Oleg Drokin [Thu, 11 Jun 2015 05:37:51 +0000 (01:37 -0400)]
staging/lustre/llite: fix ll_getname user buffer copy
strncpy_from_user could return negative values on error,
so need to take those into account.
Since ll_getname is used to get a single component name from userspace
to transfer to server as-is, there's no need to allocate 4k buffer
as done by __getname. Allocate NAME_MAX+1 buffer instead to ensure
we have enough for a null terminated max valid length buffer.
This was discovered by Al Viro in https://lkml.org/lkml/2015/4/11/243
It uses getname in unsafe manner and since it's to deal with corrupted
or inconsistent filesystem, we are probably better to deal with
it from lfsck anyway.
Merge tag 'iio-for-v4.2c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
Third round of new IIO drivers, cleanups and functionality for the 4.2 cycle.
Given Linus announced a 4.8rc coming up, hopefully time for one more
lot of IIO patches this cycle. Some of these are actually
improvements / fixes for patches earlier in the cycle.
New device support
* st_accel driver - support devices with 8 bit channels.
Cleanup
* A general cleanup of the iio tools under /tools/ from Hartmut.
I'm more than a little embarassed by how bad some of these were! Are well,
much more refined and less bug prone now.
These cover lots of stuff like unhandled error returns, memory leaks as
well as general refactoring to tidy the code up.
* iio_simple_dummy - fix memory leaks in the init functions, drop some
pointless error returns from functions that never generate errors and
make the module parameter explicitly unsigned.
* More buffer handling reworks from Lars-Peter, this time targetting hardware
buffers (a little used corner that looks likely to get more use in the near
future). Specifically:
- Always compute the masklength as inkernel buffer users may need it.
- Add a means of labeling which buffer modes a given buffer implementation
supports.
- In the case of hardware buffers, require strict scan matching rather than
matching to a superset. Currently the demux is bypassed by these drivers
(this may well not change for efficiency reasons) so allowing a superset
of channels to be selected would otherwise lead to more data than requested
confusing userspace.
Driver funcationality improvments
* mmc35240 - adds a compensation to the raw values as borrowed form Memsic's
own input driver.
* mma8452
- event support
- event debouncing
- high pass filter configuration
- triggers
* vf610 - allow conversion mode to be adjusted
Fixlets
* mmc35240
- Off by one error that by coincidence had no real effect.
- i2c_device_name should be lowercase.
- Lack of null terminator at end of attributes array.
- Avoid computing the fractional part of the magnetic field by moving
the scaling into userspace where floating point is available to simplify
the maths.
- Use a smaller sleep before assuming the measurement is done. This is
safe and improves the possible polling rate.
- Fix sensitivity on z-axis - datasheet disagrees with Memsic's releasedd
code and the value used in the code seems to be correct.
* stk3310 - make a local variable signed to ensure error handling works.
* twl4030
- fix calculation of the temperature sense current - bug unlikely
to have ever been noticed as the difference is small.
- Fix errors in descriptions.
staging: rtl8188eu: eliminate spaces before commas
Eliminate "space prohibited before that ','" errors found by checkpatch,
but do this only to lines which after the patch is applied do not
exceed 80 characters. Out of that only those lines are changed, whose
context does not exceed 80 characters in each line. In other words the
changes are limited to cases where the patch generated is itself
checkpatch-correct.
Zoltán Lajos Kis [Wed, 10 Jun 2015 20:00:17 +0000 (22:00 +0200)]
Staging: lustre: fix space before and after comma in dt_object.c
Fixes a space prohibited before that ',' and space required after
that ',' error in lustre/lustre/obdclass/dt_object.c that were
found by the checkpatch.pl tool.
Signed-off-by: Zoltán Lajos Kis <zoltan.lajos.kis@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Zoltán Lajos Kis [Wed, 10 Jun 2015 20:00:16 +0000 (22:00 +0200)]
Staging: lustre: fix braces are not necessary in dt_object.c
Fixes a braces {} are not necessary for any arm of this statement
warning in lustre/lustre/obdclass/dt_object.c that was found by
the checkpatch.pl tool.
Signed-off-by: Zoltán Lajos Kis <zoltan.lajos.kis@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Tue, 9 Jun 2015 02:27:11 +0000 (22:27 -0400)]
staging:lustre: use available kernel wrappers in lib-socket.c
Instead of handling calls to struct proto ourselves we can use
equivalent kernel wrappers. No wrapper exist for unlocked ioctl
handling so we create one here for our use. I expect some day
that function will be integrated into sock.c.
Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Tue, 9 Jun 2015 02:27:10 +0000 (22:27 -0400)]
staging:lustre: rename tcpip handling functions to lnet_* prefix
With all the TCPIP handling done in the lnet layer we should
rename all the functions with the prefix lnet_*. One other
change done was changing the remove argument of lnet_sock_getaddr
from a int to a bool.
Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Another one of those silly one line wrappers which is not
needed. Replace libcfs_sock_abort_accept wrapper with a
direct call to wake_up_all on the lnet_acceptor_state sock.
Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: wilc1000: fix build warning related to time_after_eq macro
This patch fixes a build warning related to the use of the time_after_eq
macro.Adding a typecast to the second argument suppresses the
warning.This warning was created by one my previous patch.
Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The code is actually correct, it's just that these lines were pushed in
an extra indent level by mistake in 35e33b0468ab ('staging: rtl8192e:
Fix LONG_LINE warnings').
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
- Remove unused fields in dig_t structures. Some of them were only
initialized and never accessed.
- Remove unused enums/macros/defines in rtl_dm.h
- Remove duplicated function declarations
- Remove unused dm_change_dynamic_initgain_thresh() function
- Remove unused dm_shadow_init() function
staging: rtl8192e: Remove dead code: cmpk_handle_query_config_rx()
Remove cmpk_handle_query_config_rx function. It is called
once, does some calculation, but generates no output -
it has neither return value, nor modify its parameters.
Staging: rtl8192u: Remove two useless lines at ieee80211_wep_null
Remove two lines at ieee80211_wep_null which checkpatch.pl reported as errors.
The first one because it has a C99 comment style and the second one because it is a void
return which is useless.
The function ieee80211_wep_null cannot be completely removed because it is exported and
used to autoload the module.
Signed-off-by: Pedro Marzo Perez <marzo.pedro@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Staging: rtl8192u: Simplify error check code at prism2_wep_init
Simplify prism2_wep_init error check code employing goto when a failure is detected.
Removed pr_debug which was given a checkpatch.pl error because of literal string
splitted across two lines of code, it was seldom going to be printed anyway.
Signed-off-by: Pedro Marzo Perez <marzo.pedro@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: expected restricted __le16 [usertype] frame_ctl
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: got int
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: warning: invalid assignment: |=
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: left side has type restricted __le16
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: right side has type int
Tolga Ceylan [Tue, 2 Jun 2015 16:08:35 +0000 (09:08 -0700)]
staging: rtl8192u/ieee80211/ieee80211_softmac.c: auth parse error code byte order fix
auth_parse() return result is in incorrect le16 byte order. Currently
this still works since the user code merely checks if error code is
equal to 0. However debug statement in ieee80211_check_auth_response()
prints the error code in the incorrect le16 byte order. This fix
corrects the byte order as cpu order.
David Kershner [Thu, 4 Jun 2015 13:22:49 +0000 (09:22 -0400)]
staging: unisys: Add the bus device to the visor device list.
When the bus device was created the list_all variables were not
being initialized. When the CONTROLVM_BUS_CONFIGURE message
was being sent, it was failing to find the bus and produced a
panic. Initialize the bus_info->list_all variable by doing a
INIT_LIST_HEAD.
Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Don Zickus [Thu, 4 Jun 2015 13:22:48 +0000 (09:22 -0400)]
staging: unisys: Fix clean up path
When unloading a module, we need to cleanup the platform registration.
However, unregistering the platform uncovered a couple of quirks, namely
a missing device_release function. Fix things up so module unload works
and allows us to reload the module.
Signed-off-by: Don Zickus <dzickus@redhat.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Don Zickus [Thu, 4 Jun 2015 13:22:47 +0000 (09:22 -0400)]
staging: unisys: Fix double sysfs create for module version
When we combined visorchipset and visorbus into one driver we negelected
to strip out some of the MODULE_ stuff from one of the files. When
building the drivers in, it causes a WARN that we try to create
/proc/modules/visorbus/version when it is already created.
visorchipset.c is the driver entry point, remove the cruft from
visorbus_main.c.
Signed-off-by: Don Zickus <dzickus@redhat.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Kershner [Thu, 4 Jun 2015 13:22:45 +0000 (09:22 -0400)]
staging: unisys: Remove unneeded fields in diagchannel.h
Diagchannel.h is used primarily for the diagnostics channel. The
diagnostics channel is not being used by linux guests currently, so
the majority of the file is not needed. What is left is what is
needed to perform postcode vmcalls. Those postcodes will eventually
end up in the diag channel.
Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Don Zickus [Thu, 4 Jun 2015 13:22:42 +0000 (09:22 -0400)]
staging: unisys: Convert device creation to use visor_device
This patch removes the legacy dev_info struct and instead creates
and passes around a traditional struct device.
This allows us to remove a lot of the various look up code and
removes the doubt if the struct exists or not.
Half of the churn is just the conversion of visorchipset_device_info
to visor_device. Various cleanups include re-arranging the failure
paths to make more sense.
Pay attention to the create_visor_device function. This had a lot of
churn to simplify everything.
Lots of functions disappeared because they are not needed any more.
Signed-off-by: Don Zickus <dzickus@redhat.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Don Zickus [Thu, 4 Jun 2015 13:22:41 +0000 (09:22 -0400)]
staging: unisys: Convert bus creation to use visor_device
This patch removes the legacy bus_info struct and instead creates
and passes around a traditional struct device.
This allows us to remove a lot of the various look up code and
removes the doubt if the struct exists or not.
Half of the churn is just the conversion of visorchipset_bus_info
to visor_device. Various cleanups include re-arranging the failure
paths to make more sense.
Signed-off-by: Don Zickus <dzickus@redhat.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Don Zickus [Thu, 4 Jun 2015 13:22:40 +0000 (09:22 -0400)]
staging: unisys: Do not use 0 as the default bus root device number
I used 0 as the device id for the bus root, neglecting the fact that
device 0 is a valid id in Unisys's configuration. Modify this to
use UINT_MAX instead as a unique number.
As fallout from this change it was noticed the bus_no and dev_no was not
defined the same way consistently. Fix visorbus.h to use u32 there. Fix
the resulting printk warning too.
Signed-off-by: Don Zickus <dzickus@redhat.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>