From f7ede00d609d24dae6ef47d294630e81b8ce3091 Mon Sep 17 00:00:00 2001 From: Nikita Eshkeev Date: Tue, 3 May 2016 18:22:23 +0300 Subject: [PATCH] staging:comedi:Use unsigned int instead of unsigned This patch fixed the checkpatch.pl warning: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Nikita Eshkeev Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/comedi.h | 2 +- drivers/staging/comedi/drivers/comedi_bond.c | 10 +++++----- drivers/staging/comedi/drivers/das800.c | 4 ++-- drivers/staging/comedi/drivers/ni_65xx.c | 18 +++++++++--------- drivers/staging/comedi/drivers/ni_pcidio.c | 4 ++-- drivers/staging/comedi/drivers/ni_pcimio.c | 8 ++++---- drivers/staging/comedi/drivers/pcmuio.c | 2 +- .../staging/comedi/drivers/quatech_daqp_cs.c | 2 +- drivers/staging/comedi/drivers/rtd520.c | 10 +++++----- drivers/staging/comedi/drivers/s626.c | 8 ++++---- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h index ad5297f6d418..08fb26b51a5f 100644 --- a/drivers/staging/comedi/comedi.h +++ b/drivers/staging/comedi/comedi.h @@ -779,7 +779,7 @@ struct comedi_subdinfo { unsigned int flags; unsigned int range_type; unsigned int settling_time_0; - unsigned insn_bits_support; + unsigned int insn_bits_support; unsigned int unused[8]; }; diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c index 50b76eccb7d7..64a5ea3810d4 100644 --- a/drivers/staging/comedi/drivers/comedi_bond.c +++ b/drivers/staging/comedi/drivers/comedi_bond.c @@ -55,16 +55,16 @@ struct bonded_device { struct comedi_device *dev; - unsigned minor; - unsigned subdev; - unsigned nchans; + unsigned int minor; + unsigned int subdev; + unsigned int nchans; }; struct comedi_bond_private { char name[256]; struct bonded_device **devs; - unsigned ndevs; - unsigned nchans; + unsigned int ndevs; + unsigned int nchans; }; static int bonding_dio_insn_bits(struct comedi_device *dev, diff --git a/drivers/staging/comedi/drivers/das800.c b/drivers/staging/comedi/drivers/das800.c index b02f12201cf7..9059872b407b 100644 --- a/drivers/staging/comedi/drivers/das800.c +++ b/drivers/staging/comedi/drivers/das800.c @@ -218,7 +218,7 @@ struct das800_private { }; static void das800_ind_write(struct comedi_device *dev, - unsigned val, unsigned reg) + unsigned int val, unsigned int reg) { /* * Select dev->iobase + 2 to be desired register @@ -228,7 +228,7 @@ static void das800_ind_write(struct comedi_device *dev, outb(val, dev->iobase + 2); } -static unsigned das800_ind_read(struct comedi_device *dev, unsigned reg) +static unsigned int das800_ind_read(struct comedi_device *dev, unsigned int reg) { /* * Select dev->iobase + 7 to be desired register diff --git a/drivers/staging/comedi/drivers/ni_65xx.c b/drivers/staging/comedi/drivers/ni_65xx.c index 251117be1205..07f38e385469 100644 --- a/drivers/staging/comedi/drivers/ni_65xx.c +++ b/drivers/staging/comedi/drivers/ni_65xx.c @@ -151,10 +151,10 @@ enum ni_65xx_boardid { struct ni_65xx_board { const char *name; - unsigned num_dio_ports; - unsigned num_di_ports; - unsigned num_do_ports; - unsigned legacy_invert:1; + unsigned int num_dio_ports; + unsigned int num_di_ports; + unsigned int num_do_ports; + unsigned int legacy_invert:1; }; static const struct ni_65xx_board ni_65xx_boards[] = { @@ -360,7 +360,7 @@ static int ni_65xx_dio_insn_config(struct comedi_device *dev, unsigned long base_port = (unsigned long)s->private; unsigned int chan = CR_CHAN(insn->chanspec); unsigned int chan_mask = NI_65XX_CHAN_TO_MASK(chan); - unsigned port = base_port + NI_65XX_CHAN_TO_PORT(chan); + unsigned int port = base_port + NI_65XX_CHAN_TO_PORT(chan); unsigned int interval; unsigned int val; @@ -428,14 +428,14 @@ static int ni_65xx_dio_insn_bits(struct comedi_device *dev, unsigned long base_port = (unsigned long)s->private; unsigned int base_chan = CR_CHAN(insn->chanspec); int last_port_offset = NI_65XX_CHAN_TO_PORT(s->n_chan - 1); - unsigned read_bits = 0; + unsigned int read_bits = 0; int port_offset; for (port_offset = NI_65XX_CHAN_TO_PORT(base_chan); port_offset <= last_port_offset; port_offset++) { - unsigned port = base_port + port_offset; + unsigned int port = base_port + port_offset; int base_port_channel = NI_65XX_PORT_TO_CHAN(port_offset); - unsigned port_mask, port_data, bits; + unsigned int port_mask, port_data, bits; int bitshift = base_port_channel - base_chan; if (bitshift >= 32) @@ -640,7 +640,7 @@ static int ni_65xx_auto_attach(struct comedi_device *dev, struct pci_dev *pcidev = comedi_to_pci_dev(dev); const struct ni_65xx_board *board = NULL; struct comedi_subdevice *s; - unsigned i; + unsigned int i; int ret; if (context < ARRAY_SIZE(ni_65xx_boards)) diff --git a/drivers/staging/comedi/drivers/ni_pcidio.c b/drivers/staging/comedi/drivers/ni_pcidio.c index 02a532990979..35ef1925703f 100644 --- a/drivers/staging/comedi/drivers/ni_pcidio.c +++ b/drivers/staging/comedi/drivers/ni_pcidio.c @@ -170,12 +170,12 @@ comedi_nonfree_firmware tarball available from http://www.comedi.org #define DMA_Line_Control_Group1 76 #define DMA_Line_Control_Group2 108 /* channel zero is none */ -static inline unsigned primary_DMAChannel_bits(unsigned channel) +static inline unsigned int primary_DMAChannel_bits(unsigned int channel) { return channel & 0x3; } -static inline unsigned secondary_DMAChannel_bits(unsigned channel) +static inline unsigned int secondary_DMAChannel_bits(unsigned int channel) { return (channel << 2) & 0xc; } diff --git a/drivers/staging/comedi/drivers/ni_pcimio.c b/drivers/staging/comedi/drivers/ni_pcimio.c index 344aa343e5e1..d8917392b9f9 100644 --- a/drivers/staging/comedi/drivers/ni_pcimio.c +++ b/drivers/staging/comedi/drivers/ni_pcimio.c @@ -1064,12 +1064,12 @@ static void m_series_init_eeprom_buffer(struct comedi_device *dev) struct mite *mite = devpriv->mite; resource_size_t daq_phys_addr; static const int Start_Cal_EEPROM = 0x400; - static const unsigned window_size = 10; + static const unsigned int window_size = 10; static const int serial_number_eeprom_offset = 0x4; static const int serial_number_eeprom_length = 0x4; - unsigned old_iodwbsr_bits; - unsigned old_iodwbsr1_bits; - unsigned old_iodwcr1_bits; + unsigned int old_iodwbsr_bits; + unsigned int old_iodwbsr1_bits; + unsigned int old_iodwcr1_bits; int i; /* IO Window 1 needs to be temporarily mapped to read the eeprom */ diff --git a/drivers/staging/comedi/drivers/pcmuio.c b/drivers/staging/comedi/drivers/pcmuio.c index 7ea813022ff6..8ad64f2625fe 100644 --- a/drivers/staging/comedi/drivers/pcmuio.c +++ b/drivers/staging/comedi/drivers/pcmuio.c @@ -307,7 +307,7 @@ static void pcmuio_stop_intr(struct comedi_device *dev, static void pcmuio_handle_intr_subdev(struct comedi_device *dev, struct comedi_subdevice *s, - unsigned triggered) + unsigned int triggered) { struct pcmuio_private *devpriv = dev->private; int asic = pcmuio_subdevice_to_asic(s); diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c index e9e43139157d..802f51e46405 100644 --- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c +++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c @@ -643,7 +643,7 @@ static int daqp_ao_insn_write(struct comedi_device *dev, outb(0, dev->iobase + DAQP_AUX_REG); for (i = 0; i > insn->n; i++) { - unsigned val = data[i]; + unsigned int val = data[i]; int ret; /* D/A transfer rate is about 8ms */ diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c index 9b6c56773247..0990f621dcd1 100644 --- a/drivers/staging/comedi/drivers/rtd520.c +++ b/drivers/staging/comedi/drivers/rtd520.c @@ -362,7 +362,7 @@ struct rtd_private { long ai_count; /* total transfer size (samples) */ int xfer_count; /* # to transfer data. 0->1/2FIFO */ int flags; /* flag event modes */ - unsigned fifosz; + unsigned int fifosz; /* 8254 Timer/Counter gate and clock sources */ unsigned char timer_gate_src[3]; @@ -491,9 +491,9 @@ static void rtd_load_channelgain_list(struct comedi_device *dev, static int rtd520_probe_fifo_depth(struct comedi_device *dev) { unsigned int chanspec = CR_PACK(0, 0, AREF_GROUND); - unsigned i; - static const unsigned limit = 0x2000; - unsigned fifo_size = 0; + unsigned int i; + static const unsigned int limit = 0x2000; + unsigned int fifo_size = 0; writel(0, dev->mmio + LAS0_ADC_FIFO_CLEAR); rtd_load_channelgain_list(dev, 1, &chanspec); @@ -501,7 +501,7 @@ static int rtd520_probe_fifo_depth(struct comedi_device *dev) writel(0, dev->mmio + LAS0_ADC_CONVERSION); /* convert samples */ for (i = 0; i < limit; ++i) { - unsigned fifo_status; + unsigned int fifo_status; /* trigger conversion */ writew(0, dev->mmio + LAS0_ADC); usleep_range(1, 1000); diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index c5e08635e01e..4a87b4b52400 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c @@ -708,7 +708,7 @@ static uint16_t s626_get_mode_a(struct comedi_device *dev, uint16_t cra; uint16_t crb; uint16_t setup; - unsigned cntsrc, clkmult, clkpol, encmode; + unsigned int cntsrc, clkmult, clkpol, encmode; /* Fetch CRA and CRB register images. */ cra = s626_debi_read(dev, S626_LP_CRA(chan)); @@ -763,7 +763,7 @@ static uint16_t s626_get_mode_b(struct comedi_device *dev, uint16_t cra; uint16_t crb; uint16_t setup; - unsigned cntsrc, clkmult, clkpol, encmode; + unsigned int cntsrc, clkmult, clkpol, encmode; /* Fetch CRA and CRB register images. */ cra = s626_debi_read(dev, S626_LP_CRA(chan)); @@ -838,7 +838,7 @@ static void s626_set_mode_a(struct comedi_device *dev, struct s626_private *devpriv = dev->private; uint16_t cra; uint16_t crb; - unsigned cntsrc, clkmult, clkpol; + unsigned int cntsrc, clkmult, clkpol; /* Initialize CRA and CRB images. */ /* Preload trigger is passed through. */ @@ -916,7 +916,7 @@ static void s626_set_mode_b(struct comedi_device *dev, struct s626_private *devpriv = dev->private; uint16_t cra; uint16_t crb; - unsigned cntsrc, clkmult, clkpol; + unsigned int cntsrc, clkmult, clkpol; /* Initialize CRA and CRB images. */ /* IndexSrc is passed through. */