This patch fixes the following checkpatch warnings: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis CHECK:SPACING: No space is necessary after a cast CHECK:SPACING: space preferred before that '|' (ctx:VxE) CHECK:SPACING: spaces preferred around that '&' (ctx:VxV) CHECK:SPACING: spaces preferred around that '*' (ctx:VxV) CHECK:SPACING: spaces preferred around that '+' (ctx:VxV) CHECK:SPACING: spaces preferred around that '-' (ctx:VxV) CHECK:SPACING: spaces preferred around that '/' (ctx:VxV) CHECK:SPACING: spaces preferred around that '<<' (ctx:VxV) CHECK:SPACING: spaces preferred around that '>>' (ctx:VxV) CHECK:SPACING: spaces preferred around that '|' (ctx:VxV) Additional whitespace fixes found by "checkpatch.pl --strict". Whitespace changes only. "git diff -w" shows no changes. Signed-off-by: Stefan Herdler <herdler@xxxxxxxxxxxxxx> --- drivers/staging/media/av7110/av7110.c | 60 ++++++++++----------- drivers/staging/media/av7110/av7110.h | 8 +-- drivers/staging/media/av7110/av7110_av.c | 58 ++++++++++---------- drivers/staging/media/av7110/av7110_av.h | 2 +- drivers/staging/media/av7110/av7110_ca.c | 12 ++--- drivers/staging/media/av7110/av7110_hw.c | 28 +++++----- drivers/staging/media/av7110/av7110_hw.h | 16 +++--- drivers/staging/media/av7110/av7110_ipack.c | 8 +-- drivers/staging/media/av7110/av7110_v4l.c | 14 ++--- drivers/staging/media/av7110/dvb_filter.c | 18 +++---- drivers/staging/media/av7110/dvb_filter.h | 4 +- 11 files changed, 114 insertions(+), 114 deletions(-) diff --git a/drivers/staging/media/av7110/av7110.c b/drivers/staging/media/av7110/av7110.c index 8a4e7bd82..27019e3f3 100644 --- a/drivers/staging/media/av7110/av7110.c +++ b/drivers/staging/media/av7110/av7110.c @@ -52,8 +52,8 @@ #define TS_WIDTH 376 #define TS_HEIGHT 512 -#define TS_BUFLEN (TS_WIDTH*TS_HEIGHT) -#define TS_MAX_PACKETS (TS_BUFLEN/TS_SIZE) +#define TS_BUFLEN (TS_WIDTH * TS_HEIGHT) +#define TS_MAX_PACKETS (TS_BUFLEN / TS_SIZE) int av7110_debug; @@ -122,7 +122,7 @@ static void init_av7110_av(struct av7110 *av7110) printk("dvb-ttpci:cannot set internal volume to maximum:%d\n",ret); ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetMonitorType, - 1, (u16) av7110->display_ar); + 1, (u16)av7110->display_ar); if (ret < 0) printk("dvb-ttpci: unable to set aspect ratio\n"); ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetPanScanType, @@ -234,7 +234,7 @@ static int arm_thread(void *data) for (;;) { timeout = wait_event_interruptible_timeout(av7110->arm_wait, - kthread_should_stop(), 5 * HZ); + kthread_should_stop(), 5 * HZ); if (-ERESTARTSYS == timeout || kthread_should_stop()) { /* got signal or told to quit*/ @@ -371,7 +371,7 @@ static void debiirq(struct tasklet_struct *t) switch (type & 0xff) { case DATA_TS_RECORD: dvb_dmx_swfilter_packets(&av7110->demux, - (const u8 *) av7110->debi_virt, + (const u8 *)av7110->debi_virt, av7110->debilen / 188); xfer = RX_BUFF; break; @@ -379,7 +379,7 @@ static void debiirq(struct tasklet_struct *t) case DATA_PES_RECORD: if (av7110->demux.recording) av7110_record_cb(&av7110->p2t[handle], - (u8 *) av7110->debi_virt, + (u8 *)av7110->debi_virt, av7110->debilen); xfer = RX_BUFF; break; @@ -611,11 +611,11 @@ static void gpioirq(struct tasklet_struct *t) len = 2 * 1024; iwdebi(av7110, DEBINOSWAP, TX_LEN, len, 2); iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, len, 2); - memcpy(av7110->debi_virt, av7110->bmpbuf+av7110->bmpp, len); + memcpy(av7110->debi_virt, av7110->bmpbuf + av7110->bmpp, len); av7110->bmpp += len; av7110->bmplen -= len; dprintk(8, "gpio DATA_BMP_LOAD DMA len %d\n", len); - start_debi_dma(av7110, DEBI_WRITE, DPRAM_BASE+txbuf, len); + start_debi_dma(av7110, DEBI_WRITE, DPRAM_BASE + txbuf, len); spin_unlock(&av7110->debilock); return; @@ -633,7 +633,7 @@ static void gpioirq(struct tasklet_struct *t) case DATA_TS_RECORD: case DATA_PES_RECORD: dprintk(8, "DMA: TS_REC etc.\n"); - start_debi_dma(av7110, DEBI_READ, DPRAM_BASE+rxbuf, len); + start_debi_dma(av7110, DEBI_READ, DPRAM_BASE + rxbuf, len); spin_unlock(&av7110->debilock); return; @@ -675,9 +675,9 @@ static int dvb_osd_ioctl(struct file *file, dprintk(4, "%p\n", av7110); if (cmd == OSD_SEND_CMD) - return av7110_osd_cmd(av7110, (osd_cmd_t *) parg); + return av7110_osd_cmd(av7110, (osd_cmd_t *)parg); if (cmd == OSD_GET_CAPABILITY) - return av7110_osd_capability(av7110, (osd_cap_t *) parg); + return av7110_osd_capability(av7110, (osd_cap_t *)parg); return -EINVAL; } @@ -723,7 +723,7 @@ static inline int SetPIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, } int ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, - u16 subpid, u16 pcrpid) + u16 subpid, u16 pcrpid) { int ret = 0; @@ -856,7 +856,7 @@ static int dvb_feed_start_pid(struct dvb_demux_feed *dvbdmxfeed) npids[0] = npids[1] = npids[2] = npids[3] = npids[4] = 0xffff; i = dvbdmxfeed->pes_type; - npids[i] = (pid[i]&0x8000) ? 0 : pid[i]; + npids[i] = (pid[i] & 0x8000) ? 0 : pid[i]; if ((i == 2) && npids[i] && (dvbdmxfeed->ts_type & TS_PACKET)) { npids[i] = 0; ret = ChangePIDs(av7110, npids[1], npids[0], npids[2], npids[3], npids[4]); @@ -919,7 +919,7 @@ static int dvb_feed_stop_pid(struct dvb_demux_feed *dvbdmxfeed) case 4: if (!pids_off) return 0; - npids[i] = (pid[i]&0x8000) ? 0 : pid[i]; + npids[i] = (pid[i] & 0x8000) ? 0 : pid[i]; break; } if (!ret) @@ -1111,8 +1111,8 @@ static int dvb_get_stc(struct dmx_demux *demux, unsigned int num, dprintk(2, "fwstc = %04hx %04hx %04hx %04hx\n", fwstc[0], fwstc[1], fwstc[2], fwstc[3]); - *stc = (((uint64_t) ((fwstc[3] & 0x8000) >> 15)) << 32) | - (((uint64_t) fwstc[1]) << 16) | ((uint64_t) fwstc[0]); + *stc = (((uint64_t)((fwstc[3] & 0x8000) >> 15)) << 32) | + (((uint64_t)fwstc[1]) << 16) | ((uint64_t)fwstc[0]); *base = 1; dprintk(4, "stc = %lu\n", (unsigned long)*stc); @@ -1218,7 +1218,7 @@ static int budget_stop_feed(struct dvb_demux_feed *feed) static void vpeirq(struct tasklet_struct *t) { struct av7110 *budget = from_tasklet(budget, t, vpe_tasklet); - u8 *mem = (u8 *) (budget->grabbing); + u8 *mem = (u8 *)(budget->grabbing); u32 olddma = budget->ttbp; u32 newdma = saa7146_read(budget->dev, PCI_VDP3); struct dvb_demux *demux = budget->full_ts ? &budget->demux : &budget->demux1; @@ -1268,7 +1268,7 @@ static int av7110_register(struct av7110 *av7110) av7110->registered = 1; - dvbdemux->priv = (void *) av7110; + dvbdemux->priv = (void *)av7110; for (i = 0; i < 32; i++) av7110->handle2filter[i] = NULL; @@ -1323,7 +1323,7 @@ static int av7110_register(struct av7110 *av7110) /* initialize software demux1 without its own frontend * demux1 hardware is connected to frontend0 of demux0 */ - dvbdemux1->priv = (void *) av7110; + dvbdemux1->priv = (void *)av7110; dvbdemux1->filternum = 256; dvbdemux1->feednum = 256; @@ -1901,7 +1901,7 @@ static int av7110_fe_lock_fix(struct av7110 *av7110, enum fe_status status) if (synced) { ret = SetPIDs(av7110, av7110->pids[DMX_PES_VIDEO], - av7110->pids[DMX_PES_AUDIO], + av7110->pids[DMX_PES_AUDIO], av7110->pids[DMX_PES_TELETEXT], 0, av7110->pids[DMX_PES_PCR]); if (!ret) @@ -2075,7 +2075,7 @@ static int frontend_init(struct av7110 *av7110) switch (av7110->dev->pci->subsystem_device) { case 0x0000: // Fujitsu/Siemens DVB-Cable (ves1820/Philips CD1516(??)) av7110->fe = dvb_attach(ves1820_attach, &philips_cd1516_config, - &av7110->i2c_adap, read_pwm(av7110)); + &av7110->i2c_adap, read_pwm(av7110)); if (av7110->fe) { av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params; } @@ -2379,9 +2379,9 @@ static int av7110_attach(struct saa7146_dev *dev, /* RPS1 timeout disable */ saa7146_write(dev, RPS_TOV1, 0); WRITE_RPS1(CMD_PAUSE | EVT_VBI_B); - WRITE_RPS1(CMD_WR_REG_MASK | (GPIO_CTRL>>2)); + WRITE_RPS1(CMD_WR_REG_MASK | (GPIO_CTRL >> 2)); WRITE_RPS1(GPIO3_MSK); - WRITE_RPS1(SAA7146_GPIO_OUTLO<<24); + WRITE_RPS1(SAA7146_GPIO_OUTLO << 24); #if RPS_IRQ /* issue RPS1 interrupt to increment counter */ WRITE_RPS1(CMD_INTERRUPT); @@ -2541,9 +2541,9 @@ static int av7110_attach(struct saa7146_dev *dev, /* Wait Source Line Counter Threshold (p36) */ WRITE_RPS1(CMD_PAUSE | EVT_HS); /* Set GPIO3=1 (p42) */ - WRITE_RPS1(CMD_WR_REG_MASK | (GPIO_CTRL>>2)); + WRITE_RPS1(CMD_WR_REG_MASK | (GPIO_CTRL >> 2)); WRITE_RPS1(GPIO3_MSK); - WRITE_RPS1(SAA7146_GPIO_OUTHI<<24); + WRITE_RPS1(SAA7146_GPIO_OUTHI << 24); #if RPS_IRQ /* issue RPS1 interrupt */ WRITE_RPS1(CMD_INTERRUPT); @@ -2551,9 +2551,9 @@ static int av7110_attach(struct saa7146_dev *dev, /* Wait reset Source Line Counter Threshold (p36) */ WRITE_RPS1(CMD_PAUSE | RPS_INV | EVT_HS); /* Set GPIO3=0 (p42) */ - WRITE_RPS1(CMD_WR_REG_MASK | (GPIO_CTRL>>2)); + WRITE_RPS1(CMD_WR_REG_MASK | (GPIO_CTRL >> 2)); WRITE_RPS1(GPIO3_MSK); - WRITE_RPS1(SAA7146_GPIO_OUTLO<<24); + WRITE_RPS1(SAA7146_GPIO_OUTLO << 24); #if RPS_IRQ /* issue RPS1 interrupt */ WRITE_RPS1(CMD_INTERRUPT); @@ -2623,7 +2623,7 @@ static int av7110_attach(struct saa7146_dev *dev, if (!av7110->debi_virt) goto err_saa71466_vfree_4; - av7110->iobuf = vmalloc(AVOUTLEN+AOUTLEN+BMPLEN+4*IPACKS); + av7110->iobuf = vmalloc(AVOUTLEN + AOUTLEN + BMPLEN + 4 * IPACKS); if (!av7110->iobuf) goto err_pci_free_5; @@ -2632,7 +2632,7 @@ static int av7110_attach(struct saa7146_dev *dev, goto err_iobuf_vfree_6; /* init BMP buffer */ - av7110->bmpbuf = av7110->iobuf+AVOUTLEN+AOUTLEN; + av7110->bmpbuf = av7110->iobuf + AVOUTLEN + AOUTLEN; init_waitqueue_head(&av7110->bmpq); ret = av7110_ca_init(av7110); @@ -2653,7 +2653,7 @@ static int av7110_attach(struct saa7146_dev *dev, "dvb-ttpci: Warning, firmware version 0x%04x is too old. System might be unstable!\n", FW_VERSION(av7110->arm_app)); - thread = kthread_run(arm_thread, (void *) av7110, "arm_mon"); + thread = kthread_run(arm_thread, (void *)av7110, "arm_mon"); if (IS_ERR(thread)) { ret = PTR_ERR(thread); goto err_stop_arm_9; diff --git a/drivers/staging/media/av7110/av7110.h b/drivers/staging/media/av7110/av7110.h index 2290300ae..1cfe13df6 100644 --- a/drivers/staging/media/av7110/av7110.h +++ b/drivers/staging/media/av7110/av7110.h @@ -119,11 +119,11 @@ struct av7110 { void *iobuf; /* memory for all buffers */ struct dvb_ringbuffer avout; /* buffer for video or A/V mux */ -#define AVOUTLEN (128*1024) +#define AVOUTLEN (128 * 1024) struct dvb_ringbuffer aout; /* buffer for audio */ -#define AOUTLEN (64*1024) +#define AOUTLEN (64 * 1024) void *bmpbuf; -#define BMPLEN (8*32768+1024) +#define BMPLEN (8 * 32768 + 1024) /* bitmap buffers and states */ @@ -281,7 +281,7 @@ struct av7110 { }; extern int ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, - u16 subpid, u16 pcrpid); + u16 subpid, u16 pcrpid); void av7110_ir_handler(struct av7110 *av7110, u32 ircom); int av7110_set_ir_config(struct av7110 *av7110); diff --git a/drivers/staging/media/av7110/av7110_av.c b/drivers/staging/media/av7110/av7110_av.c index 56fa1f180..e031d6028 100644 --- a/drivers/staging/media/av7110/av7110_av.c +++ b/drivers/staging/media/av7110/av7110_av.c @@ -91,7 +91,7 @@ int av7110_record_cb(struct dvb_filter_pes2ts *p2t, u8 *buf, size_t len) static int dvb_filter_pes2ts_cb(void *priv, unsigned char *data) { - struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *) priv; + struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *)priv; dvbdmxfeed->cb.ts(data, 188, NULL, 0, &dvbdmxfeed->feed.ts, NULL); @@ -117,7 +117,7 @@ int av7110_av_start_record(struct av7110 *av7110, int av, dvb_filter_pes2ts_init(&av7110->p2t[0], dvbdmx->pesfilter[0]->pid, dvb_filter_pes2ts_cb, - (void *) dvbdmx->pesfilter[0]); + (void *)dvbdmx->pesfilter[0]); ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, AudioPES, 0); break; @@ -125,7 +125,7 @@ int av7110_av_start_record(struct av7110 *av7110, int av, dvb_filter_pes2ts_init(&av7110->p2t[1], dvbdmx->pesfilter[1]->pid, dvb_filter_pes2ts_cb, - (void *) dvbdmx->pesfilter[1]); + (void *)dvbdmx->pesfilter[1]); ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, VideoPES, 0); break; @@ -133,11 +133,11 @@ int av7110_av_start_record(struct av7110 *av7110, int av, dvb_filter_pes2ts_init(&av7110->p2t[0], dvbdmx->pesfilter[0]->pid, dvb_filter_pes2ts_cb, - (void *) dvbdmx->pesfilter[0]); + (void *)dvbdmx->pesfilter[0]); dvb_filter_pes2ts_init(&av7110->p2t[1], dvbdmx->pesfilter[1]->pid, dvb_filter_pes2ts_cb, - (void *) dvbdmx->pesfilter[1]); + (void *)dvbdmx->pesfilter[1]); ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, AV_PES, 0); break; } @@ -254,10 +254,10 @@ int av7110_pes_play(void *dest, struct dvb_ringbuffer *buf, int dlen) return -1; } - dvb_ringbuffer_read(buf, dest, (size_t) blen); + dvb_ringbuffer_read(buf, dest, (size_t)blen); dprintk(2, "pread=0x%08lx, pwrite=0x%08lx\n", - (unsigned long) buf->pread, (unsigned long) buf->pwrite); + (unsigned long)buf->pread, (unsigned long)buf->pwrite); wake_up(&buf->queue); return blen; } @@ -325,7 +325,7 @@ int av7110_set_vidmode(struct av7110 *av7110, enum av7110_video_mode mode) if (!ret && !av7110->playing) { ret = ChangePIDs(av7110, av7110->pids[DMX_PES_VIDEO], - av7110->pids[DMX_PES_AUDIO], + av7110->pids[DMX_PES_AUDIO], av7110->pids[DMX_PES_TELETEXT], 0, av7110->pids[DMX_PES_PCR]); if (!ret) @@ -404,7 +404,7 @@ static inline long aux_ring_buffer_write(struct dvb_ringbuffer *rbuf, static void play_video_cb(u8 *buf, int count, void *priv) { - struct av7110 *av7110 = (struct av7110 *) priv; + struct av7110 *av7110 = (struct av7110 *)priv; dprintk(2, "av7110:%p, \n", av7110); @@ -417,7 +417,7 @@ static void play_video_cb(u8 *buf, int count, void *priv) static void play_audio_cb(u8 *buf, int count, void *priv) { - struct av7110 *av7110 = (struct av7110 *) priv; + struct av7110 *av7110 = (struct av7110 *)priv; dprintk(2, "av7110:%p, \n", av7110); @@ -499,7 +499,7 @@ static ssize_t dvb_play(struct av7110 *av7110, const char __user *buf, } static ssize_t dvb_play_kernel(struct av7110 *av7110, const u8 *buf, - unsigned long count, int nonblock, int type) + unsigned long count, int nonblock, int type) { unsigned long todo = count, n; @@ -546,8 +546,8 @@ static ssize_t dvb_aplay(struct av7110 *av7110, const char __user *buf, if (nonblock) return count - todo; if (wait_event_interruptible(av7110->aout.queue, - (dvb_ringbuffer_free(&av7110->aout) >= 20 * 1024))) - return count-todo; + (dvb_ringbuffer_free(&av7110->aout) >= 20 * 1024))) + return count - todo; } n = todo; if (n > IPACKS * 2) @@ -688,7 +688,7 @@ void av7110_p2t_write(u8 const *buf, long int length, u16 pid, struct av7110_p2t if (p->pos) { c2 = find_pes_header(buf + c, length - c, &p->frags); if (c2 >= 0 && c2 < (TS_SIZE - 4) - p->pos) - l = c2+c; + l = c2 + c; else l = (TS_SIZE - 4) - p->pos; memcpy(p->pes + p->pos, buf, l); @@ -765,7 +765,7 @@ static void p_to_t(u8 const *buf, long int length, u16 pid, u8 *counter, pes_start = 0; if (length > 3 && - buf[0] == 0x00 && buf[1] == 0x00 && buf[2] == 0x01) + buf[0] == 0x00 && buf[1] == 0x00 && buf[2] == 0x01) switch (buf[3]) { case PROG_STREAM_MAP: case PRIVATE_STREAM2: @@ -1121,7 +1121,7 @@ static int dvb_video_ioctl(struct file *file, { struct dvb_device *dvbdev = file->private_data; struct av7110 *av7110 = dvbdev->priv; - unsigned long arg = (unsigned long) parg; + unsigned long arg = (unsigned long)parg; int ret = 0; dprintk(1, "av7110:%p, cmd=%04x\n", av7110,cmd); @@ -1143,7 +1143,7 @@ static int dvb_video_ioctl(struct file *file, ret = av7110_av_stop(av7110, RP_VIDEO); else ret = vidcom(av7110, AV_VIDEO_CMD_STOP, - av7110->videostate.video_blank ? 0 : 1); + av7110->videostate.video_blank ? 0 : 1); if (!ret) av7110->trickmode = TRICK_NONE; break; @@ -1193,11 +1193,11 @@ static int dvb_video_ioctl(struct file *file, break; case VIDEO_SELECT_SOURCE: - av7110->videostate.stream_source = (video_stream_source_t) arg; + av7110->videostate.stream_source = (video_stream_source_t)arg; break; case VIDEO_SET_BLANK: - av7110->videostate.video_blank = (int) arg; + av7110->videostate.video_blank = (int)arg; break; case VIDEO_GET_STATUS: @@ -1220,7 +1220,7 @@ static int dvb_video_ioctl(struct file *file, case VIDEO_SET_DISPLAY_FORMAT: { - video_displayformat_t format = (video_displayformat_t) arg; + video_displayformat_t format = (video_displayformat_t)arg; switch (format) { case VIDEO_PAN_SCAN: @@ -1250,14 +1250,14 @@ static int dvb_video_ioctl(struct file *file, } av7110->display_ar = arg; ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetMonitorType, - 1, (u16) arg); + 1, (u16)arg); break; #ifdef CONFIG_COMPAT case VIDEO_STILLPICTURE32: { struct compat_video_still_picture *pic = - (struct compat_video_still_picture *) parg; + (struct compat_video_still_picture *)parg; av7110->videostate.stream_source = VIDEO_SOURCE_MEMORY; dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout); ret = play_iframe(av7110, compat_ptr(pic->iFrame), @@ -1269,7 +1269,7 @@ static int dvb_video_ioctl(struct file *file, case VIDEO_STILLPICTURE: { struct video_still_picture *pic = - (struct video_still_picture *) parg; + (struct video_still_picture *)parg; av7110->videostate.stream_source = VIDEO_SOURCE_MEMORY; dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout); ret = play_iframe(av7110, pic->iFrame, pic->size, @@ -1291,7 +1291,7 @@ static int dvb_video_ioctl(struct file *file, break; case VIDEO_SLOWMOTION: - if (av7110->playing&RP_VIDEO) { + if (av7110->playing & RP_VIDEO) { if (av7110->trickmode != TRICK_SLOW) ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Slow, 2, 0, 0); if (!ret) @@ -1353,7 +1353,7 @@ static int dvb_audio_ioctl(struct file *file, { struct dvb_device *dvbdev = file->private_data; struct av7110 *av7110 = dvbdev->priv; - unsigned long arg = (unsigned long) parg; + unsigned long arg = (unsigned long)parg; int ret = 0; dprintk(1, "av7110:%p, cmd=%04x\n", av7110,cmd); @@ -1398,19 +1398,19 @@ static int dvb_audio_ioctl(struct file *file, break; case AUDIO_SELECT_SOURCE: - av7110->audiostate.stream_source = (audio_stream_source_t) arg; + av7110->audiostate.stream_source = (audio_stream_source_t)arg; break; case AUDIO_SET_MUTE: { ret = audcom(av7110, arg ? AUDIO_CMD_MUTE : AUDIO_CMD_UNMUTE); if (!ret) - av7110->audiostate.mute_state = (int) arg; + av7110->audiostate.mute_state = (int)arg; break; } case AUDIO_SET_AV_SYNC: - av7110->audiostate.AV_sync_state = (int) arg; + av7110->audiostate.AV_sync_state = (int)arg; ret = audcom(av7110, arg ? AUDIO_CMD_SYNC_ON : AUDIO_CMD_SYNC_OFF); break; @@ -1421,7 +1421,7 @@ static int dvb_audio_ioctl(struct file *file, break; case AUDIO_CHANNEL_SELECT: - av7110->audiostate.channel_select = (audio_channel_select_t) arg; + av7110->audiostate.channel_select = (audio_channel_select_t)arg; switch (av7110->audiostate.channel_select) { case AUDIO_STEREO: ret = audcom(av7110, AUDIO_CMD_STEREO); diff --git a/drivers/staging/media/av7110/av7110_av.h b/drivers/staging/media/av7110/av7110_av.h index 56b0e14bb..ce0f9945d 100644 --- a/drivers/staging/media/av7110/av7110_av.h +++ b/drivers/staging/media/av7110/av7110_av.h @@ -15,7 +15,7 @@ extern int av7110_set_volume(struct av7110 *av7110, unsigned int volleft, unsigned int volright); extern int av7110_av_stop(struct av7110 *av7110, int av); extern int av7110_av_start_record(struct av7110 *av7110, int av, - struct dvb_demux_feed *dvbdmxfeed); + struct dvb_demux_feed *dvbdmxfeed); extern int av7110_av_start_play(struct av7110 *av7110, int av); extern void dvb_video_add_event(struct av7110 *av7110, struct video_event *event); diff --git a/drivers/staging/media/av7110/av7110_ca.c b/drivers/staging/media/av7110/av7110_ca.c index 93b888c70..682204a6f 100644 --- a/drivers/staging/media/av7110/av7110_ca.c +++ b/drivers/staging/media/av7110/av7110_ca.c @@ -232,7 +232,7 @@ static int dvb_ca_ioctl(struct file *file, unsigned int cmd, void *parg) { struct dvb_device *dvbdev = file->private_data; struct av7110 *av7110 = dvbdev->priv; - unsigned long arg = (unsigned long) parg; + unsigned long arg = (unsigned long)parg; int ret = 0; dprintk(8, "av7110:%p\n",av7110); @@ -298,11 +298,11 @@ static int dvb_ca_ioctl(struct file *file, unsigned int cmd, void *parg) return -EINVAL; } av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetDescr, 5, - (descr->index<<8)|descr->parity, - (descr->cw[0]<<8)|descr->cw[1], - (descr->cw[2]<<8)|descr->cw[3], - (descr->cw[4]<<8)|descr->cw[5], - (descr->cw[6]<<8)|descr->cw[7]); + (descr->index << 8) | descr->parity, + (descr->cw[0] << 8) | descr->cw[1], + (descr->cw[2] << 8) | descr->cw[3], + (descr->cw[4] << 8) | descr->cw[5], + (descr->cw[6] << 8) | descr->cw[7]); break; } diff --git a/drivers/staging/media/av7110/av7110_hw.c b/drivers/staging/media/av7110/av7110_hw.c index d3aa524f6..ef4090fb1 100644 --- a/drivers/staging/media/av7110/av7110_hw.c +++ b/drivers/staging/media/av7110/av7110_hw.c @@ -410,14 +410,14 @@ static int __av7110_send_fw_cmd(struct av7110 *av7110, u16 *buf, int length) } for (i = 2; i < length; i++) - wdebi(av7110, DEBINOSWAP, COMMAND + 2 * i, (u32) buf[i], 2); + wdebi(av7110, DEBINOSWAP, COMMAND + 2 * i, (u32)buf[i], 2); if (length) - wdebi(av7110, DEBINOSWAP, COMMAND + 2, (u32) buf[1], 2); + wdebi(av7110, DEBINOSWAP, COMMAND + 2, (u32)buf[1], 2); else wdebi(av7110, DEBINOSWAP, COMMAND + 2, 0, 2); - wdebi(av7110, DEBINOSWAP, COMMAND, (u32) buf[0], 2); + wdebi(av7110, DEBINOSWAP, COMMAND, (u32)buf[0], 2); if (FW_VERSION(av7110->arm_app) <= 0x261f) wdebi(av7110, DEBINOSWAP, COM_IF_LOCK, 0x0000, 2); @@ -685,14 +685,14 @@ static inline int SetColorBlend(struct av7110 *av7110, u8 windownr) } static inline int SetBlend_(struct av7110 *av7110, u8 windownr, - enum av7110_osd_palette_type colordepth, u16 index, u8 blending) + enum av7110_osd_palette_type colordepth, u16 index, u8 blending) { return av7110_fw_cmd(av7110, COMTYPE_OSD, SetBlend, 4, windownr, colordepth, index, blending); } static inline int SetColor_(struct av7110 *av7110, u8 windownr, - enum av7110_osd_palette_type colordepth, u16 index, u16 colorhi, u16 colorlo) + enum av7110_osd_palette_type colordepth, u16 index, u16 colorhi, u16 colorlo) { return av7110_fw_cmd(av7110, COMTYPE_OSD, SetColor, 5, windownr, colordepth, index, colorhi, colorlo); @@ -832,7 +832,7 @@ static osd_raw_window_t bpp2bit[8] = { static inline int WaitUntilBmpLoaded(struct av7110 *av7110) { int ret = wait_event_timeout(av7110->bmpq, - av7110->bmp_state != BMP_LOADING, 10*HZ); + av7110->bmp_state != BMP_LOADING, 10 * HZ); if (ret == 0) { printk("dvb-ttpci: warning: timeout waiting in LoadBitmap: %d, %d\n", ret, av7110->bmp_state); @@ -1046,7 +1046,7 @@ int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc) case OSD_Open: av7110->osdbpp[av7110->osdwin] = (dc->color - 1) & 7; ret = CreateOSDWindow(av7110, av7110->osdwin, - bpp2bit[av7110->osdbpp[av7110->osdwin]], + bpp2bit[av7110->osdbpp[av7110->osdwin]], dc->x1 - dc->x0 + 1, dc->y1 - dc->y0 + 1); if (ret) break; @@ -1076,7 +1076,7 @@ int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc) if (FW_VERSION(av7110->arm_app) >= 0x2618) ret = OSDSetPalette(av7110, dc->data, dc->color, dc->x0); else { - int i, len = dc->x0-dc->color+1; + int i, len = dc->x0 - dc->color + 1; u8 __user *colors = (u8 __user *)dc->data; u8 r, g = 0, b = 0, blend = 0; @@ -1097,7 +1097,7 @@ int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc) break; case OSD_SetPixel: ret = DrawLine(av7110, av7110->osdwin, - dc->x0, dc->y0, 0, 0, dc->color); + dc->x0, dc->y0, 0, 0, dc->color); break; case OSD_SetRow: dc->y1 = dc->y0; @@ -1107,15 +1107,15 @@ int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc) break; case OSD_FillRow: ret = DrawBlock(av7110, av7110->osdwin, dc->x0, dc->y0, - dc->x1-dc->x0+1, dc->y1, dc->color); + dc->x1 - dc->x0 + 1, dc->y1, dc->color); break; case OSD_FillBlock: ret = DrawBlock(av7110, av7110->osdwin, dc->x0, dc->y0, - dc->x1 - dc->x0 + 1, dc->y1 - dc->y0 + 1, dc->color); + dc->x1 - dc->x0 + 1, dc->y1 - dc->y0 + 1, dc->color); break; case OSD_Line: ret = DrawLine(av7110, av7110->osdwin, - dc->x0, dc->y0, dc->x1 - dc->x0, dc->y1 - dc->y0, dc->color); + dc->x0, dc->y0, dc->x1 - dc->x0, dc->y1 - dc->y0, dc->color); break; case OSD_Text: { @@ -1129,7 +1129,7 @@ int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc) if (dc->x1 > 3) dc->x1 = 3; ret = SetFont(av7110, av7110->osdwin, dc->x1, - (u16) (dc->color & 0xffff), (u16) (dc->color >> 16)); + (u16)(dc->color & 0xffff), (u16)(dc->color >> 16)); if (!ret) ret = FlushText(av7110); if (!ret) @@ -1159,7 +1159,7 @@ int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc) else av7110->osdbpp[av7110->osdwin] = 0; ret = CreateOSDWindow(av7110, av7110->osdwin, (osd_raw_window_t)dc->color, - dc->x1 - dc->x0 + 1, dc->y1 - dc->y0 + 1); + dc->x1 - dc->x0 + 1, dc->y1 - dc->y0 + 1); if (ret) break; if (!dc->data) { diff --git a/drivers/staging/media/av7110/av7110_hw.h b/drivers/staging/media/av7110/av7110_hw.h index 39488c2fc..3d0afae7f 100644 --- a/drivers/staging/media/av7110/av7110_hw.h +++ b/drivers/staging/media/av7110/av7110_hw.h @@ -11,7 +11,7 @@ #define DEBISWAP 0x002e0000 #define ARM_WAIT_FREE (HZ) -#define ARM_WAIT_SHAKE (HZ/5) +#define ARM_WAIT_SHAKE (HZ / 5) #define ARM_WAIT_OSD (HZ) enum av7110_bootstate { @@ -311,13 +311,13 @@ enum av7110_command_type { #define DATA_BUFF0_BASE (DPRAM_BASE + 0x200) #define DATA_BUFF0_SIZE 0x0800 -#define DATA_BUFF1_BASE (DATA_BUFF0_BASE+DATA_BUFF0_SIZE) +#define DATA_BUFF1_BASE (DATA_BUFF0_BASE + DATA_BUFF0_SIZE) #define DATA_BUFF1_SIZE 0x0800 -#define DATA_BUFF2_BASE (DATA_BUFF1_BASE+DATA_BUFF1_SIZE) +#define DATA_BUFF2_BASE (DATA_BUFF1_BASE + DATA_BUFF1_SIZE) #define DATA_BUFF2_SIZE 0x0800 -#define DATA_BUFF3_BASE (DATA_BUFF2_BASE+DATA_BUFF2_SIZE) +#define DATA_BUFF3_BASE (DATA_BUFF2_BASE + DATA_BUFF2_SIZE) #define DATA_BUFF3_SIZE 0x0400 #define Reserved (DPRAM_BASE + 0x1E00) @@ -393,7 +393,7 @@ static inline u32 irdebi(struct av7110 *av7110, u32 config, int addr, u32 val, u res = av7110_debiread(av7110, config, addr, count); if (count <= 4) - memcpy(av7110->debi_virt, (char *) &res, count); + memcpy(av7110->debi_virt, (char *)&res, count); return res; } @@ -456,14 +456,14 @@ static inline int av7710_set_video_mode(struct av7110 *av7110, int mode) static inline int vidcom(struct av7110 *av7110, u32 com, u32 arg) { return av7110_fw_cmd(av7110, COMTYPE_MISC, AV7110_FW_VIDEO_COMMAND, 4, - (com>>16), (com&0xffff), - (arg>>16), (arg&0xffff)); + (com >> 16), (com & 0xffff), + (arg >> 16), (arg & 0xffff)); } static inline int audcom(struct av7110 *av7110, u32 com) { return av7110_fw_cmd(av7110, COMTYPE_MISC, AV7110_FW_AUDIO_COMMAND, 2, - (com>>16), (com&0xffff)); + (com >> 16), (com & 0xffff)); } static inline int Set22K(struct av7110 *av7110, int state) diff --git a/drivers/staging/media/av7110/av7110_ipack.c b/drivers/staging/media/av7110/av7110_ipack.c index ac00bff44..9fe18f470 100644 --- a/drivers/staging/media/av7110/av7110_ipack.c +++ b/drivers/staging/media/av7110/av7110_ipack.c @@ -59,7 +59,7 @@ static void send_ipack(struct ipack *p) streamid = p->buf[off]; if ((streamid & 0xf8) == 0x80) { ai.off = 0; - ac3_off = ((p->buf[off + 2] << 8)| + ac3_off = ((p->buf[off + 2] << 8) | p->buf[off + 3]); if (ac3_off < p->count) f = dvb_filter_get_ac3info(p->buf + off + 3 + ac3_off, @@ -124,12 +124,12 @@ static void write_ipack(struct ipack *p, const u8 *data, int count) } if (p->count + count < p->size) { - memcpy(p->buf+p->count, data, count); + memcpy(p->buf + p->count, data, count); p->count += count; } else { int rest = p->size - p->count; - memcpy(p->buf+p->count, data, rest); + memcpy(p->buf + p->count, data, rest); p->count += rest; send_ipack(p); if (count - rest > 0) @@ -191,7 +191,7 @@ int av7110_ipack_instant_repack(const u8 *buf, int count, struct ipack *p) break; case 4: - if (count-c > 1) { + if (count - c > 1) { p->plen[0] = buf[c]; c++; p->plen[1] = buf[c]; diff --git a/drivers/staging/media/av7110/av7110_v4l.c b/drivers/staging/media/av7110/av7110_v4l.c index 202a05561..3090efb00 100644 --- a/drivers/staging/media/av7110/av7110_v4l.c +++ b/drivers/staging/media/av7110/av7110_v4l.c @@ -86,7 +86,7 @@ static struct v4l2_input inputs[4] = { .type = V4L2_INPUT_TYPE_CAMERA, .audioset = 1, .tuner = 0, /* ignored */ - .std = V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, + .std = V4L2_STD_PAL_BG | V4L2_STD_NTSC_M, .status = 0, .capabilities = V4L2_IN_CAP_STD, }, { @@ -95,7 +95,7 @@ static struct v4l2_input inputs[4] = { .type = V4L2_INPUT_TYPE_TUNER, .audioset = 1, .tuner = 0, - .std = V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, + .std = V4L2_STD_PAL_BG | V4L2_STD_NTSC_M, .status = 0, .capabilities = V4L2_IN_CAP_STD, }, { @@ -104,7 +104,7 @@ static struct v4l2_input inputs[4] = { .type = V4L2_INPUT_TYPE_CAMERA, .audioset = 0, .tuner = 0, - .std = V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, + .std = V4L2_STD_PAL_BG | V4L2_STD_NTSC_M, .status = 0, .capabilities = V4L2_IN_CAP_STD, }, { @@ -113,7 +113,7 @@ static struct v4l2_input inputs[4] = { .type = V4L2_INPUT_TYPE_CAMERA, .audioset = 0, .tuner = 0, - .std = V4L2_STD_PAL_BG|V4L2_STD_NTSC_M, + .std = V4L2_STD_PAL_BG | V4L2_STD_NTSC_M, .status = 0, .capabilities = V4L2_IN_CAP_STD, } @@ -529,7 +529,7 @@ static int vidioc_s_audio(struct file *file, void *fh, const struct v4l2_audio * } static int vidioc_g_sliced_vbi_cap(struct file *file, void *fh, - struct v4l2_sliced_vbi_cap *cap) + struct v4l2_sliced_vbi_cap *cap) { struct saa7146_dev *dev = video_drvdata(file); struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; @@ -545,7 +545,7 @@ static int vidioc_g_sliced_vbi_cap(struct file *file, void *fh, } static int vidioc_g_fmt_sliced_vbi_out(struct file *file, void *fh, - struct v4l2_format *f) + struct v4l2_format *f) { struct saa7146_dev *dev = video_drvdata(file); struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; @@ -584,7 +584,7 @@ static int vidioc_try_fmt_sliced_vbi_out(struct file *file, void *fh, } static int vidioc_s_fmt_sliced_vbi_out(struct file *file, void *fh, - struct v4l2_format *f) + struct v4l2_format *f) { struct saa7146_dev *dev = video_drvdata(file); struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; diff --git a/drivers/staging/media/av7110/dvb_filter.c b/drivers/staging/media/av7110/dvb_filter.c index 4c41682ff..515b4288b 100644 --- a/drivers/staging/media/av7110/dvb_filter.c +++ b/drivers/staging/media/av7110/dvb_filter.c @@ -29,7 +29,7 @@ int dvb_filter_get_ac3info(u8 *mbuf, int count, struct dvb_audio_info *ai, int p int fr = 0; while (!found && c < count) { - u8 *b = mbuf+c; + u8 *b = mbuf + c; if (b[0] == 0x0b && b[1] == 0x77) found = 1; @@ -48,17 +48,17 @@ int dvb_filter_get_ac3info(u8 *mbuf, int count, struct dvb_audio_info *ai, int p return -1; ai->layer = 0; // 0 for AC3 - headr = mbuf+c+2; + headr = mbuf + c + 2; - frame = (headr[2]&0x3f); - ai->bit_rate = ac3_bitrates[frame >> 1]*1000; + frame = (headr[2] & 0x3f); + ai->bit_rate = ac3_bitrates[frame >> 1] * 1000; if (pr) printk(KERN_CONT " BRate: %d kb/s", (int) ai->bit_rate/1000); ai->frequency = (headr[2] & 0xc0) >> 6; fr = (headr[2] & 0xc0) >> 6; - ai->frequency = freq[fr]*100; + ai->frequency = freq[fr] * 100; if (pr) printk(KERN_CONT " Freq: %d Hz\n", (int) ai->frequency); @@ -99,7 +99,7 @@ int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes, buf[1] &= ~0x40; while (len >= 184) { buf[3] = 0x10 | ((p2ts->cc++) & 0x0f); - memcpy(buf+4, pes, 184); + memcpy(buf + 4, pes, 184); if ((ret=p2ts->cb(p2ts->priv, buf))) return ret; len -= 184; pes += 184; @@ -111,10 +111,10 @@ int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes, rest = 183 - len; if (rest) { buf[5] = 0x00; - if (rest-1) - memset(buf+6, 0xff, rest-1); + if (rest - 1) + memset(buf + 6, 0xff, rest - 1); } buf[4] = rest; - memcpy(buf+5+rest, pes, len); + memcpy(buf + 5 + rest, pes, len); return p2ts->cb(p2ts->priv, buf); } diff --git a/drivers/staging/media/av7110/dvb_filter.h b/drivers/staging/media/av7110/dvb_filter.h index 43a36d653..471b53058 100644 --- a/drivers/staging/media/av7110/dvb_filter.h +++ b/drivers/staging/media/av7110/dvb_filter.h @@ -21,7 +21,7 @@ #include <media/demux.h> -typedef int (dvb_filter_pes2ts_cb_t) (void *, unsigned char *); +typedef int (dvb_filter_pes2ts_cb_t)(void *, unsigned char *); struct dvb_filter_pes2ts { unsigned char buf[188]; @@ -118,7 +118,7 @@ int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes, #define SEAM_SPLICE 0x20 #define MAX_PLENGTH 0xFFFF -#define MMAX_PLENGTH (256*MAX_PLENGTH) +#define MMAX_PLENGTH (256 * MAX_PLENGTH) #ifndef IPACKS #define IPACKS 2048 -- 2.34.0