Replaced error gotos with direct returns in fsl_mc_allocator_probe()
and fsl_mc_allocator_remove(), since the only error handling done
in those functions is to exit.
Signed-off-by: J. German Rivera
---
drivers/staging/fsl-mc/bus/mc-allocator.c | 23 +--
1 file changed, 9 inse
The macros were a left-over from a previous implementation
of the dpmcp APIs and are no longer used.
---
drivers/staging/fsl-mc/bus/dpmcp-cmd.h | 79 --
1 file changed, 79 deletions(-)
diff --git a/drivers/staging/fsl-mc/bus/dpmcp-cmd.h
b/drivers/staging/fsl-mc/bu
Changed these two fields from 32-bit integers to 16-bit integers in
struct fsl_mc_io, as 32 bits is too much for these fields. This
change does not affect other components since fsl_mc_io is an opaque
type.
---
drivers/staging/fsl-mc/include/mc-sys.h | 4 ++--
1 file changed, 2 insertions(+), 2 de
Whitespace cleanup-- add missing spaces in column 1 of copyright
---
drivers/staging/fsl-mc/include/dpcon-cmd.h | 60 +++---
1 file changed, 30 insertions(+), 30 deletions(-)
diff --git a/drivers/staging/fsl-mc/include/dpcon-cmd.h
b/drivers/staging/fsl-mc/include/dpcon-cm
Each fsl_mc_io object is associated with an fsl_mc_device object
of type "dpmcp" representing the MC portal associated with the
fsl_mc_io object. Before, we were representing this association with
an fsl_mc_resource pointer. To enhance code clarity, it is more
straight forward to use an fsl_mc_devi
owner needs to be initialized as THIS_MOUDLE.
---
drivers/staging/fsl-mc/bus/mc-bus.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c
b/drivers/staging/fsl-mc/bus/mc-bus.c
index 4ac3d07..84db55b 100644
--- a/drivers/staging/fsl-mc/bus/mc-bus.c
+++ b/drivers
Check that resource is not NULL before de-referencing it.
---
drivers/staging/fsl-mc/bus/mc-allocator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/fsl-mc/bus/mc-allocator.c
b/drivers/staging/fsl-mc/bus/mc-allocator.c
index a45293b..88d1857 100644
--- a/dri
Hi Aya,
[auto build test WARNING on staging/staging-next -- if it's inappropriate base,
please suggest rules for selecting the more suitable base]
url:
https://github.com/0day-ci/linux/commits/Aya-Mahfouz/staging-lustre-remove-uses-and-definition-of-container_of0/20151014-062751
config: blac
Hi Aya,
[auto build test WARNING on staging/staging-next -- if it's inappropriate base,
please suggest rules for selecting the more suitable base]
url:
https://github.com/0day-ci/linux/commits/Aya-Mahfouz/staging-lustre-remove-uses-and-definition-of-container_of0/20151014-062751
config: arm6
Reformat the multi-line comments in the kernel CodingStyle.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 115 ++---
1 file changed, 57 insertions(+), 58 deletions(-)
diff --git a/drivers/staging
Following is the big cleanup of the comedi cb_pcidas driver.
H Hartley Sweeten (45):
staging: comedi: cb_pcidas: tidy up multi-line comments
staging: comedi: cb_pcidas: remove NUM_CHANNELS_* defines
staging: comedi: cb_pcidas: refactor 'ai_bits' boardinfo
staging: comedi: cb_pcidas: refact
These defines don't add any additional clarity to the driver. Just
remove them.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/staging
The boards supported by this driver either have 16-bit or 12-bit
analog input/output resolution. For aesthetics, replace the 'ai_bits'
member of the boardinfo with a bit-field flag 'is_16bit'. Also,
change the types of the other bit-field flags to unsigned int.
Signed-off-by: H Hartley Sweeten
Cc
Only some of the boards supported by this driver have analog outputs
but they always have 2 channels. Refactor the 'ao_nchan' member of
the boardinfo into a bit-field flag 'has_ao' to save a bit of space.
Also, convert the 'has_ao_fifo' member into a bit-field flag.
Signed-off-by: H Hartley Sweete
All the boards supported by this driver have 16 analog input channels.
Remove this unnecessary information from the boardinfo.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 13 ++---
1 file changed, 2 insertions(
All the boards, except the 'pci-das1001', use the normal analog input
range table 'cb_pcidas_ranges'. Convert the 'ranges' boardinfo into
a bit-field flag 'use_alt_range' to save a bit of space.
For aesthetics, reword the comments in the boardinfo for the bit-field
members so they align.
Signed-o
This member of the private data holds the PCI BAR1 resource starting
address. For aesthetics, rename this member to 'pcibar1'.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 82 +++---
1 file chang
This member of the private data holds the PCI BAR2 resource starting
address. For aesthetics, rename this member to 'pcibar2'.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 20 +++-
1 file changed, 11 ins
This member of the private data holds the PCI BAR4 resource starting
address. For aesthetics, rename this member to 'pcibar4'.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 20
1 file changed, 12 ins
Convert the inline function DAC_DATA_REG() into a simple macro.
Rename the defines for the PCI BAR4 register offsets so they have
namespace associated with the driver and convert the offsets to
hex.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/com
Instead of relying on the IS_UNIPOLAR mask value, use the comedi
helper function to check if the range is unipolar.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(
Rename the defines for the PCI BAR3 register offsets so they have
namespace associated with the driver and convert the offsets to
hex.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 16 +---
1 file changed, 9
For aesthetics, convert the inline functions that return the bits
used to set the DAC range and enable bits to macros.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 26 --
1 file changed, 8 insert
Rename the defines for the PCI BAR2 register offsets so they have
namespace associated with the driver and convert the offsets to
hex.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 18 +-
1 file changed,
Rename this register and its bit defines so they have namespace
associated with the driver. Use the BIT macro to define the bits.
For aesthetics, rename the associated member of the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi
Rename this register and its bit defines so they have namespace
associated with the driver. Use the BIT macro to define the bits.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 56 --
1 file ch
Rename this register and its bit defines so they have namespace
associated with the driver. Use the BIT macro to define the bits.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 56 +++---
1 file ch
Rename this register and its bit defines so they have namespace
associated with the driver. Use the BIT macro to define the bits.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 38 --
1 file ch
Rename this register and its bit defines so they have namespace
associated with the driver. Use the BIT macro to define the bits.
For aesthetics, rename the associated member of the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi
As suggested by checkpatch.pl:
CHECK: Prefer kernel type 'u8' over 'uint8_t'
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/com
For aesthetics, add some whitespace to the subdevice init.
It's not possible to actually read from the trimpot. For convienence
the subdevice readback provided by the core is used to return the
last value written to the subdevice. Remove the SDF_READABLE flag
from the subdev_flags.
Move the comme
Rename this function so it has namespace associated with the driver.
Change the return type to void, it always returns '0' and the return
value is never checked.
For aesthetics, remove the 'static const' local variables. They don't
add any significant value.
Remove the 'bitstream' local variable.
Rename this function so it has namespace associated with the driver.
Change the return type to void, it always returns '0' and the return
value is never checked.
For aesthetics, remove the 'static const' local variables. They don't
add any significant value.
Remove the 'bitstream' local variable.
Rename this function so it has namespace associated with the driver.
For aesthetics, remove the 'static const' local variables. They don't
add any significant value.
Remove the 'bitstream' local variable. Change the type of the 'value'
param to match the callers type and write_calibration_bitstre
Refactor this function to handle the common code used to select the
calibration device (trimpot or caldac) and latch the data after
sending the bitstream.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 90
All the boards supported by this driver have an AD7376 or AD8402
trimpot. Replace the switch () with and if () and remove the
unreachable dev_err() noise.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 10 ++
1 fi
These functions are all just wrappers for cb_pcidas_calib_write().
Remove them and absorb the code into the callers.
Remove the unnecessary masking of the 'chan'. It will always be in
range due to the subdevice initialization.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartm
Only the pci-das1602/16 boards have an AD8402 trimpot. The rest of
the boards supported by this driver have an AD7376 trimpot.
Replace the 'enum trimpot_module' in the boardinfo with a bit-field
flag 'has_ad8402' to save a bit of space.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg K
For aesthetics, add some whitespace to the subdevice init.
It's not possible to actually read from the dac08. For convienence
the subdevice readback provided by the core is used to return the
last value written to the subdevice. Remove the SDF_READABLE flag
from the subdev_flags.
Signed-off-by: H
For aesthetics, add some whitespace to the subdevice init.
It's not possible to actually read from the caldac. For convienence
the subdevice readback provided by the core is used to return the
last value written to the subdevice. Remove the SDF_READABLE flag
from the subdev_flags.
Signed-off-by:
Rename this function so it has namespace associated with the driver.
Also rename the 'value' parameter to avoid having to split the line
to keep it under 80 chars.
Remove the unnecessary masking on the 'value'.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers
For aesthetics, add some whitespace to the initialization of this
subdevice.
Rename the (*insn_read) function so it has namespace associated with
the driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 19 ++--
For aesthetics, rename this member of the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 35 +++---
1 file changed, 17 insertions(+), 18 deletions(-)
diff --git a/drivers/staging/com
The comedi core expects (*insn_read) operations to return insn->n
data values. Refactor this function to work like the core expects.
For aesthetics, nvram_read() and use the comedi_timeout() helper
to handle the busy wait for the eeprom to be "ready".
Signed-off-by: H Hartley Sweeten
Cc: Ian Abb
For aesthetics, rename this member of the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/comedi/drivers/cb_pcidas
For aesthetics, add some whitespace to the subdevice initialization
and rename the (*insn_write) functions to follow the normal form
in comedi drivers.
It's not possible to actually read the analog outpus. For convienence
the subdevice readback provided by the core is used to return the
last value
For aesthetics, add some whitespace to the subdevice initialization
and rename the subdevice functions to follow the normal form in
comedi drivers.
Async command support uses interrupts. For clarity, make sure the
driver has an IRQ before initializing command support.
Signed-off-by: H Hartley Swe
Rename this function so it has namespace associated with the
driver.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/cb_
Clarify the interrupt handler by splitting the analog input handling
into a new function.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 80 ++
1 file changed, 47 insertions(+), 33 deletions(-)
This inline function just returns the bits needd to enable
a calibration source. For aethetics, absorb it into the callers.
Sorten the variable name in the private data used to hold the
current calibration source.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drive
The analog output and analog input interrupts are currently cleared
as they are handled. Refactor the code to gather all the bits needed
to clear the interrupts and do it once at the end of the interrupt
handler.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
driver
The ao (*cancel) function does not need commented.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/comedi/drivers/cb_pcidas.c
b/drivers/staging/comedi/drive
The comedi core expects (*insn_write) functions to write insn->n
data values to the hardware. Fix this function to work like the
core expects.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 11 +++
1 file changed,
The comedi core expects (*insn_write) functions to write insn->n
data values to the hardware. Fix this function to work like the
core expects.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 11 +++
1 file changed,
Change the MODULE_DESCRIPTION to something more useful than the
generic "Comedi low-level driver".
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/cb_pcidas.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/s
On 2015년 10월 13일 23:08, Mike Rapoport wrote:
On Tue, Oct 13, 2015 at 08:02:12PM +0900, Tony Cho wrote:
From: Leo Kim
This patch removes goto ERRORHANDER and the result variable in wilc_mq_send.
Then, the error type is directly returned. If normal operation, freeing memory
is not needed in th
From: Leo Kim
This patch removes goto ERRORHANDER and the result variable in wilc_mq_send.
Then, the error type is directly returned. If normal operation, freeing memory
is not needed in this function.
If an error occurs, returns an error after releasing the spin lock.
Signed-off-by: Leo Kim
Si
It's a minor issue, but the code would be a little clearer if it were made
explicit that the function always succeeds.
julia
On Wed, 14 Oct 2015, kbuild test robot wrote:
> CC: kbuild-...@01.org
> CC: de...@driverdev.osuosl.org
> TO: Oleg Drokin
> CC: "Greg Kroah-Hartman"
>
> tree: https:/
101 - 158 of 158 matches
Mail list logo