- 08 Sep, 2014 5 commits
-
-
John L. Hammond authored
Remove the unused OBD device methods mdc_pin() and mdc_unpin(). Signed-off-by:
John L. Hammond <john.hammond@intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John L. Hammond authored
Move the structures defined in lustre/include/obd_ost.h to the one file that uses them (lustre/osc/osc_request.c). Remove the unused function osc_update_enqueue(). Remove the then empty header lustre/include/obd_ost.h. Signed-off-by:
John L. Hammond <john.hammond@intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John L. Hammond authored
In osc_request.c there is no reason to handle any llog contexts since they are never setup. Remove the functions unused function osc_llog_init() and the obsolete function osc_llog_finish(). Remove the llog cleanup code in osc_disconnect() and osc_precleanup(). Signed-off-by:
John L. Hammond <john.hammond@intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John L. Hammond authored
Remove the unused OBD device methods: osc_brw() osc_cancel() osc_cancel_unused() osc_change_cbdata() osc_enqueue() osc_punch() osc_sync() and their supporting functions. Signed-off-by:
John L. Hammond <john.hammond@intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
John L. Hammond authored
Remove the unused OBD device methods: lov_brw() lov_cancel() lov_cancel_unused() lov_change_cbdata() lov_enqueue() lov_extent_calc() lov_getattr() lov_merge_lvb() lov_punch() lov_setattr() lov_sync() and their supporting functions. In lov_iocontrol() remove the unused cases LL_IOC_LOV_SETSTRIPE and LL_IOC_LOV_SETEA and their supporting functions. Signed-off-by:
John L. Hammond <john.hammond@intel.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 07 Sep, 2014 17 commits
-
-
Loïc Pellegrino authored
Align the prototype of lprocfs_wr_uint() in the declaration with the one used in the definition. The prototype is: int lprocfs_wr_uint(struct file *file, const char __user *buffer, unsigned long count, void *data) In obdclass/lprocfs_status.c But in lustre/include/lprocfs_status.h, the __user annotation is missing for the attribute buffer. The correct prototype is the first one (the definition) since: - This function is eventually called by the write() function pointer of an instance of struct file_operations - In this function, buffer is a parameter of copy_from_user() - Before the commit 73bb1da6, the declaration and the definition had the same prototype, but only the .c has been updated. Correcting this will remove a sparse error and add sparse warnings. This is a task of the Eudyptula challenge. Signed-off-by:
Loïc Pellegrino <oort10@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
LABBE Corentin authored
Fix the warning reported by sparse on drivers/staging/lustre/lnet/lnet/router_proc.c warning: incorrect type in argument 4 (different address spaces) The correction is to annotate all user buffer variable by __user Signed-off-by:
LABBE Corentin <clabbe.montjoie@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicolas Thery authored
This patch fixes the following sparse warnings: drivers/staging/rtl8188eu/hal/phy.c:46:5: warning: symbol 'phy_query_bb_reg' was not declared. Should it be static? drivers/staging/rtl8188eu/hal/phy.c:56:6: warning: symbol 'phy_set_bb_reg' was not declared. Should it be static? drivers/staging/rtl8188eu/hal/phy.c:129:5: warning: symbol 'phy_query_rf_reg' was not declared. Should it be static? drivers/staging/rtl8188eu/hal/phy.c:140:6: warning: symbol 'phy_set_rf_reg' was not declared. Should it be static? drivers/staging/rtl8188eu/hal/phy.c:228:6: warning: symbol 'phy_set_tx_power_level' was not declared. Should it be static? drivers/staging/rtl8188eu/hal/phy.c:324:6: warning: symbol 'phy_set_bw_mode' was not declared. Should it be static? drivers/staging/rtl8188eu/hal/phy.c:360:6: warning: symbol 'phy_sw_chnl' was not declared. Should it be static? Signed-off-by:
Nicolas Thery <nthery@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andreas Schlick authored
Signed-off-by:
Andreas Schlick <ninox@posteo.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Loic Pefferkorn authored
Coding style: avoid multiple assignments Signed-off-by:
Loic Pefferkorn <loic@loicp.eu> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Loic Pefferkorn authored
Coding style: document mutex usage Signed-off-by:
Loic Pefferkorn <loic@loicp.eu> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Loic Pefferkorn authored
Coding style: fix alignment to match open parenthesis Signed-off-by:
Loic Pefferkorn <loic@loicp.eu> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Loic Pefferkorn authored
Coding style: document spinlock usage Signed-off-by:
Loic Pefferkorn <loic@loicp.eu> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Loic Pefferkorn authored
Coding style: remove useless space after a cast Signed-off-by:
Loic Pefferkorn <loic@loicp.eu> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Loic Pefferkorn authored
Coding style: suppress consecutive blank lines Signed-off-by:
Loic Pefferkorn <loic@loicp.eu> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michał Bartoszkiewicz authored
This fixes "void function return statements are not generally useful" warnings from checkpatch.pl. Signed-off-by:
Michał Bartoszkiewicz <mbartoszkiewicz@gmail.com> Reviewed-by:
Insop Song <insop.song@gainspeed.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Thomas Gummerer authored
Signed-off-by:
Thomas Gummerer <t.gummerer@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Filipe Gonçalves authored
Signed-off-by:
Filipe Gonçalves <filipe@codinghighway.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Piotr Witoslawski authored
Break lines exceeding 80 characters Signed-off-by:
Piotr Witoslawski <pwitos@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Juston Li authored
lmv_internal.h:96: ERROR: space prohibited after that open parenthesis '(' lmv_internal.h:96: ERROR: space required before the open parenthesis '(' lmv_internal.h:147: WARNING: space prohibited between function name and open parenthesis '(' Signed-off-by:
Juston Li <juston.h.li@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Chaitra Ramaiah authored
Signed-off-by:
Chaitra Ramaiah <linux.delve@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Luca Ceresoli authored
Signed-off-by:
Luca Ceresoli <luca@lucaceresoli.net> Cc: Greg Kroah-Hartman <gregkh@linux.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 02 Sep, 2014 18 commits
-
-
Grzegorz Swirski authored
Signed-off-by:
Grzegorz Swirski <grzegorz@swirski.name> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ian Abbott authored
`struct pci230_private` has two members to manage the enabled interrupt sources. `int_en` is the interrupt sources we want to be enabled and `ier` is a shadow of the write-only interrupt enable register. They have the same value most of the time. They differ in the interrupt handler (`pci230_interrupt()`) itself when it temporarily clears bits in the interrupt enable register and the `ier` member in order to unlatch them in hardware, but leaves the `int_en` member alone. They also differ in `pci230_ai_stop()` and `pci230_ao_stop()` which clear bits in the `int_en` member and wait for the interrupt handler to finish before copying the value to the `ier` member and the interrupt enable register. Simplify the handling a bit, by making the `ier` member take on the role of the `int_en` member, and allowing the value to differ from the interrupt enable register while the interrupt handler is running. 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 authored
Change the return type of `pci230_handle_ao_fifo()` from `int` to `bool`. A return value of `true` indicates the AO command is still running. 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 authored
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 authored
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 authored
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 authored
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 authored
Some counter channels may be required for AI commands and AO commands. Depending on how the commands are set up, it may not be possible to run both at the same time, so we keep some state and code to find out if the required resources are busy or not. The existing code is a bit unwieldy - the code for claiming resources involves two `for` loops for example. Rewrite it to make it simpler. The new code just has a bit-mask value for each shared resource (counter channels), and an array indexed by resource "owners" (AI and AO commands), so the code for claiming resources now just has a single loop that checks that none of the other owners have claimed the wanted resources. Rename the functions involved, because the old names involving 'put' and 'get' suggested some sort of usage counting. 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 authored
The `state` member of `struct pci230_private` is used with the atomic bit-op functions and has a couple of bits defined, `AI_CMD_STARTED` and `AO_CMD_STARTED`. Spin-locks are used to protect the clearing of these bits and other stuff. No special protection is used for setting these bits. Replace the `state` member with a couple of new, single-bit bitfield members, `ai_cmd_started` and `ao_cmd_started` to save some space. 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 authored
Change the `intr_running` member of `struct pci230_private` into a single-bit bitfield of type `bool` to save a bit of space. 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 authored
Use the inline `comedi_range_is_bipolar()` function from "comedidev.h" to decide whether a range is bipolar or unipolar instead of using the local static arrays `pci230_ai_bipolar[]` and `pci230_ao_bipolar[]` which can then be removed. Change the types of the `ai_bipolar` and `ao_bipolar` members of `struct pci230_private` to `bool` to match the return value of `comedi_range_is_bipolar()` and change them into single-bit bitfields to save a bit of space. Also change the type and name of some local variables in `pci230_ai_check_chanlist()` that hold the result of `comedi_range_is_bipolar()`. 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 authored
Most functions in "amplc_pci230" are named with the prefix `pci230_`, apart from one or two that have the prefix `amplc_pci230_` and a few odd-balls with no particular prefix. Rename the ones without a 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 authored
Rename the AI subdevice "insn_read" handler function `pci230_ai_rinsn()` to `pci230_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 authored
Some functions in "amplc_pci230.c" are declared `inline`. Remove the `inline` specifiers and let the compiler do what it wants with 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 authored
`pci230_ai_read()` reads a sample from the ADC data register and converts it to a comedi sample value. The AI sample may have 12 or 16 bits of resolution, depending on the board type, but 12-bit sample values are in bits 15 to 4 of the register. The hardware value is signed, 2's complement if set to a bipolar mode, or unsigned, straight binary if set to a unipolar mode. To convert to a Comedi sample value it may need shifting right by 4 bits, and the top bit of the sample value may need to be toggled. Simplify the existing code by doing the 2's complement to straight binary conversion before the shift. That way, it is always bit 15 that is inverted regardless of the resolution. 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 authored
`pci230_ao_mangle_datum()` converts comedi sample values for the AO subdevice to hardware register values. The comedi sample value will be an unsigned value in the range 0 to 4095 (assuming 12-bit resolution). The hardware wants the value shifted so the m.s. bit of the sample in in bit 15. If set to a bipolar range, it also expects a 2's complement value, so the top bit of the sample value needs to be inverted in that case. Simplify the existing code by doing the 2's complement conversion after the shift. That way, it is always bit 15 that is inverted regardless of the resolution. 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 authored
The `ai_bits`, `ao_bits`, and `min_hwver` members of `struct pci230_board` are only set to small, non-negative values, so make them `unsigned char`. The `have_dio` member is used as a boolean so change it to a bitfield of type `bool`. 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 authored
The PCI230(+) has an AO subdevice with 2 channels, but the PCI260(+) has none. The `ao_chans` member of `struct pci230_board` indicates whether the board has an AO subdevice and the number of AO channels. The `ao_bits` member indicates the AO sample width in bits and will only be non-zero for boards with an AO subdevice. Use `ao_bits` to indicate whether the board has an AO subdevice. If it has, assume the the number of AO channels is 2. Then the `ao_chans` member becomes redundant and can be removed. 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>
-