On Fri, Sep 07, 2012 at 08:55:27AM -0700, Stephen Hemminger wrote:
> Any pure function table should be made const to avoid bugs
> and smashing attacks. Also remove unnecessary
> duplicate definition.
>
> Compile tested only.
>
> Signed-off-by: Stephen Hemminger
This doesn't apply to the staging
A lot of the messages produced by this driver are just noise and
need to be removed. For now just convert them all to dev_printk's.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 253 +---
1 file
Move the remaining defines in this header to the c file. Nothing
in the header is needed by any other file.
While moving the defines, reorder them so that the bit defines
are associated with the register they go with. Also, convert the
bit defines to bit shifts to make them a bit clearer.
Signed-
Move the struct me4000_info definition from the header to the c
file. This struct is not used by any other file.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 7 +++
drivers/staging/comedi/drivers/me4000.h | 11 ---
Since this driver is using the 8253.h helpers, these defines are
no longer needed.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.h | 24
1 file changed, 24 deletions(-)
diff --git a/drivers/staging/com
Absorb the cnt_reset and cnt_config helper functions. They are
now both just single line routines.
Remove the printk noise about "Invalid instruction length".
Fix the return value, the value should be the number of data values
used to perform the instruction. The GPCT_RESET instruction only
has o
The counter subdevice of this board is a standard 8254 compatible
counter/timer. Instead of open-coding the 8254 timer io, use the
helper functions provided by 8253.h.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 130 ++---
Rename reset_board() to me4000_reset() so it has namespace associated
with this driver. Change it's return type to void, it always succeeds.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 10 +++---
1 file changed, 3 ins
Only set the dev->irq when the request_irq is successful.
Use the dev->board_name for the name passed to request_irq.
Change the printk messages into dev_warn().
Make sure free_irq is called in the detach.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/stagi
Combine the sanity checks for valid io addresses into one if().
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/staging/comedi/drivers/me4000.c
The program_regbase variable in the private data is only used
when the board is first attached. This variable holds the pci
base address used to read/write the xilinx part to upload the
firmware.
Use a local variable in the xilinx_download() function to hold
this address and remove program_regbase
Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbot
Move the non pci probe related code out of the me4000_probe function
and back into the me4000_attach function in preparation of converting
this driver to the 'attach_pci' callback.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.
Use the hw_dev pointer in the comedi_device struct to hold the
pci_dev instead of carrying it in the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 13 ++---
drivers/staging/comedi/drivers/me4000.h | 2
Move some of the functions to avoid the need for the forward
declarations.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 252 +++-
1 file changed, 121 insertions(+), 131 deletions(-)
diff --git
Use range_bipolar10, which is exported by the comedi core, instead
of creating a local symbol for an identical range.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
This macro relies on a local variable having a specific name.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 20
drivers/staging/comedi/drivers/me4000.h | 2 --
2 files changed, 16 insertions(+), 6 dele
The init_board_info() function only gets the irq number from the
pci_dev. Just move the code into the function that calls it.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 18 +-
1 file changed, 1 insertion(
Use the irq variable provided in the comedi_device to save the
irq number and remove it from the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 8
drivers/staging/comedi/drivers/me4000.h | 2 --
2 file
The ao context is a struct containing all the register addresses
used with the ao subdevice. These can easily be calculated when
needed. Remove the me4000_ao_context struct, its initialization
function, and it's variable in the private data.
The last value written to the ao channels still needs to
These values are never used. Just remove them.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 6 --
drivers/staging/comedi/drivers/me4000.h | 3 ---
2 files changed, 9 deletions(-)
diff --git a/drivers/staging/comedi/dr
This value is read from the pci config space but it is never used.
Just remove it.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 7 ---
drivers/staging/comedi/drivers/me4000.h | 1 -
2 files changed, 8 deletions(-)
dif
This value is read from the pci config space but it is never used.
Just remove it.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 5 -
drivers/staging/comedi/drivers/me4000.h | 1 -
2 files changed, 6 deletions(-)
diff
The ai context is a struct containing all the register addresses
used with the ai subdevice. These can easily be calculated when
needed. Remove the me4000_ai_context struct, its intialization
function, and it's variable in the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Gre
The dio context is a struct containing all the register addresses
used with the dio subdevice. These can easily be calculated when
needed. Remove the me4000_dio_context struct, its intialization
function, and it's variable in the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc:
Use the iobase variable provided in the comedi_device for the
main base address used in the driver. Remove the me4000_regbase
variable from the private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 122 +++
The me4000_probe() function has a bunch of error messages that
are displayed when various parts of the probe fail. These are
just added noise. Remove them.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 62 --
The get_registers() function reads the pci base addresses used
in the driver. It's simple enough, just move the code into the
function that calls it.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 46
Remove the error messages about the pci base address not being
available. They are just noise.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 32
1 file changed, 4 insertions(+), 28 deletions
There is no need to get the resource size for each pci bar. Nothing
in the driver uses it.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 4
drivers/staging/comedi/drivers/me4000.h | 5 -
2 files changed, 9 deletion
The me4000_cnt_contect simply holds the unsigned long i/o addresses
used to read/write the counter registers. Thes can be calculated
as needed. Remove the struct and the associated field in the
private data.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/sta
Move the pci vendor/device ids from the header to the c file and
actually use them.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 70 -
drivers/staging/comedi/drivers/me4000.h | 23 --
Move the struct me4000_board definition from the header to the c file.
It's not used by any other source.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 13 +
drivers/staging/comedi/drivers/me4000.h | 17
This macro relies on a local variable having a specific name.
Remove it and use the comedi_board() helper to get the pointer.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 14 --
drivers/staging/comedi/drivers/m
The me4000_ao_info in the boardinfo struct is used to indicate
the number of analog output channels and a couple other details
about them. Remove the extra struct and absorb the data into the
boardinfo struct.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/s
The me4000_dio_info in the boardinfo struct is used to indicate
the number of 8 bit dio ports the the board has. Add a 'dio_nchan'
field to struct me4000_board and remove the struct me4000_dio_info.
The 'dio_nchan' value can then be used directly in the attach of
the board when setting the subdevic
The me4000_aio_info in the boardinfo struct is used to indicate
the number of analog input channels and a couple other details
about them. Remove the extra struct and absorb the data into the
boardinfo struct.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/s
The me4000_cnt_info in the boardinfo struct is used to indicate
that the board has an 8254 counter. Add a 'has_counter' field
to struct me4000_board and remove the struct me4000_cnt_info.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/
Remove all the boardinfo data that is set to '0'.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 40 -
1 file changed, 40 deletions(-)
diff --git a/drivers/staging/comedi/drivers/me4000.c
b/
Convert the boardinfo initialization to C99 format to make it
less error prone and easier to maintain.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 264 ++--
1 file changed, 248 insertions(+), 1
Remove the terminating entry in the boardinfo so that ARRAY_SIZE
works correctly. Then remove ME4000_BOARD_VERSIONS and just use
ARRAY_SIZE in the probe.
Signed-off-by: H Hartley Sweeten
Cc: Ian Abbott
Cc: Greg Kroah-Hartman
---
drivers/staging/comedi/drivers/me4000.c | 6 +-
1 file change
* Simplify the boardinfo and private data.
* Convert the driver to use attach_pci
* Use the 8253 helpers for the counter
* Remove the me4000.h header
* Convert all printk's to dev_printk's
H Hartley Sweeten (40):
staging: comedi: me4000: remove ME4000_BOARD_VERSIONS
staging: comedi: me4000: co
Staging: silicom: C99 cleanup of libbp_sd.h
Signed-off-by: Daniel Cotey
---
drivers/staging/silicom/libbp_sd.h | 54 +++---
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/drivers/staging/silicom/libbp_sd.h
b/drivers/staging/silicom/libbp_sd.h
ind
Staging: silicom: C99 cleanup of bypass.h
Signed-off-by: Daniel Cotey
---
drivers/staging/silicom/bypass.h | 58
1 file changed, 29 insertions(+), 29 deletions(-)
diff --git a/drivers/staging/silicom/bypass.h b/drivers/staging/silicom/bypass.h
index a1ac
Staging: silicom: C99 cleanup of bp_ioctl.h
Signed-off-by: Daniel Cotey
---
drivers/staging/silicom/bp_ioctl.h | 64 +++---
1 file changed, 32 insertions(+), 32 deletions(-)
diff --git a/drivers/staging/silicom/bp_ioctl.h
b/drivers/staging/silicom/bp_ioctl.h
ind
On 09/06/2012 03:37 PM, Dan Magenheimer wrote:
> In response to this RFC for zcache promotion, I've been asked to summarize
> the concerns and objections which led me to NACK the previous zcache
> promotion request. While I see great potential in zcache, I think some
> significant design challenge
On Fri, 2012-09-07 at 12:20 -0400, Alan Stern wrote:
> On Fri, 7 Sep 2012, Shuah Khan wrote:
>
> > I analyzed all calls to dma_map_single() and dma_map_page() in the
> > kernel, to see if callers check for mapping errors, before using the
> > returned address.
> >
> > The goal of this analysis is
On Fri, 7 Sep 2012, Shuah Khan wrote:
> I analyzed all calls to dma_map_single() and dma_map_page() in the
> kernel, to see if callers check for mapping errors, before using the
> returned address.
>
> The goal of this analysis is to find drivers that currently do not
> check dma mapping errors,
Any pure function table should be made const to avoid bugs
and smashing attacks. Also remove unnecessary
duplicate definition.
Compile tested only.
Signed-off-by: Stephen Hemminger
---
drivers/staging/ipack/bridges/tpci200.c |6 ++
drivers/staging/ipack/devices/ipoctal.c |2 +-
dr
I analyzed all calls to dma_map_single() and dma_map_page() in the
kernel, to see if callers check for mapping errors, before using the
returned address.
The goal of this analysis is to find drivers that currently do not
check dma mapping errors, and fix them.
I documented the results of this an
PCI probe routines have to be named _probe to avoid section mismatch warning.
Found when doing 'make allmodconfig'
Signed-off-by: Stephen Hemminger
--- a/drivers/staging/ipack/bridges/tpci200.c 2012-09-07 08:43:36.505462238
-0700
+++ b/drivers/staging/ipack/bridges/tpci200.c 2012-09-07 08:
> significant design challenges exist, many of which are already resolved in
> the new codebase ("zcache2"). These design issues include:
.. snip..
> Before other key mm maintainers read and comment on zcache, I think
> it would be most wise to move to a codebase which resolves the known design
>
The British Cocacola Company
Promo Award Office
22 Garden Close, Stamford Lincs PE9 2YP,
London, UNITED KINGDOM.
Dear: e-Mail Winner,
Your Email has Won £750,000.00 GREAT BRITISH POUNDS, One(1) HP Laptop and
Two(2) Black Berry Phones in the Active E-mail User of the Internet/Web raffle
draw hel
PLEASE DONOT SEND ANYMORE EMAILS!
> Samuel Iglesias Gonsálvez wrote:
>
> On Fri, 2012-09-07 at 10:29 +0200, Jens Taprogge wrote:
> > ~0 can not be casted to u8. Instead of using the IPACK_ANY_ID for the
> format
> > field we introduce a new IPACK_ANY_FORMAT specifically for that field
On Fri, 2012-09-07 at 10:29 +0200, Jens Taprogge wrote:
> ~0 can not be casted to u8. Instead of using the IPACK_ANY_ID for the format
> field we introduce a new IPACK_ANY_FORMAT specifically for that field and
> defined as 0xff.
>
> Reported-by: Dan Carpenter
> Signed-off-by: Jens Taprogge
> -
On Fri, Sep 07, 2012 at 10:27:42AM +0200, Jens Taprogge wrote:
> What are the build options to see these warnings?
>
It was a Smatch warning, not a GCC warning. http://smatch.sf.net.
regards,
dan carpenter
___
devel mailing list
devel@linuxdriverproj
On Thu, Sep 06, 2012 at 03:09:06PM -0700, Greg KH wrote:
> On Thu, Sep 06, 2012 at 06:53:14PM +0200, Samuel Iglesias Gonsálvez wrote:
> > On 09/06/2012 06:17 PM, Jens Taprogge wrote:
> > > ~0 is not casted to u8. Instead of using the IPACK_ANY_ID for the
> > > format field we introduce a new IPAC
--
ATENÇÃO;
Sua caixa de correio excedeu o limite de armazenamento, que é de 5 GB como
definido pelo administrador, que está atualmente em execução no 10.9GB, você
pode não ser capaz de enviar ou receber novas mensagens até que você re-validar
a sua caixa de correio. Para revalidar sua caixa
ATENÇÃO;
Sua caixa de correio excedeu o limite de armazenamento, que é de 5 GB como
definido pelo administrador, que está atualmente em execução no 10.9GB, você
pode não ser capaz de enviar ou receber novas mensagens até que você re-validar
a sua caixa de correio. Para revalidar sua caixa de
devannagoad
制造业中高层经理全面管理技能实战训练
2012年9月15--16日 深 圳
2012年9月22--23日 上 海
2012年10月27--28日 北 京
【学-员-对-象】制造型企业总经理、副总、厂长、各部门经理、主
60 matches
Mail list logo