Commit Graph

562561 Commits

Author SHA1 Message Date
H Hartley Sweeten bb263fd5d3 staging: comedi: adv_pci_dio: tidy up the comedi comment block
The Description is a bit long winded and the same information is in
the Devices. Shorten the Description and tidy up the Devices.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten d97e1552fd staging: comedi: adv_pci_dio: move pci_dio_override_cardtype()
This function is called as part of the pci_driver (*probe) before
doing the (*auto_attach) of the comedi driver. For aesthetics, move
the function to a more logical place in the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten a54b6e60f3 staging: comedi: adv_pci_dio: move and rename the MAX_*_SUBDEV[SG] defines
For aesthetics, move these defines after the register defines and rename
them to have namespace associated with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten 2b60bbde04 staging: comedi: adv_pci_dio: move and rename enum hw_cards_id
For aesthetics, move this enum after the register defines and rename
it to have namespace associated with the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten bcae0adaf4 staging: comedi: adv_pci_dio: remove boardinfo 'cardtype'
This member of the boardinfo is identical to the offset of the boardinfo
in the boardtypes array. It's also passed as the 'context' to the driver
(*auto_attach).

The 'cardtype' is only needed by the (*auto_attach) to determine which
PCI BAR to use and in pci_dio_reset() to handle the board specific code.

Remove the 'cardtype' member and use the 'context' value instead.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten d0b5860c27 staging: comedi: adv_pci_dio: cleanup PCI-1762 interrupt registers
For aesthetics, use a common define for the interrupt control and status
registers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten 6a1c0149a4 staging: comedi: adv_pci_dio: rename PCI1752_6_CFC define
For aesthetics, rename this define and fix the alignment.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten 008342ebfd staging: comedi: adv_pci_dio: cleanup PCI-175[46] interrupt registers
For aesthetics, replace these defines with a macro.

Refactor the switch in pci_dio_reset() to use common code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten 774a8c57b1 staging: comedi: adv_pci_dio: cleanup PCI-1753 interrupt register defines
For aesthetics, replace these defines with some macros.

Refactor the switch in pci_dio_reset() to not require the fallthrough
comment.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten db2c830d46 staging: comedi: adv_pci_dio: use common defines for PCI-1739/175[01] registers
These boards use the same offsets for the interrupt control registers.
For aesthetics, remove the current defines and use common ones.

Fix the switch() in pci_dio_reset() to use common code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten 86065e4d60 staging: comedi: adv_pci_dio: use common defines for PCI-173[036] registers
These boards use the same offsets for the interrupt control registers.
For aesthetics, remove the current defines and use common ones.

Fix the switch() in pci_dio_reset() to use common code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten ac67a3b9ba staging: comedi: adv_pci_dio: cleanup "disable and clear interrupts" comments
For aesthetics, use a common comment for the switch() that disables and clears
interrupts.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten c94a5991bf staging: comedi: adv_pci_dio: disable channel freeze outside of switch
For aesthetics, move the disable of the channel freeze for the PCI-1752
and PCI-1756 boards out of the switch used to disable and clear interrupts.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten eaf1e647ef staging: comedi: adv_pci_dio: use a default case in pci_dio_reset()
For aesthetics, use a default case in the switch (board->cardtype) used
to reset the various boards.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten 4cabeb10be staging: comedi: adv_pci_dio: remove defines used for the dio (8255) registers
These defines are only used to initialize the diosubd_data 'addr' members
in the boardinfo. For aesthetics, just open-code the values and remove the
defines.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten 7f442292fa staging: comedi: adv_pci_dio: remove defines used for the do registers
These defines are only used to initialize the diosubd_data 'addr' members
in the boardinfo. For aesthetics, just open-code the values and remove the
defines.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten d06ddc1967 staging: comedi: adv_pci_dio: reset digital outputs in subdevice init
Currently the board reset function also resets the digital output channels
to 0. This works but it makes the reset function a bit messy and each
board type has to be handled special.

Move the digital output reset into the subdevice init where it can be
handle based on the subdevice setup.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten 42100e306c staging: comedi: adv_pci_dio: do board reset early in (*auto_attach)
The board reset function disables and clears all interrupts. It also
resets all the digital output channels to 0.

Interrupts are not currently used by this driver. For asthetics, do
the board reset early in the (*auto_attach) to make sure the interrupts
are disabled in case this feature is added.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten 4190c22008 staging: comedi: adv_pci_dio: remove board reset during (*detach)
The board reset function disables and clears all interrupts. It also
resets all the digital output channels to 0.

Interrupts are not used by this driver so the disable/clear during the
(*detach) is not necessary.

Reseting all the digital outputs to 0 might not be desired depending
on what the outputs are connected to.

Remove the board reset and just use comedi_pci_detach() directly for
the driver (*detach).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten e01b70bc13 staging: comedi: adv_pci_dio: remove defines used for the di registers
These defines are only used to initialize the diosubd_data 'addr' members
in the boardinfo. For aesthetics, just open-code the values and remove the
defines.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten d9d238d898 staging: comedi: adv_pci_dio: remove defines used for the 'timer_regbase'
These defines are only used to initialize the 'timer_regbase' boardinfo.
For aesthetics, just open-code the values and remove the defines.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten 2001807e25 staging: comedi: adv_pci_dio: simplify the 'boardid' boardinfo
The "board id" register is always 4-bits (4 di channels) and the register
used to read the bits is always > 0.

Simplify the 'boardid' boardinfo by replacing it with a 'id_reg' member
and open-coding the subdevice n_chan.

For aesthetics, remove all the *_BOARDID defines and just open-code the
register values in the boardinfo.

Add the missing boardinfo for the pci1739 board id register and increase
the nsubdevs to handle it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten 66f516e6a3 staging: comedi: adv_pci_dio: use the diosubd_data 'addr' for di/do s->private
Currently the di/do subdevices store a pointer to the diosubd_data in s->private.
The (*insn_bits) functions then use that to get to the 'addr' needed to access
the registers.

The only member of diosubd_data that is needed by the (*insn_bits) functions is
the 'addr'. For aesthetics, just store the 'addr' in s->private.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten 039c5c1b27 staging: comedi: adv_pci_dio: remove need for diosubd_data 'regs' member
Currently the (*insn_bits) functions used the 'regs' member to determine how
many registers need to be read or written to update the subdevice. We can use
the subdevice 'n_chan' to determine this and make the code a bit clearer.

The (*auto_attach) also uses this member to determine how many 8255 devices
need to be initialized. These subdevices do not use the 'chans' member of
diosubd_data. Move the 'regs' value to the 'chans' to allow removing the
'regs' member completely.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten 3cdddd6338 staging: comedi: adv_pci_dio: refactor 'io_access' boardinfo
The boards supported by this driver either use 8-bit or 16-bit I/O. The
'io_access' member of the boardinfo is used by the (*auto_attach) to
determine which (*insn_bits) function to use.

Simplify the boardinfo a bit by refactoring the 'io_access' member into
a bit-field flag 'is_16bit'. Use the new flag and remove the switch ()
code in the (*auto_attach).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten f5ceac9baa staging: comedi: adv_pci_dio: absorb pci_dio_add_di()
This function initializes a digitial input subdevices. For aesthetics,
absorb it into the (*auto_attach).

Remove the improper initialization of the SDF_LSAMPL subdev_flag and
len_chanlist. These are only used by subdevices that support async
commands.

Also, remove the unnecessary 'specflags' from the diosubd_data. Only
the boardid subdevice uses it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten ac93d19adc staging: comedi: adv_pci_dio: absorb pci_dio_add_do()
This function initializes a digitial output subdevice. For aesthetics,
absorb it into the (*auto_attach).

Remove the improper initialization of the SDF_LSAMPL subdev_flag and
len_chanlist. These are only used by subdevices that support async
commands.

Also remove the unnecessary initilaization of the subdevice 'state'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten a1132fc1bb staging: comedi: adv_pci_dio: use a const pointer to the diosubd_data
For aesthetics, use a const pointer to access the diosubd_data in the
boardinfo when doing the (*auto_attach)..

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten afe5c118bd staging: comedi: adv_pci_dio: post increment 'subdev' in (*auto_attach)
For aesthetics, post-increment the 'subdev' index when used to get a
comedi_subdevice pointer instead of incrementing it after the subdevice
is initialized.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten c1e07ea22a staging: comedi: adv_pci_dio: remove 'main_pci_region' boardinfo
All the boards use PCI BAR2 for the dev->iobase except for the pci1736
which uses PCI BAR0. Just use the board->cardtype to determine which
PCI BAR to use.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten 744099055f staging: comedi: adv_pci_dio: tidy up comedi driver block comment
Reformat the bolck comment in the kernel CodingStyle.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
H Hartley Sweeten e29641c21e staging: comedi: adv_pci_dio: remove unnecessary function separation comments
These are not necessary and just add cruft. Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:57:40 -08:00
Ranjith Thangavel cff93d73f7 comedi: ni_6527: Fix coding style - use BIT macro
BIT macro is used for defining BIT location instead of
shifting operator - coding style issue

Signed-off-by: Ranjith Thangavel <ranjithece24@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:56:01 -08:00
Andrzej Pietrasiewicz c9e5ec256c staging: comedi: ni_mio_common: add "no_channel" versions of some functions
ni_release_ai_mite_channel(), ni_release_ao_mite_channel(),
ni_release_gpct_mite_channel() and ni_release_cdo_mite_channel()
call functions which interpret -1 as a special value meaning "no channel".
This patch adds explicit "no_channel" versions instead.

On the other hand, after "no_channel" versions are used,
ni_set_ai_dma_channel(), ni_set_ao_dma_channel(),
ni_set_gpct_dma_channel(), ni_set_cdo_dma_channel() are called with actual
"channel" parameter being always unsigned, so their signatures are changed
accordingly.

A side benefit of the changes is suppressesing 4 sparse warnings:
"warning: shift too big (4294967295) for type int".

Signed-off-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:56:01 -08:00
Daniel H. Hemmingsen af904c4942 Staging: comedi: Fixed multiple commenting and spacing codig style issues.
Fixed multiple comment blocks that didn't comply with the
kernels coding style, and fixed a few spacing issues as well.

Signed-off-by: Daniel H. Hemmingsen <dhh.kernel@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:55:57 -08:00
Ranjith Thangavel 1a549cb61a comedi: cb_pcidda: Fix coding style - use BIT macro
BIT macro is used for defining BIT location instead of
shifting operator - coding style issue

Signed-off-by: Ranjith Thangavel <ranjithece24@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:55:57 -08:00
Ranjith Thangavel ecbbf6d330 comedi: ni_65xx: Fix coding style - use BIT macro
BIT macro is used for defining BIT location instead of
shifting operator - coding style issue

Signed-off-by: Ranjith Thangavel <ranjithece24@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:55:57 -08:00
Ranjith Thangavel 5e1a02bd93 comedi: comedi_parport: Fix coding style - use BIT macro
BIT macro is used for defining BIT location instead of
shifting operator - coding style issue

Signed-off-by: Ranjith Thangavel <ranjithece24@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:55:57 -08:00
Geliang Tang 04226e4059 staging: comedi: use kmalloc_array instead of kmalloc
Use kmalloc_array instead of kmalloc to allocate memory for an array.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:55:57 -08:00
Jitendra Kumar Khasdev 6e411751f0 staging: dgnc: dgnc_cls.c: Replaced udelay by usleep_range
This patch is to file dgnc_cls.c that fixes up udelay function by
usleep_range.
It is safe to use according to the following documentation
Documentation/timers/timers-howto.txt. So that is why I have given
an appropriate time range.

Signed-off-by: Jitendra Kumar Khasdev <jkhasdev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:52:34 -08:00
Nizam Haider f7f2b10a82 Staging: dgnc: dgnc_tty: Typo error dgnc_wmove comment
Fix Typo errror in the comment section of dgnc_wmove

Signed-off-by: Nizam Haider <nijamh@cdac.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:50:59 -08:00
Nizam Haider 013514946c Staging: dgnc: dgnc_neo.c Braces {} should be used on all arms of this statement
Fix Checlpatch warning
HECK: braces {} should be used on all arms of this statement

Signed-off-by: Nizam Haider <nijamh@cdac.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:50:59 -08:00
Bogicevic Sasa 5bff5d9f2b driver:staging:dgnc Fix spaces preferred around that ...
This fixes all "spaces preferred around that ..." messages from
checkpatch.pl

Signed-off-by: Bogicevic Sasa <brutallesale@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:50:56 -08:00
Markus Elfring c71d264543 staging: lustre: Fix a jump label position in osc_get_info()
The script "checkpatch.pl" pointed out that labels should not be indented.
Thus delete a horizontal tab before the jump label "out"
in the function "osc_get_info".

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:49:06 -08:00
Markus Elfring 24a386334f staging: lustre: Delete an unnecessary variable initialisation in mgc_process_recover_log()
The variable "mne_swab" will eventually be set to an appropriate value
from a call of the ptlrpc_rep_need_swab() function.
Thus let us omit the explicit initialisation at the beginning.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:49:06 -08:00
Markus Elfring 3af7370ca1 staging: lustre: Delete unnecessary goto statements in six functions
Six goto statements referred to a source code position
directly behind them.
Thus omit such unnecessary jumps.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:49:06 -08:00
Shraddha Barke fb7a02014b Staging: lustre: obdclass: Declare lu_site_hash_ops as static
lu_site_hash_ops is used only in this particular file. Thus declare
it as static.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:47:30 -08:00
Shraddha Barke 61db1bc497 Staging: lustre: osc: Declare osc_attr_set as static
osc_attr_set is used only in this particular file. Thus declare it
as static.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:47:30 -08:00
Shraddha Barke 6ef3f3c736 Staging: lustre: osc: Declare as static
Declare osc_extent_find and osc_unreserve_grant as static since they
are used only in this particular file.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:47:30 -08:00
Shraddha Barke 62dc2f66a9 Staging: lustre: libcfs: Remove unused libcfs_debug_set_level
Function libcfs_debug_set_level is defined but not used. Thus
remove it.

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-12-21 15:47:30 -08:00