* [PATCH] comedi: gsc_hpdi: Fix coding style - use kernel type definitions for variables
@ 2015-11-14 17:21 Ranjith Thangavel
2015-11-18 15:53 ` Ian Abbott
0 siblings, 1 reply; 2+ messages in thread
From: Ranjith Thangavel @ 2015-11-14 17:21 UTC (permalink / raw)
To: gregkh; +Cc: abbotti, hsweeten, hgujulan, devel, linux-kernel, ranjithece24
kernel type definitions are preferred for variables over
standard type definitions
Signed-off-by: Ranjith Thangavel <ranjithece24@gmail.com>
---
drivers/staging/comedi/drivers/gsc_hpdi.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/comedi/drivers/gsc_hpdi.c b/drivers/staging/comedi/drivers/gsc_hpdi.c
index e929618..cc67a07 100644
--- a/drivers/staging/comedi/drivers/gsc_hpdi.c
+++ b/drivers/staging/comedi/drivers/gsc_hpdi.c
@@ -125,7 +125,7 @@
struct hpdi_private {
void __iomem *plx9080_mmio;
- uint32_t *dio_buffer[NUM_DMA_BUFFERS]; /* dma buffers */
+ u32 *dio_buffer[NUM_DMA_BUFFERS]; /* dma buffers */
/* physical addresses of dma buffers */
dma_addr_t dio_buffer_phys_addr[NUM_DMA_BUFFERS];
/*
@@ -137,7 +137,7 @@ struct hpdi_private {
dma_addr_t dma_desc_phys_addr;
unsigned int num_dma_descriptors;
/* pointer to start of buffers indexed by descriptor */
- uint32_t *desc_dio_buffer[NUM_DMA_DESCRIPTORS];
+ u32 *desc_dio_buffer[NUM_DMA_DESCRIPTORS];
/* index of the dma descriptor that is currently being used */
unsigned int dma_desc_index;
unsigned int tx_fifo_size;
@@ -192,10 +192,10 @@ static irqreturn_t gsc_hpdi_interrupt(int irq, void *d)
struct hpdi_private *devpriv = dev->private;
struct comedi_subdevice *s = dev->read_subdev;
struct comedi_async *async = s->async;
- uint32_t hpdi_intr_status, hpdi_board_status;
- uint32_t plx_status;
- uint32_t plx_bits;
- uint8_t dma0_status, dma1_status;
+ u32 hpdi_intr_status, hpdi_board_status;
+ u32 plx_status;
+ u32 plx_bits;
+ u8 dma0_status, dma1_status;
unsigned long flags;
if (!dev->attached)
@@ -290,7 +290,7 @@ static int gsc_hpdi_cmd(struct comedi_device *dev,
struct comedi_async *async = s->async;
struct comedi_cmd *cmd = &async->cmd;
unsigned long flags;
- uint32_t bits;
+ u32 bits;
if (s->io_bits)
return -EINVAL;
@@ -424,7 +424,7 @@ static int gsc_hpdi_setup_dma_descriptors(struct comedi_device *dev,
{
struct hpdi_private *devpriv = dev->private;
dma_addr_t phys_addr = devpriv->dma_desc_phys_addr;
- uint32_t next_bits = PLX_DESC_IN_PCI_BIT | PLX_INTR_TERM_COUNT |
+ u32 next_bits = PLX_DESC_IN_PCI_BIT | PLX_INTR_TERM_COUNT |
PLX_XFER_LOCAL_TO_PCI;
unsigned int offset = 0;
unsigned int idx = 0;
@@ -516,7 +516,7 @@ static void gsc_hpdi_free_dma(struct comedi_device *dev)
static int gsc_hpdi_init(struct comedi_device *dev)
{
struct hpdi_private *devpriv = dev->private;
- uint32_t plx_intcsr_bits;
+ u32 plx_intcsr_bits;
/* wait 10usec after reset before accessing fifos */
writel(BOARD_RESET_BIT, dev->mmio + BOARD_CONTROL_REG);
@@ -546,7 +546,7 @@ static int gsc_hpdi_init(struct comedi_device *dev)
static void gsc_hpdi_init_plx9080(struct comedi_device *dev)
{
struct hpdi_private *devpriv = dev->private;
- uint32_t bits;
+ u32 bits;
void __iomem *plx_iobase = devpriv->plx9080_mmio;
#ifdef __BIG_ENDIAN
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] comedi: gsc_hpdi: Fix coding style - use kernel type definitions for variables
2015-11-14 17:21 [PATCH] comedi: gsc_hpdi: Fix coding style - use kernel type definitions for variables Ranjith Thangavel
@ 2015-11-18 15:53 ` Ian Abbott
0 siblings, 0 replies; 2+ messages in thread
From: Ian Abbott @ 2015-11-18 15:53 UTC (permalink / raw)
To: Ranjith Thangavel, gregkh; +Cc: hsweeten, hgujulan, devel, linux-kernel
On 14/11/15 17:21, Ranjith Thangavel wrote:
> kernel type definitions are preferred for variables over
> standard type definitions
>
> Signed-off-by: Ranjith Thangavel <ranjithece24@gmail.com>
> ---
> drivers/staging/comedi/drivers/gsc_hpdi.c | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/gsc_hpdi.c b/drivers/staging/comedi/drivers/gsc_hpdi.c
> index e929618..cc67a07 100644
> --- a/drivers/staging/comedi/drivers/gsc_hpdi.c
> +++ b/drivers/staging/comedi/drivers/gsc_hpdi.c
> @@ -125,7 +125,7 @@
>
> struct hpdi_private {
> void __iomem *plx9080_mmio;
> - uint32_t *dio_buffer[NUM_DMA_BUFFERS]; /* dma buffers */
> + u32 *dio_buffer[NUM_DMA_BUFFERS]; /* dma buffers */
> /* physical addresses of dma buffers */
> dma_addr_t dio_buffer_phys_addr[NUM_DMA_BUFFERS];
> /*
> @@ -137,7 +137,7 @@ struct hpdi_private {
> dma_addr_t dma_desc_phys_addr;
> unsigned int num_dma_descriptors;
> /* pointer to start of buffers indexed by descriptor */
> - uint32_t *desc_dio_buffer[NUM_DMA_DESCRIPTORS];
> + u32 *desc_dio_buffer[NUM_DMA_DESCRIPTORS];
> /* index of the dma descriptor that is currently being used */
> unsigned int dma_desc_index;
> unsigned int tx_fifo_size;
> @@ -192,10 +192,10 @@ static irqreturn_t gsc_hpdi_interrupt(int irq, void *d)
> struct hpdi_private *devpriv = dev->private;
> struct comedi_subdevice *s = dev->read_subdev;
> struct comedi_async *async = s->async;
> - uint32_t hpdi_intr_status, hpdi_board_status;
> - uint32_t plx_status;
> - uint32_t plx_bits;
> - uint8_t dma0_status, dma1_status;
> + u32 hpdi_intr_status, hpdi_board_status;
> + u32 plx_status;
> + u32 plx_bits;
> + u8 dma0_status, dma1_status;
> unsigned long flags;
>
> if (!dev->attached)
> @@ -290,7 +290,7 @@ static int gsc_hpdi_cmd(struct comedi_device *dev,
> struct comedi_async *async = s->async;
> struct comedi_cmd *cmd = &async->cmd;
> unsigned long flags;
> - uint32_t bits;
> + u32 bits;
>
> if (s->io_bits)
> return -EINVAL;
> @@ -424,7 +424,7 @@ static int gsc_hpdi_setup_dma_descriptors(struct comedi_device *dev,
> {
> struct hpdi_private *devpriv = dev->private;
> dma_addr_t phys_addr = devpriv->dma_desc_phys_addr;
> - uint32_t next_bits = PLX_DESC_IN_PCI_BIT | PLX_INTR_TERM_COUNT |
> + u32 next_bits = PLX_DESC_IN_PCI_BIT | PLX_INTR_TERM_COUNT |
> PLX_XFER_LOCAL_TO_PCI;
> unsigned int offset = 0;
> unsigned int idx = 0;
> @@ -516,7 +516,7 @@ static void gsc_hpdi_free_dma(struct comedi_device *dev)
> static int gsc_hpdi_init(struct comedi_device *dev)
> {
> struct hpdi_private *devpriv = dev->private;
> - uint32_t plx_intcsr_bits;
> + u32 plx_intcsr_bits;
>
> /* wait 10usec after reset before accessing fifos */
> writel(BOARD_RESET_BIT, dev->mmio + BOARD_CONTROL_REG);
> @@ -546,7 +546,7 @@ static int gsc_hpdi_init(struct comedi_device *dev)
> static void gsc_hpdi_init_plx9080(struct comedi_device *dev)
> {
> struct hpdi_private *devpriv = dev->private;
> - uint32_t bits;
> + u32 bits;
> void __iomem *plx_iobase = devpriv->plx9080_mmio;
>
> #ifdef __BIG_ENDIAN
>
Thanks!
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-18 15:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-14 17:21 [PATCH] comedi: gsc_hpdi: Fix coding style - use kernel type definitions for variables Ranjith Thangavel
2015-11-18 15:53 ` Ian Abbott
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.