staging: comedi: mite: Prefer 'unsigned int' to bare use of 'unsigned'
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 20 Apr 2016 17:36:29 +0000 (10:36 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Apr 2016 05:18:51 +0000 (22:18 -0700)
Fix the checkpatch.pl issues.

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>
drivers/staging/comedi/drivers/mite.c
drivers/staging/comedi/drivers/mite.h

index 8f24702c33804643031393e098f6706821562cb9..ceaf1ec6352415dc6b42896a538ea2bf9ddad783 100644 (file)
@@ -82,11 +82,12 @@ static void dump_chip_signature(u32 csigr_bits)
                mite_csigr_wins(csigr_bits), mite_csigr_iowins(csigr_bits));
 }
 
-static unsigned mite_fifo_size(struct mite_struct *mite, unsigned channel)
+static unsigned int mite_fifo_size(struct mite_struct *mite,
+                                  unsigned int channel)
 {
-       unsigned fcr_bits = readl(mite->mite_io_addr + MITE_FCR(channel));
-       unsigned empty_count = (fcr_bits >> 16) & 0xff;
-       unsigned full_count = fcr_bits & 0xff;
+       unsigned int fcr_bits = readl(mite->mite_io_addr + MITE_FCR(channel));
+       unsigned int empty_count = (fcr_bits >> 16) & 0xff;
+       unsigned int full_count = fcr_bits & 0xff;
 
        return empty_count + full_count;
 }
@@ -97,7 +98,7 @@ int mite_setup2(struct comedi_device *dev,
        unsigned long length;
        int i;
        u32 csigr_bits;
-       unsigned unknown_dma_burst_bits;
+       unsigned int unknown_dma_burst_bits;
 
        pci_set_master(mite->pcidev);
 
@@ -213,11 +214,11 @@ void mite_free_ring(struct mite_dma_descriptor_ring *ring)
 };
 EXPORT_SYMBOL_GPL(mite_free_ring);
 
-struct mite_channel *mite_request_channel_in_range(struct mite_struct *mite,
-                                                  struct
-                                                  mite_dma_descriptor_ring
-                                                  *ring, unsigned min_channel,
-                                                  unsigned max_channel)
+struct mite_channel *
+mite_request_channel_in_range(struct mite_struct *mite,
+                             struct mite_dma_descriptor_ring *ring,
+                             unsigned int min_channel,
+                             unsigned int max_channel)
 {
        int i;
        unsigned long flags;
@@ -529,7 +530,7 @@ u32 mite_bytes_read_from_memory_ub(struct mite_channel *mite_chan)
 }
 EXPORT_SYMBOL_GPL(mite_bytes_read_from_memory_ub);
 
-unsigned mite_dma_tcr(struct mite_channel *mite_chan)
+unsigned int mite_dma_tcr(struct mite_channel *mite_chan)
 {
        struct mite_struct *mite = mite_chan->mite;
 
@@ -540,7 +541,7 @@ EXPORT_SYMBOL_GPL(mite_dma_tcr);
 void mite_dma_disarm(struct mite_channel *mite_chan)
 {
        struct mite_struct *mite = mite_chan->mite;
-       unsigned chor;
+       unsigned int chor;
 
        /* disarm */
        chor = CHOR_ABORT;
@@ -632,10 +633,10 @@ int mite_sync_output_dma(struct mite_channel *mite_chan,
 }
 EXPORT_SYMBOL_GPL(mite_sync_output_dma);
 
-unsigned mite_get_status(struct mite_channel *mite_chan)
+unsigned int mite_get_status(struct mite_channel *mite_chan)
 {
        struct mite_struct *mite = mite_chan->mite;
-       unsigned status;
+       unsigned int status;
        unsigned long flags;
 
        spin_lock_irqsave(&mite->lock, flags);
index f2099b0924e4eb4041ae836d908b57653c9cca12..4d1decef64ce77d81b5b335e117e29f48902e3af 100644 (file)
@@ -46,7 +46,7 @@ struct mite_dma_descriptor_ring {
 
 struct mite_channel {
        struct mite_struct *mite;
-       unsigned channel;
+       unsigned int channel;
        int dir;
        int done;
        struct mite_dma_descriptor_ring *ring;
@@ -60,7 +60,7 @@ struct mite_struct {
        struct mite_channel channels[MAX_MITE_DMA_CHANNELS];
        short channel_allocated[MAX_MITE_DMA_CHANNELS];
        int num_channels;
-       unsigned fifo_size;
+       unsigned int fifo_size;
        spinlock_t lock;
 };
 
@@ -80,7 +80,8 @@ void mite_free_ring(struct mite_dma_descriptor_ring *ring);
 struct mite_channel *
 mite_request_channel_in_range(struct mite_struct *mite,
                              struct mite_dma_descriptor_ring *ring,
-                             unsigned min_channel, unsigned max_channel);
+                             unsigned int min_channel,
+                             unsigned int max_channel);
 static inline struct mite_channel *
 mite_request_channel(struct mite_struct *mite,
                     struct mite_dma_descriptor_ring *ring)
@@ -91,7 +92,7 @@ mite_request_channel(struct mite_struct *mite,
 
 void mite_release_channel(struct mite_channel *mite_chan);
 
-unsigned mite_dma_tcr(struct mite_channel *mite_chan);
+unsigned int mite_dma_tcr(struct mite_channel *mite_chan);
 void mite_dma_arm(struct mite_channel *mite_chan);
 void mite_dma_disarm(struct mite_channel *mite_chan);
 int mite_sync_input_dma(struct mite_channel *mite_chan,
@@ -103,7 +104,7 @@ u32 mite_bytes_written_to_memory_ub(struct mite_channel *mite_chan);
 u32 mite_bytes_read_from_memory_lb(struct mite_channel *mite_chan);
 u32 mite_bytes_read_from_memory_ub(struct mite_channel *mite_chan);
 u32 mite_bytes_in_transit(struct mite_channel *mite_chan);
-unsigned mite_get_status(struct mite_channel *mite_chan);
+unsigned int mite_get_status(struct mite_channel *mite_chan);
 int mite_done(struct mite_channel *mite_chan);
 
 void mite_prep_dma(struct mite_channel *mite_chan,
@@ -151,9 +152,9 @@ enum MITE_IODWBSR_bits {
        WENAB = 0x80,           /* window enable */
 };
 
-static inline unsigned MITE_IODWBSR_1_WSIZE_bits(unsigned size)
+static inline unsigned int MITE_IODWBSR_1_WSIZE_bits(unsigned int size)
 {
-       unsigned order = 0;
+       unsigned int order = 0;
 
        BUG_ON(size == 0);
        order = ilog2(size);
@@ -291,7 +292,7 @@ static inline int CR_REQS(int source)
        return (source & 0x7) << 16;
 };
 
-static inline int CR_REQSDRQ(unsigned drq_line)
+static inline int CR_REQSDRQ(unsigned int drq_line)
 {
        /* This also works on m-series when using channels (drq_line) 4 or 5. */
        return CR_REQS((drq_line & 0x3) | 0x4);