Dmitry Kalinkin [Thu, 28 May 2015 12:07:00 +0000 (15:07 +0300)]
vme: tsi148: fix first DMA item mapping
This moves DMA mapping of the first list element to vme_list_add, the
same place where other elements mappings occur. This prevents extra
mapping or over-unmapping in the cases when vme_list_exec is called more
or less than one time respectively.
Also adds dma_mapping_error check.
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>
Dmitry Kalinkin [Thu, 28 May 2015 12:06:59 +0000 (15:06 +0300)]
vme: tsi148: fix DMA lists longer that one item
DMA lists on tsi148 weren't processed further than the first item
because of the broken logic. This regression was introduced in:
ac1a4f2caf7b071 "Staging: VME: Ensure TSI148 link list descriptors..."
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>
Dmitry Kalinkin [Thu, 28 May 2015 12:06:58 +0000 (15:06 +0300)]
Documentation: mention vme_master_mmap() in VME API
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>
Sudip Mukherjee [Fri, 12 Jun 2015 10:50:43 +0000 (16:20 +0530)]
staging: rtl8188eu: remove function which does nothing
The function rtw_mfree_all_stainfo() is just holding the lock,
traversing the list, and then unlocking. It is not doing anything else.
So removed the function and modified the places from where it was called.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Fri, 12 Jun 2015 10:50:42 +0000 (16:20 +0530)]
staging: rtl8188eu: remove unused variables
These variables were being set but not used afterwards.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sudip Mukherjee [Fri, 12 Jun 2015 10:50:41 +0000 (16:20 +0530)]
staging: rtl8188eu: remove unused enum and CONFIG
The CONFIGs, the enum and the function declaration was not being
used anywhere.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Luca Ceresoli [Thu, 11 Jun 2015 22:20:49 +0000 (00:20 +0200)]
staging: rtl8188eu: fix wrong debug print
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Luca Ceresoli [Thu, 11 Jun 2015 22:20:48 +0000 (00:20 +0200)]
staging: rtl8188eu: issue_probersp(): remove unused variable and dead code
is_valid_p2p_probereq is initialized to false and never modified. Code
depending on it is dead code. Remove all of it.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Luca Ceresoli [Thu, 11 Jun 2015 22:20:47 +0000 (00:20 +0200)]
staging: rtl8723au: issue_probersp(): remove unused parameter
The is_valid_p2p_probereq is never referenced in the function body.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Luca Ceresoli [Thu, 11 Jun 2015 22:20:46 +0000 (00:20 +0200)]
staging: rtl8188eu: issue_probersp(): remove unused parameter
The is_valid_p2p_probereq is never referenced in the function body.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Luca Ceresoli [Thu, 11 Jun 2015 22:20:45 +0000 (00:20 +0200)]
staging: rtl8188eu: unexport internal functions
These are internal functions. Remove their declaration in rtw_mlme_ext.h
and make them static.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Luca Ceresoli [Thu, 11 Jun 2015 22:20:44 +0000 (00:20 +0200)]
staging: rtl8188eu: rtw_mlme_ext.c: unexport message callbacks
These are internal functions. Remove their declaration in rtw_mlme_ext.h
and make them static.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Luca Ceresoli [Thu, 11 Jun 2015 22:20:43 +0000 (00:20 +0200)]
staging: rtl8188eu: rtw_mlme_ext.c: reorder message callbacks and tables
The message handling stored in mlme_sta_tbl and OnAction_tbl are internal and
will be declared static, and their declaration removed from rtw_mlme_ext.h, in
a later commit.
This would break compilation, since they are are referenced before their
definition.
Reorder these functions and the structures that hold them so that symbols are
defined before they are referenced, without the need for forward declarations.
This commit only reorders code, there is no content change.
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Juston Li [Fri, 12 Jun 2015 10:17:22 +0000 (03:17 -0700)]
staging: sm750fb: fix c99 comments
fixed all checkpatch.pl ERROR: do not use C99 // comments
Any C99 comments used to comment out code are simply removed.
Also some of the errors occur inside '#if 0' blocks which I
might as well fix since checkpatch.pl caught them but the blocks
themselves should probably be cleaned up later.
Changes since v1: close a comment block
Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Harisangam Sharvari [Thu, 11 Jun 2015 12:38:13 +0000 (12:38 +0000)]
staging: rtl8192u: Removed redundant bool comparisons in r8192U_dm.c
This patch was detected with the help of coccinelle tool.
The redundant comparisons of bool variables are removed in r8192U_dm.c.
Signed-off-by: Harisangam Sharvari <sharisan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gaston Gonzalez [Wed, 10 Jun 2015 22:46:25 +0000 (19:46 -0300)]
staging: rtl8192u: ieee80211: Fix sparse endianness warnings ieee80211_softmac.c
Fix the following endinness warnings detected by sparse:
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:669:34: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:669:34: expected restricted __le16 [usertype] duration_id
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:669:34: got int
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:679:33: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:679:33: expected restricted __le16 [usertype] algorithm
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:679:33: got int
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1090:32: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1090:32: expected restricted __le16 [usertype] duration_id
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1090:32: got int
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1109:30: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1109:30: expected restricted __le16 [usertype] listen_interval
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1109:30: got int
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3130:24: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3130:24: expected restricted __le16 [usertype] reason
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3130:24: got unsigned char [unsigned] [usertype] asRsn
Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fabian Frederick [Wed, 10 Jun 2015 16:33:38 +0000 (18:33 +0200)]
staging: speakup: use swap() in get_highlight_color()
Use kernel.h macro definition.
Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fabian Frederick [Wed, 10 Jun 2015 16:32:17 +0000 (18:32 +0200)]
staging: rtl8723au: use swap() in WMMOnAssocRsp23a()
Use kernel.h macro definition.
Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fabian Frederick [Wed, 10 Jun 2015 16:32:13 +0000 (18:32 +0200)]
staging: rtl8712: use swap() in dequeue_xframe_ex()
Use kernel.h macro definition.
Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fabian Frederick [Wed, 10 Jun 2015 16:32:28 +0000 (18:32 +0200)]
Staging: rtl8188eu: use swap() in WMMOnAssocRsp()
Use kernel.h macro definition.
Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Mon, 8 Jun 2015 21:23:34 +0000 (23:23 +0200)]
staging: rtl8192e: Remove dead code: dig_t::dbg_mode, drx_path_sel::DbgMode
dig_t::dbg_mode and drx_path_sel::DbgMode are initialized to one value and
checked only once in code.This patch throws them away, and deletes
always-true conditions.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Mateusz Kulikowski [Mon, 8 Jun 2015 21:23:33 +0000 (23:23 +0200)]
staging: rtl8192e: remove dm_shadow
dm_shadow array is no longer used.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Gnanachandran Dhanapal [Tue, 9 Jun 2015 14:47:49 +0000 (14:47 +0000)]
Staging: rtl8192e: Casting correct Endianness
Casting correct Endianness for __le16 variable used in assignment and
condition check
Signed-off-by: Gnanachandran Dhanapal <gdhanapa@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nizam Haider [Tue, 9 Jun 2015 04:44:55 +0000 (10:14 +0530)]
Staging: rts5208: xd: Fixed checkpatch warning
Fixed a warning, else is not generally useful after a break or return.
Signed-off-by: Nizam Haider <nizamhaider786@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Harisangam Sharvari [Tue, 9 Jun 2015 04:27:35 +0000 (04:27 +0000)]
Staging: vt6655: Remove unnecessary equality checks in rxtx.c
The unnecessary equality checks for bool variable are removed in rxtx.c.
These changes were detected with the help of coccinelle tool
Signed-off-by: Harisangam Sharvari <sharisan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Kershner [Fri, 12 Jun 2015 20:46:08 +0000 (16:46 -0400)]
staging: unisys: Don't hold device responses until driver loads
Currently if a driver is not loaded for a device, we will not
respond to the device create until it is done. This causes
s-Par to not mark the partition running if the driver for the
device is not loaded. Since there are several devices that
could be assigned to a guest that don't have an actual
driver this will cause us to never go running.
If the device driver is loaded, we WILL continue to only
respond to the device PAUSE message when the device driver
has responded that it is done with the device.
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Kershner [Fri, 12 Jun 2015 20:46:07 +0000 (16:46 -0400)]
staging: unisys: convert pack pragma to __packed
It was noticed that iochannel.h was still using pragmas to
pack the datastructures, should be using __packed instead.
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
David Kershner [Fri, 12 Jun 2015 20:46:06 +0000 (16:46 -0400)]
staging: unisys: Move phys_info to iochannel.h
This moves phys_info to iochannel.h. It is only
used by iochannel.h and is not needed in
vmcallinterfaces.h.
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Abdul Hussain [Thu, 11 Jun 2015 10:03:49 +0000 (10:03 +0000)]
staging: unisys: Remove unneeded variable
This patch remove unneeded variable used to store return value.
Signed-off-by: Abdul Hussain <habdul@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:35 +0000 (18:30 +0100)]
staging: comedi: das08: use better MODULE_DESCRIPTION()
Replace the boiler-plate Comedi module description string with something
more specific.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:34 +0000 (18:30 +0100)]
staging: comedi: das08: clarify sign-magnitude conversion
For DAS08/JR/16 and DAS08/JR/AO-16 boards, the 16-bit analog input
readings are assumed to be in a sign-magnitude format and need
converting to the COMEDI unsigned sample format. The expressions to do
the conversion look a little messy. Use a local variable `magnitude` to
make it easier to follow.
Also, there seems to be some discrepancy between the manual for these
boards and the COMEDI code. The manual implies that 0 is full-scale
negative and 65535 is full-scale positive. However, the COMEDI code has
used the sign-magnitude conversion for these boards since these two
boards were initially supported by a patch from an external contributor
to the COMEDI project back in 2001. Assume the code is correct for now,
but add a comment to mention the discrepancy.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:33 +0000 (18:30 +0100)]
staging: comedi: das08: rename das08_do_wbits() & das08jr_do_wbits()
`das08_do_wbits()` and `das08jr_do_wbits()` are handlers for the Comedi
`INSN_BITS` instruction for the digital output subdevice on "non-JR" and
"JR" boards, respectively. Rename them to `das08_do_insn_bits()` and
`das08jr_do_insn_bits()` respectively for consistency.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:32 +0000 (18:30 +0100)]
staging: comedi: das08: rename das08_di_rbits() & das08jr_di_rbits()
`das08_di_rbits()` and `das08jr_di_rbits()` are handlers for the Comedi
`INSN_BITS` instruction for the digital input subdevice on "non-JR" and
"JR" boards, respectively. Rename them to `das08_di_insn_bits()` and
`das08jr_di_insn_bits()` respectively for consistency.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:31 +0000 (18:30 +0100)]
staging: comedi: das08: rename das08_ai_rinsn()
`das08_ai_rinsn()` is the handler for Comedi `INSN_READ` instructions
for the AI subdevice. Rename the function to `das08_ai_insn_read()` for
consistency.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:30 +0000 (18:30 +0100)]
staging: comedi: das08: rename the gainlist variables
`das08_pgh_gainlist[]`, `das08_pgl_gainlist[]`, and
`das08_pgm_gainlist[]` hold the gain codes indexed by range index for
various boards that support programmable gain. `das08_gainlist[]` is a
look-up table to find the appropriate gain list for a board. These are
all associated with the analog input Comedi subdevice. Rename the
variables to reflect that.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:29 +0000 (18:30 +0100)]
staging: comedi: das08: rename ai range tables
The `range_das08_pgl`, `range_das08_pgm`, and `range_das08_pgh`
variables define the analog input ranges for the "PGL", "PGM", and "PGH"
board variants, and are also used for the "AOL", "AOM", and "AOH" board
variants. Rename them to use the `das08_` prefix for consistency.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:28 +0000 (18:30 +0100)]
staging: comedi: das08.c: reformat remaining comments
Use the preferred style for block comments. Squash double spaces after
the comment opening sequence for single-line comments.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:27 +0000 (18:30 +0100)]
staging: comedi: das08.c: reformat copyright comment
Replace double spaces with single spaces at the start of each line in
the copyright comment at the top of the file.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:26 +0000 (18:30 +0100)]
staging: comedi: das08: remove board register map comments
The "das08" module contains some comments outlining the register maps
for some of the ISA boards supported by this module in combination with
the "das08_isa" module. The comments are somewhat sporadically placed,
don't detail all the boards, and don't use the preferred block comment
style. If anywhere, they should probably be in the "das08_isa" module.
Just remove them. The comments for the register macros indicate which
boards they apply to anyway, so we don't lose much information.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:25 +0000 (18:30 +0100)]
staging: comedi: das08: rename DAS08AO_AO_UPDATE
"AOL", "AOM", and "AOH" boards have a jumper that controls whether
analog output channels are updated simultaneously or individually. When
set to update individually, individual channels are updated when the
high byte register is written. When set to update simultaneously,
channels are not updated until any of the analog output registers are
read. The driver doesn't know the jumper setting and is not interested
in the simultaneous update feature, so it updates a channel by writing
the low byte register, the high byte register, and then reading channel
0's low byte register.
The `DAS08AO_AO_UPDATE` macro contains the offset to the low byte
register for analog output channel 0 on the "AOL", "AOM", and "AOH"
boards, which the driver reads to update the analog outputs. Rename the
macro to `DAS08AOX_AO_UPDATE_REG` and add a comment.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:24 +0000 (18:30 +0100)]
staging: comedi: das08: rename DAS08AO_AO_LSB() and DAS08AO_AO_MSB()
The `DAS08AO_AO_LSB(x)` macro returns the offset to the analog output
low byte register for channel x (0 or 1) for "AOL", "AOM", and "AOH"
boards. The `DAS08AO_AO_MSB(x)` macro returns the offset to the
corresponding high byte register. Rename the macros to
`DAS08AOX_AO_LSB_REG(x)` and `DAS08AOX_AO_MSB_REG(x)` respectively, and
add some comments.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:23 +0000 (18:30 +0100)]
staging: comedi: das08: replace DAS08AO_GAIN_CONTROL/STATUS
The `DAS08AO_GAIN_CONTROL` and `DAS08AO_GAIN_STATUS` macros hold the
offset to the "programmable gain" register on "PGL", "PGM", "PGH",
"AOL", "AOM" and "AOH" boards. Writing a code to this register sets the
gain for the current analog input channel (selected in the main control
register). The written value can be read back in bits 3..0 of the
register. Other bits of the register are read-only and not used by the
driver. Rename `DAS08AO_GAIN_CONTROL` to `DAS08_GAIN_REG` and add a
comment. Remove `DAS08AO_GAIN_STATUS` as the driver does not use it and
the read-only parts of the register are documented in the comment.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:22 +0000 (18:30 +0100)]
staging: comedi: das08: add DAS08JR_AO_UPDATE_REG
"JR" boards with analog output channels have a jumper that controls
whether analog output channels are updated simultaneously or
individually. When set to update individually, individual channels are
updated when the high byte register is written. When set to update
simultaneously, channels are not updated until the digital inputs
register is read. The driver doesn't know how the jumper is set and is
not interested in the simultaneous output feature, so it updates a
channel by writing the low byte, then the high byte, then reading the
digital inputs register. To make the code more explicit, add a macro
`DAS08JR_AO_UPDATE_REG` with the same value as the `DAS08JR_DI_REG`
macro (for digital inputs) and use it when reading the register to
update the analog outputs.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:21 +0000 (18:30 +0100)]
staging: comedi: das08: rename DAS08JR_AO_LSB() and DAS08JR_AO_MSB()
The `DAS08JR_AO_LSB(x)` macro returns the offset to the analog output
low byte register for channel x (0 or 1) for "JR" boards with analog
output support. The `DAS08JR_AO_MSB(x)` macro returns the offset to the
corresponding high byte register. Rename the macros to
`DAS08JR_AO_LSB_REG(x)` and `DAS08JR_AO_MSB_REG(x)` respectively, and
add some comments.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:20 +0000 (18:30 +0100)]
staging: comedi: das08: rename and split DAS08JR_DIO
The `DAS08JR_DIO` macro contains the offset to the read-only digital
input register and write-only digital output register on the "JR"
boards. Replace the macro with two new macros (with the same numeric
value) named `DAS08JR_DI_REG` for the digital input register and
`DAS08JR_DO_REG` for the digital output register, and add some comments.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:19 +0000 (18:30 +0100)]
staging: comedi: das08: rename DAS08_OP() and DAS08_DO_MASK
The `DAS08_DO_MASK` macro is a bitmask for the control register
corresponding to the digital output channels (except on "JR" boards).
Rename it to `DAS08_CONTROL_DO_MASK` and add a comment.
The `DAS08_OP(x)` macro takes a bitvector of the desired digital output
channel states and returns the corresponding bits for the control
register (except on "JR" boards). Rename it to `DAS08_CONTROL_DO(x)`
and add a comment.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:18 +0000 (18:30 +0100)]
staging: comedi: das08: rename and rewrite DAS08_INTE
The `DAS08_INTE` macro contains a mask for the "INTE" bit in the control
register (except on "JR" boards). Setting it to 1 enables interrupts.
Setting it to 0 disables interrupts and clears the "IRQ" bit in the
status register. Rename the macro to `DAS08_CONTROL_INTE` and add a
comment. Also use the `BIT()` macro to define its value. (Note: the
driver does not currently enable interrupts.)
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:17 +0000 (18:30 +0100)]
staging: comedi: das08: rename DAS08_MUX() and DAS08_MUX_MASK
The `DAS08_MUX_MASK` macro is a bitmask for the control register
corresponding to the analog input multiplexor channel selection bits.
Rename it to `DAS08_CONTROL_MUX_MASK` and add a comment. Note that the
current setting of the multiplexor can also be read from the same bit
positions in the status register, but the driver does not use it. Add a
comment to that effect.
The `DAS08_MUX(x)` macro takes an analog input channel number and
returns the corresponding analog input multiplexor channel selection
bits for the control register. Rename it to `DAS08_CONTROL_MUX(x)` and
add a comment.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:16 +0000 (18:30 +0100)]
staging: comedi: das08: rename DAS08_CONTROL
The `DAS08_CONTROL` macro contains the offset to the write-only control
register. Rename it to `DAS08_CONTROL_REG` and add a comment.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:15 +0000 (18:30 +0100)]
staging: comedi: das08: rename and rewrite DAS08_IP
The `DAS08_IP()` macro takes a value read from the status register and
returns the state of the three digital input channels (except on "JR"
boards). Rename it to `DAS08_STATUS_DI()` and add a comment. Also
re-arrange the expression used to extract the state of the digital
inputs for consistency with other register macros.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:14 +0000 (18:30 +0100)]
staging: comedi: das08: rename and rewrite DAS08_IRQ
The `DAS08_IRQ` macro contains a mask for the "IRQ" status bit. This is
set to 1 when a rising edge is detected on the external interrupt input
pin of the external connector (which may be jumpered to a pacer output).
It is cleared by setting the "INTE" control bit to 0. It is not used on
"JR" boards. Rename the macro to `DAS08_STATUS_IRQ` and add a comment.
Also use the `BIT()` macro to define the value.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:13 +0000 (18:30 +0100)]
staging: comedi: das08: rename and rewrite DAS08_EOC
The `DAS08_EOC` macro contains a mask for the "end of A/D conversion"
bit in the status register. The logic is reverse sense in that the bit
is set to 1 while the conversion is in progress and set to 0 when the
conversion is complete. Rename the macro to `DAS08_STATUS_AI_BUSY` and
add a comment. Also make use of the `BIT()` macro to define the value.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:12 +0000 (18:30 +0100)]
staging: comedi: das08: rename DAS08_STATUS
The `DAS08_STATUS` macro contains the offset to the read-only status
register. Rename it to `DAS08_STATUS_REG` and add a comment.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:11 +0000 (18:30 +0100)]
staging: comedi: das08: rename DAS08_TRIG_12BIT
The `DAS08_TRIG_12BIT` macro contains the offset to the write-only
software trigger register for 12-bit or 16-bit analog-to-digital
conversions. Rename the macro to `DAS08_AI_TRIG_REG` and add a comment.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:10 +0000 (18:30 +0100)]
staging: comedi: das08: rename DAS08_LSB and DAS08_MSB
The `DAS08_LSB` and `DAS08_MSB` macros contain the offsets to the
least-significant and most-significant analog input data registers.
Rename them to `DAS08_AI_LSB_REG` and `DAS08_AI_MSB_REG` respectively
and add comments to document them.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:09 +0000 (18:30 +0100)]
staging: comedi: das08.h: make self-reliant
The Comedi "das08.h" header file is included by drivers for the
ComputerBoards/MeasurementComputing and Keithley Metrabyte boards in the
DAS08 series. It does not compile cleanly when it is the first header
included by the ".c" file. It uses `struct comedi_device *` in the
parameter list of a function prototype, so just declare `struct
comedi_device` as an incomplete type. It also uses `bool`, so include
<linux/types.h> to declare it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:08 +0000 (18:30 +0100)]
staging: comedi: das08: improve test for programmable gain
`das08_ai_rinsn()` handles Comedi `INSN_READ` instructions for the AI
subdevice. This programs the gain for the analog input channel if the
board has support for that, and acquires data from the channel. If
programmable gain is supported, the gain code is read from the array
pointed to by `devpriv->pg_gainlist` indexed by the range index. The
function assumes that programmable gain is supported if the AI
subdevice's range table supports more than one range. Replace that with
a more direct test for `devpriv->pg_gainlist` being non-NULL, as it is
only initialized to a non-NULL pointer for boards that support
programmable gain.
This will also allow range tables to be included for convenience for
those boards that support multiple ranges by DIP switches. Those boards
are currently initialized to use a single "unknown" range.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:07 +0000 (18:30 +0100)]
staging: comedi: das08: use indexed initializer for AI range table types
The "das08" common module for DAS08 ISA, PCI, and PCMCIA drivers
includes a predefined set of AI range tables. The static board data (of
type `struct das08_board_struct`) for a particular board contains an
index in its `ai_pg` member (of type `enum das08_lrange`) indicating
which of the predefined AI range tables to use. The "das08" common
module looks up this index in `das08_ai_lranges[]` to get a pointer to
the predefined range table for the board. The same index is also looked
up in `das08_gainlists[]` to get a corresponding pointer to a list of
hardware gain values for each range supported by the board (NULL for
boards without programmable gain).
To make this clearer, used indexed initializers for `das08_ai_lranges[]`
and `das08_gainlists[]`, using the enumerated constants from `enum
das08_lrange` as the indices. Also add a short comment to the
definition of `enum das08_lrange`.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:06 +0000 (18:30 +0100)]
staging: comedi: das08.h: reformat remaining comments
Reformat remaining comments to use the preferred style for single-line
and block comments.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:05 +0000 (18:30 +0100)]
staging: comedi: das08.h: change description in copyright header comment
The copyright header comment includes a single-line description saying
it is for "das08.c" and "das08_cs.c". However, it is also used by
"das08_isa.c" and "das08_pci.c". Update the description to say it is
for common DAS08 support, similar to description in "das08.c" (the
common module for the DAS08 ISA/PCI/PCMCIA drivers).
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 5 Jun 2015 17:30:04 +0000 (18:30 +0100)]
staging: comedi: das08.h: reformat copyright comment
Reformat the copyright comment at the top of the file to use the
preferred block comment style.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ian Abbott [Fri, 12 Jun 2015 15:37:41 +0000 (16:37 +0100)]
staging: comedi: cb_pcimdas: fix handlers for DI and DO subdevices
Normally, low-level Comedi drivers set an `insn_bits` handler for
digital input (DI), digital output (DO) and digital input/output (DIO)
subdevice types to handle normal reading and writing of digital
channels. The "cb_pcimdas" driver currently has an `insn_read` handler
for the DI subdevice and an `insn_write` handler for the DO subdevice.
However, the actual handler functions `cb_pcimdas_di_insn_read()` and
`cb_pcimdas_do_insn_write()` are written to behave like `insn_bits`
handlers. Something's wrong there! To fix it, set the functions as
`insn_bits` handlers and rename them for consistency.
Fixes: e56d03dee14a ("staging: comedi: cb_pcimdas: add main connector digital input/output")
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Thu, 11 Jun 2015 19:18:15 +0000 (15:18 -0400)]
staging:lustre: Update license and copyright for the LNET headers
Point to the right place for GNU license. Update Intel copyright.
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:14 +0000 (15:18 -0400)]
staging:lustre: LNet header code cleanup - indentation etc
Handle all the style issues reported by checkpatch.pl.
Remove general white spaces, spaces in function calls,
alignments etc.
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:13 +0000 (15:18 -0400)]
staging:lustre: fix camel case for LNetInit and LNetFini
For the functions LNetInit and LNetFini move away from
camel case to lnet_init and lnet_fini.
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: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>
John L. Hammond [Thu, 11 Jun 2015 19:18:08 +0000 (15:18 -0400)]
staging:lustre: remove lnet/include/lnet/linux/
Remove the linux specific headers from lnet/include/lnet/linux/,
moving whatever was worthwhile from them to their parent headers or
elsewhere.
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
James Simmons [Thu, 11 Jun 2015 19:18:07 +0000 (15:18 -0400)]
staging:lustre: Delete all obsolete LND drivers
Remove ralnd, ptllnd, mxlnd, qswlnd drivers. They are no
longer supported and have not even been buildable
for a long time.
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6209
Reviewed-on: http://review.whamcloud.com/13663
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dean Lee [Fri, 12 Jun 2015 05:11:44 +0000 (14:11 +0900)]
staging: wilc1000: change WILC_BOOL to bool
change own data type(WILC_BOOL) to common data type(bool)
but that's contain true/false value. so change with them.
Signed-off-by: Dean Lee <dean.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Fri, 12 Jun 2015 03:38:05 +0000 (12:38 +0900)]
staging: wilc1000: remove unused typedef
Remove unused typedef for custom data types.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Hari Prasath Gujulan Elango [Thu, 11 Jun 2015 07:48:13 +0000 (07:48 +0000)]
staging: wilc1000: use memdup_user
This patch replaces the kmalloc followed by copy_from_user by the
wrapper routine memdup_user.
Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dean Lee [Thu, 11 Jun 2015 03:44:24 +0000 (12:44 +0900)]
staging: wilc1000: modify odd print message
This driver has odd message in print string.
So this patch removes the data type.
Signed-off-by: Dean Lee <dean.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chris Park [Thu, 11 Jun 2015 03:42:23 +0000 (12:42 +0900)]
staging: wilc1000: fix warning while printing
size_t should print using %zu, but here it was use %lu.
we were getting warning while printing.
Signed-off-by: Chris Park <chris.park@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 11 Jun 2015 05:36:00 +0000 (14:36 +0900)]
staging: wilc1000: remove WILC_Sint64
remove unused WILC_Sint64.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 11 Jun 2015 05:35:59 +0000 (14:35 +0900)]
staging: wilc1000: remove WILC_Sint32
Use s32 instead of WILC_Sint32.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 11 Jun 2015 05:35:58 +0000 (14:35 +0900)]
staging: wilc1000: remove WILC_Sint16
Use s16 instead of WILC_Sint16.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 11 Jun 2015 05:35:57 +0000 (14:35 +0900)]
staging: wilc1000: remove WILC_Sint8
Use s8 instead of WILC_Sint8.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 11 Jun 2015 05:35:56 +0000 (14:35 +0900)]
staging: wilc1000: remove WILC_Uint64
Use u64 instead of WILC_Uint64.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 11 Jun 2015 05:35:55 +0000 (14:35 +0900)]
staging: wilc1000: remove WILC_Uint32
Use u32 instead of WILC_Uint32.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 11 Jun 2015 05:35:54 +0000 (14:35 +0900)]
staging: wilc1000: remove WILC_Uint16
Use u16 instead of WILC_Uint16.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 11 Jun 2015 05:35:53 +0000 (14:35 +0900)]
staging: wilc1000: remove UWORD32
Use u32 instead of UWORD32.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chaehyun Lim [Thu, 11 Jun 2015 05:34:32 +0000 (14:34 +0900)]
staging: wilc1000: remove UWORD8
Use u8 instead of UWORD8.
Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Thu, 11 Jun 2015 12:02:58 +0000 (14:02 +0200)]
lustre: ptlrpc: Replace uses of OBD_{ALLOC,FREE}_LARGE
Replace uses of OBD_ALLOC_LARGE by libcfs_kvzalloc and OBD_FREE_LARGE by
kvfree.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression ptr,size;
@@
- OBD_ALLOC_LARGE(ptr,size)
+ ptr = libcfs_kvzalloc(size, GFP_NOFS)
@@
expression ptr,size;
@@
- OBD_FREE_LARGE(ptr, size);
+ kvfree(ptr);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Thu, 11 Jun 2015 12:02:57 +0000 (14:02 +0200)]
lustre: obdclass: linux: Replace uses of OBD_{ALLOC, FREE}_LARGE
Replace uses of OBD_ALLOC_LARGE by libcfs_kvzalloc and OBD_FREE_LARGE by
kvfree.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression ptr,size;
@@
- OBD_ALLOC_LARGE(ptr,size)
+ ptr = libcfs_kvzalloc(size, GFP_NOFS)
@@
expression ptr,size;
@@
- OBD_FREE_LARGE(ptr, size);
+ kvfree(ptr);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Thu, 11 Jun 2015 12:02:56 +0000 (14:02 +0200)]
lustre: obdclass: Replace uses of OBD_{ALLOC,FREE}_LARGE
Replace uses of OBD_ALLOC_LARGE by libcfs_kvzalloc and OBD_FREE_LARGE by
kvfree.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression ptr,size;
@@
- OBD_ALLOC_LARGE(ptr,size)
+ ptr = libcfs_kvzalloc(size, GFP_NOFS)
@@
expression ptr,size;
@@
- OBD_FREE_LARGE(ptr, size);
+ kvfree(ptr);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Thu, 11 Jun 2015 12:02:55 +0000 (14:02 +0200)]
lustre: mdc: Replace uses of OBD_{ALLOC,FREE}_LARGE
Replace uses of OBD_ALLOC_LARGE by libcfs_kvzalloc and OBD_FREE_LARGE by
kvfree.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression ptr,size;
@@
- OBD_ALLOC_LARGE(ptr,size)
+ ptr = libcfs_kvzalloc(size, GFP_NOFS)
@@
expression ptr,size;
@@
- OBD_FREE_LARGE(ptr, size);
+ kvfree(ptr);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Thu, 11 Jun 2015 12:02:54 +0000 (14:02 +0200)]
lustre: lov: Replace uses of OBD_{ALLOC,FREE}_LARGE
Replace uses of OBD_ALLOC_LARGE by libcfs_kvzalloc and OBD_FREE_LARGE by
kvfree.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression ptr,size;
@@
- OBD_ALLOC_LARGE(ptr,size)
+ ptr = libcfs_kvzalloc(size, GFP_NOFS)
@@
expression ptr,size;
@@
- OBD_FREE_LARGE(ptr, size);
+ kvfree(ptr);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Thu, 11 Jun 2015 12:02:53 +0000 (14:02 +0200)]
lustre: lmv: Replace uses of OBD_{ALLOC,FREE}_LARGE
Replace uses of OBD_ALLOC_LARGE by libcfs_kvzalloc and OBD_FREE_LARGE by
kvfree.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression ptr,size;
@@
- OBD_ALLOC_LARGE(ptr,size)
+ ptr = libcfs_kvzalloc(size, GFP_NOFS)
@@
expression ptr,size;
@@
- OBD_FREE_LARGE(ptr, size);
+ kvfree(ptr);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Julia Lawall [Thu, 11 Jun 2015 12:02:52 +0000 (14:02 +0200)]
lustre: llite: Replace uses of OBD_{ALLOC,FREE}_LARGE
Replace uses of OBD_ALLOC_LARGE by libcfs_kvzalloc and OBD_FREE_LARGE by
kvfree.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression ptr,size;
@@
- OBD_ALLOC_LARGE(ptr,size)
+ ptr = libcfs_kvzalloc(size, GFP_NOFS)
@@
expression ptr,size;
@@
- OBD_FREE_LARGE(ptr, size);
+ kvfree(ptr);
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
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
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Oleg Drokin [Thu, 11 Jun 2015 05:37:50 +0000 (01:37 -0400)]
staging/lustre/llite: remove LL_IOC_REMOVE_ENTRY handler
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.
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman [Thu, 11 Jun 2015 03:48:34 +0000 (20:48 -0700)]
Merge tag 'iio-for-v4.2c' of git://git./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.
Andrzej Pietrasiewicz [Mon, 8 Jun 2015 21:16:44 +0000 (23:16 +0200)]
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.
Rebased onto next-
20150605.
Signed-off-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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>
Zoltán Lajos Kis [Wed, 10 Jun 2015 20:00:15 +0000 (22:00 +0200)]
Staging: lustre: fix line over 80 characters in dt_object.c
Fixes a line over 80 characters warining 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>
Fabian Frederick [Wed, 10 Jun 2015 16:32:21 +0000 (18:32 +0200)]
staging: lustre: lnet: o2iblnd: use swap() in kiblnd_dev_failover()
Use kernel.h macro definition.
Thanks to Julia Lawall for Coccinelle scripting support.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>