[PATCH v2 01/15] staging: comedi: mite: Prefer 'unsigned int' to bare use of 'unsigned'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix the checkpatch.pl issues.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Reviewed-by: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/mite.c | 29 +++++++++++++++--------------
 drivers/staging/comedi/drivers/mite.h | 17 +++++++++--------
 2 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/comedi/drivers/mite.c b/drivers/staging/comedi/drivers/mite.c
index 8f24702..ceaf1ec 100644
--- a/drivers/staging/comedi/drivers/mite.c
+++ b/drivers/staging/comedi/drivers/mite.c
@@ -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);
diff --git a/drivers/staging/comedi/drivers/mite.h b/drivers/staging/comedi/drivers/mite.h
index f2099b0..4d1dece 100644
--- a/drivers/staging/comedi/drivers/mite.h
+++ b/drivers/staging/comedi/drivers/mite.h
@@ -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);
-- 
2.6.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux