don't break long lines on strings
Subsystems (39)
v2 cover don't break long lines on strings
There are lots of drivers on media that breaks long line strings in order to fit into 80 columns. This was an usual practice to make checkpatch happy. However, it makes harder to detect where the strings are with grep.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, this patch series re-group those strings, violating the 80 columns limit by purpose.
Later patches will rely on this series to identify the strings that require KERN_CONT (or that should be converted to hexadecimal dumps).
Originally, I coded this as a single patch, but I opted to split it per directory, as it makes easy for people to review.
---
Version 2:
Thanks all for the review on version 1! I addressed all the issues pointed by the public revices I received, and added the acks.
Someone asked me in priv about removing v4l2-ioctl.c from this series, as it has long debug messages. I slept on this question. At the end, I opted to keep it. The rationale is that it is a core file, and people sometimes use the core as a coding style example.
Mauro Carvalho Chehab (58):
b2c2: don't break long lines
cx25840: don't break long lines
smiapp: don't break long lines
soc_camera: don't break long lines
b2c2: don't break long lines
bt8xx: don't break long lines
cx18: don't break long lines
cx23885: don't break long lines
cx88: don't break long lines
ddbridge: don't break long lines
dm1105: don't break long lines
ivtv: don't break long lines
meye: don't break long lines
pt1: don't break long lines
saa7134: don't break long lines
saa7164: don't break long lines
solo6x10: don't break long lines
ttpci: don't break long lines
tw68: don't break long lines
davinci: don't break long lines
exynos4-is: don't break long lines
marvell-ccic: don't break long lines
omap: don't break long lines
omap3isp: don't break long lines
s5p-mfc: don't break long lines
c8sectpfe: don't break long lines
ti-vpe: don't break long lines
si470x: don't break long lines
si4713: don't break long lines
wl128x: don't break long lines
au0828: don't break long lines
b2c2: don't break long lines
cpia2: don't break long lines
cx231xx: don't break long lines
dvb-usb: don't break long lines
dvb-usb-v2: don't break long lines
em28xx: don't break long lines
gspca: don't break long lines
hdpvr: don't break long lines
pvrusb2: don't break long lines
pwc: don't break long lines
siano: don't break long lines
stkwebcam: don't break long lines
tm6000: don't break long lines
ttusb-budget: don't break long lines
ttusb-dec: don't break long lines
usbvision: don't break long lines
uvc: don't break long lines
zr364xx: don't break long lines
v4l2-core: don't break long lines
dvb-frontends: don't break long lines
common: don't break long lines
firewire: don't break long lines
i2c: don't break long lines
platform: don't break long lines
radio: don't break long lines
rc: don't break long lines
tuners: don't break long lines
drivers/media/common/b2c2/flexcop-eeprom.c | 3 +- drivers/media/common/b2c2/flexcop-i2c.c | 4 +- drivers/media/common/b2c2/flexcop-misc.c | 9 +- drivers/media/common/b2c2/flexcop.c | 3 +- drivers/media/common/tveeprom.c | 3 +- drivers/media/dvb-frontends/au8522_common.c | 4 +- drivers/media/dvb-frontends/cx24110.c | 4 +- drivers/media/dvb-frontends/cx24113.c | 4 +- drivers/media/dvb-frontends/cx24116.c | 8 +- drivers/media/dvb-frontends/cx24117.c | 4 +- drivers/media/dvb-frontends/cx24123.c | 4 +- drivers/media/dvb-frontends/ds3000.c | 15 +- drivers/media/dvb-frontends/lgdt330x.c | 3 +- drivers/media/dvb-frontends/m88rs2000.c | 7 +- drivers/media/dvb-frontends/mt312.c | 7 +- drivers/media/dvb-frontends/nxt200x.c | 11 +- drivers/media/dvb-frontends/or51132.c | 6 +- drivers/media/dvb-frontends/or51211.c | 3 +- drivers/media/dvb-frontends/s5h1409.c | 4 +- drivers/media/dvb-frontends/s5h1411.c | 4 +- drivers/media/dvb-frontends/s5h1432.c | 4 +- drivers/media/dvb-frontends/s921.c | 4 +- drivers/media/dvb-frontends/si21xx.c | 8 +- drivers/media/dvb-frontends/sp887x.c | 3 +- drivers/media/dvb-frontends/stv0288.c | 7 +- drivers/media/dvb-frontends/stv0297.c | 4 +- drivers/media/dvb-frontends/stv0299.c | 7 +- drivers/media/dvb-frontends/stv0900_sw.c | 3 +- drivers/media/dvb-frontends/tda10021.c | 3 +- drivers/media/dvb-frontends/tda10023.c | 6 +- drivers/media/dvb-frontends/tda10048.c | 12 +- drivers/media/dvb-frontends/ves1820.c | 8 +- drivers/media/dvb-frontends/zl10036.c | 4 +- drivers/media/dvb-frontends/zl10039.c | 3 +- drivers/media/firewire/firedtv-rc.c | 4 +- drivers/media/i2c/as3645a.c | 13 +- drivers/media/i2c/cx25840/cx25840-core.c | 11 +- drivers/media/i2c/cx25840/cx25840-ir.c | 7 +- drivers/media/i2c/msp3400-kthreads.c | 4 +- drivers/media/i2c/mt9m032.c | 5 +- drivers/media/i2c/mt9p031.c | 5 +- drivers/media/i2c/saa7115.c | 18 +- drivers/media/i2c/saa717x.c | 4 +- drivers/media/i2c/smiapp/smiapp-regs.c | 4 +- drivers/media/i2c/soc_camera/ov772x.c | 3 +- drivers/media/i2c/soc_camera/ov9740.c | 3 +- drivers/media/i2c/soc_camera/tw9910.c | 3 +- drivers/media/i2c/tvp5150.c | 14 +- drivers/media/i2c/tvp7002.c | 6 +- drivers/media/i2c/upd64083.c | 4 +- drivers/media/pci/b2c2/flexcop-dma.c | 6 +- drivers/media/pci/b2c2/flexcop-pci.c | 7 +- drivers/media/pci/bt8xx/bttv-cards.c | 9 +- drivers/media/pci/bt8xx/bttv-driver.c | 6 +- drivers/media/pci/bt8xx/bttv-i2c.c | 6 +- drivers/media/pci/bt8xx/bttv-input.c | 4 +- drivers/media/pci/cx18/cx18-alsa-main.c | 8 +- drivers/media/pci/cx18/cx18-av-core.c | 17 +- drivers/media/pci/cx18/cx18-av-firmware.c | 3 +- drivers/media/pci/cx18/cx18-controls.c | 9 +- drivers/media/pci/cx18/cx18-driver.c | 35 ++- drivers/media/pci/cx18/cx18-dvb.c | 6 +- drivers/media/pci/cx18/cx18-fileops.c | 6 +- drivers/media/pci/cx18/cx18-ioctl.c | 6 +- drivers/media/pci/cx18/cx18-irq.c | 4 +- drivers/media/pci/cx18/cx18-mailbox.c | 39 ++- drivers/media/pci/cx18/cx18-queue.c | 8 +- drivers/media/pci/cx18/cx18-streams.c | 7 +- drivers/media/pci/cx23885/cimax2.c | 5 +- drivers/media/pci/cx23885/cx23885-417.c | 17 +- drivers/media/pci/cx23885/cx23885-alsa.c | 15 +- drivers/media/pci/cx23885/cx23885-cards.c | 8 +- drivers/media/pci/cx23885/cx23885-core.c | 15 +- drivers/media/pci/cx23885/cx23885-dvb.c | 3 +- drivers/media/pci/cx23885/cx23885-video.c | 3 +- drivers/media/pci/cx23885/cx23888-ir.c | 7 +- drivers/media/pci/cx88/cx88-alsa.c | 15 +- drivers/media/pci/cx88/cx88-cards.c | 14 +- drivers/media/pci/cx88/cx88-dsp.c | 12 +- drivers/media/pci/cx88/cx88-dvb.c | 6 +- drivers/media/pci/cx88/cx88-i2c.c | 3 +- drivers/media/pci/cx88/cx88-mpeg.c | 15 +- drivers/media/pci/cx88/cx88-tvaudio.c | 6 +- drivers/media/pci/cx88/cx88-video.c | 4 +- drivers/media/pci/ddbridge/ddbridge-core.c | 6 +- drivers/media/pci/dm1105/dm1105.c | 3 +- drivers/media/pci/ivtv/ivtv-alsa-main.c | 12 +- drivers/media/pci/ivtv/ivtv-driver.c | 37 +-- drivers/media/pci/ivtv/ivtv-firmware.c | 4 +- drivers/media/pci/ivtv/ivtv-yuv.c | 8 +- drivers/media/pci/ivtv/ivtvfb.c | 3 +- drivers/media/pci/meye/meye.c | 12 +- drivers/media/pci/pt1/pt1.c | 7 +- drivers/media/pci/saa7134/saa7134-alsa.c | 3 +- drivers/media/pci/saa7134/saa7134-cards.c | 8 +- drivers/media/pci/saa7134/saa7134-core.c | 39 ++- drivers/media/pci/saa7134/saa7134-dvb.c | 32 +-- drivers/media/pci/saa7134/saa7134-input.c | 13 +- drivers/media/pci/saa7164/saa7164-buffer.c | 3 +- drivers/media/pci/saa7164/saa7164-bus.c | 4 +- drivers/media/pci/saa7164/saa7164-cards.c | 4 +- drivers/media/pci/saa7164/saa7164-cmd.c | 12 +- drivers/media/pci/saa7164/saa7164-core.c | 66 +++-- drivers/media/pci/saa7164/saa7164-dvb.c | 34 ++- drivers/media/pci/saa7164/saa7164-encoder.c | 18 +- drivers/media/pci/saa7164/saa7164-fw.c | 10 +- drivers/media/pci/saa7164/saa7164-vbi.c | 14 +- drivers/media/pci/solo6x10/solo6x10-v4l2.c | 4 +- drivers/media/pci/ttpci/av7110.c | 29 +-- drivers/media/pci/ttpci/av7110_hw.c | 12 +- drivers/media/pci/ttpci/budget-av.c | 3 +- drivers/media/pci/ttpci/budget-ci.c | 4 +- drivers/media/pci/ttpci/budget-patch.c | 3 +- drivers/media/pci/ttpci/budget.c | 3 +- drivers/media/pci/ttpci/ttpci-eeprom.c | 3 +- drivers/media/pci/tw68/tw68-video.c | 16 +- drivers/media/platform/davinci/dm355_ccdc.c | 4 +- drivers/media/platform/davinci/dm644x_ccdc.c | 4 +- drivers/media/platform/davinci/vpbe.c | 15 +- drivers/media/platform/davinci/vpfe_capture.c | 6 +- drivers/media/platform/davinci/vpif_capture.c | 9 +- drivers/media/platform/davinci/vpif_display.c | 9 +- drivers/media/platform/davinci/vpss.c | 7 +- drivers/media/platform/exynos4-is/media-dev.c | 3 +- drivers/media/platform/marvell-ccic/mcam-core.c | 26 +- drivers/media/platform/mx2_emmaprp.c | 10 +- drivers/media/platform/omap/omap_vout.c | 24 +- drivers/media/platform/omap/omap_vout_vrfb.c | 5 +- drivers/media/platform/omap3isp/isp.c | 4 +- drivers/media/platform/omap3isp/ispccdc.c | 9 +- drivers/media/platform/omap3isp/ispcsi2.c | 13 +- drivers/media/platform/omap3isp/ispcsiphy.c | 4 +- drivers/media/platform/omap3isp/isph3a_aewb.c | 8 +- drivers/media/platform/omap3isp/isph3a_af.c | 8 +- drivers/media/platform/omap3isp/ispstat.c | 58 +++-- drivers/media/platform/pxa_camera.c | 6 +- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 13 +- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | 7 +- .../media/platform/sti/c8sectpfe/c8sectpfe-core.c | 16 +- drivers/media/platform/ti-vpe/vpdma.c | 22 +- drivers/media/platform/ti-vpe/vpe.c | 3 +- drivers/media/platform/via-camera.c | 7 +- drivers/media/radio/radio-gemtek.c | 8 +- drivers/media/radio/radio-wl1273.c | 3 +- drivers/media/radio/si470x/radio-si470x-i2c.c | 7 +- drivers/media/radio/si470x/radio-si470x-usb.c | 15 +- drivers/media/radio/si4713/si4713.c | 13 +- drivers/media/radio/wl128x/fmdrv_common.c | 30 +-- drivers/media/radio/wl128x/fmdrv_rx.c | 8 +- drivers/media/rc/ati_remote.c | 3 +- drivers/media/rc/ene_ir.c | 3 +- drivers/media/rc/imon.c | 48 ++-- drivers/media/rc/ite-cir.c | 9 +- drivers/media/rc/mceusb.c | 4 +- drivers/media/rc/rc-main.c | 3 +- drivers/media/rc/redrat3.c | 18 +- drivers/media/rc/streamzap.c | 11 +- drivers/media/rc/winbond-cir.c | 9 +- drivers/media/tuners/fc0011.c | 7 +- drivers/media/tuners/mc44s803.c | 4 +- drivers/media/tuners/tda18271-common.c | 4 +- drivers/media/tuners/tda18271-fe.c | 3 +- drivers/media/tuners/tda18271-maps.c | 6 +- drivers/media/tuners/tda8290.c | 4 +- drivers/media/tuners/tea5761.c | 6 +- drivers/media/tuners/tuner-simple.c | 45 ++-- drivers/media/tuners/xc4000.c | 25 +- drivers/media/usb/au0828/au0828-video.c | 3 +- drivers/media/usb/b2c2/flexcop-usb.c | 11 +- drivers/media/usb/cpia2/cpia2_usb.c | 4 +- drivers/media/usb/cx231xx/cx231xx-core.c | 10 +- drivers/media/usb/cx231xx/cx231xx-dvb.c | 4 +- drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c | 12 +- drivers/media/usb/dvb-usb-v2/mxl111sf.c | 10 +- drivers/media/usb/dvb-usb/cinergyT2-core.c | 6 +- drivers/media/usb/dvb-usb/cinergyT2-fe.c | 4 +- drivers/media/usb/dvb-usb/dib0700_core.c | 5 +- drivers/media/usb/dvb-usb/dib0700_devices.c | 3 +- drivers/media/usb/dvb-usb/dvb-usb-dvb.c | 3 +- drivers/media/usb/dvb-usb/dvb-usb-firmware.c | 6 +- drivers/media/usb/dvb-usb/dw2102.c | 10 +- drivers/media/usb/dvb-usb/friio.c | 4 +- drivers/media/usb/dvb-usb/gp8psk.c | 3 +- drivers/media/usb/dvb-usb/opera1.c | 3 +- drivers/media/usb/dvb-usb/pctv452e.c | 3 +- drivers/media/usb/dvb-usb/technisat-usb2.c | 3 +- drivers/media/usb/em28xx/em28xx-cards.c | 3 +- drivers/media/usb/gspca/gspca.c | 3 +- drivers/media/usb/gspca/m5602/m5602_core.c | 11 +- drivers/media/usb/gspca/mr97310a.c | 3 +- drivers/media/usb/gspca/ov519.c | 3 +- drivers/media/usb/gspca/pac207.c | 4 +- drivers/media/usb/gspca/pac7302.c | 3 +- drivers/media/usb/gspca/sn9c20x.c | 6 +- drivers/media/usb/gspca/sq905.c | 3 +- drivers/media/usb/gspca/sq905c.c | 4 +- drivers/media/usb/gspca/stv06xx/stv06xx.c | 9 +- drivers/media/usb/gspca/sunplus.c | 3 +- drivers/media/usb/gspca/topro.c | 3 +- drivers/media/usb/gspca/zc3xx.c | 3 +- drivers/media/usb/hdpvr/hdpvr-core.c | 9 +- drivers/media/usb/hdpvr/hdpvr-i2c.c | 7 +- drivers/media/usb/hdpvr/hdpvr-video.c | 4 +- drivers/media/usb/pvrusb2/pvrusb2-audio.c | 4 +- drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c | 4 +- drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c | 4 +- drivers/media/usb/pvrusb2/pvrusb2-debugifc.c | 4 +- drivers/media/usb/pvrusb2/pvrusb2-eeprom.c | 7 +- drivers/media/usb/pvrusb2/pvrusb2-encoder.c | 29 +-- drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 181 +++++--------- drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 33 +-- drivers/media/usb/pvrusb2/pvrusb2-io.c | 35 +-- drivers/media/usb/pvrusb2/pvrusb2-ioread.c | 36 +-- drivers/media/usb/pvrusb2/pvrusb2-std.c | 3 +- drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 10 +- drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c | 4 +- drivers/media/usb/pvrusb2/pvrusb2-wm8775.c | 3 +- drivers/media/usb/pwc/pwc-if.c | 4 +- drivers/media/usb/pwc/pwc-v4l.c | 6 +- drivers/media/usb/siano/smsusb.c | 4 +- drivers/media/usb/stkwebcam/stk-sensor.c | 4 +- drivers/media/usb/stkwebcam/stk-webcam.c | 3 +- drivers/media/usb/tm6000/tm6000-alsa.c | 4 +- drivers/media/usb/tm6000/tm6000-core.c | 14 +- drivers/media/usb/tm6000/tm6000-dvb.c | 16 +- drivers/media/usb/tm6000/tm6000-i2c.c | 3 +- drivers/media/usb/tm6000/tm6000-stds.c | 3 +- drivers/media/usb/tm6000/tm6000-video.c | 18 +- drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c | 3 +- drivers/media/usb/ttusb-dec/ttusb_dec.c | 20 +- drivers/media/usb/usbvision/usbvision-core.c | 20 +- drivers/media/usb/usbvision/usbvision-video.c | 4 +- drivers/media/usb/uvc/uvc_ctrl.c | 36 +-- drivers/media/usb/uvc/uvc_debugfs.c | 5 +- drivers/media/usb/uvc/uvc_driver.c | 278 +++++++++++---------- drivers/media/usb/uvc/uvc_entity.c | 10 +- drivers/media/usb/uvc/uvc_isight.c | 12 +- drivers/media/usb/uvc/uvc_status.c | 23 +- drivers/media/usb/uvc/uvc_v4l2.c | 11 +- drivers/media/usb/uvc/uvc_video.c | 103 ++++---- drivers/media/usb/zr364xx/zr364xx.c | 6 +- drivers/media/v4l2-core/v4l2-ioctl.c | 91 ++----- drivers/media/v4l2-core/videobuf-core.c | 3 +- drivers/media/v4l2-core/videobuf2-core.c | 25 +- drivers/media/v4l2-core/videobuf2-v4l2.c | 10 +- drivers/media/v4l2-core/videobuf2-vmalloc.c | 3 +- 246 files changed, 1232 insertions(+), 1708 deletions(-)
Signature · 1 line
2.7.4
PATCH v2 1/58 b2c2: don't break long lines
Due to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/common/b2c2/flexcop-eeprom.c | 3 +-- drivers/media/common/b2c2/flexcop-i2c.c | 4 ++-- drivers/media/common/b2c2/flexcop-misc.c | 9 +++------ drivers/media/common/b2c2/flexcop.c | 3 +-- 4 files changed, 7 insertions(+), 12 deletions(-)
drivers/media/common/b2c2/flexcop-eeprom.c +1 -2
@@ -136,8 +136,7 @@ int flexcop_eeprom_check_mac_addr(struct flexcop_device *fc, int extended)if ((ret =flexcop_eeprom_lrc_read (fc,0x3f8 ,buf,8 ,4 )) ==0 ) {if (extended !=0 ) { -err ("TODO: extended (EUI64) MAC addresses aren't " -"completely supported yet" ); +err ("TODO: extended (EUI64) MAC addresses aren't completely supported yet" ); ret = -EINVAL ; }else memcpy (fc->dvb_adapter.proposed_mac,buf,6 );
drivers/media/common/b2c2/flexcop-i2c.c +2 -2
@@ -33,8 +33,8 @@ static int flexcop_i2c_operation(struct flexcop_device *fc,return -EREMOTEIO ; } } -deb_i2c ("tried %d times i2c operation, " -"never finished or too many ack errors.\n" , i); +deb_i2c ("tried %d times i2c operation, never finished or too many ack errors.\n" , + i);return -EREMOTEIO ; }
drivers/media/common/b2c2/flexcop-misc.c +3 -6
@@ -23,18 +23,15 @@ void flexcop_determine_revision(struct flexcop_device *fc) fc->rev =FLEXCOP_III ;break ;default : -err ("unknown FlexCop Revision: %x. Please report this to " -"[email protected]." , +err ("unknown FlexCop Revision: %x. Please report this to [email protected]." , v.misc_204.Rev_N_sig_revision_hi);break ; }if ((fc->has_32_hw_pid_filter = v.misc_204.Rev_N_sig_caps)) -deb_info ("this FlexCop has " -"the additional 32 hardware pid filter.\n" ); +deb_info ("this FlexCop has the additional 32 hardware pid filter.\n" );else -deb_info ("this FlexCop has " -"the 6 basic main hardware pid filter.\n" ); +deb_info ("this FlexCop has the 6 basic main hardware pid filter.\n" );/* bus parts have to decide if hw pid filtering is used or not. */ }
drivers/media/common/b2c2/flexcop.c +1 -2
@@ -46,8 +46,7 @@ int b2c2_flexcop_debug;EXPORT_SYMBOL_GPL (b2c2_flexcop_debug);module_param_named (debug, b2c2_flexcop_debug, int,0644 );MODULE_PARM_DESC (debug, -"set debug level (1=info,2=tuner,4=i2c,8=ts," -"16=sram,32=reg (|-able))." +"set debug level (1=info,2=tuner,4=i2c,8=ts,16=sram,32=reg (|-able))." DEBSTATUS );#undef DEBSTATUS
Signature · 1 line
2.7.4
PATCH v2 2/58 cx25840: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/i2c/cx25840/cx25840-core.c | 11 +++-------- drivers/media/i2c/cx25840/cx25840-ir.c | 7 +++---- 2 files changed, 6 insertions(+), 12 deletions(-)
drivers/media/i2c/cx25840/cx25840-core.c +3 -8
@@ -873,10 +873,7 @@ void cx25840_std_setup(struct i2c_client *client)"Chroma sub-carrier freq = %d.%06d MHz\n" , fsc / 1000000, fsc % 1000000); -v4l_dbg (1 , cx25840_debug, client,"hblank %i, hactive %i, " -"vblank %i, vactive %i, vblank656 %i, src_dec %i, " -"burst 0x%02x, luma_lpf %i, uv_lpf %i, comb 0x%02x, " -"sc 0x%06x\n" , +v4l_dbg (1 , cx25840_debug, client,"hblank %i, hactive %i, vblank %i, vactive %i, vblank656 %i, src_dec %i, burst 0x%02x, luma_lpf %i, uv_lpf %i, comb 0x%02x, sc 0x%06x\n" , hblank, hactive, vblank, vactive, vblank656, src_decimation, burst, luma_lpf, uv_lpf, comb, sc); }
@@ -5169,11 +5166,9 @@ static int cx25840_probe(struct i2c_client *client, id =CX2310X_AV ; }else if ((device_id &0xff ) == (device_id >>8 )) {v4l_err (client, -"likely a confused/unresponsive cx2388[578] A/V decoder" -" found @ 0x%x (%s)\n" , +"likely a confused/unresponsive cx2388[578] A/V decoder found @ 0x%x (%s)\n" , client->addr <<1 , client->adapter->name); -v4l_err (client,"A method to reset it from the cx25840 driver" -" software is not known at this time\n" ); +v4l_err (client,"A method to reset it from the cx25840 driver software is not known at this time\n" );return -ENODEV ; }else {v4l_dbg (1 , cx25840_debug, client,"cx25840 not found\n" );
drivers/media/i2c/cx25840/cx25840-ir.c +3 -4
@@ -1113,8 +1113,8 @@ int cx25840_ir_log_status(struct v4l2_subdev *sd) j =0 ;break ; } -v4l2_info (sd,"\tNext carrier edge window: 16 clocks " -"-%1d/+%1d, %u to %u Hz\n" , i, j, +v4l2_info (sd,"\tNext carrier edge window: 16 clocks -%1d/+%1d, %u to %u Hz\n" , + i, j,clock_divider_to_freq (rxclk,16 + j),clock_divider_to_freq (rxclk,16 - i)); }
@@ -1124,8 +1124,7 @@ int cx25840_ir_log_status(struct v4l2_subdev *sd)v4l2_info (sd,"\tLow pass filter: %s\n" , filtr ?"enabled" :"disabled" );if (filtr) -v4l2_info (sd,"\tMin acceptable pulse width (LPF): %u us, " -"%u ns\n" , +v4l2_info (sd,"\tMin acceptable pulse width (LPF): %u us, %u ns\n" ,lpf_count_to_us (filtr),lpf_count_to_ns (filtr)); v4l2_info(sd, "\tPulse width timer timed-out: %s\n",
Signature · 1 line
2.7.4
PATCH v2 3/58 smiapp: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/i2c/smiapp/smiapp-regs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/i2c/smiapp/smiapp-regs.c +2 -2
@@ -268,8 +268,8 @@ int smiapp_write_no_quirk(struct smiapp_sensor *sensor, u32 reg, u32 val)if (r ==1 ) {if (retries)dev_err (&client->dev, -"sensor i2c stall encountered. " -"retries: %d\n" , retries); +"sensor i2c stall encountered. retries: %d\n" , + retries);return 0 ; }
Signature · 1 line
2.7.4
PATCH v2 4/58 soc_camera: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/i2c/soc_camera/ov772x.c | 3 +-- drivers/media/i2c/soc_camera/ov9740.c | 3 +-- drivers/media/i2c/soc_camera/tw9910.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-)
drivers/media/i2c/soc_camera/ov772x.c +1 -2
@@ -1064,8 +1064,7 @@ static int ov772x_probe(struct i2c_client *client,if (!i2c_check_functionality (adapter,I2C_FUNC_SMBUS_BYTE_DATA )) {dev_err (&adapter->dev, -"I2C-Adapter doesn't support " -"I2C_FUNC_SMBUS_BYTE_DATA\n" ); +"I2C-Adapter doesn't support I2C_FUNC_SMBUS_BYTE_DATA\n" );return -EIO ; }
drivers/media/i2c/soc_camera/ov9740.c +1 -2
@@ -881,8 +881,7 @@ static int ov9740_video_probe(struct i2c_client *client) goto done; } -dev_info (&client->dev,"ov9740 Model ID 0x%04x, Revision 0x%02x, " -"Manufacturer 0x%02x, SMIA Version 0x%02x\n" , +dev_info (&client->dev,"ov9740 Model ID 0x%04x, Revision 0x%02x, Manufacturer 0x%02x, SMIA Version 0x%02x\n" , priv->model, priv->revision, priv->manid, priv->smiaver); ret =v4l2_ctrl_handler_setup (&priv->hdl);
drivers/media/i2c/soc_camera/tw9910.c +1 -2
@@ -947,8 +947,7 @@ static int tw9910_probe(struct i2c_client *client,if (!i2c_check_functionality (adapter,I2C_FUNC_SMBUS_BYTE_DATA )) {dev_err (&client->dev, -"I2C-Adapter doesn't support " -"I2C_FUNC_SMBUS_BYTE_DATA\n" ); +"I2C-Adapter doesn't support I2C_FUNC_SMBUS_BYTE_DATA\n" );return -EIO ; }
Signature · 1 line
2.7.4
PATCH v2 5/58 b2c2: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/pci/b2c2/flexcop-dma.c | 6 ++---- drivers/media/pci/b2c2/flexcop-pci.c | 7 +++---- 2 files changed, 5 insertions(+), 8 deletions(-)
drivers/media/pci/b2c2/flexcop-dma.c +2 -4
@@ -57,8 +57,7 @@ int flexcop_dma_config(struct flexcop_device *fc, fc->write_ibi_reg (fc,dma2_014,v0x4); fc->write_ibi_reg (fc,dma2_01c,v0xc); }else { -err ("either DMA1 or DMA2 can be configured within one " -"flexcop_dma_config call." ); +err ("either DMA1 or DMA2 can be configured within one flexcop_dma_config call." );return -EINVAL ; }
@@ -82,8 +81,7 @@ int flexcop_dma_xfer_control(struct flexcop_device *fc, r0x0 = dma2_010; r0xc = dma2_01c; }else { -err ("either transfer DMA1 or DMA2 can be started within one " -"flexcop_dma_xfer_control call." ); +err ("either transfer DMA1 or DMA2 can be started within one flexcop_dma_xfer_control call." );return -EINVAL ; }
drivers/media/pci/b2c2/flexcop-pci.c +3 -4
@@ -185,8 +185,7 @@ static irqreturn_t flexcop_pci_isr(int irq, void *dev_id) fc->read_ibi_reg (fc,dma1_008).dma_0x8.dma_cur_addr <<2 ;u32 cur_pos = cur_addr - fc_pci->dma[0 ].dma_addr0; -deb_irq ("%u irq: %08x cur_addr: %llx: cur_pos: %08x, " -"last_cur_pos: %08x " , +deb_irq ("%u irq: %08x cur_addr: %llx: cur_pos: %08x, last_cur_pos: %08x " ,jiffies_to_usecs (jiffies - fc_pci->last_irq), v.raw, (unsigned long long )cur_addr, cur_pos, fc_pci->last_dma1_cur_pos);
@@ -220,8 +219,8 @@ static irqreturn_t flexcop_pci_isr(int irq, void *dev_id) fc_pci->last_dma1_cur_pos = cur_pos; fc_pci->count++; }else { -deb_irq ("isr for flexcop called, " -"apparently without reason (%08x)\n" , v.raw); +deb_irq ("isr for flexcop called, apparently without reason (%08x)\n" , + v.raw); ret =IRQ_NONE ; }
Signature · 1 line
2.7.4
PATCH v2 6/58 bt8xx: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/pci/bt8xx/bttv-cards.c | 9 +++------ drivers/media/pci/bt8xx/bttv-driver.c | 6 ++---- drivers/media/pci/bt8xx/bttv-i2c.c | 6 ++---- drivers/media/pci/bt8xx/bttv-input.c | 4 ++-- 4 files changed, 9 insertions(+), 16 deletions(-)
drivers/media/pci/bt8xx/bttv-cards.c +3 -6
@@ -125,10 +125,8 @@ module_param_array(remote, int, NULL, 0444);module_param_array (audiodev, int,NULL ,0444 );module_param_array (audiomux, int,NULL ,0444 ); -MODULE_PARM_DESC (triton1,"set ETBF pci config bit " -"[enable bug compatibility for triton1 + others]" ); -MODULE_PARM_DESC (vsfx,"set VSFX pci config bit " -"[yet another chipset flaw workaround]" ); +MODULE_PARM_DESC (triton1,"set ETBF pci config bit [enable bug compatibility for triton1 + others]" ); +MODULE_PARM_DESC (vsfx,"set VSFX pci config bit [yet another chipset flaw workaround]" );MODULE_PARM_DESC (latency,"pci latency timer" );MODULE_PARM_DESC (card,"specify TV/grabber card model, see CARDLIST file for a list" );MODULE_PARM_DESC (pll,"specify installed crystal (0=none, 28=28 MHz, 35=35 MHz, 14=14 MHz)" );
@@ -141,8 +139,7 @@ MODULE_PARM_DESC(audiodev, "specify audio device:\n""\t\t 2 = tda7432\n" "\t\t 3 = tvaudio");MODULE_PARM_DESC (saa6588,"if 1, then load the saa6588 RDS module, default (0) is to use the card definition." ); -MODULE_PARM_DESC (no_overlay,"allow override overlay default (0 disables, 1 enables)" -" [some VIA/SIS chipsets are known to have problem with overlay]" ); +MODULE_PARM_DESC (no_overlay,"allow override overlay default (0 disables, 1 enables) [some VIA/SIS chipsets are known to have problem with overlay]" );/* ----------------------------------------------------------------------- */ /* list of card IDs for bt878+ cards */
drivers/media/pci/bt8xx/bttv-driver.c +2 -4
@@ -148,8 +148,7 @@ MODULE_PARM_DESC(irq_debug, "irq handler debug messages, default is 0 (no)");MODULE_PARM_DESC (disable_ir,"disable infrared remote support" );MODULE_PARM_DESC (gbuffers,"number of capture buffers. range 2-32, default 8" );MODULE_PARM_DESC (gbufsize,"size of the capture buffers, default is 0x208000" ); -MODULE_PARM_DESC (reset_crop,"reset cropping parameters at open(), default " -"is 1 (yes) for compatibility with older applications" ); +MODULE_PARM_DESC (reset_crop,"reset cropping parameters at open(), default is 1 (yes) for compatibility with older applications" );MODULE_PARM_DESC (automute,"mute audio on bad/missing video signal, default is 1 (yes)" );MODULE_PARM_DESC (chroma_agc,"enables the AGC of chroma signal, default is 0 (no)" );MODULE_PARM_DESC (agc_crush,"enables the luminance AGC crush, default is 1 (yes)" );
@@ -3506,8 +3505,7 @@ static void bttv_irq_debug_low_latency(struct bttv *btv, u32 rc) (unsigned long)rc);if (0 == (btread (BT848_DSTATUS ) &BT848_DSTATUS_HLOC )) { -pr_notice ("%d: Oh, there (temporarily?) is no input signal. " -"Ok, then this is harmless, don't worry ;)\n" , +pr_notice ("%d: Oh, there (temporarily?) is no input signal. Ok, then this is harmless, don't worry ;)\n" , btv->c.nr);return ; }
drivers/media/pci/bt8xx/bttv-i2c.c +2 -4
@@ -44,15 +44,13 @@ static int i2c_scan;module_param (i2c_debug, int,0644 );MODULE_PARM_DESC (i2c_debug,"configure i2c debug level" );module_param (i2c_hw, int,0444 ); -MODULE_PARM_DESC (i2c_hw,"force use of hardware i2c support, " -"instead of software bitbang" ); +MODULE_PARM_DESC (i2c_hw,"force use of hardware i2c support, instead of software bitbang" );module_param (i2c_scan, int,0444 );MODULE_PARM_DESC (i2c_scan,"scan i2c bus at insmod time" );static unsigned int i2c_udelay =5 ;module_param (i2c_udelay, int,0444 ); -MODULE_PARM_DESC (i2c_udelay,"soft i2c delay at insmod time, in usecs " -"(should be 5 or higher). Lower value means higher bus speed." ); +MODULE_PARM_DESC (i2c_udelay,"soft i2c delay at insmod time, in usecs (should be 5 or higher). Lower value means higher bus speed." );/* ----------------------------------------------------------------------- */ /* I2C functions - bitbanging adapter (software i2c) */
drivers/media/pci/bt8xx/bttv-input.c +2 -2
@@ -185,8 +185,8 @@ static u32 bttv_rc5_decode(unsigned int code)return 0 ; } } -dprintk ("code=%x, rc5=%x, start=%x, toggle=%x, address=%x, " -"instr=%x\n" , rc5, org_code,RC5_START (rc5), +dprintk ("code=%x, rc5=%x, start=%x, toggle=%x, address=%x, instr=%x\n" , + rc5, org_code,RC5_START (rc5),RC5_TOGGLE (rc5),RC5_ADDR (rc5),RC5_INSTR (rc5));return rc5; }
Signature · 1 line
2.7.4
PATCH v2 7/58 cx18: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/pci/cx18/cx18-alsa-main.c | 8 +++---- drivers/media/pci/cx18/cx18-av-core.c | 17 ++++++-------- drivers/media/pci/cx18/cx18-av-firmware.c | 3 +-- drivers/media/pci/cx18/cx18-controls.c | 9 +++---- drivers/media/pci/cx18/cx18-driver.c | 35 ++++++++++++--------------- drivers/media/pci/cx18/cx18-dvb.c | 6 ++--- drivers/media/pci/cx18/cx18-fileops.c | 6 ++--- drivers/media/pci/cx18/cx18-ioctl.c | 6 ++--- drivers/media/pci/cx18/cx18-irq.c | 4 ++-- drivers/media/pci/cx18/cx18-mailbox.c | 39 +++++++++++-------------------- drivers/media/pci/cx18/cx18-queue.c | 8 +++---- drivers/media/pci/cx18/cx18-streams.c | 7 +++--- 12 files changed, 58 insertions(+), 90 deletions(-)
drivers/media/pci/cx18/cx18-alsa-main.c +4 -4
@@ -217,8 +217,8 @@ static int cx18_alsa_load(struct cx18 *cx) s = &cx->streams[CX18_ENC_STREAM_TYPE_PCM ];if (s->video_dev.v4l2_dev ==NULL ) { -CX18_DEBUG_ALSA_INFO ("%s: PCM stream for card is disabled - " -"skipping\n" , __func__); +CX18_DEBUG_ALSA_INFO ("%s: PCM stream for card is disabled - skipping\n" , + __func__);return 0 ; }
@@ -232,8 +232,8 @@ static int cx18_alsa_load(struct cx18 *cx)CX18_ALSA_ERR ("%s: failed to create struct snd_cx18_card\n" , __func__); }else { -CX18_DEBUG_ALSA_INFO ("%s: created cx18 ALSA interface instance " -"\n" , __func__); +CX18_DEBUG_ALSA_INFO ("%s: created cx18 ALSA interface instance \n" , + __func__); }return 0 ; }
drivers/media/pci/cx18/cx18-av-core.c +7 -10
@@ -468,21 +468,19 @@ void cx18_av_std_setup(struct cx18 *cx)CX18_DEBUG_INFO_DEV (sd,"Pixel rate = %d.%06d Mpixel/sec\n" , pll /8000000 , (pll /8 ) %1000000 ); -CX18_DEBUG_INFO_DEV (sd,"ADC XTAL/pixel clock decimation ratio " -"= %d.%03d\n" , src_decimation /256 , +CX18_DEBUG_INFO_DEV (sd,"ADC XTAL/pixel clock decimation ratio = %d.%03d\n" , + src_decimation /256 , ((src_decimation %256 ) *1000 ) /256 ); tmp =28636360 * (u64 ) sc;do_div (tmp, src_decimation); fsc = tmp >>13 ;CX18_DEBUG_INFO_DEV (sd, -"Chroma sub-carrier initial freq = %d.%06d " -"MHz\n" , fsc /1000000 , fsc %1000000 ); +"Chroma sub-carrier initial freq = %d.%06d MHz\n" , + fsc /1000000 , fsc %1000000 ); -CX18_DEBUG_INFO_DEV (sd,"hblank %i, hactive %i, vblank %i, " -"vactive %i, vblank656 %i, src_dec %i, " -"burst 0x%02x, luma_lpf %i, uv_lpf %i, " -"comb 0x%02x, sc 0x%06x\n" , +CX18_DEBUG_INFO_DEV (sd, +"hblank %i, hactive %i, vblank %i, vactive %i, vblank656 %i, src_dec %i, burst 0x%02x, luma_lpf %i, uv_lpf %i, comb 0x%02x, sc 0x%06x\n" , hblank, hactive, vblank, vactive, vblank656, src_decimation, burst, luma_lpf, uv_lpf, comb, sc);
@@ -1069,8 +1067,7 @@ static void log_video_status(struct cx18 *cx)CX18_INFO_DEV (sd,"Specified video input: Composite %d\n" , vid_input -CX18_AV_COMPOSITE1 +1 ); }else { -CX18_INFO_DEV (sd,"Specified video input: " -"S-Video (Luma In%d, Chroma In%d)\n" , +CX18_INFO_DEV (sd,"Specified video input: S-Video (Luma In%d, Chroma In%d)\n" , (vid_input &0xf0 ) >>4 , (vid_input &0xf00 ) >>8 ); }
drivers/media/pci/cx18/cx18-av-firmware.c +1 -2
@@ -61,8 +61,7 @@ static int cx18_av_verifyfw(struct cx18 *cx, const struct firmware *fw) dl_control &=0xffff3fff ;/* ignore top 2 bits of address */ expected =0x0f000000 | ((u32 )data[addr] <<16 ) | addr;if (expected != dl_control) { -CX18_ERR_DEV (sd,"verification of %s firmware load " -"failed: expected %#010x got %#010x\n" , +CX18_ERR_DEV (sd,"verification of %s firmware load failed: expected %#010x got %#010x\n" ,FWFILE , expected, dl_control); ret = -EIO ;break ;
drivers/media/pci/cx18/cx18-controls.c +3 -6
@@ -44,8 +44,7 @@ static int cx18_s_stream_vbi_fmt(struct cx2341x_handler *cxhdl, u32 fmt) type == V4L2_MPEG_STREAM_TYPE_MPEG2_SVCD)) {/* Only IVTV fmt VBI insertion & only MPEG-2 PS type streams */ cx->vbi.insert_mpeg =V4L2_MPEG_STREAM_VBI_FMT_NONE ; -CX18_DEBUG_INFO ("disabled insertion of sliced VBI data into " -"the MPEG stream\n" ); +CX18_DEBUG_INFO ("disabled insertion of sliced VBI data into the MPEG stream\n" );return 0 ; }
@@ -63,16 +62,14 @@ static int cx18_s_stream_vbi_fmt(struct cx2341x_handler *cxhdl, u32 fmt) } cx->vbi.insert_mpeg =V4L2_MPEG_STREAM_VBI_FMT_NONE ; -CX18_WARN ("Unable to allocate buffers for " -"sliced VBI data insertion\n" ); +CX18_WARN ("Unable to allocate buffers for sliced VBI data insertion\n" );return -ENOMEM ; } } } cx->vbi.insert_mpeg = fmt; -CX18_DEBUG_INFO ("enabled insertion of sliced VBI data into the MPEG PS," -"when sliced VBI is enabled\n" ); +CX18_DEBUG_INFO ("enabled insertion of sliced VBI data into the MPEG PS,when sliced VBI is enabled\n" );/* * If our current settings have no lines set for capture, store a valid,
drivers/media/pci/cx18/cx18-driver.c +15 -20
@@ -405,8 +405,8 @@ static void cx18_process_eeprom(struct cx18 *cx)CX18_ERR ("Invalid EEPROM\n" );return ;default : -CX18_ERR ("Unknown model %d, defaulting to original HVR-1600 " -"(cardtype=1)\n" , tv.model); +CX18_ERR ("Unknown model %d, defaulting to original HVR-1600 (cardtype=1)\n" , + tv.model); cx->card =cx18_get_card (CX18_CARD_HVR_1600_ESMT );break ; }
@@ -635,8 +635,8 @@ static void cx18_process_options(struct cx18 *cx)/* convert from kB to bytes */ cx->stream_buf_size[i] *=1024 ; } -CX18_DEBUG_INFO ("Stream type %d options: %d MB, %d buffers, " -"%d bytes\n" , i, cx->options.megabytes[i], +CX18_DEBUG_INFO ("Stream type %d options: %d MB, %d buffers, %d bytes\n" , + i, cx->options.megabytes[i], cx->stream_buffers[i], cx->stream_buf_size[i]); }
@@ -838,14 +838,13 @@ static int cx18_setup_pci(struct cx18 *cx, struct pci_dev *pci_dev,pci_read_config_byte (pci_dev,PCI_LATENCY_TIMER , &pci_latency);if (pci_latency <64 && cx18_pci_latency) { -CX18_INFO ("Unreasonably low latency timer, " -"setting to 64 (was %d)\n" , pci_latency); +CX18_INFO ("Unreasonably low latency timer, setting to 64 (was %d)\n" , + pci_latency);pci_write_config_byte (pci_dev,PCI_LATENCY_TIMER ,64 );pci_read_config_byte (pci_dev,PCI_LATENCY_TIMER , &pci_latency); } -CX18_DEBUG_INFO ("cx%d (rev %d) at %02x:%02x.%x, " -"irq: %d, latency: %d, memory: 0x%llx\n" , +CX18_DEBUG_INFO ("cx%d (rev %d) at %02x:%02x.%x, irq: %d, latency: %d, memory: 0x%llx\n" , cx->pci_dev->device, cx->card_rev, pci_dev->bus->number,PCI_SLOT (pci_dev->devfn),PCI_FUNC (pci_dev->devfn), cx->pci_dev->irq, pci_latency, (u64 )cx->base_addr);
@@ -910,8 +909,8 @@ static int cx18_probe(struct pci_dev *pci_dev,/* FIXME - module parameter arrays constrain max instances */ i =atomic_inc_return (&cx18_instance) -1 ;if (i >=CX18_MAX_CARDS ) { -printk (KERN_ERR "cx18: cannot manage card %d, driver has a " -"limit of 0 - %d\n" , i,CX18_MAX_CARDS -1 ); +printk (KERN_ERR "cx18: cannot manage card %d, driver has a limit of 0 - %d\n" , + i,CX18_MAX_CARDS -1 );return -ENOMEM ; }
@@ -926,8 +925,8 @@ static int cx18_probe(struct pci_dev *pci_dev, retval =v4l2_device_register (&pci_dev->dev, &cx->v4l2_dev);if (retval) { -printk (KERN_ERR "cx18: v4l2_device_register of card %d failed" -"\n" , cx->instance); +printk (KERN_ERR "cx18: v4l2_device_register of card %d failed\n" , + cx->instance);kfree (cx);return retval; }
@@ -958,13 +957,10 @@ static int cx18_probe(struct pci_dev *pci_dev, cx->enc_mem =ioremap_nocache (cx->base_addr +CX18_MEM_OFFSET ,CX18_MEM_SIZE );if (!cx->enc_mem) { -CX18_ERR ("ioremap failed. Can't get a window into CX23418 " -"memory and register space\n" ); -CX18_ERR ("Each capture card with a CX23418 needs 64 MB of " -"vmalloc address space for the window\n" ); +CX18_ERR ("ioremap failed. Can't get a window into CX23418 memory and register space\n" ); +CX18_ERR ("Each capture card with a CX23418 needs 64 MB of vmalloc address space for the window\n" );CX18_ERR ("Check the output of 'grep Vmalloc /proc/meminfo'\n" ); -CX18_ERR ("Use the vmalloc= kernel command line option to set " -"VmallocTotal to a larger value\n" ); +CX18_ERR ("Use the vmalloc= kernel command line option to set VmallocTotal to a larger value\n" ); retval = -ENOMEM ; goto free_mem; }
@@ -1000,8 +996,7 @@ static int cx18_probe(struct pci_dev *pci_dev,/* Initialize GPIO Reset Controller to do chip resets during i2c init */ if (cx->card->hw_all &CX18_HW_GPIO_RESET_CTRL ) {if (cx18_gpio_register (cx,CX18_HW_GPIO_RESET_CTRL ) !=0 ) -CX18_WARN ("Could not register GPIO reset controller" -"subdevice; proceeding anyway.\n" ); +CX18_WARN ("Could not register GPIO reset controllersubdevice; proceeding anyway.\n" );else cx->hw_flags |=CX18_HW_GPIO_RESET_CTRL ; }
drivers/media/pci/cx18/cx18-dvb.c +2 -4
@@ -155,10 +155,8 @@ static int yuan_mpc718_mt352_reqfw(struct cx18_stream *stream, }if (ret) { -CX18_ERR ("The MPC718 board variant with the MT352 DVB-T" -"demodualtor will not work without it\n" ); -CX18_ERR ("Run 'linux/Documentation/dvb/get_dvb_firmware " -"mpc718' if you need the firmware\n" ); +CX18_ERR ("The MPC718 board variant with the MT352 DVB-Tdemodualtor will not work without it\n" ); +CX18_ERR ("Run 'linux/Documentation/dvb/get_dvb_firmware mpc718' if you need the firmware\n" ); }return ret; }
drivers/media/pci/cx18/cx18-fileops.c +2 -4
@@ -49,8 +49,7 @@ int cx18_claim_stream(struct cx18_open_id *id, int type)/* Nothing should ever try to directly claim the IDX stream */ if (type ==CX18_ENC_STREAM_TYPE_IDX ) { -CX18_WARN ("MPEG Index stream cannot be claimed " -"directly, but something tried.\n" ); +CX18_WARN ("MPEG Index stream cannot be claimed directly, but something tried.\n" );return -EINVAL ; }
@@ -728,8 +727,7 @@ void cx18_stop_capture(struct cx18_open_id *id, int gop_end)/* Stop internal use associated VBI and IDX streams */ if (test_bit (CX18_F_S_STREAMING , &s_vbi->s_flags) && !test_bit (CX18_F_S_APPL_IO , &s_vbi->s_flags)) { -CX18_DEBUG_INFO ("close stopping embedded VBI " -"capture\n" ); +CX18_DEBUG_INFO ("close stopping embedded VBI capture\n" );cx18_stop_v4l2_encode_stream (s_vbi,0 ); }if (test_bit (CX18_F_S_STREAMING , &s_idx->s_flags)) {
drivers/media/pci/cx18/cx18-ioctl.c +2 -4
@@ -951,8 +951,7 @@ static int cx18_encoder_cmd(struct file *file, void *fh,return 0 ; h =cx18_find_handle (cx);if (h ==CX18_INVALID_TASK_HANDLE ) { -CX18_ERR ("Can't find valid task handle for " -"V4L2_ENC_CMD_PAUSE\n" ); +CX18_ERR ("Can't find valid task handle for V4L2_ENC_CMD_PAUSE\n" );return -EBADFD ; }cx18_mute (cx);
@@ -968,8 +967,7 @@ static int cx18_encoder_cmd(struct file *file, void *fh,return 0 ; h =cx18_find_handle (cx);if (h ==CX18_INVALID_TASK_HANDLE ) { -CX18_ERR ("Can't find valid task handle for " -"V4L2_ENC_CMD_RESUME\n" ); +CX18_ERR ("Can't find valid task handle for V4L2_ENC_CMD_RESUME\n" );return -EBADFD ; }cx18_vapi (cx,CX18_CPU_CAPTURE_RESUME ,1 , h);
drivers/media/pci/cx18/cx18-irq.c +2 -2
@@ -59,8 +59,8 @@ irqreturn_t cx18_irq_handler(int irq, void *dev_id)cx18_write_reg_expect (cx, hw2,HW2_INT_CLR_STATUS , ~hw2, hw2);if (sw1 || sw2 || hw2) -CX18_DEBUG_HI_IRQ ("received interrupts " -"SW1: %x SW2: %x HW2: %x\n" , sw1, sw2, hw2); +CX18_DEBUG_HI_IRQ ("received interrupts SW1: %x SW2: %x HW2: %x\n" , + sw1, sw2, hw2);/* * SW1 responses have to happen first. The sending XPU times out the
drivers/media/pci/cx18/cx18-mailbox.c +14 -25
@@ -123,8 +123,8 @@ static void dump_mb(struct cx18 *cx, struct cx18_mailbox *mb, char *name)if (!(cx18_debug &CX18_DBGFLG_API ))return ; -CX18_DEBUG_API ("%s: req %#010x ack %#010x cmd %#010x err %#010x args%s" -"\n" , name, mb->request, mb->ack, mb->cmd, mb->error, +CX18_DEBUG_API ("%s: req %#010x ack %#010x cmd %#010x err %#010x args%s\n" , + name, mb->request, mb->ack, mb->cmd, mb->error,u32arr2hex (mb->args,MAX_MB_ARGUMENTS , argstr)); }
@@ -255,8 +255,8 @@ static void epu_dma_done(struct cx18 *cx, struct cx18_in_work_order *order) s =cx18_handle_to_stream (cx, handle);if (s ==NULL ) { -CX18_WARN ("Got DMA done notification for unknown/inactive" -" handle %d, %s mailbox seq no %d\n" , handle, +CX18_WARN ("Got DMA done notification for unknown/inactive handle %d, %s mailbox seq no %d\n" , + handle, (order->flags &CX18_F_EWO_MB_STALE_UPON_RECEIPT ) ?"stale" :"good" , mb->request);return ;
@@ -290,9 +290,8 @@ static void epu_dma_done(struct cx18 *cx, struct cx18_in_work_order *order)if ((order->flags &CX18_F_EWO_MB_STALE_UPON_RECEIPT ) && !(id >= s->mdl_base_idx && id < (s->mdl_base_idx + s->buffers))) { -CX18_WARN ("Fell behind! Ignoring stale mailbox with " -" inconsistent data. Lost MDL for mailbox " -"seq no %d\n" , mb->request); +CX18_WARN ("Fell behind! Ignoring stale mailbox with inconsistent data. Lost MDL for mailbox seq no %d\n" , + mb->request);break ; } mdl =cx18_queue_get_mdl (s, id, mdl_ack->data_used);
@@ -418,9 +417,7 @@ static void mb_ack_irq(struct cx18 *cx, struct cx18_in_work_order *order)/* Don't ack if the RPU has gotten impatient and timed us out */ if (req !=cx18_readl (cx, &ack_mb->request) || req ==cx18_readl (cx, &ack_mb->ack)) { -CX18_DEBUG_WARN ("Possibly falling behind: %s self-ack'ed our " -"incoming %s to EPU mailbox (sequence no. %u) " -"while processing\n" , +CX18_DEBUG_WARN ("Possibly falling behind: %s self-ack'ed our incoming %s to EPU mailbox (sequence no. %u) while processing\n" , rpu_str[order->rpu], rpu_str[order->rpu], req); order->flags |=CX18_F_EWO_MB_STALE_WHILE_PROC ;return ;
@@ -555,8 +552,7 @@ void cx18_api_epu_cmd_irq(struct cx18 *cx, int rpu) order =alloc_in_work_order_irq (cx);if (order ==NULL ) { -CX18_WARN ("Unable to find blank work order form to schedule " -"incoming mailbox command processing\n" ); +CX18_WARN ("Unable to find blank work order form to schedule incoming mailbox command processing\n" );return ; }
@@ -573,9 +569,7 @@ void cx18_api_epu_cmd_irq(struct cx18 *cx, int rpu) (&order_mb->request)[i] =cx18_readl (cx, &mb->request + i);if (order_mb->request == order_mb->ack) { -CX18_DEBUG_WARN ("Possibly falling behind: %s self-ack'ed our " -"incoming %s to EPU mailbox (sequence no. %u)" -"\n" , +CX18_DEBUG_WARN ("Possibly falling behind: %s self-ack'ed our incoming %s to EPU mailbox (sequence no. %u)\n" , rpu_str[rpu], rpu_str[rpu], order_mb->request);if (cx18_debug &CX18_DBGFLG_WARN )dump_mb (cx, order_mb,"incoming" );
@@ -663,8 +657,8 @@ static int cx18_api_call(struct cx18 *cx, u32 cmd, int args, u32 data[])if (req != ack) {/* waited long enough, make the mbox "not busy" from our end */ cx18_writel (cx, req, &mb->ack); -CX18_ERR ("mbox was found stuck busy when setting up for %s; " -"clearing busy and trying to proceed\n" , info->name); +CX18_ERR ("mbox was found stuck busy when setting up for %s; clearing busy and trying to proceed\n" , + info->name); }else if (ret != timeout)CX18_DEBUG_API ("waited %u msecs for busy mbox to be acked\n" ,jiffies_to_msecs (timeout-ret));
@@ -707,14 +701,10 @@ static int cx18_api_call(struct cx18 *cx, u32 cmd, int args, u32 data[])mutex_unlock (mb_lock);if (ret >= timeout) {/* Timed out */ -CX18_DEBUG_WARN ("sending %s timed out waiting %d msecs " -"for RPU acknowledgement\n" , +CX18_DEBUG_WARN ("sending %s timed out waiting %d msecs for RPU acknowledgement\n" , info->name,jiffies_to_msecs (ret)); }else { -CX18_DEBUG_WARN ("woken up before mailbox ack was ready " -"after submitting %s to RPU. only " -"waited %d msecs on req %u but awakened" -" with unmatched ack %u\n" , +CX18_DEBUG_WARN ("woken up before mailbox ack was ready after submitting %s to RPU. only waited %d msecs on req %u but awakened with unmatched ack %u\n" , info->name,jiffies_to_msecs (ret), req, ack);
@@ -723,8 +713,7 @@ static int cx18_api_call(struct cx18 *cx, u32 cmd, int args, u32 data[]) }if (ret >= timeout) -CX18_DEBUG_WARN ("failed to be awakened upon RPU acknowledgment " -"sending %s; timed out waiting %d msecs\n" , +CX18_DEBUG_WARN ("failed to be awakened upon RPU acknowledgment sending %s; timed out waiting %d msecs\n" , info->name,jiffies_to_msecs (ret));else CX18_DEBUG_HI_API("waited %u msecs for %s to be acked\n",
drivers/media/pci/cx18/cx18-queue.c +3 -5
@@ -164,9 +164,8 @@ struct cx18_mdl *cx18_queue_get_mdl(struct cx18_stream *s, u32 id, mdl->skipped++;if (mdl->skipped >=atomic_read (&s->q_busy.depth)-1 ) {/* mdl must have fallen out of rotation */ -CX18_WARN ("Skipped %s, MDL %d, %d " -"times - it must have dropped out of " -"rotation\n" , s->name, mdl->id, +CX18_WARN ("Skipped %s, MDL %d, %d times - it must have dropped out of rotation\n" , + s->name, mdl->id, mdl->skipped);/* Sweep it up to put it back into rotation */ list_move_tail (&mdl->list, &sweep_up);
@@ -352,8 +351,7 @@ int cx18_stream_alloc(struct cx18_stream *s)if (s->buffers ==0 )return 0 ; -CX18_DEBUG_INFO ("Allocate %s stream: %d x %d buffers " -"(%d.%02d kB total)\n" , +CX18_DEBUG_INFO ("Allocate %s stream: %d x %d buffers (%d.%02d kB total)\n" , s->name, s->buffers, s->buf_size, s->buffers * s->buf_size /1024 , (s->buffers * s->buf_size *100 /1024 ) %100 );
drivers/media/pci/cx18/cx18-streams.c +3 -4
@@ -353,8 +353,8 @@ static int cx18_prep_dev(struct cx18 *cx, int type)if (cx->card->hw_all &CX18_HW_DVB ) { s->dvb =kzalloc (sizeof (struct cx18_dvb ),GFP_KERNEL );if (s->dvb ==NULL ) { -CX18_ERR ("Couldn't allocate cx18_dvb structure" -" for %s\n" , s->name); +CX18_ERR ("Couldn't allocate cx18_dvb structure for %s\n" , + s->name);return -ENOMEM ; } }else {
@@ -462,8 +462,7 @@ static int cx18_reg_dev(struct cx18 *cx, int type)case VFL_TYPE_VBI :if (cx->stream_buffers[type]) -CX18_INFO ("Registered device %s for %s " -"(%d x %d bytes)\n" , +CX18_INFO ("Registered device %s for %s (%d x %d bytes)\n" , name, s->name, cx->stream_buffers[type], cx->stream_buf_size[type]);else
Signature · 1 line
2.7.4
PATCH v2 8/58 cx23885: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/pci/cx23885/cimax2.c | 5 ++--- drivers/media/pci/cx23885/cx23885-417.c | 17 +++++++---------- drivers/media/pci/cx23885/cx23885-alsa.c | 15 +++++++-------- drivers/media/pci/cx23885/cx23885-cards.c | 8 +++----- drivers/media/pci/cx23885/cx23885-core.c | 15 +++++++-------- drivers/media/pci/cx23885/cx23885-dvb.c | 3 +-- drivers/media/pci/cx23885/cx23885-video.c | 3 +-- drivers/media/pci/cx23885/cx23888-ir.c | 7 +++---- 8 files changed, 31 insertions(+), 42 deletions(-)
drivers/media/pci/cx23885/cimax2.c +2 -3
@@ -365,9 +365,8 @@ static void netup_read_ci_status(struct work_struct *work)if (ret !=0 )return ; -ci_dbg_print ("%s: Slot Status Addr=[0x%04x], " -"Reg=[0x%02x], data=%02x, " -"TS config = %02x\n" , __func__, +ci_dbg_print ("%s: Slot Status Addr=[0x%04x], Reg=[0x%02x], data=%02x, TS config = %02x\n" , + __func__, state->ci_i2c_addr,0 , buf[0 ], buf[0 ]);
drivers/media/pci/cx23885/cx23885-417.c +7 -10
@@ -770,8 +770,8 @@ static int cx23885_mbox_func(void *priv,mc417_memory_read (dev, dev->cx23417_mailbox -4 , &value);if (value !=0x12345678 ) {printk (KERN_ERR -"Firmware and/or mailbox pointer not initialized " -"or corrupted, signature = 0x%x, cmd = %s\n" , value, +"Firmware and/or mailbox pointer not initialized or corrupted, signature = 0x%x, cmd = %s\n" , +value,cmd_to_str (command));return -1 ; }
@@ -781,8 +781,8 @@ static int cx23885_mbox_func(void *priv,*/ mc417_memory_read (dev, dev->cx23417_mailbox, &flag);if (flag) { -printk (KERN_ERR "ERROR: Mailbox appears to be in use " -"(%x), cmd = %s\n" , flag,cmd_to_str (command)); +printk (KERN_ERR "ERROR: Mailbox appears to be in use (%x), cmd = %s\n" , + flag,cmd_to_str (command));return -1 ; }
@@ -935,14 +935,12 @@ static int cx23885_load_firmware(struct cx23885_dev *dev)printk (KERN_ERR "ERROR: Hotplug firmware request failed (%s).\n" ,CX23885_FIRM_IMAGE_NAME ); -printk (KERN_ERR "Please fix your hotplug setup, the board will " -"not work without firmware loaded!\n" ); +printk (KERN_ERR "Please fix your hotplug setup, the board will not work without firmware loaded!\n" );return -1 ; }if (firmware->size !=CX23885_FIRM_IMAGE_SIZE ) { -printk (KERN_ERR "ERROR: Firmware size mismatch " -"(have %zu, expected %d)\n" , +printk (KERN_ERR "ERROR: Firmware size mismatch (have %zu, expected %d)\n" , firmware->size,CX23885_FIRM_IMAGE_SIZE );release_firmware (firmware);return -1 ;
@@ -1077,8 +1075,7 @@ static int cx23885_initialize_codec(struct cx23885_dev *dev, int startencoder) retval =cx23885_api_cmd (dev,CX2341X_ENC_GET_VERSION ,0 ,1 , &version);if (retval <0 ) { -printk (KERN_ERR "ERROR: cx23417 firmware get encoder :" -"version failed!\n" ); +printk (KERN_ERR "ERROR: cx23417 firmware get encoder :version failed!\n" );return -1 ; }dprintk (1 ,"cx23417 firmware version is 0x%08x\n" , version);
drivers/media/pci/cx23885/cx23885-alsa.c +7 -8
@@ -186,8 +186,8 @@ static int cx23885_start_audio_dma(struct cx23885_audio_dev *chip)cx_write (AUD_INT_A_GPCNT_CTL ,GP_COUNT_CONTROL_RESET );atomic_set (&chip->count,0 ); -dprintk (1 ,"Start audio DMA, %d B/line, %d lines/FIFO, %d periods, %d " -"byte buffer\n" , buf->bpl,cx_read (audio_ch->cmds_start+12 )>>1 , +dprintk (1 ,"Start audio DMA, %d B/line, %d lines/FIFO, %d periods, %d byte buffer\n" , + buf->bpl,cx_read (audio_ch->cmds_start+12 )>>1 , chip->num_periods, buf->bpl * chip->num_periods);/* Enables corresponding bits at AUD_INT_STAT */
@@ -327,8 +327,7 @@ static int snd_cx23885_pcm_open(struct snd_pcm_substream *substream)int err;if (!chip) { -printk (KERN_ERR "BUG: cx23885 can't find device struct." -" Can't proceed with open\n" ); +printk (KERN_ERR "BUG: cx23885 can't find device struct. Can't proceed with open\n" );return -ENODEV ; }
@@ -555,8 +554,8 @@ struct cx23885_audio_dev *cx23885_audio_register(struct cx23885_dev *dev)return NULL ;if (dev->sram_channels[AUDIO_SRAM_CHANNEL ].cmds_start ==0 ) { -printk (KERN_WARNING "%s(): Missing SRAM channel configuration " -"for analog TV Audio\n" , __func__); +printk (KERN_WARNING "%s(): Missing SRAM channel configuration for analog TV Audio\n" , + __func__);return NULL ; }
@@ -590,8 +589,8 @@ struct cx23885_audio_dev *cx23885_audio_register(struct cx23885_dev *dev) error:snd_card_free (card); -printk (KERN_ERR "%s(): Failed to register analog " -"audio adapter\n" , __func__); +printk (KERN_ERR "%s(): Failed to register analog audio adapter\n" , + __func__);return NULL ; }
drivers/media/pci/cx23885/cx23885-cards.c +3 -5
@@ -1304,8 +1304,7 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data)*/ break ;default : -printk (KERN_WARNING "%s: warning: " -"unknown hauppauge model #%d\n" , +printk (KERN_WARNING "%s: warning: unknown hauppauge model #%d\n" , dev->name, tv.model);break ; }
@@ -2342,9 +2341,8 @@ void cx23885_card_setup(struct cx23885_dev *dev) ret =request_firmware (&fw, filename, &dev->pci->dev);if (ret !=0 ) -printk (KERN_ERR "did not find the firmware file. (%s) " -"Please see linux/Documentation/dvb/ for more details " -"on firmware-problems." , filename); +printk (KERN_ERR "did not find the firmware file. (%s) Please see linux/Documentation/dvb/ for more details on firmware-problems." , + filename);else altera_init (&netup_config, fw);
drivers/media/pci/cx23885/cx23885-core.c +7 -8
@@ -915,8 +915,7 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)cx23885_init_tsport (dev, &dev->ts2,2 );if (get_resources (dev) <0 ) { -printk (KERN_ERR "CORE %s No more PCIe resources for " -"subsystem: %04x:%04x\n" , +printk (KERN_ERR "CORE %s No more PCIe resources for subsystem: %04x:%04x\n" , dev->name, dev->pci->subsystem_vendor, dev->pci->subsystem_device);
@@ -980,8 +979,8 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)if (cx23885_boards[dev->board].porta ==CX23885_ANALOG_VIDEO ) {if (cx23885_video_register (dev) <0 ) { -printk (KERN_ERR "%s() Failed to register analog " -"video adapters on VID_A\n" , __func__); +printk (KERN_ERR "%s() Failed to register analog video adapters on VID_A\n" , + __func__); } }
@@ -1579,8 +1578,8 @@ int cx23885_irq_417(struct cx23885_dev *dev, u32 status) (status & VID_B_MSK_VBI_SYNC) || (status & VID_B_MSK_OF) || (status & VID_B_MSK_VBI_OF)) { -printk (KERN_ERR "%s: V4L mpeg risc op code error, status " -"= 0x%x\n" , dev->name, status); +printk (KERN_ERR "%s: V4L mpeg risc op code error, status = 0x%x\n" , + dev->name, status);if (status &VID_B_MSK_BAD_PKT )dprintk (1 ," VID_B_MSK_BAD_PKT\n" );if (status &VID_B_MSK_OPC_ERR )
@@ -1995,8 +1994,8 @@ static int cx23885_initdev(struct pci_dev *pci_dev,/* print pci info */ dev->pci_rev = pci_dev->revision;pci_read_config_byte (pci_dev,PCI_LATENCY_TIMER , &dev->pci_lat); -printk (KERN_INFO "%s/0: found at %s, rev: %d, irq: %d, " -"latency: %d, mmio: 0x%llx\n" , dev->name, +printk (KERN_INFO "%s/0: found at %s, rev: %d, irq: %d, latency: %d, mmio: 0x%llx\n" , + dev->name,pci_name (pci_dev), dev->pci_rev, pci_dev->irq, dev->pci_lat, (unsigned long long )pci_resource_start (pci_dev,0 ));
drivers/media/pci/cx23885/cx23885-dvb.c +1 -2
@@ -2482,8 +2482,7 @@ static int dvb_register(struct cx23885_tsport *port)break ;default : -printk (KERN_INFO "%s: The frontend of your DVB/ATSC card " -" isn't supported yet\n" , +printk (KERN_INFO "%s: The frontend of your DVB/ATSC card isn't supported yet\n" , dev->name);break ; }
drivers/media/pci/cx23885/cx23885-video.c +1 -2
@@ -1065,8 +1065,7 @@ int cx23885_video_irq(struct cx23885_dev *dev, u32 status) }if (status &VID_BC_MSK_SYNC ) -dprintk (7 ," (VID_BC_MSK_SYNC 0x%08x) " -"video lines miss-match\n" , +dprintk (7 ," (VID_BC_MSK_SYNC 0x%08x) video lines miss-match\n" ,VID_BC_MSK_SYNC );if (status &VID_BC_MSK_OF )
drivers/media/pci/cx23885/cx23888-ir.c +3 -4
@@ -1015,8 +1015,8 @@ static int cx23888_ir_log_status(struct v4l2_subdev *sd) j =0 ;break ; } -v4l2_info (sd,"\tNext carrier edge window: 16 clocks " -"-%1d/+%1d, %u to %u Hz\n" , i, j, +v4l2_info (sd,"\tNext carrier edge window: 16 clocks -%1d/+%1d, %u to %u Hz\n" , + i, j,clock_divider_to_freq (rxclk,16 + j),clock_divider_to_freq (rxclk,16 - i)); }
@@ -1026,8 +1026,7 @@ static int cx23888_ir_log_status(struct v4l2_subdev *sd)v4l2_info (sd,"\tLow pass filter: %s\n" , filtr ?"enabled" :"disabled" );if (filtr) -v4l2_info (sd,"\tMin acceptable pulse width (LPF): %u us, " -"%u ns\n" , +v4l2_info (sd,"\tMin acceptable pulse width (LPF): %u us, %u ns\n" ,lpf_count_to_us (filtr),lpf_count_to_ns (filtr)); v4l2_info(sd, "\tPulse width timer timed-out: %s\n",
Signature · 1 line
2.7.4
Re: [PATCH v2 08/58] cx23885: don't break long lines
Quoted 72 lines · Mauro Carvalho Chehab
Due to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to
KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
useText::Tabs;while (<>) { if ($next ne "") { $c=$_; if ($c =~ /^\s+\"(.*)/) { $c2=$1; $next =~ s/\"\n$//; $n = expand($next); $funpos = index($n, '('); $pos = index($c2, '",'); if ($funpos && $pos > 0) { $s1 = substr $c2, 0, $pos + 2; $s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2; $s2 =~ s/^\s+//; $s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne ""); print unexpand("$next$s1\n"); print unexpand("$s2\n") if ($s2 ne ""); } else { print "$next$c2\n"; } $next=""; next; } else { print $next; } $next=""; } else { if (m/\"$/) { if (!m/\\n\"$/) { $next=$_; next; } } } print $_; }</script>
Signed-off-by Mauro Carvalho Chehab <[email protected]>--- drivers/media/pci/cx23885/cimax2.c | 5 ++--- drivers/media/pci/cx23885/cx23885-417.c | 17 +++++++---------- drivers/media/pci/cx23885/cx23885-alsa.c | 15 +++++++-------- drivers/media/pci/cx23885/cx23885-cards.c | 8 +++----- drivers/media/pci/cx23885/cx23885-core.c | 15 +++++++-------- drivers/media/pci/cx23885/cx23885-dvb.c | 3 +-- drivers/media/pci/cx23885/cx23885-video.c | 3 +-- drivers/media/pci/cx23885/cx23888-ir.c | 7 +++---- 8 files changed, 31 insertions(+), 42 deletions(-)drivers/media/pci/cx23885/cimax2.c +0
-0
drivers/media/pci/cx23885/cimax2.c static void netup_read_ci_status(struct work_struct *work) · line 371
Quoted 10 lines
drivers/media/pci/cx23885/cimax2.c +2
-3@@ -365,9 +365,8 @@ static void netup_read_ci_status(struct work_struct *work)if (ret !=0 )return ; -ci_dbg_print ("%s: Slot Status Addr=[0x%04x], " -"Reg=[0x%02x], data=%02x, " -"TS config = %02x\n" , __func__, +ci_dbg_print ("%s: Slot Status Addr=[0x%04x], Reg=[0x%02x], data=%02x, TS config = %02x\n" , + __func__, state->ci_i2c_addr,0 , buf[0 ], buf[0 ]);
The last three lines can probably be concatenated to one line.
drivers/media/pci/cx23885/cx23885-417.c static int cx23885_mbox_func(void *priv, · line 774
Quoted 13 lines
drivers/media/pci/cx23885/cx23885-417.c +2
-2@@ -770,8 +770,8 @@ static int cx23885_mbox_func(void *priv,mc417_memory_read (dev, dev->cx23417_mailbox -4 , &value);if (value !=0x12345678 ) { printk(KERN_ERR - "Firmware and/or mailbox pointer not initialized " - "or corrupted, signature = 0x%x, cmd = %s\n", value, + "Firmware and/or mailbox pointer not initialized or corrupted, signature = 0x%x, cmd = %s\n", +value,
Weird indentation (or lack thereof).
Other than these two comment this looks good.
Hans
Quoted 215 lines
drivers/media/pci/cx23885/cx23885-417.c +5
-8cmd_to_str(command));return -1 ; }@@ -781,8 +781,8 @@ static int cx23885_mbox_func(void *priv,*/ mc417_memory_read (dev, dev->cx23417_mailbox, &flag);if (flag) { -printk (KERN_ERR "ERROR: Mailbox appears to be in use " -"(%x), cmd = %s\n" , flag,cmd_to_str (command)); +printk (KERN_ERR "ERROR: Mailbox appears to be in use (%x), cmd = %s\n" , + flag,cmd_to_str (command));return -1 ; }@@ -935,14 +935,12 @@ static int cx23885_load_firmware(struct cx23885_dev *dev)printk (KERN_ERR "ERROR: Hotplug firmware request failed (%s).\n" ,CX23885_FIRM_IMAGE_NAME ); -printk (KERN_ERR "Please fix your hotplug setup, the board will " -"not work without firmware loaded!\n" ); +printk (KERN_ERR "Please fix your hotplug setup, the board will not work without firmware loaded!\n" );return -1 ; }if (firmware->size !=CX23885_FIRM_IMAGE_SIZE ) { -printk (KERN_ERR "ERROR: Firmware size mismatch " -"(have %zu, expected %d)\n" , +printk (KERN_ERR "ERROR: Firmware size mismatch (have %zu, expected %d)\n" , firmware->size,CX23885_FIRM_IMAGE_SIZE );release_firmware (firmware);return -1 ;@@ -1077,8 +1075,7 @@ static int cx23885_initialize_codec(struct cx23885_dev *dev, int startencoder) retval =cx23885_api_cmd (dev,CX2341X_ENC_GET_VERSION ,0 ,1 , &version);if (retval <0 ) { -printk (KERN_ERR "ERROR: cx23417 firmware get encoder :" -"version failed!\n" ); +printk (KERN_ERR "ERROR: cx23417 firmware get encoder :version failed!\n" );return -1 ; }dprintk (1 ,"cx23417 firmware version is 0x%08x\n" , version);drivers/media/pci/cx23885/cx23885-alsa.c +7
-8@@ -186,8 +186,8 @@ static int cx23885_start_audio_dma(struct cx23885_audio_dev *chip)cx_write (AUD_INT_A_GPCNT_CTL ,GP_COUNT_CONTROL_RESET );atomic_set (&chip->count,0 ); -dprintk (1 ,"Start audio DMA, %d B/line, %d lines/FIFO, %d periods, %d " -"byte buffer\n" , buf->bpl,cx_read (audio_ch->cmds_start+12 )>>1 , +dprintk (1 ,"Start audio DMA, %d B/line, %d lines/FIFO, %d periods, %d byte buffer\n" , + buf->bpl,cx_read (audio_ch->cmds_start+12 )>>1 , chip->num_periods, buf->bpl * chip->num_periods);/* Enables corresponding bits at AUD_INT_STAT */ @@ -327,8 +327,7 @@ static int snd_cx23885_pcm_open(struct snd_pcm_substream *substream)int err;if (!chip) { -printk (KERN_ERR "BUG: cx23885 can't find device struct." -" Can't proceed with open\n" ); +printk (KERN_ERR "BUG: cx23885 can't find device struct. Can't proceed with open\n" );return -ENODEV ; }@@ -555,8 +554,8 @@ struct cx23885_audio_dev *cx23885_audio_register(struct cx23885_dev *dev)return NULL ;if (dev->sram_channels[AUDIO_SRAM_CHANNEL ].cmds_start ==0 ) { -printk (KERN_WARNING "%s(): Missing SRAM channel configuration " -"for analog TV Audio\n" , __func__); +printk (KERN_WARNING "%s(): Missing SRAM channel configuration for analog TV Audio\n" , + __func__);return NULL ; }@@ -590,8 +589,8 @@ struct cx23885_audio_dev *cx23885_audio_register(struct cx23885_dev *dev) error:snd_card_free (card); -printk (KERN_ERR "%s(): Failed to register analog " -"audio adapter\n" , __func__); +printk (KERN_ERR "%s(): Failed to register analog audio adapter\n" , + __func__);return NULL ; }drivers/media/pci/cx23885/cx23885-cards.c +3
-5@@ -1304,8 +1304,7 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data)*/ break ;default : -printk (KERN_WARNING "%s: warning: " -"unknown hauppauge model #%d\n" , +printk (KERN_WARNING "%s: warning: unknown hauppauge model #%d\n" , dev->name, tv.model);break ; }@@ -2342,9 +2341,8 @@ void cx23885_card_setup(struct cx23885_dev *dev) ret =request_firmware (&fw, filename, &dev->pci->dev);if (ret !=0 ) -printk (KERN_ERR "did not find the firmware file. (%s) " -"Please see linux/Documentation/dvb/ for more details " -"on firmware-problems." , filename); +printk (KERN_ERR "did not find the firmware file. (%s) Please see linux/Documentation/dvb/ for more details on firmware-problems." , + filename);else altera_init (&netup_config, fw);drivers/media/pci/cx23885/cx23885-core.c +7
-8@@ -915,8 +915,7 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)cx23885_init_tsport (dev, &dev->ts2,2 );if (get_resources (dev) <0 ) { -printk (KERN_ERR "CORE %s No more PCIe resources for " -"subsystem: %04x:%04x\n" , +printk (KERN_ERR "CORE %s No more PCIe resources for subsystem: %04x:%04x\n" , dev->name, dev->pci->subsystem_vendor, dev->pci->subsystem_device);@@ -980,8 +979,8 @@ static int cx23885_dev_setup(struct cx23885_dev *dev)if (cx23885_boards[dev->board].porta ==CX23885_ANALOG_VIDEO ) {if (cx23885_video_register (dev) <0 ) { -printk (KERN_ERR "%s() Failed to register analog " -"video adapters on VID_A\n" , __func__); +printk (KERN_ERR "%s() Failed to register analog video adapters on VID_A\n" , + __func__); } }@@ -1579,8 +1578,8 @@ int cx23885_irq_417(struct cx23885_dev *dev, u32 status) (status & VID_B_MSK_VBI_SYNC) || (status & VID_B_MSK_OF) || (status & VID_B_MSK_VBI_OF)) { -printk (KERN_ERR "%s: V4L mpeg risc op code error, status " -"= 0x%x\n" , dev->name, status); +printk (KERN_ERR "%s: V4L mpeg risc op code error, status = 0x%x\n" , + dev->name, status);if (status &VID_B_MSK_BAD_PKT )dprintk (1 ," VID_B_MSK_BAD_PKT\n" );if (status &VID_B_MSK_OPC_ERR )@@ -1995,8 +1994,8 @@ static int cx23885_initdev(struct pci_dev *pci_dev,/* print pci info */ dev->pci_rev = pci_dev->revision;pci_read_config_byte (pci_dev,PCI_LATENCY_TIMER , &dev->pci_lat); -printk (KERN_INFO "%s/0: found at %s, rev: %d, irq: %d, " -"latency: %d, mmio: 0x%llx\n" , dev->name, +printk (KERN_INFO "%s/0: found at %s, rev: %d, irq: %d, latency: %d, mmio: 0x%llx\n" , + dev->name,pci_name (pci_dev), dev->pci_rev, pci_dev->irq, dev->pci_lat, (unsigned long long )pci_resource_start (pci_dev,0 ));drivers/media/pci/cx23885/cx23885-dvb.c +1
-2@@ -2482,8 +2482,7 @@ static int dvb_register(struct cx23885_tsport *port)break ;default : -printk (KERN_INFO "%s: The frontend of your DVB/ATSC card " -" isn't supported yet\n" , +printk (KERN_INFO "%s: The frontend of your DVB/ATSC card isn't supported yet\n" , dev->name);break ; }drivers/media/pci/cx23885/cx23885-video.c +1
-2@@ -1065,8 +1065,7 @@ int cx23885_video_irq(struct cx23885_dev *dev, u32 status) }if (status &VID_BC_MSK_SYNC ) -dprintk (7 ," (VID_BC_MSK_SYNC 0x%08x) " -"video lines miss-match\n" , +dprintk (7 ," (VID_BC_MSK_SYNC 0x%08x) video lines miss-match\n" ,VID_BC_MSK_SYNC );if (status &VID_BC_MSK_OF )drivers/media/pci/cx23885/cx23888-ir.c +3
-4@@ -1015,8 +1015,8 @@ static int cx23888_ir_log_status(struct v4l2_subdev *sd) j =0 ;break ; } -v4l2_info (sd,"\tNext carrier edge window: 16 clocks " -"-%1d/+%1d, %u to %u Hz\n" , i, j, +v4l2_info (sd,"\tNext carrier edge window: 16 clocks -%1d/+%1d, %u to %u Hz\n" , + i, j,clock_divider_to_freq (rxclk,16 + j),clock_divider_to_freq (rxclk,16 - i)); }@@ -1026,8 +1026,7 @@ static int cx23888_ir_log_status(struct v4l2_subdev *sd)v4l2_info (sd,"\tLow pass filter: %s\n" , filtr ?"enabled" :"disabled" );if (filtr) -v4l2_info (sd,"\tMin acceptable pulse width (LPF): %u us, " -"%u ns\n" , +v4l2_info (sd,"\tMin acceptable pulse width (LPF): %u us, %u ns\n" ,lpf_count_to_us (filtr),lpf_count_to_ns (filtr)); v4l2_info(sd, "\tPulse width timer timed-out: %s\n",
PATCH v2 9/58 cx88: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/pci/cx88/cx88-alsa.c | 15 ++++++--------- drivers/media/pci/cx88/cx88-cards.c | 14 ++++++-------- drivers/media/pci/cx88/cx88-dsp.c | 12 ++++++------ drivers/media/pci/cx88/cx88-dvb.c | 6 ++---- drivers/media/pci/cx88/cx88-i2c.c | 3 +-- drivers/media/pci/cx88/cx88-mpeg.c | 15 +++++++-------- drivers/media/pci/cx88/cx88-tvaudio.c | 6 ++---- drivers/media/pci/cx88/cx88-video.c | 4 ++-- 8 files changed, 32 insertions(+), 43 deletions(-)
drivers/media/pci/cx88/cx88-alsa.c +6 -9
@@ -120,9 +120,7 @@ MODULE_AUTHOR("Mauro Carvalho Chehab <[email protected]>");MODULE_LICENSE ("GPL" );MODULE_VERSION (CX88_VERSION ); -MODULE_SUPPORTED_DEVICE ("{{Conexant,23881}," -"{{Conexant,23882}," -"{{Conexant,23883}" ); +MODULE_SUPPORTED_DEVICE ("{{Conexant,23881},{{Conexant,23882},{{Conexant,23883}" );static unsigned int debug;module_param (debug,int,0644 );MODULE_PARM_DESC (debug,"enable debug messages" );
@@ -154,8 +152,8 @@ static int _cx88_start_audio_dma(snd_cx88_card_t *chip)cx_write (MO_AUDD_GPCNTRL ,GP_COUNT_CONTROL_RESET );atomic_set (&chip->count,0 ); -dprintk (1 ,"Start audio DMA, %d B/line, %d lines/FIFO, %d periods, %d " -"byte buffer\n" , buf->bpl,cx_read (audio_ch->cmds_start +8 )>>1 , +dprintk (1 ,"Start audio DMA, %d B/line, %d lines/FIFO, %d periods, %d byte buffer\n" , + buf->bpl,cx_read (audio_ch->cmds_start +8 )>>1 , chip->num_periods, buf->bpl * chip->num_periods);/* Enables corresponding bits at AUD_INT_STAT */
@@ -425,8 +423,7 @@ static int snd_cx88_pcm_open(struct snd_pcm_substream *substream)int err;if (!chip) { -printk (KERN_ERR "BUG: cx88 can't find device struct." -" Can't proceed with open\n" ); +printk (KERN_ERR "BUG: cx88 can't find device struct. Can't proceed with open\n" );return -ENODEV ; }
@@ -914,8 +911,8 @@ static int snd_cx88_create(struct snd_card *card, struct pci_dev *pci,/* print pci info */ pci_read_config_byte (pci,PCI_LATENCY_TIMER , &pci_lat); -dprintk (1 ,"ALSA %s/%i: found at %s, rev: %d, irq: %d, " -"latency: %d, mmio: 0x%llx\n" , core->name, devno, +dprintk (1 ,"ALSA %s/%i: found at %s, rev: %d, irq: %d, latency: %d, mmio: 0x%llx\n" , + core->name, devno,pci_name (pci), pci->revision, pci->irq, pci_lat, (unsigned long long )pci_resource_start (pci,0 ));
drivers/media/pci/cx88/cx88-cards.c +6 -8
@@ -2847,8 +2847,7 @@ static void leadtek_eeprom(struct cx88_core *core, u8 *eeprom_data)break ; } -info_printk (core,"Leadtek Winfast 2000XP Expert config: " -"tuner=%d, eeprom[0]=0x%02x\n" , +info_printk (core,"Leadtek Winfast 2000XP Expert config: tuner=%d, eeprom[0]=0x%02x\n" , core->board.tuner_type, eeprom_data[0 ]); }
@@ -3107,8 +3106,8 @@ static void dvico_fusionhdtv_hybrid_init(struct cx88_core *core) msg.len = (i !=12 ?5 :2 ); err =i2c_transfer (&core->i2c_adap, &msg,1 );if (err !=1 ) { -warn_printk (core,"dvico_fusionhdtv_hybrid_init buf %d " -"failed (err = %d)!\n" , i, err); +warn_printk (core,"dvico_fusionhdtv_hybrid_init buf %d failed (err = %d)!\n" , + i, err);return ; } }
@@ -3284,8 +3283,7 @@ static void cx88_card_list(struct cx88_core *core, struct pci_dev *pci)"%s: version might help as well.\n" , core->name,core->name,core->name,core->name); } -err_printk (core,"Here is a list of valid choices for the card=<n> " -"insmod option:\n" ); +err_printk (core,"Here is a list of valid choices for the card=<n> insmod option:\n" );for (i =0 ; i <ARRAY_SIZE (cx88_boards); i++)printk (KERN_ERR "%s: card=%d -> %s\n" , core->name, i, cx88_boards[i].name);
@@ -3510,8 +3508,8 @@ static void cx88_card_setup(struct cx88_core *core)for (i =0 ; i <ARRAY_SIZE (buffer); i++)if (2 !=i2c_master_send (&core->i2c_client, buffer[i],2 )) -warn_printk (core,"Unable to enable " -"tuner(%i).\n" , i); +warn_printk (core,"Unable to enable tuner(%i).\n" , + i); }break ;case CX88_BOARD_MSI_TVANYWHERE_MASTER :
drivers/media/pci/cx88/cx88-dsp.c +6 -6
@@ -186,8 +186,8 @@ static s32 detect_a2_a2m_eiaj(struct cx88_core *core, s16 x[], u32 N) dual =freq_magnitude (x,N , dual_freq); noise =noise_magnitude (x,N ,FREQ_NOISE_START ,FREQ_NOISE_END ); -dprintk (1 ,"detect a2/a2m/eiaj: carrier=%d, stereo=%d, dual=%d, " -"noise=%d\n" , carrier, stereo, dual, noise); +dprintk (1 ,"detect a2/a2m/eiaj: carrier=%d, stereo=%d, dual=%d, noise=%d\n" , + carrier, stereo, dual, noise);if (stereo > dual) ret =V4L2_TUNER_SUB_STEREO ;
@@ -222,8 +222,8 @@ static s32 detect_btsc(struct cx88_core *core, s16 x[], u32 N)s32 sap =freq_magnitude (x,N ,FREQ_BTSC_SAP );s32 dual_ref =freq_magnitude (x,N ,FREQ_BTSC_DUAL_REF );s32 dual =freq_magnitude (x,N ,FREQ_BTSC_DUAL ); -dprintk (1 ,"detect btsc: dual_ref=%d, dual=%d, sap_ref=%d, sap=%d" -"\n" , dual_ref, dual, sap_ref, sap); +dprintk (1 ,"detect btsc: dual_ref=%d, dual=%d, sap_ref=%d, sap=%d\n" , + dual_ref, dual, sap_ref, sap);/* FIXME: Currently not supported */ return UNSET ; }
@@ -241,8 +241,8 @@ static s16 *read_rds_samples(struct cx88_core *core, u32 *N)u32 current_address =cx_read (srch->ptr1_reg);u32 offset = (current_address - srch->fifo_start + bpl); -dprintk (1 ,"read RDS samples: current_address=%08x (offset=%08x), " -"sample_count=%d, aud_intstat=%08x\n" , current_address, +dprintk (1 ,"read RDS samples: current_address=%08x (offset=%08x), sample_count=%d, aud_intstat=%08x\n" , + current_address, current_address - srch->fifo_start, sample_count,cx_read (MO_AUD_INTSTAT ));
drivers/media/pci/cx88/cx88-dvb.c +2 -4
@@ -625,8 +625,7 @@ static int attach_xc3028(u8 addr, struct cx8802_dev *dev)return -EINVAL ;if (!fe0->dvb.frontend) { -printk (KERN_ERR "%s/2: dvb frontend not attached. " -"Can't attach xc3028\n" , +printk (KERN_ERR "%s/2: dvb frontend not attached. Can't attach xc3028\n" , dev->core->name);return -EINVAL ; }
@@ -665,8 +664,7 @@ static int attach_xc4000(struct cx8802_dev *dev, struct xc4000_config *cfg)return -EINVAL ;if (!fe0->dvb.frontend) { -printk (KERN_ERR "%s/2: dvb frontend not attached. " -"Can't attach xc4000\n" , +printk (KERN_ERR "%s/2: dvb frontend not attached. Can't attach xc4000\n" , dev->core->name);return -EINVAL ; }
drivers/media/pci/cx88/cx88-i2c.c +1 -2
@@ -45,8 +45,7 @@ MODULE_PARM_DESC(i2c_scan,"scan i2c bus at insmod time");static unsigned int i2c_udelay =5 ;module_param (i2c_udelay, int,0644 ); -MODULE_PARM_DESC (i2c_udelay,"i2c delay at insmod time, in usecs " -"(should be 5 or higher). Lower value means higher bus speed." ); +MODULE_PARM_DESC (i2c_udelay,"i2c delay at insmod time, in usecs (should be 5 or higher). Lower value means higher bus speed." ); #define dprintk(level,fmt, arg...) if (i2c_debug >= level) \ printk(KERN_DEBUG "%s: " fmt, core->name , ## arg)
drivers/media/pci/cx88/cx88-mpeg.c +7 -8
@@ -401,8 +401,8 @@ static int cx8802_init_common(struct cx8802_dev *dev) dev->pci_rev = dev->pci->revision;pci_read_config_byte (dev->pci,PCI_LATENCY_TIMER , &dev->pci_lat); -printk (KERN_INFO "%s/2: found at %s, rev: %d, irq: %d, " -"latency: %d, mmio: 0x%llx\n" , dev->core->name, +printk (KERN_INFO "%s/2: found at %s, rev: %d, irq: %d, latency: %d, mmio: 0x%llx\n" , + dev->core->name,pci_name (dev->pci), dev->pci_rev, dev->pci->irq, dev->pci_lat,(unsigned long long )pci_resource_start (dev->pci,0 ));
@@ -690,8 +690,8 @@ int cx8802_unregister_driver(struct cx8802_driver *drv)list_del (&d->drvlist);kfree (d); }else -printk (KERN_ERR "%s/2: cx8802 driver remove " -"failed (%d)\n" , dev->core->name, err); +printk (KERN_ERR "%s/2: cx8802 driver remove failed (%d)\n" , + dev->core->name, err); }mutex_unlock (&dev->core->lock);
@@ -768,8 +768,7 @@ static void cx8802_remove(struct pci_dev *pci_dev)struct cx8802_driver *drv, *tmp;int err; -printk (KERN_WARNING "%s/2: Trying to remove cx8802 driver " -"while cx8802 sub-drivers still loaded?!\n" , +printk (KERN_WARNING "%s/2: Trying to remove cx8802 driver while cx8802 sub-drivers still loaded?!\n" , dev->core->name);list_for_each_entry_safe (drv, tmp, &dev->drvlist, drvlist) {
@@ -777,8 +776,8 @@ static void cx8802_remove(struct pci_dev *pci_dev)if (err ==0 ) {list_del (&drv->drvlist); }else -printk (KERN_ERR "%s/2: cx8802 driver remove " -"failed (%d)\n" , dev->core->name, err); +printk (KERN_ERR "%s/2: cx8802 driver remove failed (%d)\n" , + dev->core->name, err);kfree (drv); } }
drivers/media/pci/cx88/cx88-tvaudio.c +2 -4
@@ -62,8 +62,7 @@ MODULE_PARM_DESC(always_analog,"force analog audio out");static unsigned int radio_deemphasis;module_param (radio_deemphasis,int,0644 ); -MODULE_PARM_DESC (radio_deemphasis,"Radio deemphasis time constant, " -"0=None, 1=50us (elsewhere), 2=75us (USA)" ); +MODULE_PARM_DESC (radio_deemphasis,"Radio deemphasis time constant, 0=None, 1=50us (elsewhere), 2=75us (USA)" ); #define dprintk(fmt, arg...) if (audio_debug) \ printk(KERN_DEBUG "%s/0: " fmt, core->name , ## arg)
@@ -976,8 +975,7 @@ void cx88_set_stereo(struct cx88_core *core, u32 mode, int manual) }if (UNSET != ctl) { -dprintk ("cx88_set_stereo: mask 0x%x, ctl 0x%x " -"[status=0x%x,ctl=0x%x,vol=0x%x]\n" , +dprintk ("cx88_set_stereo: mask 0x%x, ctl 0x%x [status=0x%x,ctl=0x%x,vol=0x%x]\n" , mask, ctl,cx_read (AUD_STATUS ),cx_read (AUD_CTL ),cx_sread (SHADOW_AUD_VOL_CTL ));cx_andor (AUD_CTL , mask, ctl);
drivers/media/pci/cx88/cx88-video.c +2 -2
@@ -1307,8 +1307,8 @@ static int cx8800_initdev(struct pci_dev *pci_dev,/* print pci info */ dev->pci_rev = pci_dev->revision;pci_read_config_byte (pci_dev,PCI_LATENCY_TIMER , &dev->pci_lat); -printk (KERN_INFO "%s/0: found at %s, rev: %d, irq: %d, " -"latency: %d, mmio: 0x%llx\n" , core->name, +printk (KERN_INFO "%s/0: found at %s, rev: %d, irq: %d, latency: %d, mmio: 0x%llx\n" , + core->name,pci_name (pci_dev), dev->pci_rev, pci_dev->irq, dev->pci_lat,(unsigned long long )pci_resource_start (pci_dev,0 ));
Signature · 1 line
2.7.4
PATCH v2 10/58 ddbridge: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/pci/ddbridge/ddbridge-core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/media/pci/ddbridge/ddbridge-core.c +2 -4
@@ -824,8 +824,7 @@ static int dvb_input_attach(struct ddb_input *input) &input->port->dev->pdev->dev, adapter_nr);if (ret <0 ) { -printk (KERN_ERR "ddbridge: Could not register adapter." -"Check if you enabled enough adapters in dvb-core!\n" ); +printk (KERN_ERR "ddbridge: Could not register adapter.Check if you enabled enough adapters in dvb-core!\n" );return ret; } input->attached =1 ;
@@ -1730,8 +1729,7 @@ static __init int module_init_ddbridge(void) {int ret; -printk (KERN_INFO "Digital Devices PCIE bridge driver, " -"Copyright (C) 2010-11 Digital Devices GmbH\n" ); +printk (KERN_INFO "Digital Devices PCIE bridge driver, Copyright (C) 2010-11 Digital Devices GmbH\n" ); ret =ddb_class_create ();if (ret <0 )
Signature · 1 line
2.7.4
PATCH v2 11/58 dm1105: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/pci/dm1105/dm1105.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/pci/dm1105/dm1105.c +1 -2
@@ -315,8 +315,7 @@ static void dm1105_card_list(struct pci_dev *pci)"dm1105: Updating to the latest version might help\n" "dm1105: as well.\n"); } -printk (KERN_ERR "Here is a list of valid choices for the card=<n> " -"insmod option:\n" ); +printk (KERN_ERR "Here is a list of valid choices for the card=<n> insmod option:\n" );for (i =0 ; i <ARRAY_SIZE (dm1105_boards); i++)printk (KERN_ERR "dm1105: card=%d -> %s\n" , i, dm1105_boards[i].name);
Signature · 1 line
2.7.4
PATCH v2 12/58 ivtv: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/pci/ivtv/ivtv-alsa-main.c | 12 +++++------ drivers/media/pci/ivtv/ivtv-driver.c | 37 ++++++++++++--------------------- drivers/media/pci/ivtv/ivtv-firmware.c | 4 ++-- drivers/media/pci/ivtv/ivtv-yuv.c | 8 +++---- drivers/media/pci/ivtv/ivtvfb.c | 3 +-- 5 files changed, 26 insertions(+), 38 deletions(-)
drivers/media/pci/ivtv/ivtv-alsa-main.c +6 -6
@@ -177,8 +177,8 @@ static int snd_ivtv_init(struct v4l2_device *v4l2_dev)#if 0 ret =snd_ivtv_mixer_create (itvsc);if (ret) { -IVTV_ALSA_WARN ("%s: snd_ivtv_mixer_create() failed with err %d:" -" proceeding anyway\n" , __func__, ret); +IVTV_ALSA_WARN ("%s: snd_ivtv_mixer_create() failed with err %d: proceeding anyway\n" , + __func__, ret); }#endif
@@ -235,8 +235,8 @@ static int ivtv_alsa_load(struct ivtv *itv) s = &itv->streams[IVTV_ENC_STREAM_TYPE_PCM ];if (s->vdev.v4l2_dev ==NULL ) { -IVTV_DEBUG_ALSA_INFO ("%s: PCM stream for card is disabled - " -"skipping\n" , __func__); +IVTV_DEBUG_ALSA_INFO ("%s: PCM stream for card is disabled - skipping\n" , + __func__);return 0 ; }
@@ -250,8 +250,8 @@ static int ivtv_alsa_load(struct ivtv *itv)IVTV_ALSA_ERR ("%s: failed to create struct snd_ivtv_card\n" , __func__); }else { -IVTV_DEBUG_ALSA_INFO ("%s: created ivtv ALSA interface instance " -"\n" , __func__); +IVTV_DEBUG_ALSA_INFO ("%s: created ivtv ALSA interface instance \n" , + __func__); }return 0 ; }
drivers/media/pci/ivtv/ivtv-driver.c +13 -24
@@ -885,8 +885,8 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *pdev,pci_read_config_byte (pdev,PCI_LATENCY_TIMER , &pci_latency);if (pci_latency <64 && ivtv_pci_latency) { -IVTV_INFO ("Unreasonably low latency timer, " -"setting to 64 (was %d)\n" , pci_latency); +IVTV_INFO ("Unreasonably low latency timer, setting to 64 (was %d)\n" , + pci_latency);pci_write_config_byte (pdev,PCI_LATENCY_TIMER ,64 );pci_read_config_byte (pdev,PCI_LATENCY_TIMER , &pci_latency); }
@@ -896,8 +896,7 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *pdev,these problems. */ pci_write_config_dword (pdev,0x40 ,0xffff ); -IVTV_DEBUG_INFO ("%d (rev %d) at %02x:%02x.%x, " -"irq: %d, latency: %d, memory: 0x%llx\n" , +IVTV_DEBUG_INFO ("%d (rev %d) at %02x:%02x.%x, irq: %d, latency: %d, memory: 0x%llx\n" , pdev->device, pdev->revision, pdev->bus->number,PCI_SLOT (pdev->devfn),PCI_FUNC (pdev->devfn), pdev->irq, pci_latency, (u64 )itv->base_addr);
@@ -1047,13 +1046,10 @@ static int ivtv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) itv->enc_mem =ioremap_nocache (itv->base_addr +IVTV_ENCODER_OFFSET ,IVTV_ENCODER_SIZE );if (!itv->enc_mem) { -IVTV_ERR ("ioremap failed. Can't get a window into CX23415/6 " -"encoder memory\n" ); -IVTV_ERR ("Each capture card with a CX23415/6 needs 8 MB of " -"vmalloc address space for this window\n" ); +IVTV_ERR ("ioremap failed. Can't get a window into CX23415/6 encoder memory\n" ); +IVTV_ERR ("Each capture card with a CX23415/6 needs 8 MB of vmalloc address space for this window\n" );IVTV_ERR ("Check the output of 'grep Vmalloc /proc/meminfo'\n" ); -IVTV_ERR ("Use the vmalloc= kernel command line option to set " -"VmallocTotal to a larger value\n" ); +IVTV_ERR ("Use the vmalloc= kernel command line option to set VmallocTotal to a larger value\n" ); retval = -ENOMEM ; goto free_mem; }
@@ -1064,14 +1060,10 @@ static int ivtv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) itv->dec_mem =ioremap_nocache (itv->base_addr +IVTV_DECODER_OFFSET ,IVTV_DECODER_SIZE );if (!itv->dec_mem) { -IVTV_ERR ("ioremap failed. Can't get a window into " -"CX23415 decoder memory\n" ); -IVTV_ERR ("Each capture card with a CX23415 needs 8 MB " -"of vmalloc address space for this window\n" ); -IVTV_ERR ("Check the output of 'grep Vmalloc " -"/proc/meminfo'\n" ); -IVTV_ERR ("Use the vmalloc= kernel command line option " -"to set VmallocTotal to a larger value\n" ); +IVTV_ERR ("ioremap failed. Can't get a window into CX23415 decoder memory\n" ); +IVTV_ERR ("Each capture card with a CX23415 needs 8 MB of vmalloc address space for this window\n" ); +IVTV_ERR ("Check the output of 'grep Vmalloc /proc/meminfo'\n" ); +IVTV_ERR ("Use the vmalloc= kernel command line option to set VmallocTotal to a larger value\n" ); retval = -ENOMEM ; goto free_mem; }
@@ -1086,13 +1078,10 @@ static int ivtv_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id) itv->reg_mem =ioremap_nocache (itv->base_addr +IVTV_REG_OFFSET ,IVTV_REG_SIZE );if (!itv->reg_mem) { -IVTV_ERR ("ioremap failed. Can't get a window into CX23415/6 " -"register space\n" ); -IVTV_ERR ("Each capture card with a CX23415/6 needs 64 kB of " -"vmalloc address space for this window\n" ); +IVTV_ERR ("ioremap failed. Can't get a window into CX23415/6 register space\n" ); +IVTV_ERR ("Each capture card with a CX23415/6 needs 64 kB of vmalloc address space for this window\n" );IVTV_ERR ("Check the output of 'grep Vmalloc /proc/meminfo'\n" ); -IVTV_ERR ("Use the vmalloc= kernel command line option to set " -"VmallocTotal to a larger value\n" ); +IVTV_ERR ("Use the vmalloc= kernel command line option to set VmallocTotal to a larger value\n" ); retval = -ENOMEM ; goto free_io; }
drivers/media/pci/ivtv/ivtv-firmware.c +2 -2
@@ -376,8 +376,8 @@ int ivtv_firmware_check(struct ivtv *itv, char *where)/* If something failed & currently idle, try to reload */ if (res && !atomic_read (&itv->capturing) && !atomic_read (&itv->decoding)) { -IVTV_INFO ("Detected in %s that firmware had failed - " -"Reloading\n" , where); +IVTV_INFO ("Detected in %s that firmware had failed - Reloading\n" , + where); res =ivtv_firmware_restart (itv);/* * Even if restarted ok, still signal a problem had occurred.
drivers/media/pci/ivtv/ivtv-yuv.c +4 -4
@@ -88,8 +88,8 @@ static int ivtv_yuv_prep_user_dma(struct ivtv *itv, struct ivtv_user_dma *dma,if (y_pages == y_dma.page_count) {IVTV_DEBUG_WARN - ("failed to map uv user pages, returned %d " -"expecting %d\n" , uv_pages, uv_dma.page_count); + ("failed to map uv user pages, returned %d expecting %d\n" , + uv_pages, uv_dma.page_count);if (uv_pages >=0 ) {for (i =0 ; i < uv_pages; i++)
@@ -100,8 +100,8 @@ static int ivtv_yuv_prep_user_dma(struct ivtv *itv, struct ivtv_user_dma *dma, } }else {IVTV_DEBUG_WARN - ("failed to map y user pages, returned %d " -"expecting %d\n" , y_pages, y_dma.page_count); + ("failed to map y user pages, returned %d expecting %d\n" , + y_pages, y_dma.page_count); }if (y_pages >=0 ) {for (i =0 ; i < y_pages; i++)
drivers/media/pci/ivtv/ivtvfb.c +1 -2
@@ -293,8 +293,7 @@ static int ivtvfb_prep_dec_dma_to_device(struct ivtv *itv,/* Map User DMA */ if (ivtv_udma_setup (itv, ivtv_dest_addr, userbuf, size_in_bytes) <=0 ) {mutex_unlock (&itv->udma.lock); -IVTVFB_WARN ("ivtvfb_prep_dec_dma_to_device, " -"Error with get_user_pages: %d bytes, %d pages returned\n" , +IVTVFB_WARN ("ivtvfb_prep_dec_dma_to_device, Error with get_user_pages: %d bytes, %d pages returned\n" , size_in_bytes, itv->udma.page_count);/* get_user_pages must have failed completely */
Signature · 1 line
2.7.4
PATCH v2 13/58 meye: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/pci/meye/meye.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
drivers/media/pci/meye/meye.c +4 -8
@@ -60,8 +60,7 @@ MODULE_PARM_DESC(gbuffers, "number of capture buffers, default is 2 (32 max)");/* size of a grab buffer */ static unsigned int gbufsize =MEYE_MAX_BUFSIZE ;module_param (gbufsize, int,0444 ); -MODULE_PARM_DESC (gbufsize,"size of the capture buffers, default is 614400" -" (will be rounded up to a page multiple)" ); +MODULE_PARM_DESC (gbufsize,"size of the capture buffers, default is 614400 (will be rounded up to a page multiple)" );/* /dev/videoX registration number */ static int video_nr =-1 ;
@@ -1261,8 +1260,7 @@ static int vidioc_reqbufs(struct file *file, void *fh, meye.grab_fbuffer =rvmalloc (gbuffers * gbufsize);if (!meye.grab_fbuffer) { -printk (KERN_ERR "meye: v4l framebuffer allocation" -" failed\n" ); +printk (KERN_ERR "meye: v4l framebuffer allocation failed\n" );mutex_unlock (&meye.lock);return -ENOMEM ; }
@@ -1659,8 +1657,7 @@ static int meye_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) ret = -EIO ;if ((ret =sony_pic_camera_command (SONY_PIC_COMMAND_SETCAMERA ,1 ))) {v4l2_err (v4l2_dev,"meye: unable to power on the camera\n" ); -v4l2_err (v4l2_dev,"meye: did you enable the camera in " -"sonypi using the module options ?\n" ); +v4l2_err (v4l2_dev,"meye: did you enable the camera in sonypi using the module options ?\n" ); goto outsonypienable; }
@@ -1834,8 +1831,7 @@ static int __init meye_init(void)if (gbufsize >MEYE_MAX_BUFSIZE ) gbufsize =MEYE_MAX_BUFSIZE ; gbufsize =PAGE_ALIGN (gbufsize); -printk (KERN_INFO "meye: using %d buffers with %dk (%dk total) " -"for capture\n" , +printk (KERN_INFO "meye: using %d buffers with %dk (%dk total) for capture\n" , gbuffers, gbufsize /1024 , gbuffers * gbufsize /1024 );return pci_register_driver (&meye_driver);
Signature · 1 line
2.7.4
PATCH v2 14/58 pt1: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/pci/pt1/pt1.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/media/pci/pt1/pt1.c +3 -4
@@ -282,13 +282,12 @@ static int pt1_filter(struct pt1 *pt1, struct pt1_buffer_page *page)continue ;if (upacket >>24 &1 ) -printk_ratelimited (KERN_INFO "earth-pt1: device " -"buffer overflowing. table[%d] buf[%d]\n" , +printk_ratelimited (KERN_INFO "earth-pt1: device buffer overflowing. table[%d] buf[%d]\n" , pt1->table_index, pt1->buf_index); sc = upacket >>26 &0x7 ;if (adap->st_count !=-1 && sc != ((adap->st_count +1 ) &0x7 )) -printk_ratelimited (KERN_INFO "earth-pt1: data loss" -" in streamID(adapter)[%d]\n" , index); +printk_ratelimited (KERN_INFO "earth-pt1: data loss in streamID(adapter)[%d]\n" , + index); adap->st_count = sc; buf = adap->buf;
Signature · 1 line
2.7.4
PATCH v2 15/58 saa7134: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/pci/saa7134/saa7134-alsa.c | 3 +-- drivers/media/pci/saa7134/saa7134-cards.c | 8 +++---- drivers/media/pci/saa7134/saa7134-core.c | 39 ++++++++++++++----------------- drivers/media/pci/saa7134/saa7134-dvb.c | 32 ++++++++++++------------- drivers/media/pci/saa7134/saa7134-input.c | 13 ++++------- 5 files changed, 43 insertions(+), 52 deletions(-)
drivers/media/pci/saa7134/saa7134-alsa.c +1 -2
@@ -813,8 +813,7 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream)int amux, err;if (!saa7134) { -pr_err ("BUG: saa7134 can't find device struct." -" Can't proceed with open\n" ); +pr_err ("BUG: saa7134 can't find device struct. Can't proceed with open\n" );return -ENODEV ; } dev = saa7134->dev;
drivers/media/pci/saa7134/saa7134-cards.c +4 -4
@@ -7341,8 +7341,8 @@ static void hauppauge_eeprom(struct saa7134_dev *dev, u8 *eeprom_data)case 67659 :/* WinTV-HVR1110 (OEM, no IR, hybrid, FM, SVid/Comp, RCA aud) */ break ;default : -pr_warn ("%s: warning: " -"unknown hauppauge model #%d\n" , dev->name, tv.model); +pr_warn ("%s: warning: unknown hauppauge model #%d\n" , + dev->name, tv.model);break ; }
@@ -7920,8 +7920,8 @@ int saa7134_board_init2(struct saa7134_dev *dev) msg.addr =0x0b ; msg.len =1 ;if (1 !=i2c_transfer (&dev->i2c_adap, &msg,1 )) { -pr_warn ("%s: send wake up byte to pic16C505" -"(IR chip) failed\n" , dev->name); +pr_warn ("%s: send wake up byte to pic16C505(IR chip) failed\n" , + dev->name); }else { msg.flags =I2C_M_RD ; rc =i2c_transfer (&dev->i2c_adap, &msg,1 );
drivers/media/pci/saa7134/saa7134-core.c +17 -22
@@ -66,8 +66,7 @@ MODULE_PARM_DESC(latency,"pci latency timer");int saa7134_no_overlay=-1 ;module_param_named (no_overlay, saa7134_no_overlay, int,0444 ); -MODULE_PARM_DESC (no_overlay,"allow override overlay default (0 disables, 1 enables)" -" [some VIA/SIS chipsets are known to have problem with overlay]" ); +MODULE_PARM_DESC (no_overlay,"allow override overlay default (0 disables, 1 enables) [some VIA/SIS chipsets are known to have problem with overlay]" );bool saa7134_userptr;module_param (saa7134_userptr, bool,0644 );
@@ -619,25 +618,25 @@ static irqreturn_t saa7134_irq(int irq, void *dev_id)print_irqstatus (dev,loop,report,status);if (report &SAA7134_IRQ_REPORT_PE ) {/* disable all parity error */ -pr_warn ("%s/irq: looping -- " -"clearing PE (parity error!) enable bit\n" ,dev->name); +pr_warn ("%s/irq: looping -- clearing PE (parity error!) enable bit\n" , + dev->name);saa_clearl (SAA7134_IRQ2 ,SAA7134_IRQ2_INTE_PE ); }else if (report &SAA7134_IRQ_REPORT_GPIO16 ) {/* disable gpio16 IRQ */ -pr_warn ("%s/irq: looping -- " -"clearing GPIO16 enable bit\n" ,dev->name); +pr_warn ("%s/irq: looping -- clearing GPIO16 enable bit\n" , + dev->name);saa_clearl (SAA7134_IRQ2 ,SAA7134_IRQ2_INTE_GPIO16_P );saa_clearl (SAA7134_IRQ2 ,SAA7134_IRQ2_INTE_GPIO16_N ); }else if (report &SAA7134_IRQ_REPORT_GPIO18 ) {/* disable gpio18 IRQs */ -pr_warn ("%s/irq: looping -- " -"clearing GPIO18 enable bit\n" ,dev->name); +pr_warn ("%s/irq: looping -- clearing GPIO18 enable bit\n" , + dev->name);saa_clearl (SAA7134_IRQ2 ,SAA7134_IRQ2_INTE_GPIO18_P );saa_clearl (SAA7134_IRQ2 ,SAA7134_IRQ2_INTE_GPIO18_N ); }else {/* disable all irqs */ -pr_warn ("%s/irq: looping -- " -"clearing all enable bits\n" ,dev->name); +pr_warn ("%s/irq: looping -- clearing all enable bits\n" , + dev->name);saa_writel (SAA7134_IRQ1 ,0 );saa_writel (SAA7134_IRQ2 ,0 ); }
@@ -1081,18 +1080,14 @@ static int saa7134_initdev(struct pci_dev *pci_dev, }#endif if (pci_pci_problems & (PCIPCI_FAIL |PCIAGP_FAIL )) { -pr_info ("%s: quirk: this driver and your " -"chipset may not work together" -" in overlay mode.\n" ,dev->name); +pr_info ("%s: quirk: this driver and your chipset may not work together in overlay mode.\n" , + dev->name);if (!saa7134_no_overlay) { -pr_info ("%s: quirk: overlay " -"mode will be disabled.\n" , +pr_info ("%s: quirk: overlay mode will be disabled.\n" , dev->name); saa7134_no_overlay =1 ; }else { -pr_info ("%s: quirk: overlay " -"mode will be forced. Use this" -" option at your own risk.\n" , +pr_info ("%s: quirk: overlay mode will be forced. Use this option at your own risk.\n" , dev->name); } }
@@ -1106,10 +1101,10 @@ static int saa7134_initdev(struct pci_dev *pci_dev,/* print pci info */ dev->pci_rev = pci_dev->revision;pci_read_config_byte (pci_dev,PCI_LATENCY_TIMER , &dev->pci_lat); -pr_info ("%s: found at %s, rev: %d, irq: %d, " -"latency: %d, mmio: 0x%llx\n" , dev->name, -pci_name (pci_dev), dev->pci_rev, pci_dev->irq, - dev->pci_lat,(unsigned long long )pci_resource_start (pci_dev,0 )); +pr_info ("%s: found at %s, rev: %d, irq: %d, latency: %d, mmio: 0x%llx\n" , + dev->name, +pci_name (pci_dev), dev->pci_rev, pci_dev->irq, + dev->pci_lat,(unsigned long long )pci_resource_start (pci_dev,0 ));pci_set_master (pci_dev); err =pci_set_dma_mask (pci_dev,DMA_BIT_MASK (32 ));if (err) {
drivers/media/pci/saa7134/saa7134-dvb.c +16 -16
@@ -1449,8 +1449,8 @@ static int dvb_init(struct saa7134_dev *dev)if (dvb_attach (tda826x_attach, fe0->dvb.frontend,0x60 , &dev->i2c_adap,0 ) ==NULL ) { -pr_warn ("%s: Medion Quadro, no tda826x " -"found !\n" , __func__); +pr_warn ("%s: Medion Quadro, no tda826x found !\n" , + __func__); goto detach_frontend; }if (dev_id !=0x08 ) {
@@ -1458,8 +1458,8 @@ static int dvb_init(struct saa7134_dev *dev) fe->ops.i2c_gate_ctrl (fe,1 );if (dvb_attach (isl6405_attach, fe, &dev->i2c_adap,0x08 ,0 ,0 ) ==NULL ) { -pr_warn ("%s: Medion Quadro, no ISL6405 " -"found !\n" , __func__); +pr_warn ("%s: Medion Quadro, no ISL6405 found !\n" , + __func__); goto detach_frontend; }if (dev_id ==0x07 ) {
@@ -1629,8 +1629,8 @@ static int dvb_init(struct saa7134_dev *dev)struct dvb_frontend *fe;if (dvb_attach (dvb_pll_attach, fe0->dvb.frontend,0x60 , &dev->i2c_adap,DVB_PLL_PHILIPS_SD1878_TDA8261 ) ==NULL ) { -pr_warn ("%s: MD7134 DVB-S, no SD1878 " -"found !\n" , __func__); +pr_warn ("%s: MD7134 DVB-S, no SD1878 found !\n" , + __func__); goto detach_frontend; }/* we need to open the i2c gate (we know it exists) */
@@ -1638,8 +1638,8 @@ static int dvb_init(struct saa7134_dev *dev) fe->ops.i2c_gate_ctrl (fe,1 );if (dvb_attach (isl6405_attach, fe, &dev->i2c_adap,0x08 ,0 ,0 ) ==NULL ) { -pr_warn ("%s: MD7134 DVB-S, no ISL6405 " -"found !\n" , __func__); +pr_warn ("%s: MD7134 DVB-S, no ISL6405 found !\n" , + __func__); goto detach_frontend; } fe->ops.i2c_gate_ctrl (fe,0 );
@@ -1670,14 +1670,14 @@ static int dvb_init(struct saa7134_dev *dev)if (dvb_attach (tda826x_attach, fe0->dvb.frontend,0x60 , &dev->i2c_adap,0 ) ==NULL ) { -pr_warn ("%s: Asus Tiger 3in1, no " -"tda826x found!\n" , __func__); +pr_warn ("%s: Asus Tiger 3in1, no tda826x found!\n" , + __func__); goto detach_frontend; }if (dvb_attach (lnbp21_attach, fe0->dvb.frontend, &dev->i2c_adap,0 ,0 ) ==NULL ) { -pr_warn ("%s: Asus Tiger 3in1, no lnbp21" -" found!\n" , __func__); +pr_warn ("%s: Asus Tiger 3in1, no lnbp21 found!\n" , + __func__); goto detach_frontend; } }
@@ -1695,14 +1695,14 @@ static int dvb_init(struct saa7134_dev *dev)if (dvb_attach (tda826x_attach, fe0->dvb.frontend,0x60 , &dev->i2c_adap,0 ) ==NULL ) { -pr_warn ("%s: Asus My Cinema PS3-100, no " -"tda826x found!\n" , __func__); +pr_warn ("%s: Asus My Cinema PS3-100, no tda826x found!\n" , + __func__); goto detach_frontend; }if (dvb_attach (lnbp21_attach, fe0->dvb.frontend, &dev->i2c_adap,0 ,0 ) ==NULL ) { -pr_warn ("%s: Asus My Cinema PS3-100, no lnbp21" -" found!\n" , __func__); +pr_warn ("%s: Asus My Cinema PS3-100, no lnbp21 found!\n" , + __func__); goto detach_frontend; } }
drivers/media/pci/saa7134/saa7134-input.c +5 -8
@@ -123,8 +123,7 @@ static int get_key_flydvb_trio(struct IR_i2c *ir, enum rc_type *protocol,struct saa7134_dev *dev = ir->c->adapter->algo_data;if (dev ==NULL ) { -ir_dbg (ir,"get_key_flydvb_trio: " -"ir->c->adapter->algo_data is NULL!\n" ); +ir_dbg (ir,"get_key_flydvb_trio: ir->c->adapter->algo_data is NULL!\n" );return -EIO ; }
@@ -150,8 +149,8 @@ static int get_key_flydvb_trio(struct IR_i2c *ir, enum rc_type *protocol,msleep (10 );continue ; } -ir_dbg (ir,"send wake up byte to pic16C505 (IR chip)" -"failed %dx\n" , attempt); +ir_dbg (ir,"send wake up byte to pic16C505 (IR chip)failed %dx\n" , + attempt);return -EIO ; }if (1 !=i2c_master_recv (ir->c, &b,1 )) {
@@ -174,8 +173,7 @@ static int get_key_msi_tvanywhere_plus(struct IR_i2c *ir, enum rc_type *protocol/* <dev> is needed to access GPIO. Used by the saa_readl macro. */ struct saa7134_dev *dev = ir->c->adapter->algo_data;if (dev ==NULL ) { -ir_dbg (ir,"get_key_msi_tvanywhere_plus: " -"ir->c->adapter->algo_data is NULL!\n" ); +ir_dbg (ir,"get_key_msi_tvanywhere_plus: ir->c->adapter->algo_data is NULL!\n" );return -EIO ; }
@@ -223,8 +221,7 @@ static int get_key_kworld_pc150u(struct IR_i2c *ir, enum rc_type *protocol,/* <dev> is needed to access GPIO. Used by the saa_readl macro. */ struct saa7134_dev *dev = ir->c->adapter->algo_data;if (dev ==NULL ) { -ir_dbg (ir,"get_key_kworld_pc150u: " -"ir->c->adapter->algo_data is NULL!\n" ); +ir_dbg (ir,"get_key_kworld_pc150u: ir->c->adapter->algo_data is NULL!\n" );return -EIO ; }
Signature · 1 line
2.7.4
PATCH v2 16/58 saa7164: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/pci/saa7164/saa7164-buffer.c | 3 +- drivers/media/pci/saa7164/saa7164-bus.c | 4 +- drivers/media/pci/saa7164/saa7164-cards.c | 4 +- drivers/media/pci/saa7164/saa7164-cmd.c | 12 +++--- drivers/media/pci/saa7164/saa7164-core.c | 66 ++++++++++++----------------- drivers/media/pci/saa7164/saa7164-dvb.c | 34 +++++++-------- drivers/media/pci/saa7164/saa7164-encoder.c | 18 ++++---- drivers/media/pci/saa7164/saa7164-fw.c | 10 ++--- drivers/media/pci/saa7164/saa7164-vbi.c | 14 +++--- 9 files changed, 72 insertions(+), 93 deletions(-)
drivers/media/pci/saa7164/saa7164-buffer.c +1 -2
@@ -218,8 +218,7 @@ int saa7164_buffer_activate(struct saa7164_buffer *buf, int i)saa7164_writel (port->bufptr32h + ((sizeof (u32) *2 ) * i), buf->pt_dma);saa7164_writel (port->bufptr32l + ((sizeof (u32) *2 ) * i),0 ); - dprintk(DBGLVL_BUF, " buf[%d] offset 0x%llx (0x%x) " - "buf 0x%llx/%llx (0x%x/%x) nr=%d\n", + dprintk(DBGLVL_BUF, " buf[%d] offset 0x%llx (0x%x) buf 0x%llx/%llx (0x%x/%x) nr=%d\n", buf->idx, (u64)port->bufoffset + (i * sizeof(u32)), saa7164_readl(port->bufoffset + (sizeof(u32) * i)),
drivers/media/pci/saa7164/saa7164-bus.c +2 -2
@@ -427,8 +427,8 @@ int saa7164_bus_get(struct saa7164_dev *dev, struct tmComResInfo* msg, write_distance = curr_gwp + bus->m_dwSizeGetRing - curr_grp;if (bytes_to_read > write_distance) { -printk (KERN_ERR "%s() Invalid bus state, missing msg " -"or mangled ring, faulty H/W / bad code?\n" , __func__); +printk (KERN_ERR "%s() Invalid bus state, missing msg or mangled ring, faulty H/W / bad code?\n" , + __func__); ret =SAA_ERR_INVALID_COMMAND ; goto out; }
drivers/media/pci/saa7164/saa7164-cards.c +2 -2
@@ -726,8 +726,8 @@ void saa7164_card_list(struct saa7164_dev *dev) dev->name, dev->name, dev->name, dev->name); } -printk (KERN_ERR "%s: Here are valid choices for the card=<n> insmod " -"option:\n" , dev->name); +printk (KERN_ERR "%s: Here are valid choices for the card=<n> insmod option:\n" , + dev->name);for (i =0 ; i < saa7164_bcount; i++) printk(KERN_ERR "%s: card=%d -> %s\n",
drivers/media/pci/saa7164/saa7164-cmd.c +5 -7
@@ -301,8 +301,8 @@ static int saa7164_cmd_wait(struct saa7164_dev *dev, u8 seqno)else saa7164_cmd_timeout_seqno (dev, seqno); -dprintk (DBGLVL_CMD ,"%s(seqno=%d) Waiting res = %d " -"(signalled=%d)\n" , __func__, seqno, r, +dprintk (DBGLVL_CMD ,"%s(seqno=%d) Waiting res = %d (signalled=%d)\n" , + __func__, seqno, r, dev->cmds[seqno].signalled); }else ret =SAA_OK ;
@@ -353,8 +353,8 @@ int saa7164_cmd_send(struct saa7164_dev *dev, u8 id, enum tmComResCmd command,int ret;int safety =0 ; -dprintk (DBGLVL_CMD ,"%s(unitid = %s (%d) , command = 0x%x, " -"sel = 0x%x)\n" , __func__,saa7164_unitid_name (dev, id), id, +dprintk (DBGLVL_CMD ,"%s(unitid = %s (%d) , command = 0x%x, sel = 0x%x)\n" , + __func__,saa7164_unitid_name (dev, id), id, command, controlselector);if ((size ==0 ) || (buf ==NULL )) {
@@ -452,9 +452,7 @@ int saa7164_cmd_send(struct saa7164_dev *dev, u8 id, enum tmComResCmd command,if (presponse_t->seqno != pcommand_t->seqno) {dprintk (DBGLVL_CMD , -"wrong event: seqno = %d, " -"expected seqno = %d, " -"will dequeue regardless\n" , +"wrong event: seqno = %d, expected seqno = %d, will dequeue regardless\n" , presponse_t->seqno, pcommand_t->seqno); ret =saa7164_cmd_dequeue (dev);
drivers/media/pci/saa7164/saa7164-core.c +28 -38
166 lines not on this page · raw message
drivers/media/pci/saa7164/saa7164-dvb.c +16 -18
@@ -244,8 +244,8 @@ static int saa7164_dvb_start_port(struct saa7164_port *port)/* Stop the hardware, regardless */ result =saa7164_api_transition_port (port,SAA_DMASTATE_STOP );if ((result !=SAA_OK ) && (result !=SAA_ERR_ALREADY_STOPPED )) { -printk (KERN_ERR "%s() acquire/forced stop transition " -"failed, res = 0x%x\n" , __func__, result); +printk (KERN_ERR "%s() acquire/forced stop transition failed, res = 0x%x\n" , + __func__, result); } ret = -EIO ; goto out;
@@ -261,8 +261,8 @@ static int saa7164_dvb_start_port(struct saa7164_port *port)/* Stop the hardware, regardless */ result =saa7164_api_transition_port (port,SAA_DMASTATE_STOP );if ((result !=SAA_OK ) && (result !=SAA_ERR_ALREADY_STOPPED )) { -printk (KERN_ERR "%s() pause/forced stop transition " -"failed, res = 0x%x\n" , __func__, result); +printk (KERN_ERR "%s() pause/forced stop transition failed, res = 0x%x\n" , + __func__, result); } ret = -EIO ;
@@ -279,8 +279,8 @@ static int saa7164_dvb_start_port(struct saa7164_port *port)/* Stop the hardware, regardless */ result =saa7164_api_transition_port (port,SAA_DMASTATE_STOP );if ((result !=SAA_OK ) && (result !=SAA_ERR_ALREADY_STOPPED )) { -printk (KERN_ERR "%s() run/forced stop transition " -"failed, res = 0x%x\n" , __func__, result); +printk (KERN_ERR "%s() run/forced stop transition failed, res = 0x%x\n" , + __func__, result); } ret = -EIO ;
@@ -357,8 +357,7 @@ static int dvb_register(struct saa7164_port *port)/* Sanity check that the PCI configuration space is active */ if (port->hwcfg.BARLocation ==0 ) { result = -ENOMEM ; -printk (KERN_ERR "%s: dvb_register_adapter failed " -"(errno = %d), NO PCI configuration\n" , +printk (KERN_ERR "%s: dvb_register_adapter failed (errno = %d), NO PCI configuration\n" ,DRIVER_NAME , result); goto fail_adapter; }
@@ -386,8 +385,7 @@ static int dvb_register(struct saa7164_port *port)if (!buf) { result = -ENOMEM ; -printk (KERN_ERR "%s: dvb_register_adapter failed " -"(errno = %d), unable to allocate buffers\n" , +printk (KERN_ERR "%s: dvb_register_adapter failed (errno = %d), unable to allocate buffers\n" ,DRIVER_NAME , result); goto fail_adapter; }
@@ -401,8 +399,8 @@ static int dvb_register(struct saa7164_port *port) result =dvb_register_adapter (&dvb->adapter,DRIVER_NAME ,THIS_MODULE , &dev->pci->dev, adapter_nr);if (result <0 ) { -printk (KERN_ERR "%s: dvb_register_adapter failed " -"(errno = %d)\n" ,DRIVER_NAME , result); +printk (KERN_ERR "%s: dvb_register_adapter failed (errno = %d)\n" , +DRIVER_NAME , result); goto fail_adapter; } dvb->adapter.priv = port;
@@ -410,8 +408,8 @@ static int dvb_register(struct saa7164_port *port)/* register frontend */ result =dvb_register_frontend (&dvb->adapter, dvb->frontend);if (result <0 ) { -printk (KERN_ERR "%s: dvb_register_frontend failed " -"(errno = %d)\n" ,DRIVER_NAME , result); +printk (KERN_ERR "%s: dvb_register_frontend failed (errno = %d)\n" , +DRIVER_NAME , result); goto fail_frontend; }
@@ -444,16 +442,16 @@ static int dvb_register(struct saa7164_port *port) dvb->fe_hw.source =DMX_FRONTEND_0 ; result = dvb->demux.dmx.add_frontend (&dvb->demux.dmx, &dvb->fe_hw);if (result <0 ) { -printk (KERN_ERR "%s: add_frontend failed " -"(DMX_FRONTEND_0, errno = %d)\n" ,DRIVER_NAME , result); +printk (KERN_ERR "%s: add_frontend failed (DMX_FRONTEND_0, errno = %d)\n" , +DRIVER_NAME , result); goto fail_fe_hw; } dvb->fe_mem.source =DMX_MEMORY_FE ; result = dvb->demux.dmx.add_frontend (&dvb->demux.dmx, &dvb->fe_mem);if (result <0 ) { -printk (KERN_ERR "%s: add_frontend failed " -"(DMX_MEMORY_FE, errno = %d)\n" ,DRIVER_NAME , result); +printk (KERN_ERR "%s: add_frontend failed (DMX_MEMORY_FE, errno = %d)\n" , +DRIVER_NAME , result); goto fail_fe_mem; }
drivers/media/pci/saa7164/saa7164-encoder.c +8 -10
@@ -157,8 +157,7 @@ static int saa7164_encoder_buffers_alloc(struct saa7164_port *port) params->pitch);if (!buf) { -printk (KERN_ERR "%s() failed " -"(errno = %d), unable to allocate buffer\n" , +printk (KERN_ERR "%s() failed (errno = %d), unable to allocate buffer\n" , __func__, result); result = -ENOMEM ; goto failed;
@@ -681,8 +680,8 @@ static int saa7164_encoder_start_streaming(struct saa7164_port *port)/* Stop the hardware, regardless */ result =saa7164_api_transition_port (port,SAA_DMASTATE_STOP );if ((result !=SAA_OK ) && (result !=SAA_ERR_ALREADY_STOPPED )) { -printk (KERN_ERR "%s() acquire/forced stop transition " -"failed, res = 0x%x\n" , __func__, result); +printk (KERN_ERR "%s() acquire/forced stop transition failed, res = 0x%x\n" , + __func__, result); } ret = -EIO ; goto out;
@@ -698,8 +697,8 @@ static int saa7164_encoder_start_streaming(struct saa7164_port *port)/* Stop the hardware, regardless */ result =saa7164_api_transition_port (port,SAA_DMASTATE_STOP );if ((result !=SAA_OK ) && (result !=SAA_ERR_ALREADY_STOPPED )) { -printk (KERN_ERR "%s() pause/forced stop transition " -"failed, res = 0x%x\n" , __func__, result); +printk (KERN_ERR "%s() pause/forced stop transition failed, res = 0x%x\n" , + __func__, result); } ret = -EIO ;
@@ -716,8 +715,8 @@ static int saa7164_encoder_start_streaming(struct saa7164_port *port)/* Stop the hardware, regardless */ result =saa7164_api_transition_port (port,SAA_DMASTATE_STOP );if ((result !=SAA_OK ) && (result !=SAA_ERR_ALREADY_STOPPED )) { -printk (KERN_ERR "%s() run/forced stop transition " -"failed, res = 0x%x\n" , __func__, result); +printk (KERN_ERR "%s() run/forced stop transition failed, res = 0x%x\n" , + __func__, result); } ret = -EIO ;
@@ -1026,8 +1025,7 @@ int saa7164_encoder_register(struct saa7164_port *port)/* Sanity check that the PCI configuration space is active */ if (port->hwcfg.BARLocation ==0 ) { -printk (KERN_ERR "%s() failed " -"(errno = %d), NO PCI configuration\n" , +printk (KERN_ERR "%s() failed (errno = %d), NO PCI configuration\n" , __func__, result); result = -ENOMEM ; goto failed;
drivers/media/pci/saa7164/saa7164-fw.c +4 -6
@@ -421,8 +421,8 @@ int saa7164_downloadfirmware(struct saa7164_dev *dev) ret =request_firmware (&fw, fwname, &dev->pci->dev);if (ret) { -printk (KERN_ERR "%s() Upload failed. " -"(file not found?)\n" , __func__); +printk (KERN_ERR "%s() Upload failed. (file not found?)\n" , + __func__);return -ENOMEM ; }
@@ -478,15 +478,13 @@ int saa7164_downloadfirmware(struct saa7164_dev *dev) 0x03) && (saa7164_readl(SAA_DATAREADY_FLAG_ACK) == 0x00) && (version == 0x00)) { -dprintk (DBGLVL_FW ,"BootLoader version in " -"rom %d.%d.%d.%d\n" , +dprintk (DBGLVL_FW ,"BootLoader version in rom %d.%d.%d.%d\n" , (bootloaderversion &0x0000fc00 ) >>10 , (bootloaderversion &0x000003e0 ) >>5 , (bootloaderversion &0x0000001f ), (bootloaderversion &0xffff0000 ) >>16 ); - dprintk(DBGLVL_FW, "BootLoader version " - "in file %d.%d.%d.%d\n", + dprintk(DBGLVL_FW, "BootLoader version in file %d.%d.%d.%d\n", (boothdr->version & 0x0000fc00) >> 10, (boothdr->version & 0x000003e0) >> 5, (boothdr->version & 0x0000001f),
drivers/media/pci/saa7164/saa7164-vbi.c +6 -8
@@ -110,8 +110,7 @@ static int saa7164_vbi_buffers_alloc(struct saa7164_port *port) params->pitch);if (!buf) { -printk (KERN_ERR "%s() failed " -"(errno = %d), unable to allocate buffer\n" , +printk (KERN_ERR "%s() failed (errno = %d), unable to allocate buffer\n" , __func__, result); result = -ENOMEM ; goto failed;
@@ -384,8 +383,8 @@ static int saa7164_vbi_start_streaming(struct saa7164_port *port)/* Stop the hardware, regardless */ result =saa7164_vbi_stop_port (port);if (result !=SAA_OK ) { -printk (KERN_ERR "%s() pause/forced stop transition " -"failed, res = 0x%x\n" , __func__, result); +printk (KERN_ERR "%s() pause/forced stop transition failed, res = 0x%x\n" , + __func__, result); } ret = -EIO ;
@@ -403,8 +402,8 @@ static int saa7164_vbi_start_streaming(struct saa7164_port *port) result =saa7164_vbi_acquire_port (port); result =saa7164_vbi_stop_port (port);if (result !=SAA_OK ) { -printk (KERN_ERR "%s() run/forced stop transition " -"failed, res = 0x%x\n" , __func__, result); +printk (KERN_ERR "%s() run/forced stop transition failed, res = 0x%x\n" , + __func__, result); } ret = -EIO ;
@@ -728,8 +727,7 @@ int saa7164_vbi_register(struct saa7164_port *port)/* Sanity check that the PCI configuration space is active */ if (port->hwcfg.BARLocation ==0 ) { -printk (KERN_ERR "%s() failed " -"(errno = %d), NO PCI configuration\n" , +printk (KERN_ERR "%s() failed (errno = %d), NO PCI configuration\n" , __func__, result); result = -ENOMEM ; goto failed;
Signature · 1 line
2.7.4
PATCH v2 17/58 solo6x10: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/pci/solo6x10/solo6x10-v4l2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/pci/solo6x10/solo6x10-v4l2.c +2 -2
@@ -702,8 +702,8 @@ int solo_v4l2_init(struct solo_dev *solo_dev, unsigned nr)snprintf (solo_dev->vfd->name,sizeof (solo_dev->vfd->name),"%s (%i)" ,SOLO6X10_NAME , solo_dev->vfd->num); -dev_info (&solo_dev->pdev->dev,"Display as /dev/video%d with " -"%d inputs (%d extended)\n" , solo_dev->vfd->num, +dev_info (&solo_dev->pdev->dev,"Display as /dev/video%d with %d inputs (%d extended)\n" , + solo_dev->vfd->num, solo_dev->nr_chans, solo_dev->nr_ext);return 0 ;
Signature · 1 line
2.7.4
PATCH v2 18/58 ttpci: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/pci/ttpci/av7110.c | 29 +++++++++++------------------ drivers/media/pci/ttpci/av7110_hw.c | 12 ++++-------- drivers/media/pci/ttpci/budget-av.c | 3 +-- drivers/media/pci/ttpci/budget-ci.c | 4 +--- drivers/media/pci/ttpci/budget-patch.c | 3 +-- drivers/media/pci/ttpci/budget.c | 3 +-- drivers/media/pci/ttpci/ttpci-eeprom.c | 3 +-- 7 files changed, 20 insertions(+), 37 deletions(-)
drivers/media/pci/ttpci/av7110.c +11 -18
@@ -100,8 +100,7 @@ MODULE_PARM_DESC(adac,"audio DAC type: 0 TI, 1 CRYSTAL, 2 MSP (use if autodetectmodule_param (hw_sections, int,0444 );MODULE_PARM_DESC (hw_sections,"0 use software section filter, 1 use hardware" );module_param (rgb_on, int,0444 ); -MODULE_PARM_DESC (rgb_on,"For Siemens DVB-C cards only: Enable RGB control" -" signal on SCART pin 16 to switch SCART video mode from CVBS to RGB" ); +MODULE_PARM_DESC (rgb_on,"For Siemens DVB-C cards only: Enable RGB control signal on SCART pin 16 to switch SCART video mode from CVBS to RGB" );module_param (volume, int,0444 );MODULE_PARM_DESC (volume,"initial volume: default 255 (range 0-255)" );module_param (budgetpatch, int,0444 );
@@ -833,8 +832,7 @@ static int StartHWFilter(struct dvb_demux_filter *dvbdmxfilter) ret =av7110_fw_request (av7110, buf,20 , &handle,1 );if (ret !=0 || handle >=32 ) { -printk ("dvb-ttpci: %s error buf %04x %04x %04x %04x " -"ret %d handle %04x\n" , +printk ("dvb-ttpci: %s error buf %04x %04x %04x %04x ret %d handle %04x\n" , __func__, buf[0 ], buf[1 ], buf[2 ], buf[3 ], ret, handle); dvbdmxfilter->hw_handle =0xffff ;
@@ -876,8 +874,7 @@ static int StopHWFilter(struct dvb_demux_filter *dvbdmxfilter) buf[2 ] = handle; ret =av7110_fw_request (av7110, buf,3 , answ,2 );if (ret !=0 || answ[1 ] != handle) { -printk ("dvb-ttpci: %s error cmd %04x %04x %04x ret %x " -"resp %04x %04x pid %d\n" , +printk ("dvb-ttpci: %s error cmd %04x %04x %04x ret %x resp %04x %04x pid %d\n" , __func__, buf[0 ], buf[1 ], buf[2 ], ret, answ[0 ], answ[1 ], dvbdmxfilter->feed->pid);if (!ret)
@@ -1532,15 +1529,12 @@ static int get_firmware(struct av7110* av7110) ret =request_firmware (&fw,"dvb-ttpci-01.fw" , &av7110->dev->pci->dev);if (ret) {if (ret == -ENOENT ) { -printk (KERN_ERR "dvb-ttpci: could not load firmware," -" file not found: dvb-ttpci-01.fw\n" ); -printk (KERN_ERR "dvb-ttpci: usually this should be in " -"/usr/lib/hotplug/firmware or /lib/firmware\n" ); -printk (KERN_ERR "dvb-ttpci: and can be downloaded from" -" https://linuxtv.org/download/dvb/firmware/\n" ); +printk (KERN_ERR "dvb-ttpci: could not load firmware, file not found: dvb-ttpci-01.fw\n" ); +printk (KERN_ERR "dvb-ttpci: usually this should be in /usr/lib/hotplug/firmware or /lib/firmware\n" ); +printk (KERN_ERR "dvb-ttpci: and can be downloaded from https://linuxtv.org/download/dvb/firmware/\n" ); }else -printk (KERN_ERR "dvb-ttpci: cannot request firmware" -" (error %i)\n" , ret); +printk (KERN_ERR "dvb-ttpci: cannot request firmware (error %i)\n" , + ret);return -EINVAL ; }
@@ -2700,8 +2694,8 @@ static int av7110_attach(struct saa7146_dev* dev, goto err_stop_arm_9;if (FW_VERSION (av7110->arm_app)<0x2501 ) -printk ("dvb-ttpci: Warning, firmware version 0x%04x is too old. " -"System might be unstable!\n" ,FW_VERSION (av7110->arm_app)); +printk ("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" );if (IS_ERR (thread)) {
@@ -2944,7 +2938,6 @@ static void __exit av7110_exit(void)module_init (av7110_init);module_exit (av7110_exit); -MODULE_DESCRIPTION ("driver for the SAA7146 based AV110 PCI DVB cards by " -"Siemens, Technotrend, Hauppauge" ); +MODULE_DESCRIPTION ("driver for the SAA7146 based AV110 PCI DVB cards by Siemens, Technotrend, Hauppauge" );MODULE_AUTHOR ("Ralph Metzler, Marcus Metzler, others" );MODULE_LICENSE ("GPL" );
drivers/media/pci/ttpci/av7110_hw.c +4 -8
@@ -235,8 +235,7 @@ int av7110_bootarm(struct av7110 *av7110)iwdebi (av7110,DEBISWAP ,DPRAM_BASE ,0x76543210 ,4 );if ((ret=irdebi (av7110,DEBINOSWAP ,DPRAM_BASE ,0 ,4 )) !=0x10325476 ) { -printk (KERN_ERR "dvb-ttpci: debi test in av7110_bootarm() failed: " -"%08x != %08x (check your BIOS 'Plug&Play OS' settings)\n" , +printk (KERN_ERR "dvb-ttpci: debi test in av7110_bootarm() failed: %08x != %08x (check your BIOS 'Plug&Play OS' settings)\n" , ret,0x10325476 );return -1 ; }
@@ -262,8 +261,7 @@ int av7110_bootarm(struct av7110 *av7110)iwdebi (av7110,DEBINOSWAP ,AV7110_BOOT_STATE ,BOOTSTATE_BUFFER_FULL ,2 );if (saa7146_wait_for_debi_done (av7110->dev,1 )) { -printk (KERN_ERR "dvb-ttpci: av7110_bootarm(): " -"saa7146_wait_for_debi_done() timed out\n" ); +printk (KERN_ERR "dvb-ttpci: av7110_bootarm(): saa7146_wait_for_debi_done() timed out\n" );return -ETIMEDOUT ; }saa7146_setgpio (dev,RESET_LINE ,SAA7146_GPIO_OUTHI );
@@ -271,8 +269,7 @@ int av7110_bootarm(struct av7110 *av7110)dprintk (1 ,"load dram code\n" );if (load_dram (av7110, (u32 *)av7110->bin_root, av7110->size_root) <0 ) { -printk (KERN_ERR "dvb-ttpci: av7110_bootarm(): " -"load_dram() failed\n" ); +printk (KERN_ERR "dvb-ttpci: av7110_bootarm(): load_dram() failed\n" );return -1 ; }
@@ -283,8 +280,7 @@ int av7110_bootarm(struct av7110 *av7110)mwdebi (av7110,DEBISWAB ,DPRAM_BASE , av7110->bin_dpram, av7110->size_dpram);if (saa7146_wait_for_debi_done (av7110->dev,1 )) { -printk (KERN_ERR "dvb-ttpci: av7110_bootarm(): " -"saa7146_wait_for_debi_done() timed out after loading DRAM\n" ); +printk (KERN_ERR "dvb-ttpci: av7110_bootarm(): saa7146_wait_for_debi_done() timed out after loading DRAM\n" );return -ETIMEDOUT ; }saa7146_setgpio (dev,RESET_LINE ,SAA7146_GPIO_OUTHI );
drivers/media/pci/ttpci/budget-av.c +1 -2
@@ -1636,5 +1636,4 @@ module_exit(budget_av_exit);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Ralph Metzler, Marcus Metzler, Michael Hunold, others" ); -MODULE_DESCRIPTION ("driver for the SAA7146 based so-called " -"budget PCI DVB w/ analog input and CI-module (e.g. the KNC cards)" ); +MODULE_DESCRIPTION ("driver for the SAA7146 based so-called budget PCI DVB w/ analog input and CI-module (e.g. the KNC cards)" );
drivers/media/pci/ttpci/budget-ci.c +1 -3
@@ -1586,6 +1586,4 @@ module_exit(budget_ci_exit);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Michael Hunold, Jack Thomasson, Andrew de Quincey, others" ); -MODULE_DESCRIPTION ("driver for the SAA7146 based so-called " -"budget PCI DVB cards w/ CI-module produced by " -"Siemens, Technotrend, Hauppauge" ); +MODULE_DESCRIPTION ("driver for the SAA7146 based so-called budget PCI DVB cards w/ CI-module produced by Siemens, Technotrend, Hauppauge" );
drivers/media/pci/ttpci/budget-patch.c +1 -2
@@ -679,5 +679,4 @@ module_exit(budget_patch_exit);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Emard, Roberto Deza, Holger Waechtler, Michael Hunold, others" ); -MODULE_DESCRIPTION ("Driver for full TS modified DVB-S SAA7146+AV7110 " -"based so-called Budget Patch cards" ); +MODULE_DESCRIPTION ("Driver for full TS modified DVB-S SAA7146+AV7110 based so-called Budget Patch cards" );
drivers/media/pci/ttpci/budget.c +1 -2
@@ -897,5 +897,4 @@ module_exit(budget_exit);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Ralph Metzler, Marcus Metzler, Michael Hunold, others" ); -MODULE_DESCRIPTION ("driver for the SAA7146 based so-called " -"budget PCI DVB cards by Siemens, Technotrend, Hauppauge" ); +MODULE_DESCRIPTION ("driver for the SAA7146 based so-called budget PCI DVB cards by Siemens, Technotrend, Hauppauge" );
drivers/media/pci/ttpci/ttpci-eeprom.c +1 -2
@@ -171,5 +171,4 @@ EXPORT_SYMBOL(ttpci_eeprom_parse_mac);MODULE_LICENSE ("GPL" );MODULE_AUTHOR ("Ralph Metzler, Marcus Metzler, others" ); -MODULE_DESCRIPTION ("Decode dvb_net MAC address from EEPROM of PCI DVB cards " -"made by Siemens, Technotrend, Hauppauge" ); +MODULE_DESCRIPTION ("Decode dvb_net MAC address from EEPROM of PCI DVB cards made by Siemens, Technotrend, Hauppauge" );
Signature · 1 line
2.7.4
PATCH v2 19/58 tw68: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/pci/tw68/tw68-video.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-)
drivers/media/pci/tw68/tw68-video.c +7 -9
@@ -279,9 +279,8 @@ static int tw68_set_scale(struct tw68_dev *dev, unsigned int width, height /=2 ;/* we must set for 1-frame */ pr_debug ("%s: width=%d, height=%d, both=%d\n" -" tvnorm h_delay=%d, h_start=%d, h_stop=%d, " -"v_delay=%d, v_start=%d, v_stop=%d\n" , __func__, - width, height,V4L2_FIELD_HAS_BOTH (field), +" tvnorm h_delay=%d, h_start=%d, h_stop=%d, v_delay=%d, v_start=%d, v_stop=%d\n" , + __func__, width, height,V4L2_FIELD_HAS_BOTH (field), norm->h_delay, norm->h_start, norm->h_stop, norm->v_delay, norm->video_v_start, norm->video_v_stop);
@@ -309,16 +308,15 @@ static int tw68_set_scale(struct tw68_dev *dev, unsigned int width,V4L2_FIELD_HAS_TOP (field) ?"T" :"" ,V4L2_FIELD_HAS_BOTTOM (field) ?"B" :"" , v4l2_norm_to_name(dev->tvnorm->id)); -pr_debug ("%s: hactive=%d, hdelay=%d, hscale=%d; " -"vactive=%d, vdelay=%d, vscale=%d\n" , __func__, +pr_debug ("%s: hactive=%d, hdelay=%d, hscale=%d; vactive=%d, vdelay=%d, vscale=%d\n" , + __func__, hactive, hdelay, hscale, vactive, vdelay, vscale); comb = ((vdelay &0x300 ) >>2 ) | ((vactive &0x300 ) >>4 ) | ((hdelay &0x300 ) >>6 ) | ((hactive &0x300 ) >>8 ); -pr_debug ("%s: setting CROP_HI=%02x, VDELAY_LO=%02x, " -"VACTIVE_LO=%02x, HDELAY_LO=%02x, HACTIVE_LO=%02x\n" , +pr_debug ("%s: setting CROP_HI=%02x, VDELAY_LO=%02x, VACTIVE_LO=%02x, HDELAY_LO=%02x, HACTIVE_LO=%02x\n" , __func__, comb, vdelay, vactive, hdelay, hactive);tw_writeb (TW68_CROP_HI , comb);tw_writeb (TW68_VDELAY_LO , vdelay &0xff );
@@ -327,8 +325,8 @@ static int tw68_set_scale(struct tw68_dev *dev, unsigned int width,tw_writeb (TW68_HACTIVE_LO , hactive &0xff ); comb = ((vscale &0xf00 ) >>4 ) | ((hscale &0xf00 ) >>8 ); -pr_debug ("%s: setting SCALE_HI=%02x, VSCALE_LO=%02x, " -"HSCALE_LO=%02x\n" , __func__, comb, vscale, hscale); +pr_debug ("%s: setting SCALE_HI=%02x, VSCALE_LO=%02x, HSCALE_LO=%02x\n" , + __func__, comb, vscale, hscale);tw_writeb (TW68_SCALE_HI , comb);tw_writeb (TW68_VSCALE_LO , vscale);tw_writeb (TW68_HSCALE_LO , hscale);
Signature · 1 line
2.7.4
PATCH v2 20/58 davinci: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/platform/davinci/dm355_ccdc.c | 4 ++-- drivers/media/platform/davinci/dm644x_ccdc.c | 4 ++-- drivers/media/platform/davinci/vpbe.c | 15 +++++---------- drivers/media/platform/davinci/vpfe_capture.c | 6 ++---- drivers/media/platform/davinci/vpif_capture.c | 9 ++------- drivers/media/platform/davinci/vpif_display.c | 9 ++------- drivers/media/platform/davinci/vpss.c | 7 +++---- 7 files changed, 18 insertions(+), 36 deletions(-)
drivers/media/platform/davinci/dm355_ccdc.c +2 -2
@@ -334,8 +334,8 @@ static int ccdc_set_params(void __user *params) x =copy_from_user (&ccdc_raw_params, params,sizeof (ccdc_raw_params));if (x) { -dev_dbg (ccdc_cfg.dev,"ccdc_set_params: error in copying ccdc" -"params, %d\n" , x); +dev_dbg (ccdc_cfg.dev,"ccdc_set_params: error in copying ccdcparams, %d\n" , + x);return -EFAULT ; }
drivers/media/platform/davinci/dm644x_ccdc.c +2 -2
@@ -354,8 +354,8 @@ static int ccdc_set_params(void __user *params) x =copy_from_user (&ccdc_raw_params, params,sizeof (ccdc_raw_params));if (x) { -dev_dbg (ccdc_cfg.dev,"ccdc_set_params: error in copying" -"ccdc params, %d\n" , x); +dev_dbg (ccdc_cfg.dev,"ccdc_set_params: error in copyingccdc params, %d\n" , + x);return -EFAULT ; }
drivers/media/platform/davinci/vpbe.c +5 -10
@@ -705,15 +705,13 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)"v4l2 sub device %s registered\n" , enc_info->module_name); else { -v4l2_err (&vpbe_dev->v4l2_dev,"encoder %s" -" failed to register" , +v4l2_err (&vpbe_dev->v4l2_dev,"encoder %s failed to register" , enc_info->module_name); ret = -ENODEV ; goto fail_kfree_encoders; } }else -v4l2_warn (&vpbe_dev->v4l2_dev,"non-i2c encoders" -" currently not supported" ); +v4l2_warn (&vpbe_dev->v4l2_dev,"non-i2c encoders currently not supported" ); }/* Add amplifier subdevice for dm365 */ if ((strcmp(vpbe_dev->cfg->module_name, "dm365-vpbe-display") == 0) &&
@@ -735,8 +733,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev) amp_info->module_name); }else { vpbe_dev->amp =NULL ; -v4l2_warn (&vpbe_dev->v4l2_dev,"non-i2c amplifiers" -" currently not supported" ); +v4l2_warn (&vpbe_dev->v4l2_dev,"non-i2c amplifiers currently not supported" ); } }else { vpbe_dev->amp =NULL ;
@@ -835,15 +832,13 @@ static int vpbe_probe(struct platform_device *pdev)if (!cfg->module_name[0 ] || !cfg->osd.module_name[0 ] || !cfg->venc.module_name[0 ]) { -v4l2_err (pdev->dev.driver,"vpbe display module names not" -" defined\n" ); +v4l2_err (pdev->dev.driver,"vpbe display module names not defined\n" );return ret; } vpbe_dev =kzalloc (sizeof (*vpbe_dev),GFP_KERNEL );if (vpbe_dev ==NULL ) { -v4l2_err (pdev->dev.driver,"Unable to allocate memory" -" for vpbe_device\n" ); +v4l2_err (pdev->dev.driver,"Unable to allocate memory for vpbe_device\n" );return -ENOMEM ; } vpbe_dev->cfg = cfg;
drivers/media/platform/davinci/vpfe_capture.c +2 -4
@@ -919,8 +919,7 @@ static const struct vpfe_pixel_format *else pixfmt->sizeimage = pixfmt->bytesperline * pixfmt->height; -v4l2_info (&vpfe_dev->v4l2_dev,"adjusted width = %d, height =" -" %d, bpp = %d, bytesperline = %d, sizeimage = %d\n" , +v4l2_info (&vpfe_dev->v4l2_dev,"adjusted width = %d, height = %d, bpp = %d, bytesperline = %d, sizeimage = %d\n" , pixfmt->width, pixfmt->height, vpfe_pix_fmt->bpp, pixfmt->bytesperline, pixfmt->sizeimage);return vpfe_pix_fmt;
@@ -1088,8 +1087,7 @@ static int vpfe_enum_input(struct file *file, void *priv, &subdev, &index, inp->index) < 0) { -v4l2_err (&vpfe_dev->v4l2_dev,"input information not found" -" for the subdev\n" ); +v4l2_err (&vpfe_dev->v4l2_dev,"input information not found for the subdev\n" );return -EINVAL ; } sdinfo = &vpfe_dev->cfg->sub_devs[subdev];
drivers/media/platform/davinci/vpif_capture.c +2 -7
@@ -1152,11 +1152,7 @@ static int vpif_s_dv_timings(struct file *file, void *priv, timings->bt.vfrontporch && (timings->bt.vbackporch || timings->bt.vsync))) { -vpif_dbg (2 , debug,"Timings for width, height, " -"horizontal back porch, horizontal sync, " -"horizontal front porch, vertical back porch, " -"vertical sync and vertical back porch " -"must be defined\n" ); +vpif_dbg (2 , debug,"Timings for width, height, horizontal back porch, horizontal sync, horizontal front porch, vertical back porch, vertical sync and vertical back porch must be defined\n" );return -EINVAL ; }
@@ -1181,8 +1177,7 @@ static int vpif_s_dv_timings(struct file *file, void *priv, std_info->l11 = std_info->vsize - (bt->il_vfrontporch -1 ); }else { -vpif_dbg (2 , debug,"Required timing values for " -"interlaced BT format missing\n" ); +vpif_dbg (2 , debug,"Required timing values for interlaced BT format missing\n" );return -EINVAL ; } }else {
drivers/media/platform/davinci/vpif_display.c +2 -7
@@ -954,11 +954,7 @@ static int vpif_s_dv_timings(struct file *file, void *priv, timings->bt.vfrontporch && (timings->bt.vbackporch || timings->bt.vsync))) { -vpif_dbg (2 , debug,"Timings for width, height, " -"horizontal back porch, horizontal sync, " -"horizontal front porch, vertical back porch, " -"vertical sync and vertical back porch " -"must be defined\n" ); +vpif_dbg (2 , debug,"Timings for width, height, horizontal back porch, horizontal sync, horizontal front porch, vertical back porch, vertical sync and vertical back porch must be defined\n" );return -EINVAL ; }
@@ -983,8 +979,7 @@ static int vpif_s_dv_timings(struct file *file, void *priv, std_info->l11 = std_info->vsize - (bt->il_vfrontporch -1 ); }else { -vpif_dbg (2 , debug,"Required timing values for " -"interlaced BT format missing\n" ); +vpif_dbg (2 , debug,"Required timing values for interlaced BT format missing\n" );return -EINVAL ; } }else {
drivers/media/platform/davinci/vpss.c +3 -4
@@ -261,8 +261,8 @@ static int dm355_enable_clock(enum vpss_clock_sel clock_sel, int en) shift =6 ;break ;default : -printk (KERN_ERR "dm355_enable_clock:" -" Invalid selector: %d\n" , clock_sel); +printk (KERN_ERR "dm355_enable_clock: Invalid selector: %d\n" , + clock_sel);return -EINVAL ; }
@@ -421,8 +421,7 @@ static int vpss_probe(struct platform_device *pdev)else if (!strcmp (platform_name,"dm644x_vpss" )) oper_cfg.platform =DM644X ;else { -dev_err (&pdev->dev,"vpss driver not supported on" -" this platform\n" ); +dev_err (&pdev->dev,"vpss driver not supported on this platform\n" );return -ENODEV ; }
Signature · 1 line
2.7.4
PATCH v2 21/58 exynos4-is: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/platform/exynos4-is/media-dev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/platform/exynos4-is/media-dev.c +1 -2
@@ -938,8 +938,7 @@ static int fimc_md_create_links(struct fimc_md *fmd) csis = fmd->csis[pdata->mux_id].sd;if (WARN (csis ==NULL , -"MIPI-CSI interface specified " -"but s5p-csis module is not loaded!\n" )) +"MIPI-CSI interface specified but s5p-csis module is not loaded!\n" ))return -EINVAL ; pad = sensor->entity.num_pads -1 ;
Signature · 1 line
2.7.4
PATCH v2 22/58 marvell-ccic: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/platform/marvell-ccic/mcam-core.c | 26 +++++++------------------ 1 file changed, 7 insertions(+), 19 deletions(-)
drivers/media/platform/marvell-ccic/mcam-core.c +7 -19
@@ -49,24 +49,17 @@static bool alloc_bufs_at_read;module_param (alloc_bufs_at_read, bool,0444 );MODULE_PARM_DESC (alloc_bufs_at_read, -"Non-zero value causes DMA buffers to be allocated when the " -"video capture device is read, rather than at module load " -"time. This saves memory, but decreases the chances of " -"successfully getting those buffers. This parameter is " -"only used in the vmalloc buffer mode" ); +"Non-zero value causes DMA buffers to be allocated when the video capture device is read, rather than at module load time. This saves memory, but decreases the chances of successfully getting those buffers. This parameter is only used in the vmalloc buffer mode" );static int n_dma_bufs =3 ;module_param (n_dma_bufs, uint,0644 );MODULE_PARM_DESC (n_dma_bufs, -"The number of DMA buffers to allocate. Can be either two " -"(saves memory, makes timing tighter) or three." ); +"The number of DMA buffers to allocate. Can be either two (saves memory, makes timing tighter) or three." );static int dma_buf_size =VGA_WIDTH *VGA_HEIGHT *2 ;/* Worst case */ module_param (dma_buf_size, uint,0444 );MODULE_PARM_DESC (dma_buf_size, -"The size of the allocated DMA buffers. If actual operating " -"parameters require larger buffers, an attempt to reallocate " -"will be made." ); +"The size of the allocated DMA buffers. If actual operating parameters require larger buffers, an attempt to reallocate will be made." );#else /* MCAM_MODE_VMALLOC */ static const bool alloc_bufs_at_read;static const int n_dma_bufs =3 ;/* Used by S/G_PARM */
@@ -75,15 +68,12 @@ static const int n_dma_bufs = 3; /* Used by S/G_PARM */static bool flip;module_param (flip, bool,0444 );MODULE_PARM_DESC (flip, -"If set, the sensor will be instructed to flip the image " -"vertically." ); +"If set, the sensor will be instructed to flip the image vertically." );static int buffer_mode =-1 ;module_param (buffer_mode, int,0444 );MODULE_PARM_DESC (buffer_mode, -"Set the buffer mode to be used; default is to go with what " -"the platform driver asks for. Set to 0 for vmalloc, 1 for " -"DMA contiguous." ); +"Set the buffer mode to be used; default is to go with what the platform driver asks for. Set to 0 for vmalloc, 1 for DMA contiguous." );/* * Status flags. Always manipulated with bit operations.
@@ -1759,8 +1749,7 @@ int mccic_register(struct mcam_camera *cam) cam->buffer_mode = buffer_mode;if (cam->buffer_mode == B_DMA_sg && cam->chip_id ==MCAM_CAFE ) { -printk (KERN_ERR "marvell-cam: Cafe can't do S/G I/O, " -"attempting vmalloc mode instead\n" ); +printk (KERN_ERR "marvell-cam: Cafe can't do S/G I/O, attempting vmalloc mode instead\n" ); cam->buffer_mode = B_vmalloc; }if (!mcam_buffer_mode_supported (cam->buffer_mode)) {
@@ -1828,8 +1817,7 @@ int mccic_register(struct mcam_camera *cam)*/ if (cam->buffer_mode == B_vmalloc && !alloc_bufs_at_read) {if (mcam_alloc_dma_bufs (cam,1 )) -cam_warn (cam,"Unable to alloc DMA buffers at load" -" will try again later." ); +cam_warn (cam,"Unable to alloc DMA buffers at load will try again later." ); }mutex_unlock (&cam->s_mutex);
Signature · 1 line
2.7.4
PATCH v2 23/58 omap: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/platform/omap/omap_vout.c | 24 +++++++++++++----------- drivers/media/platform/omap/omap_vout_vrfb.c | 5 +++-- 2 files changed, 16 insertions(+), 13 deletions(-)
drivers/media/platform/omap/omap_vout.c +13 -11
@@ -408,8 +408,8 @@ static int omapvid_setup_overlay(struct omap_vout_device *vout,v4l2_dbg (1 , debug, &vout->vid_dev->v4l2_dev,"%s enable=%d addr=%pad width=%d\n height=%d color_mode=%d\n" "rotation=%d mirror=%d posx=%d posy=%d out_width = %d \n" -"out_height=%d rotation_type=%d screen_width=%d\n" , - __func__, ovl->is_enabled (ovl), &info.paddr, info.width, info.height, +"out_height=%d rotation_type=%d screen_width=%d\n" , __func__, + ovl->is_enabled (ovl), &info.paddr, info.width, info.height, info.color_mode, info.rotation, info.mirror, info.pos_x, info.pos_y, info.out_width, info.out_height, info.rotation_type, info.screen_width);
@@ -791,7 +791,8 @@ static int omap_vout_buffer_prepare(struct videobuf_queue *q, dma_addr =dma_map_single (vout->vid_dev->v4l2_dev.dev, (void *) addr, size,DMA_TO_DEVICE );if (dma_mapping_error (vout->vid_dev->v4l2_dev.dev, dma_addr)) -v4l2_err (&vout->vid_dev->v4l2_dev,"dma_map_single failed\n" ); +v4l2_err (&vout->vid_dev->v4l2_dev, +"dma_map_single failed\n" ); vout->queued_buf_addr[vb->i] = (u8 *)vout->buf_phy_addr[vb->i]; }
@@ -1657,8 +1658,8 @@ static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i)/* Turn of the pipeline */ ret =omapvid_apply_changes (vout);if (ret) -v4l2_err (&vout->vid_dev->v4l2_dev,"failed to change mode in" -" streamoff\n" ); +v4l2_err (&vout->vid_dev->v4l2_dev, +"failed to change mode in streamoff\n" );INIT_LIST_HEAD (&vout->dma_queue); ret =videobuf_streamoff (&vout->vbq);
@@ -1858,8 +1859,8 @@ static int __init omap_vout_setup_video_data(struct omap_vout_device *vout) vfd = vout->vfd =video_device_alloc ();if (!vfd) { - printk(KERN_ERR VOUT_NAME ": could not allocate" - " video device struct\n"); + printk(KERN_ERR VOUT_NAME + ": could not allocate video device struct\n");v4l2_ctrl_handler_free (hdl);return -ENOMEM ; }
@@ -1984,16 +1985,17 @@ static int __init omap_vout_create_video_devices(struct platform_device *pdev)*/ vfd = vout->vfd;if (video_register_device (vfd,VFL_TYPE_GRABBER ,-1 ) <0 ) { -dev_err (&pdev->dev,": Could not register " -"Video for Linux device\n" ); +dev_err (&pdev->dev, +": Could not register Video for Linux device\n" ); vfd->minor =-1 ; ret = -ENODEV ; goto error2; }video_set_drvdata (vfd, vout); -dev_info (&pdev->dev,": registered and initialized" -" video device %d\n" , vfd->minor); +dev_info (&pdev->dev, +": registered and initialized video device %d\n" , + vfd->minor);if (k == (pdev->num_resources -1 ))return 0 ;
drivers/media/platform/omap/omap_vout_vrfb.c +3 -2
@@ -139,8 +139,9 @@ int omap_vout_setup_vrfb_bufs(struct platform_device *pdev, int vid_num, (void *) &vout->vrfb_dma_tx, &vout->vrfb_dma_tx.dma_ch);if (ret <0 ) { vout->vrfb_dma_tx.req_status =DMA_CHAN_NOT_ALLOTED ; -dev_info (&pdev->dev,": failed to allocate DMA Channel for" -" video%d\n" , vfd->minor); +dev_info (&pdev->dev, +": failed to allocate DMA Channel for video%d\n" , + vfd->minor); }init_waitqueue_head (&vout->vrfb_dma_tx.wait);
Signature · 1 line
2.7.4
PATCH v2 24/58 omap3isp: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/platform/omap3isp/isp.c | 4 +- drivers/media/platform/omap3isp/ispccdc.c | 9 +++-- drivers/media/platform/omap3isp/ispcsi2.c | 13 ++---- drivers/media/platform/omap3isp/ispcsiphy.c | 4 +- drivers/media/platform/omap3isp/isph3a_aewb.c | 8 ++-- drivers/media/platform/omap3isp/isph3a_af.c | 8 ++-- drivers/media/platform/omap3isp/ispstat.c | 58 +++++++++++++++------------ 7 files changed, 54 insertions(+), 50 deletions(-)
drivers/media/platform/omap3isp/isp.c +2 -2
@@ -480,8 +480,8 @@ void omap3isp_hist_dma_done(struct isp_device *isp) omap3isp_stat_pcr_busy(&isp->isp_hist)) {/* Histogram cannot be enabled in this frame anymore */ atomic_set (&isp->isp_hist.buf_err,1 ); -dev_dbg (isp->dev,"hist: Out of synchronization with " -"CCDC. Ignoring next buffer.\n" ); +dev_dbg (isp->dev, +"hist: Out of synchronization with CCDC. Ignoring next buffer.\n" ); } }
drivers/media/platform/omap3isp/ispccdc.c +5 -4
@@ -151,8 +151,8 @@ static int ccdc_lsc_validate_config(struct isp_ccdc_device *ccdc, }if (lsc_cfg->offset &3 ) { -dev_dbg (isp->dev,"CCDC: LSC: Offset must be a multiple of " -"4\n" ); +dev_dbg (isp->dev, +"CCDC: LSC: Offset must be a multiple of 4\n" );return -EINVAL ; }
@@ -416,8 +416,9 @@ static int ccdc_lsc_config(struct isp_ccdc_device *ccdc,return 0 ;if (update != (OMAP3ISP_CCDC_CONFIG_LSC |OMAP3ISP_CCDC_TBL_LSC )) { -dev_dbg (to_device (ccdc),"%s: Both LSC configuration and table " -"need to be supplied\n" , __func__); +dev_dbg (to_device (ccdc), +"%s: Both LSC configuration and table need to be supplied\n" , + __func__);return -EINVAL ; }
drivers/media/platform/omap3isp/ispcsi2.c +4 -9
@@ -753,8 +753,8 @@ void omap3isp_csi2_isr(struct isp_csi2_device *csi2) ISPCSI2_PHY_IRQSTATUS);isp_reg_writel (isp, cpxio1_irqstatus, csi2->regs1,ISPCSI2_PHY_IRQSTATUS ); -dev_dbg (isp->dev,"CSI2: ComplexIO Error IRQ " -"%x\n" , cpxio1_irqstatus); +dev_dbg (isp->dev,"CSI2: ComplexIO Error IRQ %x\n" , + cpxio1_irqstatus); pipe->error = true; }
@@ -763,13 +763,8 @@ void omap3isp_csi2_isr(struct isp_csi2_device *csi2) ISPCSI2_IRQSTATUS_ECC_NO_CORRECTION_IRQ | ISPCSI2_IRQSTATUS_COMPLEXIO2_ERR_IRQ | ISPCSI2_IRQSTATUS_FIFO_OVF_IRQ)) { - dev_dbg(isp->dev, "CSI2 Err:" - " OCP:%d," - " Short_pack:%d," - " ECC:%d," - " CPXIO2:%d," - " FIFO_OVF:%d," - "\n", + dev_dbg(isp->dev, + "CSI2 Err: OCP:%d, Short_pack:%d, ECC:%d, CPXIO2:%d, FIFO_OVF:%d,\n", (csi2_irqstatus & ISPCSI2_IRQSTATUS_OCP_ERR_IRQ) ? 1 : 0, (csi2_irqstatus &
drivers/media/platform/omap3isp/ispcsiphy.c +2 -2
@@ -267,8 +267,8 @@ int omap3isp_csiphy_acquire(struct isp_csiphy *phy)int rval;if (phy->vdd ==NULL ) { -dev_err (phy->isp->dev,"Power regulator for CSI PHY not " -"available\n" ); +dev_err (phy->isp->dev, +"Power regulator for CSI PHY not available\n" );return -ENODEV ; }
drivers/media/platform/omap3isp/isph3a_aewb.c +4 -4
@@ -304,8 +304,8 @@ int omap3isp_h3a_aewb_init(struct isp_device *isp) aewb_recover_cfg =devm_kzalloc (isp->dev,sizeof (*aewb_recover_cfg),GFP_KERNEL );if (!aewb_recover_cfg) { -dev_err (aewb->isp->dev,"AEWB: cannot allocate memory for " -"recover configuration.\n" ); +dev_err (aewb->isp->dev, +"AEWB: cannot allocate memory for recover configuration.\n" );return -ENOMEM ; }
@@ -321,8 +321,8 @@ int omap3isp_h3a_aewb_init(struct isp_device *isp) aewb_recover_cfg->subsample_hor_inc =OMAP3ISP_AEWB_MIN_SUB_INC ;if (h3a_aewb_validate_params (aewb, aewb_recover_cfg)) { -dev_err (aewb->isp->dev,"AEWB: recover configuration is " -"invalid.\n" ); +dev_err (aewb->isp->dev, +"AEWB: recover configuration is invalid.\n" );return -EINVAL ; }
drivers/media/platform/omap3isp/isph3a_af.c +4 -4
@@ -367,8 +367,8 @@ int omap3isp_h3a_af_init(struct isp_device *isp) af_recover_cfg =devm_kzalloc (isp->dev,sizeof (*af_recover_cfg),GFP_KERNEL );if (!af_recover_cfg) { -dev_err (af->isp->dev,"AF: cannot allocate memory for recover " -"configuration.\n" ); +dev_err (af->isp->dev, +"AF: cannot allocate memory for recover configuration.\n" );return -ENOMEM ; }
@@ -379,8 +379,8 @@ int omap3isp_h3a_af_init(struct isp_device *isp) af_recover_cfg->paxel.v_cnt =OMAP3ISP_AF_PAXEL_VERTICAL_COUNT_MIN ; af_recover_cfg->paxel.line_inc =OMAP3ISP_AF_PAXEL_INCREMENT_MIN ;if (h3a_af_validate_params (af, af_recover_cfg)) { -dev_err (af->isp->dev,"AF: recover configuration is " -"invalid.\n" ); +dev_err (af->isp->dev, +"AF: recover configuration is invalid.\n" );return -EINVAL ; }
drivers/media/platform/omap3isp/ispstat.c +33 -25
126 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v2 25/58 s5p-mfc: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 13 ++++++------- drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c | 7 ++----- 2 files changed, 8 insertions(+), 12 deletions(-)
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +6 -7
@@ -793,18 +793,17 @@ static int vidioc_g_crop(struct file *file, void *priv, cr->c.top = top; cr->c.width = ctx->img_width - left - right; cr->c.height = ctx->img_height - top - bottom; -mfc_debug (2 ,"Cropping info [h264]: l=%d t=%d " -"w=%d h=%d (r=%d b=%d fw=%d fh=%d\n" , left, top, - cr->c.width, cr->c.height, right, bottom, - ctx->buf_width, ctx->buf_height); +mfc_debug (2 ,"Cropping info [h264]: l=%d t=%d w=%d h=%d (r=%d b=%d fw=%d fh=%d\n" , + left, top, cr->c.width, cr->c.height, right, bottom, + ctx->buf_width, ctx->buf_height); }else { cr->c.left =0 ; cr->c.top =0 ; cr->c.width = ctx->img_width; cr->c.height = ctx->img_height; -mfc_debug (2 ,"Cropping info: w=%d h=%d fw=%d " -"fh=%d\n" , cr->c.width, cr->c.height, ctx->buf_width, - ctx->buf_height); +mfc_debug (2 ,"Cropping info: w=%d h=%d fw=%d fh=%d\n" , + cr->c.width, cr->c.height, ctx->buf_width, + ctx->buf_height); }return 0 ; }
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c +2 -5
@@ -1293,14 +1293,11 @@ static int s5p_mfc_run_init_dec_buffers(struct s5p_mfc_ctx *ctx)* First set the output frame buffers */ if (ctx->capture_state !=QUEUE_BUFS_MMAPED ) { -mfc_err ("It seems that not all destionation buffers were " -"mmaped\nMFC requires that all destination are mmaped " -"before starting processing\n" ); +mfc_err ("It seems that not all destionation buffers were mmaped\nMFC requires that all destination are mmaped before starting processing\n" );return -EAGAIN ; }if (list_empty (&ctx->src_queue)) { -mfc_err ("Header has been deallocated in the middle of" -" initialization\n" ); +mfc_err ("Header has been deallocated in the middle of initialization\n" );return -EIO ; } temp_vb = list_entry(ctx->src_queue.next, struct s5p_mfc_buf, list);
Signature · 1 line
2.7.4
PATCH v2 26/58 c8sectpfe: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)
drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c +6 -10
@@ -112,8 +112,7 @@ static void channel_swdemux_tsklet(unsigned long data) buf = (u8 *) channel->back_buffer_aligned;dev_dbg (fei->dev, -"chan=%d channel=%p num_packets = %d, buf = %p, pos = 0x%x\n\t" -"rp=0x%lx, wp=0x%lx\n" , +"chan=%d channel=%p num_packets = %d, buf = %p, pos = 0x%x\n\trp=0x%lx, wp=0x%lx\n" , channel->tsin_id, channel, num_packets, buf, pos, rp, wp);for (n =0 ; n < num_packets; n++) {
@@ -789,8 +788,7 @@ static int c8sectpfe_probe(struct platform_device *pdev)/* sanity check value */ if (tsin->tsin_id > fei->hw_stats.num_ib) {dev_err (&pdev->dev, -"tsin-num %d specified greater than number\n\t" -"of input block hw in SoC! (%d)" , +"tsin-num %d specified greater than number\n\tof input block hw in SoC! (%d)" , tsin->tsin_id, fei->hw_stats.num_ib); ret = -EINVAL ; goto err_clk_disable;
@@ -855,8 +853,7 @@ static int c8sectpfe_probe(struct platform_device *pdev) tsin->demux_mapping = index; dev_dbg(fei->dev, - "channel=%p n=%d tsin_num=%d, invert-ts-clk=%d\n\t" - "serial-not-parallel=%d pkt-clk-valid=%d dvb-card=%d\n", + "channel=%p n=%d tsin_num=%d, invert-ts-clk=%d\n\tserial-not-parallel=%d pkt-clk-valid=%d dvb-card=%d\n", fei->channel_data[index], index, tsin->tsin_id, tsin->invert_ts_clk, tsin->serial_not_parallel, tsin->async_not_sync,
@@ -1045,8 +1042,8 @@ static void load_imem_segment(struct c8sectpfei *fei, Elf32_Phdr *phdr,*/ dev_dbg (fei->dev, -"Loading IMEM segment %d 0x%08x\n\t" -" (0x%x bytes) -> 0x%p (0x%x bytes)\n" , seg_num, +"Loading IMEM segment %d 0x%08x\n\t (0x%x bytes) -> 0x%p (0x%x bytes)\n" , +seg_num, phdr->p_paddr, phdr->p_filesz, dest, phdr->p_memsz + phdr->p_memsz /3 );
@@ -1075,8 +1072,7 @@ static void load_dmem_segment(struct c8sectpfei *fei, Elf32_Phdr *phdr,*/ dev_dbg (fei->dev, -"Loading DMEM segment %d 0x%08x\n\t" -"(0x%x bytes) -> 0x%p (0x%x bytes)\n" , +"Loading DMEM segment %d 0x%08x\n\t(0x%x bytes) -> 0x%p (0x%x bytes)\n" , seg_num, phdr->p_paddr, phdr->p_filesz, dst, phdr->p_memsz);
Signature · 1 line
2.7.4
PATCH v2 27/58 ti-vpe: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/platform/ti-vpe/vpdma.c | 22 ++++++++++------------ drivers/media/platform/ti-vpe/vpe.c | 3 +-- 2 files changed, 11 insertions(+), 14 deletions(-)
drivers/media/platform/ti-vpe/vpdma.c +10 -12
@@ -466,10 +466,10 @@ static void dump_cfd(struct vpdma_cfd *cfd)pr_debug ("word2: payload_addr = 0x%08x\n" , cfd->payload_addr); -pr_debug ("word3: pkt_type = %d, direct = %d, class = %d, dest = %d, " -"payload_len = %d\n" ,cfd_get_pkt_type (cfd), -cfd_get_direct (cfd), class,cfd_get_dest (cfd), -cfd_get_payload_len (cfd)); +pr_debug ("word3: pkt_type = %d, direct = %d, class = %d, dest = %d, payload_len = %d\n" , +cfd_get_pkt_type (cfd), +cfd_get_direct (cfd), class,cfd_get_dest (cfd), +cfd_get_payload_len (cfd)); }/*
@@ -574,8 +574,7 @@ static void dump_dtd(struct vpdma_dtd *dtd)pr_debug ("%s data transfer descriptor for channel %d\n" , dir ==DTD_DIR_OUT ?"outbound" :"inbound" , chan); -pr_debug ("word0: data_type = %d, notify = %d, field = %d, 1D = %d, " -"even_ln_skp = %d, odd_ln_skp = %d, line_stride = %d\n" , +pr_debug ("word0: data_type = %d, notify = %d, field = %d, 1D = %d, even_ln_skp = %d, odd_ln_skp = %d, line_stride = %d\n" ,dtd_get_data_type (dtd),dtd_get_notify (dtd),dtd_get_field (dtd),dtd_get_1d (dtd),dtd_get_even_line_skip (dtd),dtd_get_odd_line_skip (dtd),dtd_get_line_stride (dtd));
@@ -586,17 +585,16 @@ static void dump_dtd(struct vpdma_dtd *dtd)pr_debug ("word2: start_addr = %pad\n" , &dtd->start_addr); -pr_debug ("word3: pkt_type = %d, mode = %d, dir = %d, chan = %d, " -"pri = %d, next_chan = %d\n" ,dtd_get_pkt_type (dtd), -dtd_get_mode (dtd), dir, chan,dtd_get_priority (dtd), -dtd_get_next_chan (dtd)); +pr_debug ("word3: pkt_type = %d, mode = %d, dir = %d, chan = %d, pri = %d, next_chan = %d\n" , +dtd_get_pkt_type (dtd), +dtd_get_mode (dtd), dir, chan,dtd_get_priority (dtd), +dtd_get_next_chan (dtd));if (dir ==DTD_DIR_IN )pr_debug ("word4: frame_width = %d, frame_height = %d\n" ,dtd_get_frame_width (dtd),dtd_get_frame_height (dtd));else -pr_debug ("word4: desc_write_addr = 0x%08x, write_desc = %d, " -"drp_data = %d, use_desc_reg = %d\n" , +pr_debug ("word4: desc_write_addr = 0x%08x, write_desc = %d, drp_data = %d, use_desc_reg = %d\n" ,dtd_get_desc_write_addr (dtd),dtd_get_write_desc (dtd),dtd_get_drop_data (dtd),dtd_get_use_desc (dtd));
drivers/media/platform/ti-vpe/vpe.c +1 -2
@@ -1263,8 +1263,7 @@ static irqreturn_t vpe_irq(int irq_vpe, void *data) }if (irqst0 | irqst1) { -dev_warn (dev->v4l2_dev.dev,"Unexpected interrupt: " -"INT0_STATUS0 = 0x%08x, INT0_STATUS1 = 0x%08x\n" , +dev_warn (dev->v4l2_dev.dev,"Unexpected interrupt: INT0_STATUS0 = 0x%08x, INT0_STATUS1 = 0x%08x\n" , irqst0, irqst1); }
Signature · 1 line
2.7.4
PATCH v2 28/58 si470x: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/radio/si470x/radio-si470x-i2c.c | 7 +++---- drivers/media/radio/si470x/radio-si470x-usb.c | 15 +++++++-------- 2 files changed, 10 insertions(+), 12 deletions(-)
drivers/media/radio/si470x/radio-si470x-i2c.c +3 -4
@@ -387,8 +387,8 @@ static int si470x_i2c_probe(struct i2c_client *client, radio->registers[DEVICEID], radio->registers[SI_CHIPID]);if ((radio->registers[SI_CHIPID ] &SI_CHIPID_FIRMWARE ) <RADIO_FW_VERSION ) {dev_warn (&client->dev, -"This driver is known to work with " -"firmware version %hu,\n" ,RADIO_FW_VERSION ); +"This driver is known to work with firmware version %hu,\n" , +RADIO_FW_VERSION );dev_warn (&client->dev,"but the device has firmware version %hu.\n" , radio->registers[SI_CHIPID ] &SI_CHIPID_FIRMWARE );
@@ -400,8 +400,7 @@ static int si470x_i2c_probe(struct i2c_client *client,dev_warn (&client->dev,"If you have some trouble using this driver,\n" );dev_warn (&client->dev, -"please report to V4L ML at " -"[email protected]\n" ); +"please report to V4L ML at [email protected]\n" ); }/* set initial frequency */
drivers/media/radio/si470x/radio-si470x-usb.c +7 -8
@@ -351,8 +351,8 @@ static int si470x_get_scratch_page_versions(struct si470x_device *radio) retval =si470x_get_report (radio, radio->usb_buf,SCRATCH_REPORT_SIZE );if (retval <0 ) -dev_warn (&radio->intf->dev,"si470x_get_scratch: " -"si470x_get_report returned %d\n" , retval); +dev_warn (&radio->intf->dev,"si470x_get_scratch: si470x_get_report returned %d\n" , + retval);else { radio->software_version = radio->usb_buf[1 ]; radio->hardware_version = radio->usb_buf[2 ];
@@ -688,8 +688,8 @@ static int si470x_usb_driver_probe(struct usb_interface *intf, radio->registers[DEVICEID], radio->registers[SI_CHIPID]);if ((radio->registers[SI_CHIPID ] &SI_CHIPID_FIRMWARE ) <RADIO_FW_VERSION ) {dev_warn (&intf->dev, -"This driver is known to work with " -"firmware version %hu,\n" ,RADIO_FW_VERSION ); +"This driver is known to work with firmware version %hu,\n" , +RADIO_FW_VERSION );dev_warn (&intf->dev,"but the device has firmware version %hu.\n" , radio->registers[SI_CHIPID ] &SI_CHIPID_FIRMWARE );
@@ -705,8 +705,8 @@ static int si470x_usb_driver_probe(struct usb_interface *intf, radio->software_version, radio->hardware_version);if (radio->hardware_version <RADIO_HW_VERSION ) {dev_warn (&intf->dev, -"This driver is known to work with " -"hardware version %hu,\n" ,RADIO_HW_VERSION ); +"This driver is known to work with hardware version %hu,\n" , +RADIO_HW_VERSION );dev_warn (&intf->dev,"but the device has hardware version %hu.\n" , radio->hardware_version);
@@ -718,8 +718,7 @@ static int si470x_usb_driver_probe(struct usb_interface *intf,dev_warn (&intf->dev,"If you have some trouble using this driver,\n" );dev_warn (&intf->dev, -"please report to V4L ML at " -"[email protected]\n" ); +"please report to V4L ML at [email protected]\n" ); }/* set led to connect state */
Signature · 1 line
2.7.4
PATCH v2 29/58 si4713: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/radio/si4713/si4713.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)
drivers/media/radio/si4713/si4713.c +6 -7
@@ -716,9 +716,9 @@ static int si4713_tx_tune_status(struct si4713_device *sdev, u8 intack, *power = val[5 ]; *antcap = val[6 ]; *noise = val[7 ]; -v4l2_dbg (1 , debug, &sdev->sd,"%s: response: %d x 10 kHz " -"(power %d, antcap %d, rnl %d)\n" , __func__, - *frequency, *power, *antcap, *noise); +v4l2_dbg (1 , debug, &sdev->sd, +"%s: response: %d x 10 kHz (power %d, antcap %d, rnl %d)\n" , + __func__, *frequency, *power, *antcap, *noise); }return err;
@@ -758,10 +758,9 @@ static int si4713_tx_rds_buff(struct si4713_device *sdev, u8 mode, u16 rdsb,v4l2_dbg (1 , debug, &sdev->sd,"%s: status=0x%02x\n" , __func__, val[0 ]); *cbleft = (s8 )val[2 ] - val[3 ]; -v4l2_dbg (1 , debug, &sdev->sd,"%s: response: interrupts" -" 0x%02x cb avail: %d cb used %d fifo avail" -" %d fifo used %d\n" , __func__, val[1 ], - val[2 ], val[3 ], val[4 ], val[5 ]); +v4l2_dbg (1 , debug, &sdev->sd, +"%s: response: interrupts 0x%02x cb avail: %d cb used %d fifo avail %d fifo used %d\n" , + __func__, val[1 ], val[2 ], val[3 ], val[4 ], val[5 ]); }return err;
Signature · 1 line
2.7.4
PATCH v2 30/58 wl128x: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/radio/wl128x/fmdrv_common.c | 30 +++++++++++++----------------- drivers/media/radio/wl128x/fmdrv_rx.c | 8 ++++---- 2 files changed, 17 insertions(+), 21 deletions(-)
drivers/media/radio/wl128x/fmdrv_common.c +13 -17
@@ -230,10 +230,10 @@ inline void dump_rx_skb_data(struct sk_buff *skb)struct fm_event_msg_hdr *evt_hdr; evt_hdr = (struct fm_event_msg_hdr *)skb->data; -printk (KERN_INFO ">> hdr:%02x len:%02x sts:%02x numhci:%02x " -"opcode:%02x type:%s dlen:%02x" , evt_hdr->hdr, evt_hdr->len, - evt_hdr->status, evt_hdr->num_fm_hci_cmds, evt_hdr->op, - (evt_hdr->rd_wr) ?"RD" :"WR" , evt_hdr->dlen); +printk (KERN_INFO ">> hdr:%02x len:%02x sts:%02x numhci:%02x opcode:%02x type:%s dlen:%02x" , + evt_hdr->hdr, evt_hdr->len, + evt_hdr->status, evt_hdr->num_fm_hci_cmds, evt_hdr->op, + (evt_hdr->rd_wr) ?"RD" :"WR" , evt_hdr->dlen); len_org = skb->len -FM_EVT_MSG_HDR_SIZE ;if (len_org >0 ) {
@@ -271,9 +271,9 @@ static void recv_tasklet(unsigned long arg)/* Process all packets in the RX queue */ while ((skb =skb_dequeue (&fmdev->rx_q))) {if (skb->len <sizeof (struct fm_event_msg_hdr )) { -fmerr ("skb(%p) has only %d bytes, " -"at least need %zu bytes to decode\n" , skb, - skb->len,sizeof (struct fm_event_msg_hdr )); +fmerr ("skb(%p) has only %d bytes, at least need %zu bytes to decode\n" , + skb, + skb->len,sizeof (struct fm_event_msg_hdr ));kfree_skb (skb);continue ; }
@@ -472,8 +472,7 @@ int fmc_send_cmd(struct fmdev *fmdev, u8 fm_op, u16 type, void *payload,if (!wait_for_completion_timeout (&fmdev->maintask_comp,FM_DRV_TX_TIMEOUT )) { -fmerr ("Timeout(%d sec),didn't get reg" -"completion signal from RX tasklet\n" , +fmerr ("Timeout(%d sec),didn't get regcompletion signal from RX tasklet\n" ,jiffies_to_msecs (FM_DRV_TX_TIMEOUT ) /1000 );return -ETIMEDOUT ; }
@@ -523,8 +522,7 @@ static inline int check_cmdresp_status(struct fmdev *fmdev, fm_evt_hdr = (void *)(*skb)->data;if (fm_evt_hdr->status !=0 ) { -fmerr ("irq: opcode %x response status is not zero " -"Initiating irq recovery process\n" , +fmerr ("irq: opcode %x response status is not zero Initiating irq recovery process\n" , fm_evt_hdr->op);mod_timer (&fmdev->irq_info.timer, jiffies +FM_DRV_TX_TIMEOUT );
@@ -564,8 +562,7 @@ static void int_timeout_handler(unsigned long data)* reset stage index & retry count values */ fmirq->stage =0 ; fmirq->retry =0 ; -fmerr ("Recovery action failed during" -"irq processing, max retry reached\n" ); +fmerr ("Recovery action failed duringirq processing, max retry reached\n" );return ; }fm_irq_call_stage (fmdev,FM_SEND_INTMSK_CMD_IDX );
@@ -1516,14 +1513,13 @@ int fmc_prepare(struct fmdev *fmdev)if (!wait_for_completion_timeout (&wait_for_fmdrv_reg_comp,FM_ST_REG_TIMEOUT )) { -fmerr ("Timeout(%d sec), didn't get reg " -"completion signal from ST\n" , +fmerr ("Timeout(%d sec), didn't get reg completion signal from ST\n" ,jiffies_to_msecs (FM_ST_REG_TIMEOUT ) /1000 );return -ETIMEDOUT ; }if (fmdev->streg_cbdata !=0 ) { -fmerr ("ST reg comp CB called with error " -"status %d\n" , fmdev->streg_cbdata); +fmerr ("ST reg comp CB called with error status %d\n" , + fmdev->streg_cbdata);return -EAGAIN ; }
drivers/media/radio/wl128x/fmdrv_rx.c +4 -4
@@ -120,8 +120,8 @@ int fm_rx_set_freq(struct fmdev *fmdev, u32 freq) curr_frq_in_khz = (fmdev->rx.region.bot_freq + ((u32 )curr_frq *FM_FREQ_MUL ));if (curr_frq_in_khz != freq) { -pr_info ("Frequency is set to (%d) but " -"requested freq is (%d)\n" , curr_frq_in_khz, freq); +pr_info ("Frequency is set to (%d) but requested freq is (%d)\n" , + curr_frq_in_khz, freq); }/* Update local cache */
@@ -390,8 +390,8 @@ int fm_rx_set_region(struct fmdev *fmdev, u8 region_to_set) new_frq = fmdev->rx.region.top_freq;if (new_frq) { -fmdbg ("Current freq is not within band limit boundary," -"switching to %d KHz\n" , new_frq); +fmdbg ("Current freq is not within band limit boundary,switching to %d KHz\n" , + new_frq);/* Current RX frequency is not in range. So, update it */ ret =fm_rx_set_freq (fmdev, new_frq); }
Signature · 1 line
2.7.4
PATCH v2 31/58 au0828: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/au0828/au0828-video.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/usb/au0828/au0828-video.c +1 -2
@@ -253,8 +253,7 @@ static int au0828_init_isoc(struct au0828_dev *dev, int max_packets, dev->isoc_ctl.transfer_buffer[i] =usb_alloc_coherent (dev->usbdev, sb_size,GFP_KERNEL , &urb->transfer_dma);if (!dev->isoc_ctl.transfer_buffer[i]) { -printk ("unable to allocate %i bytes for transfer" -" buffer %i%s\n" , +printk ("unable to allocate %i bytes for transfer buffer %i%s\n" , sb_size, i,in_interrupt () ?" while in int" :"" );au0828_uninit_isoc (dev);
Signature · 1 line
2.7.4
PATCH v2 32/58 b2c2: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/b2c2/flexcop-usb.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
drivers/media/usb/b2c2/flexcop-usb.c +5 -6
@@ -33,8 +33,7 @@static int debug;module_param (debug, int,0644 ); -MODULE_PARM_DESC (debug,"set debugging level (1=info,ts=2," -"ctrl=4,i2c=8,v8mem=16 (or-able))." DEBSTATUS ); +MODULE_PARM_DESC (debug,"set debugging level (1=info,ts=2,ctrl=4,i2c=8,v8mem=16 (or-able))." DEBSTATUS );#undef DEBSTATUS #define deb_info(args...) dprintk(0x01, args)
@@ -403,8 +402,8 @@ static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb) frame_size, i, j, ret;int buffer_offset =0 ; -deb_ts ("creating %d iso-urbs with %d frames " -"each of %d bytes size = %d.\n" ,B2C2_USB_NUM_ISO_URB , +deb_ts ("creating %d iso-urbs with %d frames each of %d bytes size = %d.\n" , +B2C2_USB_NUM_ISO_URB ,B2C2_USB_FRAMES_PER_ISO , frame_size, bufsize); fc_usb->iso_buffer = usb_alloc_coherent(fc_usb->udev,
@@ -429,8 +428,8 @@ static int flexcop_usb_transfer_init(struct flexcop_usb *fc_usb)for (i =0 ; i <B2C2_USB_NUM_ISO_URB ; i++) {int frame_offset =0 ;struct urb *urb = fc_usb->iso_urb[i]; -deb_ts ("initializing and submitting urb no. %d " -"(buf_offset: %d).\n" , i, buffer_offset); +deb_ts ("initializing and submitting urb no. %d (buf_offset: %d).\n" , + i, buffer_offset); urb->dev = fc_usb->udev; urb->context = fc_usb;
Signature · 1 line
2.7.4
PATCH v2 33/58 cpia2: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/cpia2/cpia2_usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/media/usb/cpia2/cpia2_usb.c +1 -3
@@ -733,9 +733,7 @@ int cpia2_usb_stream_start(struct camera_data *cam, unsigned int alternate) cam->params.camera_state.stream_mode = old_alt; ret2 =set_alternate (cam,USBIF_CMDONLY );if (ret2 <0 ) { -ERR ("cpia2_usb_change_streaming_alternate(%d) =%d has already " -"failed. Then tried to call " -"set_alternate(USBIF_CMDONLY) = %d.\n" , +ERR ("cpia2_usb_change_streaming_alternate(%d) =%d has already failed. Then tried to call set_alternate(USBIF_CMDONLY) = %d.\n" , alternate, ret, ret2); } }else {
Signature · 1 line
2.7.4
PATCH v2 34/58 cx231xx: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/cx231xx/cx231xx-core.c | 10 ++++------ drivers/media/usb/cx231xx/cx231xx-dvb.c | 4 ++-- 2 files changed, 6 insertions(+), 8 deletions(-)
drivers/media/usb/cx231xx/cx231xx-core.c +4 -6
@@ -241,8 +241,7 @@ static int __usb_control_msg(struct cx231xx *dev, unsigned int pipe,int rc, i;if (reg_debug) { - printk(KERN_DEBUG "%s: (pipe 0x%08x): " - "%s: %02x %02x %02x %02x %02x %02x %02x %02x ", + printk(KERN_DEBUG "%s: (pipe 0x%08x): %s: %02x %02x %02x %02x %02x %02x %02x %02x ", dev->name, pipe, (requesttype & USB_DIR_IN) ? "IN" : "OUT",
@@ -441,8 +440,7 @@ int cx231xx_write_ctrl_reg(struct cx231xx *dev, u8 req, u16 reg, char *buf,if (reg_debug) {int byte; - cx231xx_isocdbg("(pipe 0x%08x): " - "OUT: %02x %02x %02x %02x %02x %02x %02x %02x >>>", + cx231xx_isocdbg("(pipe 0x%08x): OUT: %02x %02x %02x %02x %02x %02x %02x %02x >>>", pipe, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, req, 0, val, reg & 0xff,
@@ -600,8 +598,8 @@ int cx231xx_set_alt_setting(struct cx231xx *dev, u8 index, u8 alt)return -1 ; } -cx231xx_coredbg ("setting alternate %d with wMaxPacketSize=%u," -"Interface = %d\n" , alt, max_pkt_size, +cx231xx_coredbg ("setting alternate %d with wMaxPacketSize=%u,Interface = %d\n" , + alt, max_pkt_size, usb_interface_index);if (usb_interface_index >0 ) {
drivers/media/usb/cx231xx/cx231xx-dvb.c +2 -2
@@ -377,8 +377,8 @@ static int attach_xc5000(u8 addr, struct cx231xx *dev) cfg.i2c_addr = addr;if (!dev->dvb->frontend) { -dev_err (dev->dev,"%s/2: dvb frontend not attached. " -"Can't attach xc5000\n" , dev->name); +dev_err (dev->dev,"%s/2: dvb frontend not attached. Can't attach xc5000\n" , + dev->name);return -EINVAL ; }
Signature · 1 line
2.7.4
PATCH v2 35/58 dvb-usb: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/dvb-usb/cinergyT2-core.c | 6 ++---- drivers/media/usb/dvb-usb/cinergyT2-fe.c | 4 ++-- drivers/media/usb/dvb-usb/dib0700_core.c | 5 +---- drivers/media/usb/dvb-usb/dib0700_devices.c | 3 +-- drivers/media/usb/dvb-usb/dvb-usb-dvb.c | 3 +-- drivers/media/usb/dvb-usb/dvb-usb-firmware.c | 6 ++---- drivers/media/usb/dvb-usb/dw2102.c | 10 ++-------- drivers/media/usb/dvb-usb/friio.c | 4 ++-- drivers/media/usb/dvb-usb/gp8psk.c | 3 +-- drivers/media/usb/dvb-usb/opera1.c | 3 +-- drivers/media/usb/dvb-usb/pctv452e.c | 3 +-- drivers/media/usb/dvb-usb/technisat-usb2.c | 3 +-- 12 files changed, 17 insertions(+), 36 deletions(-)
drivers/media/usb/dvb-usb/cinergyT2-core.c +2 -4
@@ -34,8 +34,7 @@int dvb_usb_cinergyt2_debug;module_param_named (debug, dvb_usb_cinergyt2_debug, int,0644 ); -MODULE_PARM_DESC (debug,"set debugging level (1=info, xfer=2, rc=4 " -"(or-able))." ); +MODULE_PARM_DESC (debug,"set debugging level (1=info, xfer=2, rc=4 (or-able))." );DVB_DEFINE_MOD_OPT_ADAPTER_NR (adapter_nr);
@@ -74,8 +73,7 @@ static int cinergyt2_frontend_attach(struct dvb_usb_adapter *adap) ret =dvb_usb_generic_rw (adap->dev, query,sizeof (query), state,sizeof (state),0 );if (ret <0 ) { -deb_rc ("cinergyt2_power_ctrl() Failed to retrieve sleep " -"state info\n" ); +deb_rc ("cinergyt2_power_ctrl() Failed to retrieve sleep state info\n" ); }/* Copy this pointer as we are gonna need it in the release phase */
drivers/media/usb/dvb-usb/cinergyT2-fe.c +2 -2
@@ -219,8 +219,8 @@ static int cinergyt2_fe_read_signal_strength(struct dvb_frontend *fe, ret =dvb_usb_generic_rw (state->d, cmd,sizeof (cmd), (char *)&status,sizeof (status),0 );if (ret <0 ) { -err ("cinergyt2_fe_read_signal_strength() Failed!" -" (Error=%d)\n" , ret); +err ("cinergyt2_fe_read_signal_strength() Failed! (Error=%d)\n" , + ret);return ret; } *strength = (0xffff -le16_to_cpu (status.gain));
drivers/media/usb/dvb-usb/dib0700_core.c +1 -4
@@ -16,10 +16,7 @@ MODULE_PARM_DESC(debug, "set debugging level (1=info,2=fw,4=fwdata,8=data (or-abstatic int nb_packet_buffer_size =21 ;module_param (nb_packet_buffer_size, int,0644 );MODULE_PARM_DESC (nb_packet_buffer_size, -"Set the dib0700 driver data buffer size. This parameter " -"corresponds to the number of TS packets. The actual size of " -"the data buffer corresponds to this parameter " -"multiplied by 188 (default: 21)" ); +"Set the dib0700 driver data buffer size. This parameter corresponds to the number of TS packets. The actual size of the data buffer corresponds to this parameter multiplied by 188 (default: 21)" );DVB_DEFINE_MOD_OPT_ADAPTER_NR (adapter_nr);
drivers/media/usb/dvb-usb/dib0700_devices.c +1 -2
@@ -26,8 +26,7 @@static int force_lna_activation;module_param (force_lna_activation, int,0644 ); -MODULE_PARM_DESC (force_lna_activation,"force the activation of Low-Noise-Amplifyer(s) (LNA), " -"if applicable for the device (default: 0=automatic/off)." ); +MODULE_PARM_DESC (force_lna_activation,"force the activation of Low-Noise-Amplifyer(s) (LNA), if applicable for the device (default: 0=automatic/off)." );struct dib0700_adapter_state {int (*set_param_save) (struct dvb_frontend *);
drivers/media/usb/dvb-usb/dvb-usb-dvb.c +1 -2
@@ -277,8 +277,7 @@ int dvb_usb_adapter_frontend_init(struct dvb_usb_adapter *adap)for (i =0 ; i < adap->props.num_frontends; i++) {if (adap->props.fe[i].frontend_attach ==NULL ) { -err ("strange: '%s' #%d,%d " -"doesn't want to attach a frontend." , +err ("strange: '%s' #%d,%d doesn't want to attach a frontend." , adap->dev->desc->name, adap->id, i);return 0 ;
drivers/media/usb/dvb-usb/dvb-usb-firmware.c +2 -4
@@ -49,8 +49,7 @@ int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw ret =usb_cypress_writemem (udev,hx.addr,hx.data,hx.len);if (ret != hx.len) { -err ("error while transferring firmware " -"(transferred size: %d, block size: %d)" , +err ("error while transferring firmware (transferred size: %d, block size: %d)" , ret,hx.len); ret = -EINVAL ;break ;
@@ -81,8 +80,7 @@ int dvb_usb_download_firmware(struct usb_device *udev, struct dvb_usb_device_proconst struct firmware *fw =NULL ;if ((ret =request_firmware (&fw, props->firmware, &udev->dev)) !=0 ) { -err ("did not find the firmware file. (%s) " -"Please see linux/Documentation/dvb/ for more details on firmware-problems. (%d)" , +err ("did not find the firmware file. (%s) Please see linux/Documentation/dvb/ for more details on firmware-problems. (%d)" , props->firmware,ret);return ret; }
drivers/media/usb/dvb-usb/dw2102.c +2 -8
@@ -86,8 +86,7 @@ MODULE_PARM_DESC(debug, "set debugging level (1=info 2=xfer 4=rc(or-able))."/* demod probe */ static int demod_probe =1 ;module_param_named (demod, demod_probe, int,0644 ); -MODULE_PARM_DESC (demod,"demod to probe (1=cx24116 2=stv0903+stv6110 " -"4=stv0903+stb6100(or-able))." ); +MODULE_PARM_DESC (demod,"demod to probe (1=cx24116 2=stv0903+stv6110 4=stv0903+stb6100(or-able))." );DVB_DEFINE_MOD_OPT_ADAPTER_NR (adapter_nr);
@@ -2343,12 +2342,7 @@ static struct usb_driver dw2102_driver = {module_usb_driver (dw2102_driver);MODULE_AUTHOR ("Igor M. Liplianin (c) [email protected]" ); -MODULE_DESCRIPTION ("Driver for DVBWorld DVB-S 2101, 2102, DVB-S2 2104," -" DVB-C 3101 USB2.0," -" TeVii S421, S480, S482, S600, S630, S632, S650," -" TeVii S660, S662, Prof 1100, 7500 USB2.0," -" Geniatech SU3000, T220," -" TechnoTrend S2-4600, Terratec Cinergy S2 devices" ); +MODULE_DESCRIPTION ("Driver for DVBWorld DVB-S 2101, 2102, DVB-S2 2104, DVB-C 3101 USB2.0, TeVii S421, S480, S482, S600, S630, S632, S650, TeVii S660, S662, Prof 1100, 7500 USB2.0, Geniatech SU3000, T220, TechnoTrend S2-4600, Terratec Cinergy S2 devices" );MODULE_VERSION ("0.1" );MODULE_LICENSE ("GPL" );MODULE_FIRMWARE (DW2101_FIRMWARE );
drivers/media/usb/dvb-usb/friio.c +2 -2
@@ -320,8 +320,8 @@ static int friio_initialize(struct dvb_usb_device *d)*/ if (rbuf[0 ] &0x80 ) {/* still in PowerOnReset state? */ if (++retry >3 ) { -deb_info ("failed to get the correct" -" FE demod status:0x%02x\n" , rbuf[0 ]); +deb_info ("failed to get the correct FE demod status:0x%02x\n" , + rbuf[0 ]); goto error; }msleep (100 );
drivers/media/usb/dvb-usb/gp8psk.c +1 -2
@@ -117,8 +117,7 @@ static int gp8psk_load_bcm4500fw(struct dvb_usb_device *d)u8 *buf;if ((ret =request_firmware (&fw, bcm4500_firmware, &d->udev->dev)) !=0 ) { -err ("did not find the bcm4500 firmware file. (%s) " -"Please see linux/Documentation/dvb/ for more details on firmware-problems. (%d)" , +err ("did not find the bcm4500 firmware file. (%s) Please see linux/Documentation/dvb/ for more details on firmware-problems. (%d)" , bcm4500_firmware,ret);return ret; }
drivers/media/usb/dvb-usb/opera1.c +1 -2
@@ -453,8 +453,7 @@ static int opera1_xilinx_load_firmware(struct usb_device *dev,info ("start downloading fpga firmware %s" ,filename);if ((ret =request_firmware (&fw, filename, &dev->dev)) !=0 ) { -err ("did not find the firmware file. (%s) " -"Please see linux/Documentation/dvb/ for more details on firmware-problems." , +err ("did not find the firmware file. (%s) Please see linux/Documentation/dvb/ for more details on firmware-problems." , filename);return ret; }else {
drivers/media/usb/dvb-usb/pctv452e.c +1 -2
@@ -446,8 +446,7 @@ static int pctv452e_i2c_msg(struct dvb_usb_device *d, u8 addr,return rcv_len; failed: -err ("I2C error %d; %02X %02X %02X %02X %02X -> " -"%02X %02X %02X %02X %02X." , +err ("I2C error %d; %02X %02X %02X %02X %02X -> %02X %02X %02X %02X %02X." , ret,SYNC_BYTE_OUT , id, addr <<1 , snd_len, rcv_len, buf[0 ], buf[1 ], buf[4 ], buf[5 ], buf[6 ]);
drivers/media/usb/dvb-usb/technisat-usb2.c +1 -2
@@ -50,8 +50,7 @@ MODULE_PARM_DESC(debug,static int disable_led_control;module_param (disable_led_control, int,0444 );MODULE_PARM_DESC (disable_led_control, -"disable LED control of the device " -"(default: 0 - LED control is active)." ); +"disable LED control of the device (default: 0 - LED control is active)." );/* device private data */ struct technisat_usb2_state {
Signature · 1 line
2.7.4
PATCH v2 36/58 dvb-usb-v2: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c | 12 +++++------- drivers/media/usb/dvb-usb-v2/mxl111sf.c | 10 ++++------ 2 files changed, 9 insertions(+), 13 deletions(-)
drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c +5 -7
@@ -666,8 +666,8 @@ static int mxl111sf_i2c_hw_xfer_msg(struct mxl111sf_state *state,if (rd_status[i] ==0x04 ) {if (i <7 ) { -mxl_i2c ("i2c fifo empty!" -" @ %d" , i); +mxl_i2c ("i2c fifo empty! @ %d" , + i); msg->buf[(index*8 )+i] = i2c_r_data[(i*3 )+1 ];/* read again */
@@ -692,8 +692,7 @@ static int mxl111sf_i2c_hw_xfer_msg(struct mxl111sf_state *state, } goto stop_copy; }else { -mxl_i2c ("readagain " -"ERROR!" ); +mxl_i2c ("readagain ERROR!" ); } }else { msg->buf[(index*8)+i] =
@@ -827,9 +826,8 @@ int mxl111sf_i2c_xfer(struct i2c_adapter *adap, mxl111sf_i2c_hw_xfer_msg(state, &msg[i]) :mxl111sf_i2c_sw_xfer_msg (state, &msg[i]);if (mxl_fail (ret)) { -mxl_debug_adv ("failed with error %d on i2c " -"transaction %d of %d, %sing %d bytes " -"to/from 0x%02x" , ret, i+1 , num, +mxl_debug_adv ("failed with error %d on i2c transaction %d of %d, %sing %d bytes to/from 0x%02x" , + ret, i+1 , num, (msg[i].flags &I2C_M_RD ) ?"read" :"writ" , msg[i].len, msg[i].addr);
drivers/media/usb/dvb-usb-v2/mxl111sf.c +4 -6
@@ -29,8 +29,7 @@int dvb_usb_mxl111sf_debug;module_param_named (debug, dvb_usb_mxl111sf_debug, int,0644 ); -MODULE_PARM_DESC (debug,"set debugging level " -"(1=info, 2=xfer, 4=i2c, 8=reg, 16=adv (or-able))." ); +MODULE_PARM_DESC (debug,"set debugging level (1=info, 2=xfer, 4=i2c, 8=reg, 16=adv (or-able))." );static int dvb_usb_mxl111sf_isoc;module_param_named (isoc, dvb_usb_mxl111sf_isoc, int,0644 );
@@ -137,8 +136,8 @@ int mxl111sf_write_reg_mask(struct mxl111sf_state *state,#if 1 /* dont know why this usually errors out on the first try */ if (mxl_fail (ret)) -pr_err ("error writing addr: 0x%02x, mask: 0x%02x, " -"data: 0x%02x, retrying..." , addr, mask, data); +pr_err ("error writing addr: 0x%02x, mask: 0x%02x, data: 0x%02x, retrying..." , + addr, mask, data); ret =mxl111sf_read_reg (state, addr, &val);#endif
@@ -946,8 +945,7 @@ static int mxl111sf_init(struct dvb_usb_device *d)case 138001 :break ;default : -printk (KERN_WARNING "%s: warning: " -"unknown hauppauge model #%d\n" , +printk (KERN_WARNING "%s: warning: unknown hauppauge model #%d\n" , __func__, state->tv.model); }#endif
Signature · 1 line
2.7.4
PATCH v2 37/58 em28xx: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/em28xx/em28xx-cards.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/usb/em28xx/em28xx-cards.c +1 -2
@@ -1561,8 +1561,7 @@ struct em28xx_board em28xx_boards[] = { } }, }, [EM2820_BOARD_PINNACLE_DVC_90] = { - .name = "Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker " - "/ Kworld DVD Maker 2 / Plextor ConvertX PX-AV100U", + .name = "Pinnacle Dazzle DVC 90/100/101/107 / Kaiser Baas Video to DVD maker / Kworld DVD Maker 2 / Plextor ConvertX PX-AV100U", .tuner_type = TUNER_ABSENT, /* capture only board */ .decoder = EM28XX_SAA711X, .input = { {
Signature · 1 line
2.7.4
PATCH v2 38/58 gspca: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/gspca/gspca.c | 3 +-- drivers/media/usb/gspca/m5602/m5602_core.c | 11 ++++------- drivers/media/usb/gspca/mr97310a.c | 3 +-- drivers/media/usb/gspca/ov519.c | 3 +-- drivers/media/usb/gspca/pac207.c | 4 ++-- drivers/media/usb/gspca/pac7302.c | 3 +-- drivers/media/usb/gspca/sn9c20x.c | 6 ++---- drivers/media/usb/gspca/sq905.c | 3 +-- drivers/media/usb/gspca/sq905c.c | 4 ++-- drivers/media/usb/gspca/stv06xx/stv06xx.c | 9 +++------ drivers/media/usb/gspca/sunplus.c | 3 +-- drivers/media/usb/gspca/topro.c | 3 +-- drivers/media/usb/gspca/zc3xx.c | 3 +-- 13 files changed, 21 insertions(+), 37 deletions(-)
drivers/media/usb/gspca/gspca.c +1 -2
@@ -201,8 +201,7 @@ static int alloc_and_submit_int_urb(struct gspca_dev *gspca_dev, buffer_len =le16_to_cpu (ep->wMaxPacketSize); interval = ep->bInterval; -PDEBUG (D_CONF ,"found int in endpoint: 0x%x, " -"buffer_len=%u, interval=%u" , +PDEBUG (D_CONF ,"found int in endpoint: 0x%x, buffer_len=%u, interval=%u" , ep->bEndpointAddress, buffer_len, interval); dev = gspca_dev->dev;
drivers/media/usb/gspca/m5602/m5602_core.c +4 -7
@@ -154,8 +154,8 @@ int m5602_read_sensor(struct sd *sd, const u8 address, err =m5602_read_bridge (sd,M5602_XB_I2C_DATA , &(i2c_data[i])); -PDEBUG (D_CONF ,"Reading sensor register " -"0x%x containing 0x%x " , address, *i2c_data); +PDEBUG (D_CONF ,"Reading sensor register 0x%x containing 0x%x " , + address, *i2c_data); }return err; }
@@ -441,13 +441,10 @@ MODULE_DESCRIPTION(DRIVER_DESC);MODULE_LICENSE ("GPL" );module_param (force_sensor, int,S_IRUGO |S_IWUSR );MODULE_PARM_DESC (force_sensor, -"forces detection of a sensor, " -"1 = OV9650, 2 = S5K83A, 3 = S5K4AA, " -"4 = MT9M111, 5 = PO1030, 6 = OV7660" ); +"forces detection of a sensor, 1 = OV9650, 2 = S5K83A, 3 = S5K4AA, 4 = MT9M111, 5 = PO1030, 6 = OV7660" );module_param (dump_bridge, bool,S_IRUGO |S_IWUSR );MODULE_PARM_DESC (dump_bridge,"Dumps all usb bridge registers at startup" );module_param (dump_sensor, bool,S_IRUGO |S_IWUSR ); -MODULE_PARM_DESC (dump_sensor,"Dumps all usb sensor registers " -"at startup providing a sensor is found" ); +MODULE_PARM_DESC (dump_sensor,"Dumps all usb sensor registers at startup providing a sensor is found" );
drivers/media/usb/gspca/mr97310a.c +1 -2
@@ -72,8 +72,7 @@#define MR97310A_MIN_CLOCKDIV_MAX 8#define MR97310A_MIN_CLOCKDIV_DEFAULT 3 -MODULE_AUTHOR ("Kyle Guinn <[email protected]>," -"Theodore Kilgore <[email protected]>" ); +MODULE_AUTHOR ("Kyle Guinn <[email protected]>,Theodore Kilgore <[email protected]>" );MODULE_DESCRIPTION ("GSPCA/Mars-Semi MR97310A USB Camera Driver" );MODULE_LICENSE ("GPL" );
drivers/media/usb/gspca/ov519.c +1 -2
@@ -4326,8 +4326,7 @@ static void ov511_pkt_scan(struct gspca_dev *gspca_dev,/* Frame end */ if ((in[9 ] +1 ) *8 != gspca_dev->pixfmt.width || (in[10 ] +1 ) *8 != gspca_dev->pixfmt.height) { -PERR ("Invalid frame size, got: %dx%d," -" requested: %dx%d\n" , +PERR ("Invalid frame size, got: %dx%d, requested: %dx%d\n" , (in[9 ] +1 ) *8 , (in[10 ] +1 ) *8 , gspca_dev->pixfmt.width, gspca_dev->pixfmt.height);
drivers/media/usb/gspca/pac207.c +2 -2
@@ -179,8 +179,8 @@ static int sd_config(struct gspca_dev *gspca_dev, }PDEBUG (D_PROBE , -"Pixart PAC207BCA Image Processor and Control Chip detected" -" (vid/pid 0x%04X:0x%04X)" , id->idVendor, id->idProduct); +"Pixart PAC207BCA Image Processor and Control Chip detected (vid/pid 0x%04X:0x%04X)" , + id->idVendor, id->idProduct); cam = &gspca_dev->cam; cam->cam_mode = sif_mode;
drivers/media/usb/gspca/pac7302.c +1 -2
@@ -105,8 +105,7 @@#define PAC7302_EXPOSURE_DEFAULT 66/* 33 ms / 30 fps */ #define PAC7302_EXPOSURE_KNEE 133/* 66 ms / 15 fps */ -MODULE_AUTHOR ("Jean-Francois Moine <http://moinejf.free.fr>, " -"Thomas Kaiser [email protected]" ); +MODULE_AUTHOR ("Jean-Francois Moine <http://moinejf.free.fr>, Thomas Kaiser [email protected]" );MODULE_DESCRIPTION ("Pixart PAC7302" );MODULE_LICENSE ("GPL" );
drivers/media/usb/gspca/sn9c20x.c +2 -4
@@ -29,8 +29,7 @@#include <linux/dmi.h> -MODULE_AUTHOR ("Brian Johnson <[email protected]>, " -"microdia project <[email protected]>" ); +MODULE_AUTHOR ("Brian Johnson <[email protected]>, microdia project <[email protected]>" );MODULE_DESCRIPTION ("GSPCA/SN9C20X USB Camera Driver" );MODULE_LICENSE ("GPL" );
@@ -1948,8 +1947,7 @@ static int sd_isoc_init(struct gspca_dev *gspca_dev) intf =usb_ifnum_to_if (gspca_dev->dev, gspca_dev->iface);if (intf->num_altsetting !=9 ) { -pr_warn ("sn9c20x camera with unknown number of alt " -"settings (%d), please report!\n" , +pr_warn ("sn9c20x camera with unknown number of alt settings (%d), please report!\n" , intf->num_altsetting); gspca_dev->alt = intf->num_altsetting;return 0 ;
drivers/media/usb/gspca/sq905.c +1 -2
@@ -41,8 +41,7 @@#include <linux/slab.h> #include "gspca.h" -MODULE_AUTHOR ("Adam Baker <[email protected]>, " -"Theodore Kilgore <[email protected]>" ); +MODULE_AUTHOR ("Adam Baker <[email protected]>, Theodore Kilgore <[email protected]>" );MODULE_DESCRIPTION ("GSPCA/SQ905 USB Camera Driver" );MODULE_LICENSE ("GPL" );
drivers/media/usb/gspca/sq905c.c +2 -2
@@ -210,8 +210,8 @@ static int sd_config(struct gspca_dev *gspca_dev,int ret;PDEBUG (D_PROBE , -"SQ9050 camera detected" -" (vid/pid 0x%04X:0x%04X)" , id->idVendor, id->idProduct); +"SQ9050 camera detected (vid/pid 0x%04X:0x%04X)" , + id->idVendor, id->idProduct); ret =sq905c_command (gspca_dev,SQ905C_GET_ID ,0 );if (ret <0 ) {
drivers/media/usb/gspca/stv06xx/stv06xx.c +3 -6
@@ -412,8 +412,7 @@ static void stv06xx_pkt_scan(struct gspca_dev *gspca_dev, len -=4 ;if (len < chunk_len) { -PERR ("URB packet length is smaller" -" than the specified chunk length" ); +PERR ("URB packet length is smaller than the specified chunk length" ); gspca_dev->last_packet_type =DISCARD_PACKET ;return ; }
@@ -455,8 +454,7 @@ static void stv06xx_pkt_scan(struct gspca_dev *gspca_dev, sd->to_skip = gspca_dev->pixfmt.width *4 ;if (chunk_len) -PERR ("Chunk length is " -"non-zero on a SOF" ); +PERR ("Chunk length is non-zero on a SOF" );break ;case 0x8002 :
@@ -469,8 +467,7 @@ static void stv06xx_pkt_scan(struct gspca_dev *gspca_dev, NULL, 0);if (chunk_len) -PERR ("Chunk length is " -"non-zero on a EOF" ); +PERR ("Chunk length is non-zero on a EOF" );break ;case 0x0005 :
drivers/media/usb/gspca/sunplus.c +1 -2
@@ -368,8 +368,7 @@ static void spca504_read_info(struct gspca_dev *gspca_dev) info[i] = gspca_dev->usb_buf[0 ]; }PDEBUG (D_STREAM , -"Read info: %d %d %d %d %d %d." -" Should be 1,0,2,2,0,0" , +"Read info: %d %d %d %d %d %d. Should be 1,0,2,2,0,0" , info[0 ], info[1 ], info[2 ], info[3 ], info[4 ], info[5 ]); }
drivers/media/usb/gspca/topro.c +1 -2
@@ -24,8 +24,7 @@#include "gspca.h" MODULE_DESCRIPTION ("Topro TP6800/6810 gspca webcam driver" ); -MODULE_AUTHOR ("Jean-Francois Moine <http://moinejf.free.fr>, " -"Anders Blomdell <[email protected]>" ); +MODULE_AUTHOR ("Jean-Francois Moine <http://moinejf.free.fr>, Anders Blomdell <[email protected]>" );MODULE_LICENSE ("GPL" );static int force_sensor =-1 ;
drivers/media/usb/gspca/zc3xx.c +1 -2
@@ -25,8 +25,7 @@#include "gspca.h" #include "jpeg.h" -MODULE_AUTHOR ("Jean-Francois Moine <http://moinejf.free.fr>, " -"Serge A. Suchkov <[email protected]>" ); +MODULE_AUTHOR ("Jean-Francois Moine <http://moinejf.free.fr>, Serge A. Suchkov <[email protected]>" );MODULE_DESCRIPTION ("GSPCA ZC03xx/VC3xx USB Camera Driver" );MODULE_LICENSE ("GPL" );
Signature · 1 line
2.7.4
PATCH v2 39/58 hdpvr: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/hdpvr/hdpvr-core.c | 9 +++------ drivers/media/usb/hdpvr/hdpvr-i2c.c | 7 +++---- drivers/media/usb/hdpvr/hdpvr-video.c | 4 +--- 3 files changed, 7 insertions(+), 13 deletions(-)
drivers/media/usb/hdpvr/hdpvr-core.c +3 -6
@@ -41,13 +41,11 @@ MODULE_PARM_DESC(hdpvr_debug, "enable debugging output");static uint default_video_input =HDPVR_VIDEO_INPUTS ;module_param (default_video_input, uint,S_IRUGO |S_IWUSR ); -MODULE_PARM_DESC (default_video_input,"default video input: 0=Component / " -"1=S-Video / 2=Composite" ); +MODULE_PARM_DESC (default_video_input,"default video input: 0=Component / 1=S-Video / 2=Composite" );static uint default_audio_input =HDPVR_AUDIO_INPUTS ;module_param (default_audio_input, uint,S_IRUGO |S_IWUSR ); -MODULE_PARM_DESC (default_audio_input,"default audio input: 0=RCA back / " -"1=RCA front / 2=S/PDIF" ); +MODULE_PARM_DESC (default_audio_input,"default audio input: 0=RCA back / 1=RCA front / 2=S/PDIF" );static bool boost_audio;module_param (boost_audio, bool,S_IRUGO |S_IWUSR );
@@ -165,8 +163,7 @@ static int device_authorization(struct hdpvr_device *dev) dev->flags |=HDPVR_FLAG_AC3_CAP ;break ;default : -v4l2_info (&dev->v4l2_dev,"untested firmware, the driver might" -" not work.\n" ); +v4l2_info (&dev->v4l2_dev,"untested firmware, the driver might not work.\n" );if (dev->fw_ver >=HDPVR_FIRMWARE_VERSION_AC3 ) dev->flags |=HDPVR_FLAG_AC3_CAP ;else
drivers/media/usb/hdpvr/hdpvr-i2c.c +3 -4
@@ -145,15 +145,14 @@ static int hdpvr_transfer(struct i2c_adapter *i2c_adapter, struct i2c_msg *msgs, msgs[0].len); }else if (num ==2 ) {if (msgs[0 ].addr != msgs[1 ].addr) { -v4l2_warn (&dev->v4l2_dev,"refusing 2-phase i2c xfer " -"with conflicting target addresses\n" ); +v4l2_warn (&dev->v4l2_dev,"refusing 2-phase i2c xfer with conflicting target addresses\n" ); retval = -EINVAL ; goto out; }if ((msgs[0 ].flags &I2C_M_RD ) || !(msgs[1 ].flags &I2C_M_RD )) { -v4l2_warn (&dev->v4l2_dev,"refusing complex xfer with " -"r0=%d, r1=%d\n" , msgs[0 ].flags &I2C_M_RD , +v4l2_warn (&dev->v4l2_dev,"refusing complex xfer with r0=%d, r1=%d\n" , + msgs[0 ].flags &I2C_M_RD , msgs[1 ].flags &I2C_M_RD ); retval = -EINVAL ; goto out;
drivers/media/usb/hdpvr/hdpvr-video.c +1 -3
@@ -337,9 +337,7 @@ static int hdpvr_stop_streaming(struct hdpvr_device *dev) buf =kmalloc (dev->bulk_in_size,GFP_KERNEL );if (!buf) -v4l2_err (&dev->v4l2_dev,"failed to allocate temporary buffer " -"for emptying the internal device buffer. " -"Next capture start will be slow\n" ); +v4l2_err (&dev->v4l2_dev,"failed to allocate temporary buffer for emptying the internal device buffer. Next capture start will be slow\n" ); dev->status =STATUS_SHUTTING_DOWN ;hdpvr_config_call (dev,CTRL_STOP_STREAMING_VALUE ,0x00 );
Signature · 1 line
2.7.4
PATCH v2 40/58 pvrusb2: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/pvrusb2/pvrusb2-audio.c | 4 +- drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c | 4 +- drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c | 4 +- drivers/media/usb/pvrusb2/pvrusb2-debugifc.c | 4 +- drivers/media/usb/pvrusb2/pvrusb2-eeprom.c | 7 +- drivers/media/usb/pvrusb2/pvrusb2-encoder.c | 29 ++-- drivers/media/usb/pvrusb2/pvrusb2-hdw.c | 181 ++++++++---------------- drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 33 ++--- drivers/media/usb/pvrusb2/pvrusb2-io.c | 35 ++--- drivers/media/usb/pvrusb2/pvrusb2-ioread.c | 36 ++--- drivers/media/usb/pvrusb2/pvrusb2-std.c | 3 +- drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 10 +- drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c | 4 +- drivers/media/usb/pvrusb2/pvrusb2-wm8775.c | 3 +- 14 files changed, 118 insertions(+), 239 deletions(-)
drivers/media/usb/pvrusb2/pvrusb2-audio.c +1 -3
@@ -74,9 +74,7 @@ void pvr2_msp3400_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd) input = sp->def[hdw->input_val]; }else {pvr2_trace (PVR2_TRACE_ERROR_LEGS , -"*** WARNING *** subdev msp3400 set_input:" -" Invalid routing scheme (%u)" -" and/or input (%d)" , +"*** WARNING *** subdev msp3400 set_input: Invalid routing scheme (%u) and/or input (%d)" , sid, hdw->input_val);return ; }
drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c +1 -3
@@ -72,9 +72,7 @@ void pvr2_cs53l32a_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd) (hdw->input_val < 0) || (hdw->input_val >= sp->cnt)) {pvr2_trace (PVR2_TRACE_ERROR_LEGS , -"*** WARNING *** subdev v4l2 set_input:" -" Invalid routing scheme (%u)" -" and/or input (%d)" , +"*** WARNING *** subdev v4l2 set_input: Invalid routing scheme (%u) and/or input (%d)" , sid, hdw->input_val);return ; }
drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c +1 -3
@@ -137,9 +137,7 @@ void pvr2_cx25840_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd) (hdw->input_val < 0) || (hdw->input_val >= sp->cnt)) {pvr2_trace (PVR2_TRACE_ERROR_LEGS , -"*** WARNING *** subdev cx2584x set_input:" -" Invalid routing scheme (%u)" -" and/or input (%d)" , +"*** WARNING *** subdev cx2584x set_input: Invalid routing scheme (%u) and/or input (%d)" , sid, hdw->input_val);return ; }
drivers/media/usb/pvrusb2/pvrusb2-debugifc.c +1 -3
@@ -176,9 +176,7 @@ int pvr2_debugifc_print_status(struct pvr2_hdw *hdw,pvr2_stream_get_stats (sp, &stats,0 ); ccnt = scnprintf( buf,acnt, - "Bytes streamed=%u" - " URBs: queued=%u idle=%u ready=%u" - " processed=%u failed=%u\n", + "Bytes streamed=%u URBs: queued=%u idle=%u ready=%u processed=%u failed=%u\n", stats.bytes_processed, stats.buffers_in_queue, stats.buffers_in_idle,
drivers/media/usb/pvrusb2/pvrusb2-eeprom.c +3 -4
@@ -56,8 +56,7 @@ static u8 *pvr2_eeprom_fetch(struct pvr2_hdw *hdw) eeprom =kmalloc (EEPROM_SIZE ,GFP_KERNEL );if (!eeprom) {pvr2_trace (PVR2_TRACE_ERROR_LEGS , -"Failed to allocate memory" -" required to read eeprom" ); +"Failed to allocate memory required to read eeprom" );return NULL ; }
@@ -74,8 +73,8 @@ static u8 *pvr2_eeprom_fetch(struct pvr2_hdw *hdw)strange but it's what they do) */ mode16 = (addr &1 ); eepromSize = (mode16 ?4096 :256 ); -trace_eeprom ("Examining %d byte eeprom at location 0x%x" -" using %d bit addressing" ,eepromSize,addr, +trace_eeprom ("Examining %d byte eeprom at location 0x%x using %d bit addressing" , + eepromSize,addr, mode16 ?16 :8 ); msg[0 ].addr = addr;
drivers/media/usb/pvrusb2/pvrusb2-encoder.c +8 -21
@@ -188,9 +188,7 @@ static int pvr2_encoder_cmd(void *ctxt,if (arg_cnt_send > (ARRAY_SIZE (wrData) -4 )) {pvr2_trace (PVR2_TRACE_ERROR_LEGS , -"Failed to write cx23416 command" -" - too many input arguments" -" (was given %u limit %lu)" , +"Failed to write cx23416 command - too many input arguments (was given %u limit %lu)" , arg_cnt_send, (long unsigned )ARRAY_SIZE (wrData) -4 );return -EINVAL ; }
@@ -198,9 +196,7 @@ static int pvr2_encoder_cmd(void *ctxt,if (arg_cnt_recv > (ARRAY_SIZE (rdData) -4 )) {pvr2_trace (PVR2_TRACE_ERROR_LEGS , -"Failed to write cx23416 command" -" - too many return arguments" -" (was given %u limit %lu)" , +"Failed to write cx23416 command - too many return arguments (was given %u limit %lu)" , arg_cnt_recv, (long unsigned )ARRAY_SIZE (rdData) -4 );return -EINVAL ; }
@@ -248,14 +244,12 @@ static int pvr2_encoder_cmd(void *ctxt, retry_flag = !0 ;pvr2_trace (PVR2_TRACE_ERROR_LEGS , -"Encoder timed out waiting for us" -"; arranging to retry" ); +"Encoder timed out waiting for us; arranging to retry" ); }else {pvr2_trace (PVR2_TRACE_ERROR_LEGS , -"***WARNING*** device's encoder" -" appears to be stuck" -" (status=0x%08x)" ,rdData[0 ]); +"***WARNING*** device's encoder appears to be stuck (status=0x%08x)" , +rdData[0 ]); } pvr2_trace( PVR2_TRACE_ERROR_LEGS,
@@ -293,11 +287,7 @@ static int pvr2_encoder_cmd(void *ctxt, }pvr2_trace (PVR2_TRACE_ERROR_LEGS , -"Giving up on command." -" This is normally recovered via a firmware" -" reload and re-initialization; concern" -" is only warranted if this happens repeatedly" -" and rapidly." ); +"Giving up on command. This is normally recovered via a firmware reload and re-initialization; concern is only warranted if this happens repeatedly and rapidly." );break ; } wrData[0 ] =0x7 ;
@@ -325,9 +315,7 @@ static int pvr2_encoder_vcmd(struct pvr2_hdw *hdw, int cmd,if (args >ARRAY_SIZE (data)) {pvr2_trace (PVR2_TRACE_ERROR_LEGS , -"Failed to write cx23416 command" -" - too many arguments" -" (was given %u limit %lu)" , +"Failed to write cx23416 command - too many arguments (was given %u limit %lu)" , args, (long unsigned )ARRAY_SIZE (data));return -EINVAL ; }
@@ -433,8 +421,7 @@ int pvr2_encoder_configure(struct pvr2_hdw *hdw) {int ret;int val; -pvr2_trace (PVR2_TRACE_ENCODER ,"pvr2_encoder_configure" -" (cx2341x module)" ); +pvr2_trace (PVR2_TRACE_ENCODER ,"pvr2_encoder_configure (cx2341x module)" ); hdw->enc_ctl_state.port =CX2341X_PORT_STREAMING ; hdw->enc_ctl_state.width = hdw->res_hor_val; hdw->enc_ctl_state.height = hdw->res_ver_val;
drivers/media/usb/pvrusb2/pvrusb2-hdw.c +59 -122
457 lines not on this page · raw message
drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c +11 -22
@@ -62,8 +62,7 @@ static int pvr2_i2c_write(struct pvr2_hdw *hdw, /* Context */if (!data) length =0 ;if (length > (sizeof (hdw->cmd_buffer) -3 )) {pvr2_trace (PVR2_TRACE_ERROR_LEGS , -"Killing an I2C write to %u that is too large" -" (desired=%u limit=%u)" , +"Killing an I2C write to %u that is too large (desired=%u limit=%u)" , i2c_addr, length,(unsigned int )(sizeof (hdw->cmd_buffer) -3 ));return -ENOTSUPP ;
@@ -90,8 +89,7 @@ static int pvr2_i2c_write(struct pvr2_hdw *hdw, /* Context */if (hdw->cmd_buffer[0 ] !=8 ) { ret = -EIO ;if (hdw->cmd_buffer[0 ] !=7 ) { -trace_i2c ("unexpected status" -" from i2_write[%d]: %d" , +trace_i2c ("unexpected status from i2_write[%d]: %d" , i2c_addr,hdw->cmd_buffer[0 ]); } }
@@ -116,16 +114,14 @@ static int pvr2_i2c_read(struct pvr2_hdw *hdw, /* Context */if (!data) dlen =0 ;if (dlen > (sizeof (hdw->cmd_buffer) -4 )) {pvr2_trace (PVR2_TRACE_ERROR_LEGS , -"Killing an I2C read to %u that has wlen too large" -" (desired=%u limit=%u)" , +"Killing an I2C read to %u that has wlen too large (desired=%u limit=%u)" , i2c_addr, dlen,(unsigned int )(sizeof (hdw->cmd_buffer) -4 ));return -ENOTSUPP ; }if (res && (rlen > (sizeof (hdw->cmd_buffer) -1 ))) {pvr2_trace (PVR2_TRACE_ERROR_LEGS , -"Killing an I2C read to %u that has rlen too large" -" (desired=%u limit=%u)" , +"Killing an I2C read to %u that has rlen too large (desired=%u limit=%u)" , i2c_addr, rlen,(unsigned int )(sizeof (hdw->cmd_buffer) -1 ));return -ENOTSUPP ;
@@ -154,8 +150,7 @@ static int pvr2_i2c_read(struct pvr2_hdw *hdw, /* Context */if (hdw->cmd_buffer[0 ] !=8 ) { ret = -EIO ;if (hdw->cmd_buffer[0 ] !=7 ) { -trace_i2c ("unexpected status" -" from i2_read[%d]: %d" , +trace_i2c ("unexpected status from i2_read[%d]: %d" , i2c_addr,hdw->cmd_buffer[0 ]); } }
@@ -352,13 +347,11 @@ static int i2c_hack_cx25840(struct pvr2_hdw *hdw,if ((ret !=0 ) || (*rdata ==0x04 ) || (*rdata ==0x0a )) {pvr2_trace (PVR2_TRACE_ERROR_LEGS , -"WARNING: Detected a wedged cx25840 chip;" -" the device will not work." ); +"WARNING: Detected a wedged cx25840 chip; the device will not work." );pvr2_trace (PVR2_TRACE_ERROR_LEGS ,"WARNING: Try power cycling the pvrusb2 device." );pvr2_trace (PVR2_TRACE_ERROR_LEGS , -"WARNING: Disabling further access to the device" -" to prevent other foul-ups." ); +"WARNING: Disabling further access to the device to prevent other foul-ups." );// This blocks all further communication with the part. hdw->i2c_func[0x44 ] =NULL ;pvr2_hdw_render_useless (hdw);
@@ -444,8 +437,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, } }else if (num ==2 ) {if (msgs[0 ].addr != msgs[1 ].addr) { -trace_i2c ("i2c refusing 2 phase transfer with" -" conflicting target addresses" ); +trace_i2c ("i2c refusing 2 phase transfer with conflicting target addresses" ); ret = -ENOTSUPP ; goto done; }
@@ -477,8 +469,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap, ret =2 ; goto done; }else { -trace_i2c ("i2c refusing complex transfer" -" read0=%d read1=%d" , +trace_i2c ("i2c refusing complex transfer read0=%d read1=%d" , (msgs[0 ].flags &I2C_M_RD ), (msgs[1 ].flags &I2C_M_RD )); }
@@ -492,8 +483,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap,for (idx =0 ; idx < num; idx++) { cnt = msgs[idx].len; printk(KERN_INFO - "pvrusb2 i2c xfer %u/%u:" - " addr=0x%x len=%d %s", + "pvrusb2 i2c xfer %u/%u: addr=0x%x len=%d %s", idx+1,num, msgs[idx].addr, cnt,
@@ -668,8 +658,7 @@ void pvr2_i2c_core_init(struct pvr2_hdw *hdw)the emulated IR receiver. */ if (do_i2c_probe (hdw,0x71 )) {pvr2_trace (PVR2_TRACE_INFO , -"Device has newer IR hardware;" -" disabling unneeded virtual IR device" ); +"Device has newer IR hardware; disabling unneeded virtual IR device" ); hdw->i2c_func[0x18 ] =NULL ;/* Remember that this is a different device... */ hdw->ir_scheme_active =PVR2_IR_SCHEME_24XXX_MCE ;
drivers/media/usb/pvrusb2/pvrusb2-io.c +13 -22
@@ -113,8 +113,7 @@ static const char *pvr2_buffer_state_decode(enum pvr2_buffer_state st)static void pvr2_buffer_describe (struct pvr2_buffer *bp,const char *msg) { pvr2_trace(PVR2_TRACE_INFO, - "buffer%s%s %p state=%s id=%d status=%d" - " stream=%p purb=%p sig=0x%x", + "buffer%s%s %p state=%s id=%d status=%d stream=%p purb=%p sig=0x%x", (msg ? " " : ""), (msg ? msg : ""), bp,
@@ -156,8 +155,7 @@ static void pvr2_buffer_remove(struct pvr2_buffer *bp) (*cnt)--; (*bcnt) -= ccnt;pvr2_trace (PVR2_TRACE_BUF_FLOW , -"/*---TRACE_FLOW---*/" -" bufferPool %8s dec cap=%07d cnt=%02d" , +"/*---TRACE_FLOW---*/ bufferPool %8s dec cap=%07d cnt=%02d" ,pvr2_buffer_state_decode (bp->state),*bcnt,*cnt); bp->state = pvr2_buffer_state_none; }
@@ -198,8 +196,7 @@ static int pvr2_buffer_set_ready(struct pvr2_buffer *bp) (sp->r_count)++; sp->r_bcount += bp->used_count;pvr2_trace (PVR2_TRACE_BUF_FLOW , -"/*---TRACE_FLOW---*/" -" bufferPool %8s inc cap=%07d cnt=%02d" , +"/*---TRACE_FLOW---*/ bufferPool %8s inc cap=%07d cnt=%02d" ,pvr2_buffer_state_decode (bp->state), sp->r_bcount,sp->r_count);spin_unlock_irqrestore (&sp->list_lock,irq_flags);
@@ -224,8 +221,7 @@ static void pvr2_buffer_set_idle(struct pvr2_buffer *bp) (sp->i_count)++; sp->i_bcount += bp->max_count;pvr2_trace (PVR2_TRACE_BUF_FLOW , -"/*---TRACE_FLOW---*/" -" bufferPool %8s inc cap=%07d cnt=%02d" , +"/*---TRACE_FLOW---*/ bufferPool %8s inc cap=%07d cnt=%02d" ,pvr2_buffer_state_decode (bp->state), sp->i_bcount,sp->i_count);spin_unlock_irqrestore (&sp->list_lock,irq_flags);
@@ -249,8 +245,7 @@ static void pvr2_buffer_set_queued(struct pvr2_buffer *bp) (sp->q_count)++; sp->q_bcount += bp->max_count;pvr2_trace (PVR2_TRACE_BUF_FLOW , -"/*---TRACE_FLOW---*/" -" bufferPool %8s inc cap=%07d cnt=%02d" , +"/*---TRACE_FLOW---*/ bufferPool %8s inc cap=%07d cnt=%02d" ,pvr2_buffer_state_decode (bp->state), sp->q_bcount,sp->q_count);spin_unlock_irqrestore (&sp->list_lock,irq_flags);
@@ -293,8 +288,8 @@ static void pvr2_buffer_done(struct pvr2_buffer *bp) bp->signature =0 ; bp->stream =NULL ;usb_free_urb (bp->purb); -pvr2_trace (PVR2_TRACE_BUF_POOL ,"/*---TRACE_FLOW---*/" -" bufferDone %p" ,bp); +pvr2_trace (PVR2_TRACE_BUF_POOL ,"/*---TRACE_FLOW---*/ bufferDone %p" , + bp); }static int pvr2_stream_buffer_count (struct pvr2_stream *sp,unsigned int cnt)
@@ -306,8 +301,7 @@ static int pvr2_stream_buffer_count(struct pvr2_stream *sp,unsigned int cnt)if (cnt == sp->buffer_total_count)return 0 ;pvr2_trace (PVR2_TRACE_BUF_POOL , -"/*---TRACE_FLOW---*/ poolResize " -" stream=%p cur=%d adj=%+d" , +"/*---TRACE_FLOW---*/ poolResize stream=%p cur=%d adj=%+d" , sp, sp->buffer_total_count, cnt-sp->buffer_total_count);
@@ -374,8 +368,7 @@ static int pvr2_stream_achieve_buffer_count(struct pvr2_stream *sp)if (sp->buffer_total_count == sp->buffer_target_count)return 0 ;pvr2_trace (PVR2_TRACE_BUF_POOL , -"/*---TRACE_FLOW---*/" -" poolCheck stream=%p cur=%d tgt=%d" , +"/*---TRACE_FLOW---*/ poolCheck stream=%p cur=%d tgt=%d" , sp,sp->buffer_total_count,sp->buffer_target_count);if (sp->buffer_total_count < sp->buffer_target_count) {
@@ -454,8 +447,8 @@ static void buffer_complete(struct urb *urb) bp->used_count = urb->actual_length;if (sp->fail_count) {pvr2_trace (PVR2_TRACE_TOLERANCE , -"stream %p transfer ok" -" - fail count reset" ,sp); +"stream %p transfer ok - fail count reset" , +sp); sp->fail_count =0 ; } }else if (sp->fail_count < sp->fail_tolerance) {
@@ -464,8 +457,7 @@ static void buffer_complete(struct urb *urb) (sp->fail_count)++; (sp->buffers_failed)++;pvr2_trace (PVR2_TRACE_TOLERANCE , -"stream %p ignoring error %d" -" - fail count increased to %u" , +"stream %p ignoring error %d - fail count increased to %u" , sp,urb->status,sp->fail_count); }else { (sp->buffers_failed)++;
@@ -666,8 +658,7 @@ int pvr2_buffer_set_buffer(struct pvr2_buffer *bp,void *ptr,unsigned int cnt) bp->max_count = cnt; bp->stream->i_bcount += bp->max_count;pvr2_trace (PVR2_TRACE_BUF_FLOW , -"/*---TRACE_FLOW---*/ bufferPool " -" %8s cap cap=%07d cnt=%02d" , +"/*---TRACE_FLOW---*/ bufferPool %8s cap cap=%07d cnt=%02d" ,pvr2_buffer_state_decode ( pvr2_buffer_state_idle), bp->stream->i_bcount,bp->stream->i_count);
drivers/media/usb/pvrusb2/pvrusb2-ioread.c +13 -23
@@ -169,9 +169,7 @@ static int pvr2_ioread_start(struct pvr2_ioread *cp) stat =pvr2_buffer_queue (bp);if (stat <0 ) {pvr2_trace (PVR2_TRACE_DATA_FLOW , -"/*---TRACE_READ---*/" -" pvr2_ioread_start id=%p" -" error=%d" , +"/*---TRACE_READ---*/ pvr2_ioread_start id=%p error=%d" , cp,stat);pvr2_ioread_stop (cp);return stat;
@@ -209,8 +207,8 @@ int pvr2_ioread_setup(struct pvr2_ioread *cp,struct pvr2_stream *sp) do { if (cp->stream) { pvr2_trace(PVR2_TRACE_START_STOP, - "/*---TRACE_READ---*/" - " pvr2_ioread_setup (tear-down) id=%p",cp); + "/*---TRACE_READ---*/ pvr2_ioread_setup (tear-down) id=%p", +cp); pvr2_ioread_stop(cp); pvr2_stream_kill(cp->stream); if (pvr2_stream_get_buffer_count(cp->stream)) {
@@ -220,8 +218,8 @@ int pvr2_ioread_setup(struct pvr2_ioread *cp,struct pvr2_stream *sp) }if (sp) {pvr2_trace (PVR2_TRACE_START_STOP , -"/*---TRACE_READ---*/" -" pvr2_ioread_setup (setup) id=%p" ,cp); +"/*---TRACE_READ---*/ pvr2_ioread_setup (setup) id=%p" , +cp);pvr2_stream_kill (sp); ret =pvr2_stream_set_buffer_count (sp,BUFFER_COUNT );if (ret <0 ) {
@@ -270,9 +268,7 @@ static int pvr2_ioread_get_buffer(struct pvr2_ioread *cp)if (stat <0 ) {// Streaming error... pvr2_trace (PVR2_TRACE_DATA_FLOW , -"/*---TRACE_READ---*/" -" pvr2_ioread_read id=%p" -" queue_error=%d" , +"/*---TRACE_READ---*/ pvr2_ioread_read id=%p queue_error=%d" , cp,stat);pvr2_ioread_stop (cp);return 0 ;
@@ -292,9 +288,7 @@ static int pvr2_ioread_get_buffer(struct pvr2_ioread *cp)if (stat <0 ) {// Streaming error... pvr2_trace (PVR2_TRACE_DATA_FLOW , -"/*---TRACE_READ---*/" -" pvr2_ioread_read id=%p" -" buffer_error=%d" , +"/*---TRACE_READ---*/ pvr2_ioread_read id=%p buffer_error=%d" , cp,stat);pvr2_ioread_stop (cp);// Give up.
@@ -347,8 +341,7 @@ static void pvr2_ioread_filter(struct pvr2_ioread *cp)if (cp->sync_buf_offs >= cp->sync_key_len) { cp->sync_trashed_count -= cp->sync_key_len;pvr2_trace (PVR2_TRACE_DATA_FLOW , -"/*---TRACE_READ---*/" -" sync_state <== 2 (skipped %u bytes)" , +"/*---TRACE_READ---*/ sync_state <== 2 (skipped %u bytes)" , cp->sync_trashed_count); cp->sync_state =2 ; cp->sync_buf_offs =0 ;
@@ -358,8 +351,7 @@ static void pvr2_ioread_filter(struct pvr2_ioread *cp)if (cp->c_data_offs < cp->c_data_len) {// Sanity check - should NEVER get here pvr2_trace (PVR2_TRACE_ERROR_LEGS , -"ERROR: pvr2_ioread filter sync problem" -" len=%u offs=%u" , +"ERROR: pvr2_ioread filter sync problem len=%u offs=%u" , cp->c_data_len,cp->c_data_offs);// Get out so we don't get stuck in an infinite // loop.
@@ -418,8 +410,8 @@ int pvr2_ioread_read(struct pvr2_ioread *cp,void __user *buf,unsigned int cnt)if (!cnt) {pvr2_trace (PVR2_TRACE_TRAP , -"/*---TRACE_READ---*/ pvr2_ioread_read id=%p" -" ZERO Request? Returning zero." ,cp); +"/*---TRACE_READ---*/ pvr2_ioread_read id=%p ZERO Request? Returning zero." , +cp);return 0 ; }
@@ -477,8 +469,7 @@ int pvr2_ioread_read(struct pvr2_ioread *cp,void __user *buf,unsigned int cnt)// Consumed entire key; switch mode // to normal. pvr2_trace (PVR2_TRACE_DATA_FLOW , -"/*---TRACE_READ---*/" -" sync_state <== 0" ); +"/*---TRACE_READ---*/ sync_state <== 0" ); cp->sync_state =0 ; } }else {
@@ -502,8 +493,7 @@ int pvr2_ioread_read(struct pvr2_ioread *cp,void __user *buf,unsigned int cnt) }pvr2_trace (PVR2_TRACE_DATA_FLOW , -"/*---TRACE_READ---*/ pvr2_ioread_read" -" id=%p request=%d result=%d" , +"/*---TRACE_READ---*/ pvr2_ioread_read id=%p request=%d result=%d" , cp,req_cnt,ret);return ret; }
drivers/media/usb/pvrusb2/pvrusb2-std.c +1 -2
@@ -357,8 +357,7 @@ struct v4l2_standard *pvr2_std_create_enum(unsigned int *countptr, bcnt =pvr2_std_id_to_str (buf,sizeof (buf),fmsk);pvr2_trace (PVR2_TRACE_ERROR_LEGS , -"WARNING:" -" Failed to classify the following standard(s): %.*s" , +"WARNING: Failed to classify the following standard(s): %.*s" , bcnt,buf); }
drivers/media/usb/pvrusb2/pvrusb2-v4l2.c +4 -6
@@ -949,8 +949,8 @@ static long pvr2_v4l2_ioctl(struct file *file,if (ret <0 ) {if (pvrusb2_debug &PVR2_TRACE_V4LIOCTL ) {pvr2_trace (PVR2_TRACE_V4LIOCTL , -"pvr2_v4l2_do_ioctl failure, ret=%ld" -" command was:" , ret); +"pvr2_v4l2_do_ioctl failure, ret=%ld command was:" , +ret);v4l_printk_ioctl (pvr2_hdw_get_driver_name (hdw), cmd); } }else {
@@ -1254,8 +1254,7 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip, nr_ptr = video_nr;if (!dip->stream) {pr_err (KBUILD_MODNAME -": Failed to set up pvrusb2 v4l video dev" -" due to missing stream instance\n" ); +": Failed to set up pvrusb2 v4l video dev due to missing stream instance\n" );return ; }break ;
@@ -1272,8 +1271,7 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip,break ;default :/* Bail out (this should be impossible) */ -pr_err (KBUILD_MODNAME ": Failed to set up pvrusb2 v4l dev" -" due to unrecognized config\n" ); +pr_err (KBUILD_MODNAME ": Failed to set up pvrusb2 v4l dev due to unrecognized config\n" );return ; }
drivers/media/usb/pvrusb2/pvrusb2-video-v4l.c +1 -3
@@ -91,9 +91,7 @@ void pvr2_saa7115_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd) (hdw->input_val < 0) || (hdw->input_val >= sp->cnt)) {pvr2_trace (PVR2_TRACE_ERROR_LEGS , -"*** WARNING *** subdev v4l2 set_input:" -" Invalid routing scheme (%u)" -" and/or input (%d)" , +"*** WARNING *** subdev v4l2 set_input: Invalid routing scheme (%u) and/or input (%d)" , sid, hdw->input_val);return ; }
drivers/media/usb/pvrusb2/pvrusb2-wm8775.c +1 -2
@@ -49,8 +49,7 @@ void pvr2_wm8775_subdev_update(struct pvr2_hdw *hdw, struct v4l2_subdev *sd) input =2 ;break ; } -pvr2_trace (PVR2_TRACE_CHIPS ,"subdev wm8775" -" set_input(val=%d route=0x%x)" , +pvr2_trace (PVR2_TRACE_CHIPS ,"subdev wm8775 set_input(val=%d route=0x%x)" , hdw->input_val, input); sd->ops->audio->s_routing (sd, input,0 ,0 );
Signature · 1 line
2.7.4
PATCH v2 41/58 pwc: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/pwc/pwc-if.c | 4 ++-- drivers/media/usb/pwc/pwc-v4l.c | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-)
drivers/media/usb/pwc/pwc-if.c +2 -2
@@ -238,8 +238,8 @@ static void pwc_frame_complete(struct pwc_device *pdev) }else {/* Check for underflow first */ if (fbuf->filled < pdev->frame_total_size) { -PWC_DEBUG_FLOW ("Frame buffer underflow (%d bytes);" -" discarded.\n" , fbuf->filled); +PWC_DEBUG_FLOW ("Frame buffer underflow (%d bytes); discarded.\n" , + fbuf->filled); }else { fbuf->vb.field =V4L2_FIELD_NONE ; fbuf->vb.sequence = pdev->vframe_count;
drivers/media/usb/pwc/pwc-v4l.c +2 -4
@@ -406,8 +406,7 @@ static void pwc_vidioc_fill_fmt(struct v4l2_format *f, f->fmt.pix.bytesperline = f->fmt.pix.width; f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.width *3 /2 ; f->fmt.pix.colorspace =V4L2_COLORSPACE_SRGB ; - PWC_DEBUG_IOCTL("pwc_vidioc_fill_fmt() " - "width=%d, height=%d, bytesperline=%d, sizeimage=%d, pixelformat=%c%c%c%c\n", + PWC_DEBUG_IOCTL("pwc_vidioc_fill_fmt() width=%d, height=%d, bytesperline=%d, sizeimage=%d, pixelformat=%c%c%c%c\n", f->fmt.pix.width, f->fmt.pix.height, f->fmt.pix.bytesperline,
@@ -473,8 +472,7 @@ static int pwc_s_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f) pixelformat = f->fmt.pix.pixelformat; - PWC_DEBUG_IOCTL("Trying to set format to: width=%d height=%d fps=%d " - "format=%c%c%c%c\n", + PWC_DEBUG_IOCTL("Trying to set format to: width=%d height=%d fps=%d format=%c%c%c%c\n", f->fmt.pix.width, f->fmt.pix.height, pdev->vframes, (pixelformat)&255, (pixelformat>>8)&255,
Signature · 1 line
2.7.4
PATCH v2 42/58 siano: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/siano/smsusb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/usb/siano/smsusb.c +2 -2
@@ -604,8 +604,8 @@ static int smsusb_resume(struct usb_interface *intf) intf->cur_altsetting->desc. bInterfaceNumber, 0);if (rc <0 ) { -printk (KERN_INFO "%s usb_set_interface failed, " -"rc %d\n" , __func__, rc); +printk (KERN_INFO "%s usb_set_interface failed, rc %d\n" , + __func__, rc);return rc; } }
Signature · 1 line
2.7.4
PATCH v2 43/58 stkwebcam: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/stkwebcam/stk-sensor.c | 4 ++-- drivers/media/usb/stkwebcam/stk-webcam.c | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-)
drivers/media/usb/stkwebcam/stk-sensor.c +2 -2
@@ -391,8 +391,8 @@ int stk_sensor_init(struct stk_camera *dev) }stk_sensor_write_regvals (dev, ov_initvals);msleep (10 ); -STK_INFO ("OmniVision sensor detected, id %02X%02X" -" at address %x\n" , idh, idl,SENSOR_ADDRESS ); +STK_INFO ("OmniVision sensor detected, id %02X%02X at address %x\n" , + idh, idl,SENSOR_ADDRESS );return 0 ; }
drivers/media/usb/stkwebcam/stk-webcam.c +1 -2
@@ -366,8 +366,7 @@ static void stk_isoc_handler(struct urb *urb)if (fb->v4lbuf.bytesused !=0 && fb->v4lbuf.bytesused != dev->frame_size) { (void ) (printk_ratelimit () && -STK_ERROR ("frame %d, " -"bytesused=%d, skipping\n" , +STK_ERROR ("frame %d, bytesused=%d, skipping\n" , i, fb->v4lbuf.bytesused)); fb->v4lbuf.bytesused =0 ; fill = fb->buffer;
Signature · 1 line
2.7.4
PATCH v2 44/58 tm6000: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/tm6000/tm6000-alsa.c | 4 +--- drivers/media/usb/tm6000/tm6000-core.c | 14 ++++++-------- drivers/media/usb/tm6000/tm6000-dvb.c | 16 +++++----------- drivers/media/usb/tm6000/tm6000-i2c.c | 3 +-- drivers/media/usb/tm6000/tm6000-stds.c | 3 +-- drivers/media/usb/tm6000/tm6000-video.c | 18 ++++++++---------- 6 files changed, 22 insertions(+), 36 deletions(-)
drivers/media/usb/tm6000/tm6000-alsa.c +1 -3
@@ -58,9 +58,7 @@ MODULE_PARM_DESC(index, "Index value for tm6000x capture interface(s).");MODULE_DESCRIPTION ("ALSA driver module for tm5600/tm6000/tm6010 based TV cards" );MODULE_AUTHOR ("Mauro Carvalho Chehab" );MODULE_LICENSE ("GPL" ); -MODULE_SUPPORTED_DEVICE ("{{Trident,tm5600}," -"{{Trident,tm6000}," -"{{Trident,tm6010}" ); +MODULE_SUPPORTED_DEVICE ("{{Trident,tm5600},{{Trident,tm6000},{{Trident,tm6010}" );static unsigned int debug;module_param (debug, int,0644 );MODULE_PARM_DESC (debug,"enable debug messages" );
drivers/media/usb/tm6000/tm6000-core.c +6 -8
@@ -602,8 +602,8 @@ int tm6000_init(struct tm6000_core *dev)for (i =0 ; i < size; i++) { rc =tm6000_set_reg (dev, tab[i].req, tab[i].reg, tab[i].val);if (rc <0 ) { -printk (KERN_ERR "Error %i while setting req %d, " -"reg %d to value %d\n" , rc, +printk (KERN_ERR "Error %i while setting req %d, reg %d to value %d\n" , + rc, tab[i].req, tab[i].reg, tab[i].val);return rc; }
@@ -761,9 +761,8 @@ int tm6000_tvaudio_set_mute(struct tm6000_core *dev, u8 mute)if (dev->dev_type ==TM6010 )tm6010_set_mute_sif (dev, mute);else { -printk (KERN_INFO "ERROR: TM5600 and TM6000 don't has" -" SIF audio inputs. Please check the %s" -" configuration.\n" , dev->name); +printk (KERN_INFO "ERROR: TM5600 and TM6000 don't has SIF audio inputs. Please check the %s configuration.\n" , + dev->name);return -EINVAL ; }break ;
@@ -822,9 +821,8 @@ void tm6000_set_volume(struct tm6000_core *dev, int vol)if (dev->dev_type ==TM6010 )tm6010_set_volume_sif (dev, vol);else -printk (KERN_INFO "ERROR: TM5600 and TM6000 don't has" -" SIF audio inputs. Please check the %s" -" configuration.\n" , dev->name); +printk (KERN_INFO "ERROR: TM5600 and TM6000 don't has SIF audio inputs. Please check the %s configuration.\n" , + dev->name);break ;case TM6000_AMUX_ADC1 :case TM6000_AMUX_ADC2 :
drivers/media/usb/tm6000/tm6000-dvb.c +5 -11
@@ -35,9 +35,7 @@ MODULE_DESCRIPTION("DVB driver extension module for tm5600/6000/6010 based TV caMODULE_AUTHOR ("Mauro Carvalho Chehab" );MODULE_LICENSE ("GPL" ); -MODULE_SUPPORTED_DEVICE ("{{Trident, tm5600}," -"{{Trident, tm6000}," -"{{Trident, tm6010}" ); +MODULE_SUPPORTED_DEVICE ("{{Trident, tm5600},{{Trident, tm6000},{{Trident, tm6010}" );static int debug;
@@ -292,13 +290,11 @@ static int register_dvb(struct tm6000_core *dev) }if (!dvb_attach (xc2028_attach, dvb->frontend, &cfg)) { -printk (KERN_ERR "tm6000: couldn't register " -"frontend (xc3028)\n" ); +printk (KERN_ERR "tm6000: couldn't register frontend (xc3028)\n" ); ret = -EINVAL ; goto frontend_err; } -printk (KERN_INFO "tm6000: XC2028/3028 asked to be " -"attached to frontend!\n" ); +printk (KERN_INFO "tm6000: XC2028/3028 asked to be attached to frontend!\n" );break ; }case TUNER_XC5000 : {
@@ -315,13 +311,11 @@ static int register_dvb(struct tm6000_core *dev) }if (!dvb_attach (xc5000_attach, dvb->frontend, &dev->i2c_adap, &cfg)) { -printk (KERN_ERR "tm6000: couldn't register " -"frontend (xc5000)\n" ); +printk (KERN_ERR "tm6000: couldn't register frontend (xc5000)\n" ); ret = -EINVAL ; goto frontend_err; } -printk (KERN_INFO "tm6000: XC5000 asked to be " -"attached to frontend!\n" ); +printk (KERN_INFO "tm6000: XC5000 asked to be attached to frontend!\n" );break ; } }
drivers/media/usb/tm6000/tm6000-i2c.c +1 -2
@@ -173,8 +173,7 @@ static int tm6000_i2c_xfer(struct i2c_adapter *i2c_adap,* immediately after a 1 or 2 byte write to select * a register. We cannot fulfil this request. */ -i2c_dprintk (2 ," read without preceding write not" -" supported" ); +i2c_dprintk (2 ," read without preceding write not supported" ); rc = -EOPNOTSUPP ; goto err; } else if (i + 1 < num && msgs[i].len <= 2 &&
drivers/media/usb/tm6000/tm6000-stds.c +1 -2
@@ -464,8 +464,7 @@ static int tm6000_load_std(struct tm6000_core *dev, struct tm6000_reg_settings *for (i =0 ; set[i].req; i++) { rc =tm6000_set_reg (dev, set[i].req, set[i].reg, set[i].value);if (rc <0 ) { -printk (KERN_ERR "Error %i while setting " -"req %d, reg %d to value %d\n" , +printk (KERN_ERR "Error %i while setting req %d, reg %d to value %d\n" , rc, set[i].req, set[i].reg, set[i].value);return rc; }
drivers/media/usb/tm6000/tm6000-video.c +8 -10
@@ -615,8 +615,7 @@ static int tm6000_prepare_isoc(struct tm6000_core *dev)return -ENOMEM ; } -dprintk (dev,V4L2_DEBUG_QUEUE ,"Allocating %d x %d packets" -" (%d bytes) of %d bytes each to handle %u size\n" , +dprintk (dev,V4L2_DEBUG_QUEUE ,"Allocating %d x %d packets (%d bytes) of %d bytes each to handle %u size\n" , max_packets, num_bufs, sb_size, dev->isoc_in.maxsize, size);
@@ -939,8 +938,8 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv, fmt =format_by_fourcc (f->fmt.pix.pixelformat);if (NULL == fmt) { -dprintk (dev,2 ,"Fourcc format (0x%08x)" -" invalid.\n" , f->fmt.pix.pixelformat); +dprintk (dev,2 ,"Fourcc format (0x%08x) invalid.\n" , + f->fmt.pix.pixelformat);return -EINVAL ; }
@@ -1366,14 +1365,13 @@ static int __tm6000_open(struct file *file) fh->width = dev->width; fh->height = dev->height; -dprintk (dev,V4L2_DEBUG_OPEN ,"Open: fh=0x%08lx, dev=0x%08lx, " -"dev->vidq=0x%08lx\n" , +dprintk (dev,V4L2_DEBUG_OPEN ,"Open: fh=0x%08lx, dev=0x%08lx, dev->vidq=0x%08lx\n" , (unsigned long )fh, (unsigned long )dev, (unsigned long )&dev->vidq); -dprintk (dev,V4L2_DEBUG_OPEN ,"Open: list_empty " -"queued=%d\n" ,list_empty (&dev->vidq.queued)); -dprintk (dev,V4L2_DEBUG_OPEN ,"Open: list_empty " -"active=%d\n" ,list_empty (&dev->vidq.active)); +dprintk (dev,V4L2_DEBUG_OPEN ,"Open: list_empty queued=%d\n" , +list_empty (&dev->vidq.queued)); +dprintk (dev,V4L2_DEBUG_OPEN ,"Open: list_empty active=%d\n" , +list_empty (&dev->vidq.active));/* initialize hardware on analog mode */ rc =tm6000_init_analog_mode (dev);
Signature · 1 line
2.7.4
PATCH v2 45/58 ttusb-budget: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c +1 -2
@@ -767,8 +767,7 @@ static void ttusb_iso_irq(struct urb *urb)for (i =0 ; i < urb->number_of_packets; ++i) { numpkt++;if (time_after_eq (jiffies, lastj +HZ )) { -dprintk ("frames/s: %lu (ts: %d, stuff %d, " -"sec: %d, invalid: %d, all: %d)\n" , +dprintk ("frames/s: %lu (ts: %d, stuff %d, sec: %d, invalid: %d, all: %d)\n" , numpkt *HZ / (jiffies - lastj), numts, numstuff, numsec, numinvalid, numts + numstuff + numsec + numinvalid);
Signature · 1 line
2.7.4
PATCH v2 46/58 ttusb-dec: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/ttusb-dec/ttusb_dec.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-)
drivers/media/usb/ttusb-dec/ttusb_dec.c +8 -12
@@ -708,8 +708,8 @@ static void ttusb_dec_process_urb_frame(struct ttusb_dec *dec, u8 *b, dec->packet_payload_length =2 ; dec->packet_state =7 ; }else { -printk ("%s: unknown packet type: " -"%02x%02x\n" , __func__, +printk ("%s: unknown packet type: %02x%02x\n" , + __func__, dec->packet[0 ], dec->packet[1 ]); dec->packet_state =0 ; }
@@ -961,8 +961,8 @@ static int ttusb_dec_start_iso_xfer(struct ttusb_dec *dec)for (i =0 ; i <ISO_BUF_COUNT ; i++) {if ((result =usb_submit_urb (dec->iso_urb[i],GFP_ATOMIC ))) { -printk ("%s: failed urb submission %d: " -"error %d\n" , __func__, i, result); +printk ("%s: failed urb submission %d: error %d\n" , + __func__, i, result);while (i) {usb_kill_urb (dec->iso_urb[i -1 ]);
@@ -1375,8 +1375,7 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec)memcpy (&tmp, &firmware[56 ],4 ); crc32_check =ntohl (tmp);if (crc32_csum != crc32_check) { -printk ("%s: crc32 check of DSP code failed (calculated " -"0x%08x != 0x%08x in file), file invalid.\n" , +printk ("%s: crc32 check of DSP code failed (calculated 0x%08x != 0x%08x in file), file invalid.\n" , __func__, crc32_csum, crc32_check);release_firmware (fw_entry);return -ENOENT ;
@@ -1453,11 +1452,9 @@ static int ttusb_dec_init_stb(struct ttusb_dec *dec)if (!mode) {if (version ==0xABCDEFAB ) -printk (KERN_INFO "ttusb_dec: no version " -"info in Firmware\n" ); +printk (KERN_INFO "ttusb_dec: no version info in Firmware\n" );else -printk (KERN_INFO "ttusb_dec: Firmware " -"%x.%02x%c%c\n" , +printk (KERN_INFO "ttusb_dec: Firmware %x.%02x%c%c\n" , version >>24 , (version >>16 ) &0xff , (version >>8 ) &0xff , version &0xff );
@@ -1481,8 +1478,7 @@ static int ttusb_dec_init_stb(struct ttusb_dec *dec)ttusb_dec_set_model (dec,TTUSB_DEC2540T );break ;default : -printk (KERN_ERR "%s: unknown model returned " -"by firmware (%08x) - please report\n" , +printk (KERN_ERR "%s: unknown model returned by firmware (%08x) - please report\n" , __func__, model);return -ENOENT ; }
Signature · 1 line
2.7.4
PATCH v2 47/58 usbvision: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/usbvision/usbvision-core.c | 20 ++++++++++---------- drivers/media/usb/usbvision/usbvision-video.c | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-)
drivers/media/usb/usbvision/usbvision-core.c +10 -10
@@ -1656,8 +1656,8 @@ static int usbvision_set_video_format(struct usb_usbvision *usbvision, int forma (__u16) USBVISION_FILT_CONT, value, 2, HZ);if (rc <0 ) { -printk (KERN_ERR "%s: ERROR=%d. USBVISION stopped - " -"reconnect or reload driver.\n" , proc, rc); +printk (KERN_ERR "%s: ERROR=%d. USBVISION stopped - reconnect or reload driver.\n" , + proc, rc); } usbvision->isoc_mode = format;return rc;
@@ -1890,8 +1890,8 @@ static int usbvision_set_compress_params(struct usb_usbvision *usbvision) (__u16) USBVISION_INTRA_CYC, value, 5, HZ);if (rc <0 ) { -printk (KERN_ERR "%sERROR=%d. USBVISION stopped - " -"reconnect or reload driver.\n" , proc, rc); +printk (KERN_ERR "%sERROR=%d. USBVISION stopped - reconnect or reload driver.\n" , + proc, rc);return rc; }
@@ -1921,8 +1921,8 @@ static int usbvision_set_compress_params(struct usb_usbvision *usbvision) (__u16) USBVISION_PCM_THR1, value, 6, HZ);if (rc <0 ) { -printk (KERN_ERR "%sERROR=%d. USBVISION stopped - " -"reconnect or reload driver.\n" , proc, rc); +printk (KERN_ERR "%sERROR=%d. USBVISION stopped - reconnect or reload driver.\n" , + proc, rc); }return rc; }
@@ -1960,8 +1960,8 @@ int usbvision_set_input(struct usb_usbvision *usbvision) rc =usbvision_write_reg (usbvision,USBVISION_VIN_REG1 , value[0 ]);if (rc <0 ) { -printk (KERN_ERR "%sERROR=%d. USBVISION stopped - " -"reconnect or reload driver.\n" , proc, rc); +printk (KERN_ERR "%sERROR=%d. USBVISION stopped - reconnect or reload driver.\n" , + proc, rc);return rc; }
@@ -2026,8 +2026,8 @@ int usbvision_set_input(struct usb_usbvision *usbvision)USB_DIR_OUT |USB_TYPE_VENDOR |USB_RECIP_ENDPOINT ,0 , (__u16) USBVISION_LXSIZE_I, value, 8, HZ);if (rc <0 ) { -printk (KERN_ERR "%sERROR=%d. USBVISION stopped - " -"reconnect or reload driver.\n" , proc, rc); +printk (KERN_ERR "%sERROR=%d. USBVISION stopped - reconnect or reload driver.\n" , + proc, rc);return rc; }
drivers/media/usb/usbvision/usbvision-video.c +2 -2
@@ -1456,8 +1456,8 @@ static int usbvision_probe(struct usb_interface *intf, }if (interface->desc.bNumEndpoints <2 ) { -dev_err (&intf->dev,"interface %d has %d endpoints, but must" -" have minimum 2\n" , ifnum, interface->desc.bNumEndpoints); +dev_err (&intf->dev,"interface %d has %d endpoints, but must have minimum 2\n" , + ifnum, interface->desc.bNumEndpoints); ret = -ENODEV ; goto err_usb; }
Signature · 1 line
2.7.4
PATCH v2 48/58 uvc: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/uvc/uvc_ctrl.c | 36 ++--- drivers/media/usb/uvc/uvc_debugfs.c | 5 +- drivers/media/usb/uvc/uvc_driver.c | 278 +++++++++++++++++++----------------- drivers/media/usb/uvc/uvc_entity.c | 10 +- drivers/media/usb/uvc/uvc_isight.c | 12 +- drivers/media/usb/uvc/uvc_status.c | 23 +-- drivers/media/usb/uvc/uvc_v4l2.c | 11 +- drivers/media/usb/uvc/uvc_video.c | 103 ++++++------- 8 files changed, 256 insertions(+), 222 deletions(-)
drivers/media/usb/uvc/uvc_ctrl.c +20 -16
@@ -960,8 +960,7 @@ static int uvc_ctrl_populate_cache(struct uvc_video_chain *chain,* resolution value to zero. */ uvc_warn_once (chain->dev,UVC_WARN_XU_GET_RES , -"UVC non compliance - GET_RES failed on " -"an XU control. Enabling workaround.\n" ); +"UVC non compliance - GET_RES failed on an XU control. Enabling workaround.\n" );memset (uvc_ctrl_data (ctrl,UVC_CTRL_DATA_RES ),0 , ctrl->info.size); }
@@ -1680,8 +1679,8 @@ static int uvc_ctrl_fill_xu_info(struct uvc_device *dev,uvc_ctrl_fixup_xu_info (dev, ctrl, info); - uvc_trace(UVC_TRACE_CONTROL, "XU control %pUl/%u queried: len %u, " - "flags { get %u set %u auto %u }.\n", + uvc_trace(UVC_TRACE_CONTROL, + "XU control %pUl/%u queried: len %u, flags { get %u set %u auto %u }.\n", info->entity, info->selector, info->size, (info->flags & UVC_CTRL_FLAG_GET_CUR) ? 1 : 0, (info->flags & UVC_CTRL_FLAG_SET_CUR) ? 1 : 0,
@@ -1710,8 +1709,9 @@ static int uvc_ctrl_init_xu_ctrl(struct uvc_device *dev, ret =uvc_ctrl_add_info (dev, ctrl, &info);if (ret <0 ) -uvc_trace (UVC_TRACE_CONTROL ,"Failed to initialize control " -"%pUl/%u on device %s entity %u\n" , info.entity, +uvc_trace (UVC_TRACE_CONTROL , +"Failed to initialize control %pUl/%u on device %s entity %u\n" , + info.entity, info.selector, dev->udev->devpath, ctrl->entity->id);return ret;
@@ -1904,8 +1904,9 @@ static int uvc_ctrl_add_info(struct uvc_device *dev, struct uvc_control *ctrl, ctrl->initialized =1 ; -uvc_trace (UVC_TRACE_CONTROL ,"Added control %pUl/%u to device %s " -"entity %u\n" , ctrl->info.entity, ctrl->info.selector, +uvc_trace (UVC_TRACE_CONTROL , +"Added control %pUl/%u to device %s entity %u\n" , + ctrl->info.entity, ctrl->info.selector, dev->udev->devpath, ctrl->entity->id); done:
@@ -1964,8 +1965,9 @@ int uvc_ctrl_add_mapping(struct uvc_video_chain *chain,int ret;if (mapping->id & ~V4L2_CTRL_ID_MASK ) { -uvc_trace (UVC_TRACE_CONTROL ,"Can't add mapping '%s', control " -"id 0x%08x is invalid.\n" , mapping->name, +uvc_trace (UVC_TRACE_CONTROL , +"Can't add mapping '%s', control id 0x%08x is invalid.\n" , + mapping->name, mapping->id);return -EINVAL ; }
@@ -2004,8 +2006,8 @@ int uvc_ctrl_add_mapping(struct uvc_video_chain *chain,list_for_each_entry (map, &ctrl->info.mappings, list) {if (mapping->id == map->id) { -uvc_trace (UVC_TRACE_CONTROL ,"Can't add mapping '%s', " -"control id 0x%08x already exists.\n" , +uvc_trace (UVC_TRACE_CONTROL , +"Can't add mapping '%s', control id 0x%08x already exists.\n" , mapping->name, mapping->id); ret = -EEXIST ; goto done;
@@ -2015,8 +2017,9 @@ int uvc_ctrl_add_mapping(struct uvc_video_chain *chain,/* Prevent excess memory consumption */ if (atomic_inc_return (&dev->nmappings) >UVC_MAX_CONTROL_MAPPINGS ) {atomic_dec (&dev->nmappings); -uvc_trace (UVC_TRACE_CONTROL ,"Can't add mapping '%s', maximum " -"mappings count (%u) exceeded.\n" , mapping->name, +uvc_trace (UVC_TRACE_CONTROL , +"Can't add mapping '%s', maximum mappings count (%u) exceeded.\n" , + mapping->name,UVC_MAX_CONTROL_MAPPINGS ); ret = -ENOMEM ; goto done;
@@ -2086,8 +2089,9 @@ static void uvc_ctrl_prune_entity(struct uvc_device *dev, !uvc_test_bit(controls, blacklist[i].index)) continue; -uvc_trace (UVC_TRACE_CONTROL ,"%u/%u control is black listed, " -"removing it.\n" , entity->id, blacklist[i].index); +uvc_trace (UVC_TRACE_CONTROL , +"%u/%u control is black listed, removing it.\n" , + entity->id, blacklist[i].index);uvc_clear_bit (controls, blacklist[i].index); }
drivers/media/usb/uvc/uvc_debugfs.c +3 -2
@@ -88,8 +88,9 @@ int uvc_debugfs_init_stream(struct uvc_streaming *stream) dent =debugfs_create_dir (dir_name, uvc_debugfs_root_dir);if (IS_ERR_OR_NULL (dent)) { -uvc_printk (KERN_INFO ,"Unable to create debugfs %s " -"directory.\n" , dir_name); +uvc_printk (KERN_INFO , +"Unable to create debugfs %s directory.\n" , + dir_name);return -ENODEV ; }
drivers/media/usb/uvc/uvc_driver.c +148 -130
558 lines not on this page · raw message
drivers/media/usb/uvc/uvc_entity.c +6 -4
@@ -109,8 +109,9 @@ int uvc_mc_register_entities(struct uvc_video_chain *chain)list_for_each_entry (entity, &chain->entities, chain) { ret =uvc_mc_init_entity (chain, entity);if (ret <0 ) { -uvc_printk (KERN_INFO ,"Failed to initialize entity for " -"entity %u\n" , entity->id); +uvc_printk (KERN_INFO , +"Failed to initialize entity for entity %u\n" , + entity->id);return ret; } }
@@ -118,8 +119,9 @@ int uvc_mc_register_entities(struct uvc_video_chain *chain)list_for_each_entry (entity, &chain->entities, chain) { ret =uvc_mc_create_links (chain, entity);if (ret <0 ) { -uvc_printk (KERN_INFO ,"Failed to create links for " -"entity %u\n" , entity->id); +uvc_printk (KERN_INFO , +"Failed to create links for entity %u\n" , + entity->id);return ret; } }
drivers/media/usb/uvc/uvc_isight.c +6 -6
@@ -61,8 +61,8 @@ static int isight_decode(struct uvc_video_queue *queue, struct uvc_buffer *buf,/* Synchronize to the input stream by waiting for a header packet. */ if (buf->state !=UVC_BUF_STATE_ACTIVE ) {if (!is_header) { -uvc_trace (UVC_TRACE_FRAME ,"Dropping packet (out of " -"sync).\n" ); +uvc_trace (UVC_TRACE_FRAME , +"Dropping packet (out of sync).\n" );return 0 ; }
@@ -90,8 +90,8 @@ static int isight_decode(struct uvc_video_queue *queue, struct uvc_buffer *buf, buf->bytesused += nbytes;if (len > maxlen || buf->bytesused == buf->length) { -uvc_trace (UVC_TRACE_FRAME ,"Frame complete " -"(overflow).\n" ); +uvc_trace (UVC_TRACE_FRAME , +"Frame complete (overflow).\n" ); buf->state =UVC_BUF_STATE_DONE ; } }
@@ -106,8 +106,8 @@ void uvc_video_decode_isight(struct urb *urb, struct uvc_streaming *stream,for (i =0 ; i < urb->number_of_packets; ++i) {if (urb->iso_frame_desc[i].status <0 ) { -uvc_trace (UVC_TRACE_FRAME ,"USB isochronous frame " -"lost (%d).\n" , +uvc_trace (UVC_TRACE_FRAME , +"USB isochronous frame lost (%d).\n" , urb->iso_frame_desc[i].status); }
drivers/media/usb/uvc/uvc_status.c +13 -10
@@ -81,8 +81,8 @@ static void uvc_input_report_key(struct uvc_device *dev, unsigned int code,static void uvc_event_streaming (struct uvc_device *dev,__u8 *data,int len) {if (len <3 ) { -uvc_trace (UVC_TRACE_STATUS ,"Invalid streaming status event " -"received.\n" ); +uvc_trace (UVC_TRACE_STATUS , +"Invalid streaming status event received.\n" );return ; }
@@ -93,8 +93,9 @@ static void uvc_event_streaming(struct uvc_device *dev, __u8 *data, int len) data[1], data[3] ? "pressed" : "released", len);uvc_input_report_key (dev,KEY_CAMERA , data[3 ]); }else { -uvc_trace (UVC_TRACE_STATUS ,"Stream %u error event %02x %02x " -"len %d.\n" , data[1 ], data[2 ], data[3 ], len); +uvc_trace (UVC_TRACE_STATUS , +"Stream %u error event %02x %02x len %d.\n" , + data[1 ], data[2 ], data[3 ], len); } }
@@ -103,8 +104,8 @@ static void uvc_event_control(struct uvc_device *dev, __u8 *data, int len)char *attrs[3 ] = {"value" ,"info" ,"failure" };if (len <6 || data[2 ] !=0 || data[4 ] >2 ) { -uvc_trace (UVC_TRACE_STATUS ,"Invalid control status event " -"received.\n" ); +uvc_trace (UVC_TRACE_STATUS , +"Invalid control status event received.\n" );return ; }
@@ -129,8 +130,9 @@ static void uvc_status_complete(struct urb *urb)return ;default : -uvc_printk (KERN_WARNING ,"Non-zero status (%d) in status " -"completion handler.\n" , urb->status); +uvc_printk (KERN_WARNING , +"Non-zero status (%d) in status completion handler.\n" , + urb->status);return ; }
@@ -146,8 +148,9 @@ static void uvc_status_complete(struct urb *urb)break ;default : -uvc_trace (UVC_TRACE_STATUS ,"Unknown status event " -"type %u.\n" , dev->status[0 ]); +uvc_trace (UVC_TRACE_STATUS , +"Unknown status event type %u.\n" , + dev->status[0 ]);break ; } }
drivers/media/usb/uvc/uvc_v4l2.c +6 -5
@@ -85,8 +85,8 @@ static int uvc_ioctl_ctrl_map(struct uvc_video_chain *chain,break ;default : -uvc_trace (UVC_TRACE_CONTROL ,"Unsupported V4L2 control type " -"%u.\n" , xmap->v4l2_type); +uvc_trace (UVC_TRACE_CONTROL ,"Unsupported V4L2 control type %u.\n" , + xmap->v4l2_type); ret = -ENOTTY ; goto done; }
@@ -224,9 +224,10 @@ static int uvc_v4l2_try_format(struct uvc_streaming *stream,/* Use the default frame interval. */ interval = frame->dwDefaultFrameInterval; -uvc_trace (UVC_TRACE_FORMAT ,"Using default frame interval %u.%u us " -"(%u.%u fps).\n" , interval/10 , interval%10 ,10000000 /interval, - (100000000 /interval)%10 ); +uvc_trace (UVC_TRACE_FORMAT , +"Using default frame interval %u.%u us (%u.%u fps).\n" , + interval/10 , interval%10 ,10000000 /interval, + (100000000 /interval)%10 );/* Set the format index, frame index and frame interval. */ memset (probe,0 ,sizeof *probe);
drivers/media/usb/uvc/uvc_video.c +54 -49
223 lines not on this page · raw message
Signature · 1 line
2.7.4
Laurent Pinchart
maintainerRe: [PATCH v2 48/58] uvc: don't break long lines
Hi Mauro,
Thank you for the patch.
Quoted 16 lines · On Tuesday 18 Oct 2016 18:46:00 Mauro Carvalho Chehab wrote:
Due to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to
KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
useText::Tabs;
Quoted 12 lines
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
Quoted 3 lines
$s2 =~ s/^\s+//; $s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne
"");
Quoted 40 lines
print unexpand("$next$s1\n"); print unexpand("$s2\n") if ($s2 ne ""); } else { print "$next$c2\n"; } $next=""; next; } else { print $next; } $next=""; } else { if (m/\"$/) { if (!m/\\n\"$/) { $next=$_; next; } } } print $_; }</script>
Signed-off-by Mauro Carvalho Chehab <[email protected]>--- drivers/media/usb/uvc/uvc_ctrl.c | 36 ++--- drivers/media/usb/uvc/uvc_debugfs.c | 5 +- drivers/media/usb/uvc/uvc_driver.c | 278 ++++++++++++++++----------------- drivers/media/usb/uvc/uvc_entity.c | 10 +- drivers/media/usb/uvc/uvc_isight.c | 12 +- drivers/media/usb/uvc/uvc_status.c | 23 +-- drivers/media/usb/uvc/uvc_v4l2.c | 11 +- drivers/media/usb/uvc/uvc_video.c | 103 ++++++------- 8 files changed, 256 insertions(+), 222 deletions(-)(quoted diff) +0
-0
b/drivers/media/usb/uvc/uvc_ctrl.cindexc2ee6e39fd0c..747415d4fa60100644drivers/media/usb/uvc/uvc_ctrl.c +0
-0
[snip]
drivers/media/usb/uvc/uvc_ctrl.c static int uvc_ctrl_init_xu_ctrl(struct uvc_device · line 1714
Quoted 9 lines
drivers/media/usb/uvc/uvc_ctrl.c +2
-2@@ -1710,8 +1709,9 @@ static int uvc_ctrl_init_xu_ctrl(struct uvc_device *dev, ret =uvc_ctrl_add_info (dev, ctrl, &info);if (ret <0 ) - uvc_trace(UVC_TRACE_CONTROL, "Failed to initialize control " - "%pUl/%u on device %s entity %u\n", info.entity, + uvc_trace(UVC_TRACE_CONTROL, + "Failed to initialize control %pUl/%u on device
%s entity %u\n",
drivers/media/usb/uvc/uvc_ctrl.c static int uvc_ctrl_init_xu_ctrl(struct uvc_device · line 1717
Quoted 3 lines
drivers/media/usb/uvc/uvc_ctrl.c +1
-0+ info.entity, info.selector, dev->udev->devpath, ctrl->entity- id);
The split looks weird, the following would be better.
info.entity, info.selector, dev->udev->devpath,
ctrl->entity->id);
drivers/media/usb/uvc/uvc_ctrl.c static int uvc_ctrl_add_info(struct uvc_device *dev, · line 1911
Quoted 13 lines
drivers/media/usb/uvc/uvc_ctrl.c +3
-2return ret;@@ -1904,8 +1904,9 @@ static int uvc_ctrl_add_info(struct uvc_device *dev,struct uvc_control *ctrl, ctrl->initialized = 1; -uvc_trace (UVC_TRACE_CONTROL ,"Added control %pUl/%u to device %s " -"entity %u\n" , ctrl->info.entity, ctrl->info.selector, +uvc_trace (UVC_TRACE_CONTROL , +"Added control %pUl/%u to device %s entity %u\n" , + ctrl->info.entity, ctrl->info.selector, dev->udev->devpath, ctrl->entity->id);
The last line isn't indented correctly.
drivers/media/usb/uvc/uvc_ctrl.c int uvc_ctrl_add_mapping(struct uvc_video_chain · line 1967
Quoted 7 lines
drivers/media/usb/uvc/uvc_ctrl.c +0
-1done:@@ -1964,8 +1965,9 @@ int uvc_ctrl_add_mapping(struct uvc_video_chain *chain, int ret;if (mapping->id & ~V4L2_CTRL_ID_MASK ) { - uvc_trace(UVC_TRACE_CONTROL, "Can't add mapping '%s',
control "
drivers/media/usb/uvc/uvc_ctrl.c int uvc_ctrl_add_mapping(struct uvc_video_chain *chain,
Quoted 3 lines
drivers/media/usb/uvc/uvc_ctrl.c +2
-1- "id 0x%08x is invalid.\n", mapping->name, + uvc_trace(UVC_TRACE_CONTROL, + "Can't add mapping '%s', control id 0x%08x is
invalid.\n",
drivers/media/usb/uvc/uvc_ctrl.c int uvc_ctrl_add_mapping(struct uvc_video_chain *chain, · line 1971
Quoted 2 lines
drivers/media/usb/uvc/uvc_ctrl.c +1
-0+ mapping->name, mapping->id);
The last two arguments can fit on a single line.
drivers/media/usb/uvc/uvc_ctrl.c int uvc_ctrl_add_mapping(struct uvc_video_chain · line 2008
Quoted 8 lines
drivers/media/usb/uvc/uvc_ctrl.c +0
-1return -EINVAL ; }@@ -2004,8 +2006,8 @@ int uvc_ctrl_add_mapping(struct uvc_video_chain *chain, list_for_each_entry(map, &ctrl->info.mappings, list) {if (mapping->id == map->id) { - uvc_trace(UVC_TRACE_CONTROL, "Can't add mapping
'%s', "
drivers/media/usb/uvc/uvc_ctrl.c int uvc_ctrl_add_mapping(struct uvc_video_chain *chain,
Quoted 3 lines
drivers/media/usb/uvc/uvc_ctrl.c +2
-1- "control id 0x%08x already exists.\n", + uvc_trace(UVC_TRACE_CONTROL, + "Can't add mapping '%s', control id
0x%08x already exists.\n",
drivers/media/usb/uvc/uvc_ctrl.c int uvc_ctrl_add_mapping(struct uvc_video_chain *chain, · line 2011
Quoted 1 line
drivers/media/usb/uvc/uvc_ctrl.c +0
-0mapping->name, mapping->id);
The last line isn't indented correctly.
drivers/media/usb/uvc/uvc_ctrl.c int uvc_ctrl_add_mapping(struct uvc_video_chain · line 2018
Quoted 7 lines
drivers/media/usb/uvc/uvc_ctrl.c +0
-0ret = -EEXIST ;drivers/media/usb/uvc/uvc_ctrl.c +0
-1goto done;@@ -2015,8 +2017,9 @@ int uvc_ctrl_add_mapping(struct uvc_video_chain *chain,/* Prevent excess memory consumption */ if (atomic_inc_return(&dev->nmappings) > UVC_MAX_CONTROL_MAPPINGS) {atomic_dec (&dev->nmappings); - uvc_trace(UVC_TRACE_CONTROL, "Can't add mapping '%s',
maximum "
drivers/media/usb/uvc/uvc_ctrl.c int uvc_ctrl_add_mapping(struct uvc_video_chain *chain,
Quoted 3 lines
drivers/media/usb/uvc/uvc_ctrl.c +2
-1- "mappings count (%u) exceeded.\n", mapping->name, + uvc_trace(UVC_TRACE_CONTROL, + "Can't add mapping '%s', maximum mappings count
(%u) exceeded.\n",
drivers/media/usb/uvc/uvc_ctrl.c int uvc_ctrl_add_mapping(struct uvc_video_chain *chain, · line 2023
Quoted 2 lines
drivers/media/usb/uvc/uvc_ctrl.c +1
-0+ mapping->name, UVC_MAX_CONTROL_MAPPINGS);
Same here.
Quoted 2 lines
drivers/media/usb/uvc/uvc_ctrl.c +0
-0ret = -ENOMEM ; goto done;
[snip]
Quoted 5 lines
(quoted diff) +0
-0
b/drivers/media/usb/uvc/uvc_driver.cindex9c4b56b4a9c6..7502569752f6100644drivers/media/usb/uvc/uvc_driver.c +0
-0
[snip]
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_streaming(struct uvc_device *dev, · line 628
Quoted 9 lines
drivers/media/usb/uvc/uvc_driver.c +2
-3@@ -623,15 +624,17 @@ static int uvc_parse_streaming(struct uvc_device *dev,if (intf->cur_altsetting->desc.bInterfaceSubClass !=UVC_SC_VIDEOSTREAMING ) { -uvc_trace (UVC_TRACE_DESCR ,"device %d interface %d isn't a " -"video streaming interface\n" , dev->udev->devnum, - intf->altsetting[0 ].desc.bInterfaceNumber); + uvc_trace(UVC_TRACE_DESCR, + "device %d interface %d isn't a video streaming
interface\n",
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_streaming(struct uvc_device *dev,
Quoted 7 lines
drivers/media/usb/uvc/uvc_driver.c +2
-1+ dev->udev->devnum, + intf->altsetting[0].desc.bInterfaceNumber);return -EINVAL ; }if (usb_driver_claim_interface (&uvc_driver.driver, intf, dev)) { - uvc_trace(UVC_TRACE_DESCR, "device %d interface %d is
already "
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_streaming(struct uvc_device *dev, · line 638
Quoted 5 lines
drivers/media/usb/uvc/uvc_driver.c +3
-1-"claimed\n" , dev->udev->devnum, +uvc_trace (UVC_TRACE_DESCR , +"device %d interface %d is already claimed\n" , + dev->udev->devnum, intf->altsetting[0 ].desc.bInterfaceNumber);
The last line isn't indented correctly.
Quoted 2 lines
drivers/media/usb/uvc/uvc_driver.c +0
-0return -EINVAL ; }
[snip]
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_streaming(struct uvc_device *dev, · line 696
Quoted 5 lines
drivers/media/usb/uvc/uvc_driver.c +0
-1@@ -693,9 +697,10 @@ static int uvc_parse_streaming(struct uvc_device *dev,break ;default : - uvc_trace(UVC_TRACE_DESCR, "device %d videostreaming
interface "
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_streaming(struct uvc_device *dev, · line 702
Quoted 5 lines
drivers/media/usb/uvc/uvc_driver.c +2
-2-"%d HEADER descriptor not found.\n" , dev->udev- devnum, - alts->desc.bInterfaceNumber); + uvc_trace(UVC_TRACE_DESCR, + "device %d videostreaming interface %d HEADER
descriptor not
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_format(struct uvc_device *dev, · line 376
Quoted 3 lines
drivers/media/usb/uvc/uvc_driver.c +2
-0found.\n", + dev->udev->devnum, + alts->desc.bInterfaceNumber);
The last two arguments fit on a single line.
Quoted 3 lines
drivers/media/usb/uvc/uvc_driver.c +0
-0goto error;}
[snip]
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_standard_control(struct uvc_device · line 991
Quoted 5 lines
drivers/media/usb/uvc/uvc_driver.c +0
-1@@ -988,9 +994,10 @@ static int uvc_parse_standard_control(struct uvc_device *dev, n = buflen >=12 ? buffer[11 ] :0 ;if (buflen <12 + n) { - uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol
"
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_standard_control(struct uvc_device · line 999
Quoted 5 lines
drivers/media/usb/uvc/uvc_driver.c +2
-2-"interface %d HEADER error\n" , udev- devnum, - alts->desc.bInterfaceNumber); + uvc_trace(UVC_TRACE_DESCR, + "device %d videocontrol interface %d
HEADER error\n",
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_standard_control(struct uvc_device *dev, · line 1000
Quoted 2 lines
drivers/media/usb/uvc/uvc_driver.c +2
-0+ udev->devnum, + alts->desc.bInterfaceNumber);
Same here.
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_standard_control(struct · line 1012
Quoted 11 lines
drivers/media/usb/uvc/uvc_driver.c +2
-2return -EINVAL ; }@@ -1001,8 +1008,8 @@ static int uvc_parse_standard_control(struct uvc_device *dev, for (i = 0; i < n; ++i) { intf =usb_ifnum_to_if (udev, buffer[12 +i]);if (intf ==NULL ) { - uvc_trace(UVC_TRACE_DESCR, "device %d " - "interface %d doesn't exists\n", + uvc_trace(UVC_TRACE_DESCR, + "device %d interface %d doesn't
exists\n",
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_standard_control(struct uvc_device *dev, · line 1013
Quoted 1 line
drivers/media/usb/uvc/uvc_driver.c +0
-0udev->devnum, i);
The last line isn't indented correctly.
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_standard_control(struct · line 1017
Quoted 8 lines
drivers/media/usb/uvc/uvc_driver.c +0
-1continue ; }@@ -1013,8 +1020,8 @@ static int uvc_parse_standard_control(struct uvc_device *dev, case UVC_VC_INPUT_TERMINAL: if (buflen < 8) { - uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol
"
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_standard_control(struct uvc_device *dev,
Quoted 3 lines
drivers/media/usb/uvc/uvc_driver.c +2
-1- "interface %d INPUT_TERMINAL error\n", + uvc_trace(UVC_TRACE_DESCR, + "device %d videocontrol interface %d
INPUT_TERMINAL error\n",
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_standard_control(struct · line 1027
Quoted 2 lines
drivers/media/usb/uvc/uvc_driver.c +0
-0udev->devnum, alts- desc.bInterfaceNumber);
Same here.
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_standard_control(struct uvc_device *dev,
Quoted 7 lines
drivers/media/usb/uvc/uvc_driver.c +0
-0return -EINVAL ; }@@ -1024,11 +1031,11 @@ static int uvc_parse_standard_control(struct
uvc_device*dev, */drivers/media/usb/uvc/uvc_driver.c +0
-1type =get_unaligned_le16 (&buffer[4 ]);if ((type &0xff00 ) ==0 ) { - uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol
"
drivers/media/usb/uvc/uvc_driver.c
Quoted 1 line
drivers/media/usb/uvc/uvc_driver.c +0
-1- "interface %d INPUT_TERMINAL %d has
invalid "
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_standard_control(struct uvc_device *dev,
Quoted 5 lines
drivers/media/usb/uvc/uvc_driver.c +2
-3-"type 0x%04x, skipping\n" , udev->devnum, - alts->desc.bInterfaceNumber, - buffer[3], type); + uvc_trace(UVC_TRACE_DESCR, + "device %d videocontrol interface %d
INPUT_TERMINAL %d has invalid
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_standard_control(struct uvc_device *dev, · line 1037
Quoted 3 lines
type 0x%04x, skipping\n",
drivers/media/usb/uvc/uvc_driver.c +2
-0+ udev->devnum, + alts->desc.bInterfaceNumber,
The above two arguments fit on a single line.
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_standard_control(struct · line 1050
Quoted 9 lines
drivers/media/usb/uvc/uvc_driver.c +1
-1+ buffer[3], type);return 0 ; }@@ -1047,8 +1054,8 @@ static int uvc_parse_standard_control(struct uvc_device *dev, }if (buflen < len + n + p) { - uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol
"
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_standard_control(struct uvc_device *dev,
Quoted 3 lines
drivers/media/usb/uvc/uvc_driver.c +2
-1- "interface %d INPUT_TERMINAL error\n", + uvc_trace(UVC_TRACE_DESCR, + "device %d videocontrol interface %d
INPUT_TERMINAL error\n",
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_standard_control(struct · line 1060
Quoted 2 lines
drivers/media/usb/uvc/uvc_driver.c +0
-0udev->devnum, alts- desc.bInterfaceNumber);
The last line isn't indented correctly.
Quoted 2 lines
drivers/media/usb/uvc/uvc_driver.c +0
-0return -EINVAL ;}
[snip]
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_standard_control(struct uvc_device *dev,
Quoted 5 lines
drivers/media/usb/uvc/uvc_driver.c +0
-0@@ -1105,10 +1112,10 @@ static int uvc_parse_standard_control(struct
uvc_device*dev, */drivers/media/usb/uvc/uvc_driver.c +0
-1type =get_unaligned_le16 (&buffer[4 ]);if ((type &0xff00 ) ==0 ) { - uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol
"
drivers/media/usb/uvc/uvc_driver.c
Quoted 1 line
drivers/media/usb/uvc/uvc_driver.c +0
-1- "interface %d OUTPUT_TERMINAL %d has
invalid "
drivers/media/usb/uvc/uvc_driver.c
Quoted 2 lines
drivers/media/usb/uvc/uvc_driver.c +0
-2-"type 0x%04x, skipping\n" , udev->devnum, - alts->desc.bInterfaceNumber, buffer[3],
type);
drivers/media/usb/uvc/uvc_driver.c
Quoted 2 lines
drivers/media/usb/uvc/uvc_driver.c +2
-0+ uvc_trace(UVC_TRACE_DESCR, + "device %d videocontrol interface %d
OUTPUT_TERMINAL %d has invalid
drivers/media/usb/uvc/uvc_driver.c
Quoted 3 lines
type 0x%04x, skipping\n",
drivers/media/usb/uvc/uvc_driver.c +2
-0+ udev->devnum, + alts->desc.bInterfaceNumber, buffer[3],
type);
It would be more logical two group udev->devnum and alts-
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_standard_control(struct · line 1135
Quoted 10 lines
desc.bInterfaceNumber on one line and buffer[3] and type on a second line.
drivers/media/usb/uvc/uvc_driver.c +0
-1return 0 ; }@@ -1132,9 +1139,9 @@ static int uvc_parse_standard_control(structuvc_device *dev, p = buflen >=5 ? buffer[4 ] :0 ;if (buflen <5 || buflen <6 + p) { - uvc_trace(UVC_TRACE_DESCR, "device %d videocontrol
"
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_standard_control(struct · line 1144
Quoted 5 lines
drivers/media/usb/uvc/uvc_driver.c +2
-2-"interface %d SELECTOR_UNIT error\n" , - udev->devnum, alts- desc.bInterfaceNumber); + uvc_trace(UVC_TRACE_DESCR, + "device %d videocontrol interface %d
SELECTOR_UNIT error\n",
drivers/media/usb/uvc/uvc_driver.c static int uvc_parse_standard_control(struct · line 1146
Quoted 2 lines
drivers/media/usb/uvc/uvc_driver.c +1
-0+ udev->devnum, alts- desc.bInterfaceNumber);
The last line isn't indented correctly.
Quoted 3 lines
drivers/media/usb/uvc/uvc_driver.c +0
-0return -EINVAL ;}
[snip]
drivers/media/usb/uvc/uvc_driver.c static int uvc_scan_chain_backward(struct · line 1533
Quoted 10 lines
drivers/media/usb/uvc/uvc_driver.c +3
-2@@ -1515,8 +1527,9 @@ static int uvc_scan_chain_backward(structuvc_video_chain *chain, entity =uvc_entity_by_id (chain->dev, id);if (entity ==NULL ) { -uvc_trace (UVC_TRACE_DESCR ,"Found reference to " -"unknown entity %d.\n" , id); +uvc_trace (UVC_TRACE_DESCR , +"Found reference to unknown entity %d.\n" , + id);
id can fit on the same line as the format string.
Quoted 3 lines
drivers/media/usb/uvc/uvc_driver.c +0
-0return -EINVAL ; }
[snip]
drivers/media/usb/uvc/uvc_driver.c static int uvc_register_chains(struct uvc_device *dev) · line 1874
Quoted 9 lines
drivers/media/usb/uvc/uvc_driver.c +3
-2@@ -1854,8 +1869,9 @@ static int uvc_register_chains(struct uvc_device *dev)#ifdef CONFIG_MEDIA_CONTROLLER ret =uvc_mc_register_entities (chain);if (ret <0 ) { -uvc_printk (KERN_INFO ,"Failed to register entites " -"(%d).\n" , ret); +uvc_printk (KERN_INFO , +"Failed to register entites (%d).\n" , + ret);
ret can fit on the same line as the format string.
Quoted 5 lines
drivers/media/usb/uvc/uvc_driver.c +0
-0}#endif }@@ -1875,9 +1891,10 @@ static int uvc_probe(struct usb_interface *intf,int ret;
drivers/media/usb/uvc/uvc_driver.c static int uvc_probe(struct usb_interface *intf, · line 1898
Quoted 10 lines
drivers/media/usb/uvc/uvc_driver.c +4
-3if (id->idVendor && id->idProduct) -uvc_trace (UVC_TRACE_PROBE ,"Probing known UVC device %s " -"(%04x:%04x)\n" , udev->devpath, id- idVendor, - id->idProduct); +uvc_trace (UVC_TRACE_PROBE , +"Probing known UVC device %s (%04x:%04x)\n" , + udev->devpath, id->idVendor, + id->idProduct);
The three arguments can fit in a single line.
drivers/media/usb/uvc/uvc_driver.c static int uvc_probe(struct usb_interface *intf, · line 1900
Quoted 2 lines
drivers/media/usb/uvc/uvc_driver.c +0
-0else uvc_trace(UVC_TRACE_PROBE, "Probing generic UVC device
%s\n",
Quoted 1 line
udev->devpath);
[snip]
drivers/media/usb/uvc/uvc_video.c int uvc_query_ctrl(struct uvc_device *dev, __u8 query, · line 80
Quoted 9 lines
(quoted diff) +0
-0
b/drivers/media/usb/uvc/uvc_video.cindexb5589d5f5da4..9202469af85d100644drivers/media/usb/uvc/uvc_video.c +0
-1@@ -77,8 +77,9 @@ int uvc_query_ctrl(struct uvc_device *dev, __u8 query,__u8 unit, ret =__uvc_query_ctrl (dev, query, unit, intfnum, cs, data, size,UVC_CTRL_CONTROL_TIMEOUT );if (ret != size) { - uvc_printk(KERN_ERR, "Failed to query (%s) UVC control %u on
"
drivers/media/usb/uvc/uvc_video.c int uvc_query_ctrl(struct uvc_device *dev, __u8 query, · line 81
Quoted 1 line
drivers/media/usb/uvc/uvc_video.c +0
-1- "unit %u: %d (exp. %u).\n", uvc_query_name(query),
cs,
drivers/media/usb/uvc/uvc_video.c int uvc_query_ctrl(struct uvc_device *dev, __u8 query, · line 81
Quoted 2 lines
drivers/media/usb/uvc/uvc_video.c +2
-0+ uvc_printk(KERN_ERR, + "Failed to query (%s) UVC control %u on unit %u:
%d (exp. %u).\n",
drivers/media/usb/uvc/uvc_video.c int uvc_query_ctrl(struct uvc_device *dev, __u8 query, __u8 unit, · line 83
Quoted 2 lines
drivers/media/usb/uvc/uvc_video.c +1
-0+uvc_query_name (query), cs, unit, ret, size);
All the arguments after the format string can fit on a single line.
Quoted 2 lines
drivers/media/usb/uvc/uvc_video.c +0
-0return -EIO ; }
[snip]
drivers/media/usb/uvc/uvc_video.c static int uvc_get_video_ctrl(struct uvc_streaming · line 204
Quoted 9 lines
drivers/media/usb/uvc/uvc_video.c +2
-3@@ -200,15 +200,15 @@ static int uvc_get_video_ctrl(struct uvc_streaming*stream, * video probe control. Warn once and return, the caller will * fall back to GET_CUR. */ -uvc_warn_once (stream->dev,UVC_WARN_PROBE_DEF ,"UVC non " -"compliance - GET_DEF(PROBE) not supported. " -"Enabling workaround.\n" ); + uvc_warn_once(stream->dev, UVC_WARN_PROBE_DEF, + "UVC non compliance - GET_DEF(PROBE) not
supported. Enabling
drivers/media/usb/uvc/uvc_video.c static int uvc_get_video_ctrl(struct uvc_streaming *stream,
Quoted 4 lines
drivers/media/usb/uvc/uvc_video.c +0
-1workaround.\n"); ret = -EIO; goto out; }else if (ret != size) { - uvc_printk(KERN_ERR, "Failed to query (%u) UVC %s control :
"
drivers/media/usb/uvc/uvc_video.c static int uvc_get_video_ctrl(struct uvc_streaming · line 210
Quoted 1 line
drivers/media/usb/uvc/uvc_video.c +0
-1- "%d (exp. %u).\n", query, probe ? "probe" :
"commit",
drivers/media/usb/uvc/uvc_video.c static int uvc_get_video_ctrl(struct uvc_streaming *stream,
Quoted 3 lines
drivers/media/usb/uvc/uvc_video.c +2
-1- ret, size); + uvc_printk(KERN_ERR, + "Failed to query (%u) UVC %s control : %d (exp.
%u).\n",
drivers/media/usb/uvc/uvc_video.c static int uvc_get_video_ctrl(struct uvc_streaming *stream, · line 211
Quoted 2 lines
drivers/media/usb/uvc/uvc_video.c +2
-0+ query, probe ?"probe" :"commit" , + ret, size);
All the arguments after the format string can fit on a single line.
drivers/media/usb/uvc/uvc_video.c static int uvc_set_video_ctrl(struct uvc_streaming · line 291
Quoted 11 lines
drivers/media/usb/uvc/uvc_video.c +2
-2ret = -EIO ; goto out; }@@ -287,8 +287,9 @@ static int uvc_set_video_ctrl(struct uvc_streaming *stream, probe ?UVC_VS_PROBE_CONTROL :UVC_VS_COMMIT_CONTROL , data, size, uvc_timeout_param);if (ret != size) { - uvc_printk(KERN_ERR, "Failed to set UVC %s control : " - "%d (exp. %u).\n", probe ? "probe" : "commit", + uvc_printk(KERN_ERR, + "Failed to set UVC %s control : %d (exp. %u).
\n",
drivers/media/usb/uvc/uvc_video.c static int uvc_set_video_ctrl(struct uvc_streaming *stream, · line 293
Quoted 2 lines
drivers/media/usb/uvc/uvc_video.c +1
-0+ probe ?"probe" :"commit" , ret, size);
Same here.
Quoted 2 lines
drivers/media/usb/uvc/uvc_video.c +0
-0ret = -EIO ; }
[snip]
Signature · 3 lines
Regards, Laurent Pinchart
Re: [PATCH v2 48/58] uvc: don't break long lines
Em Thu, 20 Oct 2016 14:06:39 +0300
Laurent Pinchart <[email protected]> escreveu:
Quoted 3 lines
Hi Mauro,
Thank you for the patch.
Thanks for review.
Quoted 4 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ uvc_warn_once(stream->dev, UVC_WARN_PROBE_DEF, + "UVC non compliance - GET_DEF(PROBE) notsupported. Enabling
Quoted 1 line
workaround.\n"); ret =
-EIO;
Please fix your emailer, as it is word-wrapping long lines, making really difficult to distinguish your comments from the patch itself.
It follows the patch with your comments addressed.
Thanks,
Mauro
-
[PATCH] uvc: don't break long lines
Due to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
drivers/media/usb/uvc/uvc_ctrl.c +23 -21
@@ -960,8 +960,7 @@ static int uvc_ctrl_populate_cache(struct uvc_video_chain *chain,* resolution value to zero. */ uvc_warn_once (chain->dev,UVC_WARN_XU_GET_RES , -"UVC non compliance - GET_RES failed on " -"an XU control. Enabling workaround.\n" ); +"UVC non compliance - GET_RES failed on an XU control. Enabling workaround.\n" );memset (uvc_ctrl_data (ctrl,UVC_CTRL_DATA_RES ),0 , ctrl->info.size); }
@@ -1680,8 +1679,8 @@ static int uvc_ctrl_fill_xu_info(struct uvc_device *dev,uvc_ctrl_fixup_xu_info (dev, ctrl, info); - uvc_trace(UVC_TRACE_CONTROL, "XU control %pUl/%u queried: len %u, " - "flags { get %u set %u auto %u }.\n", + uvc_trace(UVC_TRACE_CONTROL, + "XU control %pUl/%u queried: len %u, flags { get %u set %u auto %u }.\n", info->entity, info->selector, info->size, (info->flags & UVC_CTRL_FLAG_GET_CUR) ? 1 : 0, (info->flags & UVC_CTRL_FLAG_SET_CUR) ? 1 : 0,
@@ -1710,9 +1709,10 @@ static int uvc_ctrl_init_xu_ctrl(struct uvc_device *dev, ret =uvc_ctrl_add_info (dev, ctrl, &info);if (ret <0 ) -uvc_trace (UVC_TRACE_CONTROL ,"Failed to initialize control " -"%pUl/%u on device %s entity %u\n" , info.entity, - info.selector, dev->udev->devpath, ctrl->entity->id); +uvc_trace (UVC_TRACE_CONTROL , +"Failed to initialize control %pUl/%u on device %s entity %u\n" , + info.entity, info.selector, dev->udev->devpath, + ctrl->entity->id);return ret; }
@@ -1904,9 +1904,10 @@ static int uvc_ctrl_add_info(struct uvc_device *dev, struct uvc_control *ctrl, ctrl->initialized =1 ; -uvc_trace (UVC_TRACE_CONTROL ,"Added control %pUl/%u to device %s " -"entity %u\n" , ctrl->info.entity, ctrl->info.selector, - dev->udev->devpath, ctrl->entity->id); +uvc_trace (UVC_TRACE_CONTROL , +"Added control %pUl/%u to device %s entity %u\n" , + ctrl->info.entity, ctrl->info.selector, + dev->udev->devpath, ctrl->entity->id); done:if (ret <0 )
@@ -1964,9 +1965,9 @@ int uvc_ctrl_add_mapping(struct uvc_video_chain *chain,int ret;if (mapping->id & ~V4L2_CTRL_ID_MASK ) { -uvc_trace (UVC_TRACE_CONTROL ,"Can't add mapping '%s', control " -"id 0x%08x is invalid.\n" , mapping->name, - mapping->id); +uvc_trace (UVC_TRACE_CONTROL , +"Can't add mapping '%s', control id 0x%08x is invalid.\n" , + mapping->name, mapping->id);return -EINVAL ; }
@@ -2004,9 +2005,9 @@ int uvc_ctrl_add_mapping(struct uvc_video_chain *chain,list_for_each_entry (map, &ctrl->info.mappings, list) {if (mapping->id == map->id) { -uvc_trace (UVC_TRACE_CONTROL ,"Can't add mapping '%s', " -"control id 0x%08x already exists.\n" , - mapping->name, mapping->id); +uvc_trace (UVC_TRACE_CONTROL , +"Can't add mapping '%s', control id 0x%08x already exists.\n" , + mapping->name, mapping->id); ret = -EEXIST ; goto done; }
@@ -2015,9 +2016,9 @@ int uvc_ctrl_add_mapping(struct uvc_video_chain *chain,/* Prevent excess memory consumption */ if (atomic_inc_return (&dev->nmappings) >UVC_MAX_CONTROL_MAPPINGS ) {atomic_dec (&dev->nmappings); -uvc_trace (UVC_TRACE_CONTROL ,"Can't add mapping '%s', maximum " -"mappings count (%u) exceeded.\n" , mapping->name, -UVC_MAX_CONTROL_MAPPINGS ); +uvc_trace (UVC_TRACE_CONTROL , +"Can't add mapping '%s', maximum mappings count (%u) exceeded.\n" , + mapping->name,UVC_MAX_CONTROL_MAPPINGS ); ret = -ENOMEM ; goto done; }
@@ -2086,8 +2087,9 @@ static void uvc_ctrl_prune_entity(struct uvc_device *dev, !uvc_test_bit(controls, blacklist[i].index)) continue; -uvc_trace (UVC_TRACE_CONTROL ,"%u/%u control is black listed, " -"removing it.\n" , entity->id, blacklist[i].index); +uvc_trace (UVC_TRACE_CONTROL , +"%u/%u control is black listed, removing it.\n" , + entity->id, blacklist[i].index);uvc_clear_bit (controls, blacklist[i].index); }
drivers/media/usb/uvc/uvc_debugfs.c +3 -2
@@ -88,8 +88,9 @@ int uvc_debugfs_init_stream(struct uvc_streaming *stream) dent =debugfs_create_dir (dir_name, uvc_debugfs_root_dir);if (IS_ERR_OR_NULL (dent)) { -uvc_printk (KERN_INFO ,"Unable to create debugfs %s " -"directory.\n" , dir_name); +uvc_printk (KERN_INFO , +"Unable to create debugfs %s directory.\n" , + dir_name);return -ENODEV ; }
drivers/media/usb/uvc/uvc_driver.c +146 -134
560 lines not on this page · raw message
drivers/media/usb/uvc/uvc_entity.c +6 -4
@@ -109,8 +109,9 @@ int uvc_mc_register_entities(struct uvc_video_chain *chain)list_for_each_entry (entity, &chain->entities, chain) { ret =uvc_mc_init_entity (chain, entity);if (ret <0 ) { -uvc_printk (KERN_INFO ,"Failed to initialize entity for " -"entity %u\n" , entity->id); +uvc_printk (KERN_INFO , +"Failed to initialize entity for entity %u\n" , + entity->id);return ret; } }
@@ -118,8 +119,9 @@ int uvc_mc_register_entities(struct uvc_video_chain *chain)list_for_each_entry (entity, &chain->entities, chain) { ret =uvc_mc_create_links (chain, entity);if (ret <0 ) { -uvc_printk (KERN_INFO ,"Failed to create links for " -"entity %u\n" , entity->id); +uvc_printk (KERN_INFO , +"Failed to create links for entity %u\n" , + entity->id);return ret; } }
drivers/media/usb/uvc/uvc_isight.c +6 -6
@@ -61,8 +61,8 @@ static int isight_decode(struct uvc_video_queue *queue, struct uvc_buffer *buf,/* Synchronize to the input stream by waiting for a header packet. */ if (buf->state !=UVC_BUF_STATE_ACTIVE ) {if (!is_header) { -uvc_trace (UVC_TRACE_FRAME ,"Dropping packet (out of " -"sync).\n" ); +uvc_trace (UVC_TRACE_FRAME , +"Dropping packet (out of sync).\n" );return 0 ; }
@@ -90,8 +90,8 @@ static int isight_decode(struct uvc_video_queue *queue, struct uvc_buffer *buf, buf->bytesused += nbytes;if (len > maxlen || buf->bytesused == buf->length) { -uvc_trace (UVC_TRACE_FRAME ,"Frame complete " -"(overflow).\n" ); +uvc_trace (UVC_TRACE_FRAME , +"Frame complete (overflow).\n" ); buf->state =UVC_BUF_STATE_DONE ; } }
@@ -106,8 +106,8 @@ void uvc_video_decode_isight(struct urb *urb, struct uvc_streaming *stream,for (i =0 ; i < urb->number_of_packets; ++i) {if (urb->iso_frame_desc[i].status <0 ) { -uvc_trace (UVC_TRACE_FRAME ,"USB isochronous frame " -"lost (%d).\n" , +uvc_trace (UVC_TRACE_FRAME , +"USB isochronous frame lost (%d).\n" , urb->iso_frame_desc[i].status); }
drivers/media/usb/uvc/uvc_status.c +13 -10
@@ -81,8 +81,8 @@ static void uvc_input_report_key(struct uvc_device *dev, unsigned int code,static void uvc_event_streaming (struct uvc_device *dev,__u8 *data,int len) {if (len <3 ) { -uvc_trace (UVC_TRACE_STATUS ,"Invalid streaming status event " -"received.\n" ); +uvc_trace (UVC_TRACE_STATUS , +"Invalid streaming status event received.\n" );return ; }
@@ -93,8 +93,9 @@ static void uvc_event_streaming(struct uvc_device *dev, __u8 *data, int len) data[1], data[3] ? "pressed" : "released", len);uvc_input_report_key (dev,KEY_CAMERA , data[3 ]); }else { -uvc_trace (UVC_TRACE_STATUS ,"Stream %u error event %02x %02x " -"len %d.\n" , data[1 ], data[2 ], data[3 ], len); +uvc_trace (UVC_TRACE_STATUS , +"Stream %u error event %02x %02x len %d.\n" , + data[1 ], data[2 ], data[3 ], len); } }
@@ -103,8 +104,8 @@ static void uvc_event_control(struct uvc_device *dev, __u8 *data, int len)char *attrs[3 ] = {"value" ,"info" ,"failure" };if (len <6 || data[2 ] !=0 || data[4 ] >2 ) { -uvc_trace (UVC_TRACE_STATUS ,"Invalid control status event " -"received.\n" ); +uvc_trace (UVC_TRACE_STATUS , +"Invalid control status event received.\n" );return ; }
@@ -129,8 +130,9 @@ static void uvc_status_complete(struct urb *urb)return ;default : -uvc_printk (KERN_WARNING ,"Non-zero status (%d) in status " -"completion handler.\n" , urb->status); +uvc_printk (KERN_WARNING , +"Non-zero status (%d) in status completion handler.\n" , + urb->status);return ; }
@@ -146,8 +148,9 @@ static void uvc_status_complete(struct urb *urb)break ;default : -uvc_trace (UVC_TRACE_STATUS ,"Unknown status event " -"type %u.\n" , dev->status[0 ]); +uvc_trace (UVC_TRACE_STATUS , +"Unknown status event type %u.\n" , + dev->status[0 ]);break ; } }
drivers/media/usb/uvc/uvc_v4l2.c +6 -5
@@ -85,8 +85,8 @@ static int uvc_ioctl_ctrl_map(struct uvc_video_chain *chain,break ;default : -uvc_trace (UVC_TRACE_CONTROL ,"Unsupported V4L2 control type " -"%u.\n" , xmap->v4l2_type); +uvc_trace (UVC_TRACE_CONTROL ,"Unsupported V4L2 control type %u.\n" , + xmap->v4l2_type); ret = -ENOTTY ; goto done; }
@@ -224,9 +224,10 @@ static int uvc_v4l2_try_format(struct uvc_streaming *stream,/* Use the default frame interval. */ interval = frame->dwDefaultFrameInterval; -uvc_trace (UVC_TRACE_FORMAT ,"Using default frame interval %u.%u us " -"(%u.%u fps).\n" , interval/10 , interval%10 ,10000000 /interval, - (100000000 /interval)%10 ); +uvc_trace (UVC_TRACE_FORMAT , +"Using default frame interval %u.%u us (%u.%u fps).\n" , + interval/10 , interval%10 ,10000000 /interval, + (100000000 /interval)%10 );/* Set the format index, frame index and frame interval. */ memset (probe,0 ,sizeof *probe);
drivers/media/usb/uvc/uvc_video.c +53 -51
224 lines not on this page · raw message
PATCH v2 49/58 zr364xx: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/usb/zr364xx/zr364xx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/media/usb/zr364xx/zr364xx.c +2 -4
@@ -633,8 +633,7 @@ static int zr364xx_read_video_callback(struct zr364xx_camera *cam, }else {if (frm->cur_size + purb->actual_length >MAX_FRAME_SIZE ) {dev_info (&cam->udev->dev, -"%s: buffer (%d bytes) too small to hold " -"frame data. Discarding frame data.\n" , +"%s: buffer (%d bytes) too small to hold frame data. Discarding frame data.\n" , __func__,MAX_FRAME_SIZE ); }else { pdest += frm->cur_size;
@@ -1373,8 +1372,7 @@ static int zr364xx_board_init(struct zr364xx_camera *cam) &cam->buffer.frame[i], i, cam->buffer.frame[i].lpvbits);if (cam->buffer.frame[i].lpvbits ==NULL ) { - printk(KERN_INFO KBUILD_MODNAME ": out of memory. " - "Using less frames\n"); + printk(KERN_INFO KBUILD_MODNAME ": out of memory. Using less frames\n");break ; } }
Signature · 1 line
2.7.4
PATCH v2 50/58 v4l2-core: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/v4l2-core/v4l2-ioctl.c | 91 +++++++++-------------------- drivers/media/v4l2-core/videobuf-core.c | 3 +- drivers/media/v4l2-core/videobuf2-core.c | 25 ++++---- drivers/media/v4l2-core/videobuf2-v4l2.c | 10 ++-- drivers/media/v4l2-core/videobuf2-vmalloc.c | 3 +- 5 files changed, 43 insertions(+), 89 deletions(-)
drivers/media/v4l2-core/v4l2-ioctl.c +26 -65
@@ -174,8 +174,7 @@ static void v4l_print_querycap(const void *arg, bool write_only) {const struct v4l2_capability *p = arg; - pr_cont("driver=%.*s, card=%.*s, bus=%.*s, version=0x%08x, " - "capabilities=0x%08x, device_caps=0x%08x\n", + pr_cont("driver=%.*s, card=%.*s, bus=%.*s, version=0x%08x, capabilities=0x%08x, device_caps=0x%08x\n", (int)sizeof(p->driver), p->driver, (int)sizeof(p->card), p->card, (int)sizeof(p->bus_info), p->bus_info,
@@ -186,8 +185,7 @@ static void v4l_print_enuminput(const void *arg, bool write_only) {const struct v4l2_input *p = arg; -pr_cont ("index=%u, name=%.*s, type=%u, audioset=0x%x, tuner=%u, " -"std=0x%08Lx, status=0x%x, capabilities=0x%x\n" , +pr_cont ("index=%u, name=%.*s, type=%u, audioset=0x%x, tuner=%u, std=0x%08Lx, status=0x%x, capabilities=0x%x\n" , p->index, (int )sizeof (p->name), p->name, p->type, p->audioset, p->tuner, (unsigned long long )p->std, p->status, p->capabilities);
@@ -197,8 +195,7 @@ static void v4l_print_enumoutput(const void *arg, bool write_only) {const struct v4l2_output *p = arg; -pr_cont ("index=%u, name=%.*s, type=%u, audioset=0x%x, " -"modulator=%u, std=0x%08Lx, capabilities=0x%x\n" , +pr_cont ("index=%u, name=%.*s, type=%u, audioset=0x%x, modulator=%u, std=0x%08Lx, capabilities=0x%x\n" , p->index, (int )sizeof (p->name), p->name, p->type, p->audioset, p->modulator, (unsigned long long )p->std, p->capabilities); }
@@ -256,11 +253,7 @@ static void v4l_print_format(const void *arg, bool write_only)case V4L2_BUF_TYPE_VIDEO_CAPTURE :case V4L2_BUF_TYPE_VIDEO_OUTPUT : pix = &p->fmt.pix; - pr_cont(", width=%u, height=%u, " - "pixelformat=%c%c%c%c, field=%s, " - "bytesperline=%u, sizeimage=%u, colorspace=%d, " - "flags=0x%x, ycbcr_enc=%u, quantization=%u, " - "xfer_func=%u\n", + pr_cont(", width=%u, height=%u, pixelformat=%c%c%c%c, field=%s, bytesperline=%u, sizeimage=%u, colorspace=%d, flags=0x%x, ycbcr_enc=%u, quantization=%u, xfer_func=%u\n", pix->width, pix->height, (pix->pixelformat & 0xff), (pix->pixelformat >> 8) & 0xff,
@@ -274,10 +267,7 @@ static void v4l_print_format(const void *arg, bool write_only)case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE :case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE : mp = &p->fmt.pix_mp; - pr_cont(", width=%u, height=%u, " - "format=%c%c%c%c, field=%s, " - "colorspace=%d, num_planes=%u, flags=0x%x, " - "ycbcr_enc=%u, quantization=%u, xfer_func=%u\n", + pr_cont(", width=%u, height=%u, format=%c%c%c%c, field=%s, colorspace=%d, num_planes=%u, flags=0x%x, ycbcr_enc=%u, quantization=%u, xfer_func=%u\n", mp->width, mp->height, (mp->pixelformat & 0xff), (mp->pixelformat >> 8) & 0xff,
@@ -306,8 +296,7 @@ static void v4l_print_format(const void *arg, bool write_only)case V4L2_BUF_TYPE_VBI_CAPTURE :case V4L2_BUF_TYPE_VBI_OUTPUT : vbi = &p->fmt.vbi; - pr_cont(", sampling_rate=%u, offset=%u, samples_per_line=%u, " - "sample_format=%c%c%c%c, start=%u,%u, count=%u,%u\n", + pr_cont(", sampling_rate=%u, offset=%u, samples_per_line=%u, sample_format=%c%c%c%c, start=%u,%u, count=%u,%u\n", vbi->sampling_rate, vbi->offset, vbi->samples_per_line, (vbi->sample_format & 0xff),
@@ -343,9 +332,7 @@ static void v4l_print_framebuffer(const void *arg, bool write_only) {const struct v4l2_framebuffer *p = arg; - pr_cont("capability=0x%x, flags=0x%x, base=0x%p, width=%u, " - "height=%u, pixelformat=%c%c%c%c, " - "bytesperline=%u, sizeimage=%u, colorspace=%d\n", + pr_cont("capability=0x%x, flags=0x%x, base=0x%p, width=%u, height=%u, pixelformat=%c%c%c%c, bytesperline=%u, sizeimage=%u, colorspace=%d\n", p->capability, p->flags, p->base, p->fmt.width, p->fmt.height, (p->fmt.pixelformat & 0xff),
@@ -368,8 +355,7 @@ static void v4l_print_modulator(const void *arg, bool write_only)if (write_only)pr_cont ("index=%u, txsubchans=0x%x\n" , p->index, p->txsubchans);else -pr_cont ("index=%u, name=%.*s, capability=0x%x, " -"rangelow=%u, rangehigh=%u, txsubchans=0x%x\n" , +pr_cont ("index=%u, name=%.*s, capability=0x%x, rangelow=%u, rangehigh=%u, txsubchans=0x%x\n" , p->index, (int )sizeof (p->name), p->name, p->capability, p->rangelow, p->rangehigh, p->txsubchans); }
@@ -381,9 +367,7 @@ static void v4l_print_tuner(const void *arg, bool write_only)if (write_only)pr_cont ("index=%u, audmode=%u\n" , p->index, p->audmode);else - pr_cont("index=%u, name=%.*s, type=%u, capability=0x%x, " - "rangelow=%u, rangehigh=%u, signal=%u, afc=%d, " - "rxsubchans=0x%x, audmode=%u\n", + pr_cont("index=%u, name=%.*s, type=%u, capability=0x%x, rangelow=%u, rangehigh=%u, signal=%u, afc=%d, rxsubchans=0x%x, audmode=%u\n", p->index, (int)sizeof(p->name), p->name, p->type, p->capability, p->rangelow, p->rangehigh, p->signal, p->afc,
@@ -402,8 +386,8 @@ static void v4l_print_standard(const void *arg, bool write_only) {const struct v4l2_standard *p = arg; - pr_cont("index=%u, id=0x%Lx, name=%.*s, fps=%u/%u, " - "framelines=%u\n", p->index, + pr_cont("index=%u, id=0x%Lx, name=%.*s, fps=%u/%u, framelines=%u\n", + p->index, (unsigned long long)p->id, (int)sizeof(p->name), p->name, p->frameperiod.numerator, p->frameperiod.denominator,
@@ -419,8 +403,7 @@ static void v4l_print_hw_freq_seek(const void *arg, bool write_only) {const struct v4l2_hw_freq_seek *p = arg; -pr_cont ("tuner=%u, type=%u, seek_upward=%u, wrap_around=%u, spacing=%u, " -"rangelow=%u, rangehigh=%u\n" , +pr_cont ("tuner=%u, type=%u, seek_upward=%u, wrap_around=%u, spacing=%u, rangelow=%u, rangehigh=%u\n" , p->tuner, p->type, p->seek_upward, p->wrap_around, p->spacing, p->rangelow, p->rangehigh); }
@@ -442,8 +425,7 @@ static void v4l_print_buffer(const void *arg, bool write_only)const struct v4l2_plane *plane;int i; - pr_cont("%02ld:%02d:%02d.%08ld index=%d, type=%s, " - "flags=0x%08x, field=%s, sequence=%d, memory=%s", + pr_cont("%02ld:%02d:%02d.%08ld index=%d, type=%s, flags=0x%08x, field=%s, sequence=%d, memory=%s", p->timestamp.tv_sec / 3600, (int)(p->timestamp.tv_sec / 60) % 60, (int)(p->timestamp.tv_sec % 60),
@@ -458,8 +440,7 @@ static void v4l_print_buffer(const void *arg, bool write_only)for (i =0 ; i < p->length; ++i) { plane = &p->m.planes[i];printk (KERN_DEBUG -"plane %d: bytesused=%d, data_offset=0x%08x, " -"offset/userptr=0x%lx, length=%d\n" , +"plane %d: bytesused=%d, data_offset=0x%08x, offset/userptr=0x%lx, length=%d\n" , i, plane->bytesused, plane->data_offset, plane->m.userptr, plane->length); }
@@ -468,8 +449,7 @@ static void v4l_print_buffer(const void *arg, bool write_only) p->bytesused, p->m.userptr, p->length); } -printk (KERN_DEBUG "timecode=%02d:%02d:%02d type=%d, " -"flags=0x%08x, frames=%d, userbits=0x%08x\n" , +printk (KERN_DEBUG "timecode=%02d:%02d:%02d type=%d, flags=0x%08x, frames=%d, userbits=0x%08x\n" , tc->hours, tc->minutes, tc->seconds, tc->type, tc->flags, tc->frames, *(__u32 *)tc->userbits); }
@@ -503,8 +483,7 @@ static void v4l_print_streamparm(const void *arg, bool write_only) p->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {const struct v4l2_captureparm *c = &p->parm.capture; -pr_cont (", capability=0x%x, capturemode=0x%x, timeperframe=%d/%d, " -"extendedmode=%d, readbuffers=%d\n" , +pr_cont (", capability=0x%x, capturemode=0x%x, timeperframe=%d/%d, extendedmode=%d, readbuffers=%d\n" , c->capability, c->capturemode, c->timeperframe.numerator, c->timeperframe.denominator, c->extendedmode, c->readbuffers);
@@ -512,8 +491,7 @@ static void v4l_print_streamparm(const void *arg, bool write_only) p->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {const struct v4l2_outputparm *c = &p->parm.output; -pr_cont (", capability=0x%x, outputmode=0x%x, timeperframe=%d/%d, " -"extendedmode=%d, writebuffers=%d\n" , +pr_cont (", capability=0x%x, outputmode=0x%x, timeperframe=%d/%d, extendedmode=%d, writebuffers=%d\n" , c->capability, c->outputmode, c->timeperframe.numerator, c->timeperframe.denominator, c->extendedmode, c->writebuffers);
@@ -526,8 +504,7 @@ static void v4l_print_queryctrl(const void *arg, bool write_only) {const struct v4l2_queryctrl *p = arg; -pr_cont ("id=0x%x, type=%d, name=%.*s, min/max=%d/%d, " -"step=%d, default=%d, flags=0x%08x\n" , +pr_cont ("id=0x%x, type=%d, name=%.*s, min/max=%d/%d, step=%d, default=%d, flags=0x%08x\n" , p->id, p->type, (int )sizeof (p->name), p->name, p->minimum, p->maximum, p->step, p->default_value, p->flags);
@@ -537,9 +514,7 @@ static void v4l_print_query_ext_ctrl(const void *arg, bool write_only) {const struct v4l2_query_ext_ctrl *p = arg; - pr_cont("id=0x%x, type=%d, name=%.*s, min/max=%lld/%lld, " - "step=%lld, default=%lld, flags=0x%08x, elem_size=%u, elems=%u, " - "nr_of_dims=%u, dims=%u,%u,%u,%u\n", + pr_cont("id=0x%x, type=%d, name=%.*s, min/max=%lld/%lld, step=%lld, default=%lld, flags=0x%08x, elem_size=%u, elems=%u, nr_of_dims=%u, dims=%u,%u,%u,%u\n", p->id, p->type, (int)sizeof(p->name), p->name, p->minimum, p->maximum, p->step, p->default_value, p->flags,
@@ -583,9 +558,7 @@ static void v4l_print_cropcap(const void *arg, bool write_only) {const struct v4l2_cropcap *p = arg; - pr_cont("type=%s, bounds wxh=%dx%d, x,y=%d,%d, " - "defrect wxh=%dx%d, x,y=%d,%d, " - "pixelaspect %d/%d\n", + pr_cont("type=%s, bounds wxh=%dx%d, x,y=%d,%d, defrect wxh=%dx%d, x,y=%d,%d, pixelaspect %d/%d\n", prt_names(p->type, v4l2_type_names), p->bounds.width, p->bounds.height, p->bounds.left, p->bounds.top,
@@ -618,8 +591,7 @@ static void v4l_print_jpegcompression(const void *arg, bool write_only) {const struct v4l2_jpegcompression *p = arg; -pr_cont ("quality=%d, APPn=%d, APP_len=%d, " -"COM_len=%d, jpeg_markers=0x%x\n" , +pr_cont ("quality=%d, APPn=%d, APP_len=%d, COM_len=%d, jpeg_markers=0x%x\n" , p->quality, p->APPn, p->APP_len, p->COM_len, p->jpeg_markers); }
@@ -686,14 +658,7 @@ static void v4l_print_dv_timings(const void *arg, bool write_only)switch (p->type) {case V4L2_DV_BT_656_1120 : - pr_cont("type=bt-656/1120, interlaced=%u, " - "pixelclock=%llu, " - "width=%u, height=%u, polarities=0x%x, " - "hfrontporch=%u, hsync=%u, " - "hbackporch=%u, vfrontporch=%u, " - "vsync=%u, vbackporch=%u, " - "il_vfrontporch=%u, il_vsync=%u, " - "il_vbackporch=%u, standards=0x%x, flags=0x%x\n", + pr_cont("type=bt-656/1120, interlaced=%u, pixelclock=%llu, width=%u, height=%u, polarities=0x%x, hfrontporch=%u, hsync=%u, hbackporch=%u, vfrontporch=%u, vsync=%u, vbackporch=%u, il_vfrontporch=%u, il_vsync=%u, il_vbackporch=%u, standards=0x%x, flags=0x%x\n", p->bt.interlaced, p->bt.pixelclock, p->bt.width, p->bt.height, p->bt.polarities, p->bt.hfrontporch,
@@ -723,8 +688,7 @@ static void v4l_print_dv_timings_cap(const void *arg, bool write_only)switch (p->type) {case V4L2_DV_BT_656_1120 : - pr_cont("type=bt-656/1120, width=%u-%u, height=%u-%u, " - "pixelclock=%llu-%llu, standards=0x%x, capabilities=0x%x\n", + pr_cont("type=bt-656/1120, width=%u-%u, height=%u-%u, pixelclock=%llu-%llu, standards=0x%x, capabilities=0x%x\n", p->bt.min_width, p->bt.max_width, p->bt.min_height, p->bt.max_height, p->bt.min_pixelclock, p->bt.max_pixelclock,
@@ -805,8 +769,7 @@ static void v4l_print_event(const void *arg, bool write_only)const struct v4l2_event *p = arg;const struct v4l2_event_ctrl *c; -pr_cont ("type=0x%x, pending=%u, sequence=%u, id=%u, " -"timestamp=%lu.%9.9lu\n" , +pr_cont ("type=0x%x, pending=%u, sequence=%u, id=%u, timestamp=%lu.%9.9lu\n" , p->type, p->pending, p->sequence, p->id, p->timestamp.tv_sec, p->timestamp.tv_nsec);switch (p->type) {
@@ -822,8 +785,7 @@ static void v4l_print_event(const void *arg, bool write_only)pr_cont ("value64=%lld, " , c->value64); else pr_cont("value=%d, ", c->value); -pr_cont ("flags=0x%x, minimum=%d, maximum=%d, step=%d, " -"default_value=%d\n" , +pr_cont ("flags=0x%x, minimum=%d, maximum=%d, step=%d, default_value=%d\n" , c->flags, c->minimum, c->maximum, c->step, c->default_value);break ;
@@ -859,8 +821,7 @@ static void v4l_print_freq_band(const void *arg, bool write_only) {const struct v4l2_frequency_band *p = arg; -pr_cont ("tuner=%u, type=%u, index=%u, capability=0x%x, " -"rangelow=%u, rangehigh=%u, modulation=0x%x\n" , +pr_cont ("tuner=%u, type=%u, index=%u, capability=0x%x, rangelow=%u, rangehigh=%u, modulation=0x%x\n" , p->tuner, p->type, p->index, p->capability, p->rangelow, p->rangehigh, p->modulation);
drivers/media/v4l2-core/videobuf-core.c +1 -2
@@ -572,8 +572,7 @@ int videobuf_qbuf(struct videobuf_queue *q, struct v4l2_buffer *b)switch (b->memory) {case V4L2_MEMORY_MMAP :if (0 == buf->baddr) { -dprintk (1 ,"qbuf: mmap requested " -"but buffer addr is zero!\n" ); +dprintk (1 ,"qbuf: mmap requested but buffer addr is zero!\n" ); goto done; } if (q->type == V4L2_BUF_TYPE_VIDEO_OUTPUT
drivers/media/v4l2-core/videobuf2-core.c +11 -14
@@ -358,8 +358,8 @@ static int __vb2_queue_alloc(struct vb2_queue *q, enum vb2_memory memory,if (memory ==VB2_MEMORY_MMAP ) { ret =__vb2_buf_mem_alloc (vb);if (ret) { -dprintk (1 ,"failed allocating memory for " -"buffer %d\n" , buffer); +dprintk (1 ,"failed allocating memory for buffer %d\n" , + buffer); q->bufs[vb->index] =NULL ;kfree (vb);break ;
@@ -372,8 +372,8 @@ static int __vb2_queue_alloc(struct vb2_queue *q, enum vb2_memory memory,*/ ret =call_vb_qop (vb, buf_init, vb);if (ret) { -dprintk (1 ,"buffer %d %p initialization" -" failed\n" , buffer, vb); +dprintk (1 ,"buffer %d %p initialization failed\n" , + buffer, vb);__vb2_buf_mem_free (vb); q->bufs[vb->index] =NULL ;kfree (vb);
@@ -997,13 +997,12 @@ static int __qbuf_userptr(struct vb2_buffer *vb, const void *pb) && vb->planes[plane].length == planes[plane].length)continue ; -dprintk (3 ,"userspace address for plane %d changed, " -"reacquiring memory\n" , plane); +dprintk (3 ,"userspace address for plane %d changed, reacquiring memory\n" , + plane);/* Check if the provided plane buffer is large enough */ if (planes[plane].length < vb->planes[plane].min_length) { -dprintk (1 ,"provided buffer size %u is less than " -"setup size %u for plane %d\n" , +dprintk (1 ,"provided buffer size %u is less than setup size %u for plane %d\n" , planes[plane].length, vb->planes[plane].min_length, plane);
@@ -1032,8 +1031,8 @@ static int __qbuf_userptr(struct vb2_buffer *vb, const void *pb) planes[plane].m.userptr, planes[plane].length, dma_dir);if (IS_ERR (mem_priv)) { -dprintk (1 ,"failed acquiring userspace " -"memory for plane %d\n" , plane); +dprintk (1 ,"failed acquiring userspace memory for plane %d\n" , + plane); ret =PTR_ERR (mem_priv); goto err; }
@@ -1123,8 +1122,7 @@ static int __qbuf_dmabuf(struct vb2_buffer *vb, const void *pb) planes[plane].length = dbuf->size;if (planes[plane].length < vb->planes[plane].min_length) { -dprintk (1 ,"invalid dmabuf length %u for plane %d, " -"minimum length %u\n" , +dprintk (1 ,"invalid dmabuf length %u for plane %d, minimum length %u\n" , planes[plane].length, plane, vb->planes[plane].min_length);dma_buf_put (dbuf);
@@ -1472,8 +1470,7 @@ static int __vb2_wait_for_done_vb(struct vb2_queue *q, int nonblocking) }if (nonblocking) { -dprintk (1 ,"nonblocking and no buffers to dequeue, " -"will not wait\n" ); +dprintk (1 ,"nonblocking and no buffers to dequeue, will not wait\n" );return -EAGAIN ; }
drivers/media/v4l2-core/videobuf2-v4l2.c +4 -6
@@ -60,14 +60,13 @@ static int __verify_planes_array(struct vb2_buffer *vb, const struct v4l2_buffer/* Is memory for copying plane information present? */ if (b->m.planes ==NULL ) { -dprintk (1 ,"multi-planar buffer passed but " -"planes array not provided\n" ); +dprintk (1 ,"multi-planar buffer passed but planes array not provided\n" );return -EINVAL ; }if (b->length < vb->num_planes || b->length >VB2_MAX_PLANES ) { -dprintk (1 ,"incorrect planes array length, " -"expected %d, got %d\n" , vb->num_planes, b->length); +dprintk (1 ,"incorrect planes array length, expected %d, got %d\n" , + vb->num_planes, b->length);return -EINVAL ; }
@@ -316,8 +315,7 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb,* that just says that it is either a top or a bottom field, * but not which of the two it is. */ -dprintk (1 ,"the field is incorrectly set to ALTERNATE " -"for an output buffer\n" ); +dprintk (1 ,"the field is incorrectly set to ALTERNATE for an output buffer\n" );return -EINVAL ; } vb->timestamp =0 ;
drivers/media/v4l2-core/videobuf2-vmalloc.c +1 -2
@@ -151,8 +151,7 @@ static void *vb2_vmalloc_vaddr(void *buf_priv)struct vb2_vmalloc_buf *buf = buf_priv;if (!buf->vaddr) { -pr_err ("Address of an unallocated plane requested " -"or cannot map user pointer\n" ); +pr_err ("Address of an unallocated plane requested or cannot map user pointer\n" );return NULL ; }
Signature · 1 line
2.7.4
Re: [PATCH v2 50/58] v4l2-core: don't break long lines
Hi Mauro,
Quoted 5 lines · Mauro Carvalho Chehab
drivers/media/v4l2-core/v4l2-ioctl.c +0
-0
drivers/media/v4l2-core/v4l2-ioctl.c static void v4l_print_querycap(const void *arg, bool write_only) · line 180
Quoted 9 lines
drivers/media/v4l2-core/v4l2-ioctl.c +1
-2@@ -174,8 +174,7 @@ static void v4l_print_querycap(const void *arg, bool write_only) {const struct v4l2_capability *p = arg; - pr_cont("driver=%.*s, card=%.*s, bus=%.*s, version=0x%08x, " - "capabilities=0x%08x, device_caps=0x%08x\n", + pr_cont("driver=%.*s, card=%.*s, bus=%.*s, version=0x%08x, capabilities=0x%08x, device_caps=0x%08x\n", (int)sizeof(p->driver), p->driver, (int)sizeof(p->card), p->card, (int)sizeof(p->bus_info), p->bus_info,
I still wouldn't do this to v4l2-ioctl.c. It does not improve grappability because of the format strings. Some are also really long such as the one a few chunks below.
Other than that, this looks very nice now. Your script makes me wonder, though, whether there should be a tool to automatically improve coding style for cases such as this. I didn't realise so many strings were actually split. I'm sure also the rest of the kernel would benefit from such a tool. With the increased number of lines of code, the special cases that need to be handled manually must decrease as well or it becomes unfeasible.
Quoted 390 lines
drivers/media/v4l2-core/v4l2-ioctl.c +25
-63@@ -186,8 +185,7 @@ static void v4l_print_enuminput(const void *arg, bool write_only) {const struct v4l2_input *p = arg; -pr_cont ("index=%u, name=%.*s, type=%u, audioset=0x%x, tuner=%u, " -"std=0x%08Lx, status=0x%x, capabilities=0x%x\n" , +pr_cont ("index=%u, name=%.*s, type=%u, audioset=0x%x, tuner=%u, std=0x%08Lx, status=0x%x, capabilities=0x%x\n" , p->index, (int )sizeof (p->name), p->name, p->type, p->audioset, p->tuner, (unsigned long long )p->std, p->status, p->capabilities);@@ -197,8 +195,7 @@ static void v4l_print_enumoutput(const void *arg, bool write_only) {const struct v4l2_output *p = arg; -pr_cont ("index=%u, name=%.*s, type=%u, audioset=0x%x, " -"modulator=%u, std=0x%08Lx, capabilities=0x%x\n" , +pr_cont ("index=%u, name=%.*s, type=%u, audioset=0x%x, modulator=%u, std=0x%08Lx, capabilities=0x%x\n" , p->index, (int )sizeof (p->name), p->name, p->type, p->audioset, p->modulator, (unsigned long long )p->std, p->capabilities); }@@ -256,11 +253,7 @@ static void v4l_print_format(const void *arg, bool write_only)case V4L2_BUF_TYPE_VIDEO_CAPTURE :case V4L2_BUF_TYPE_VIDEO_OUTPUT : pix = &p->fmt.pix; - pr_cont(", width=%u, height=%u, " - "pixelformat=%c%c%c%c, field=%s, " - "bytesperline=%u, sizeimage=%u, colorspace=%d, " - "flags=0x%x, ycbcr_enc=%u, quantization=%u, " - "xfer_func=%u\n", + pr_cont(", width=%u, height=%u, pixelformat=%c%c%c%c, field=%s, bytesperline=%u, sizeimage=%u, colorspace=%d, flags=0x%x, ycbcr_enc=%u, quantization=%u, xfer_func=%u\n", pix->width, pix->height, (pix->pixelformat & 0xff), (pix->pixelformat >> 8) & 0xff,@@ -274,10 +267,7 @@ static void v4l_print_format(const void *arg, bool write_only)case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE :case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE : mp = &p->fmt.pix_mp; - pr_cont(", width=%u, height=%u, " - "format=%c%c%c%c, field=%s, " - "colorspace=%d, num_planes=%u, flags=0x%x, " - "ycbcr_enc=%u, quantization=%u, xfer_func=%u\n", + pr_cont(", width=%u, height=%u, format=%c%c%c%c, field=%s, colorspace=%d, num_planes=%u, flags=0x%x, ycbcr_enc=%u, quantization=%u, xfer_func=%u\n", mp->width, mp->height, (mp->pixelformat & 0xff), (mp->pixelformat >> 8) & 0xff,@@ -306,8 +296,7 @@ static void v4l_print_format(const void *arg, bool write_only)case V4L2_BUF_TYPE_VBI_CAPTURE :case V4L2_BUF_TYPE_VBI_OUTPUT : vbi = &p->fmt.vbi; - pr_cont(", sampling_rate=%u, offset=%u, samples_per_line=%u, " - "sample_format=%c%c%c%c, start=%u,%u, count=%u,%u\n", + pr_cont(", sampling_rate=%u, offset=%u, samples_per_line=%u, sample_format=%c%c%c%c, start=%u,%u, count=%u,%u\n", vbi->sampling_rate, vbi->offset, vbi->samples_per_line, (vbi->sample_format & 0xff),@@ -343,9 +332,7 @@ static void v4l_print_framebuffer(const void *arg, bool write_only) {const struct v4l2_framebuffer *p = arg; - pr_cont("capability=0x%x, flags=0x%x, base=0x%p, width=%u, " - "height=%u, pixelformat=%c%c%c%c, " - "bytesperline=%u, sizeimage=%u, colorspace=%d\n", + pr_cont("capability=0x%x, flags=0x%x, base=0x%p, width=%u, height=%u, pixelformat=%c%c%c%c, bytesperline=%u, sizeimage=%u, colorspace=%d\n", p->capability, p->flags, p->base, p->fmt.width, p->fmt.height, (p->fmt.pixelformat & 0xff),@@ -368,8 +355,7 @@ static void v4l_print_modulator(const void *arg, bool write_only)if (write_only)pr_cont ("index=%u, txsubchans=0x%x\n" , p->index, p->txsubchans);else -pr_cont ("index=%u, name=%.*s, capability=0x%x, " -"rangelow=%u, rangehigh=%u, txsubchans=0x%x\n" , +pr_cont ("index=%u, name=%.*s, capability=0x%x, rangelow=%u, rangehigh=%u, txsubchans=0x%x\n" , p->index, (int )sizeof (p->name), p->name, p->capability, p->rangelow, p->rangehigh, p->txsubchans); }@@ -381,9 +367,7 @@ static void v4l_print_tuner(const void *arg, bool write_only)if (write_only)pr_cont ("index=%u, audmode=%u\n" , p->index, p->audmode);else - pr_cont("index=%u, name=%.*s, type=%u, capability=0x%x, " - "rangelow=%u, rangehigh=%u, signal=%u, afc=%d, " - "rxsubchans=0x%x, audmode=%u\n", + pr_cont("index=%u, name=%.*s, type=%u, capability=0x%x, rangelow=%u, rangehigh=%u, signal=%u, afc=%d, rxsubchans=0x%x, audmode=%u\n", p->index, (int)sizeof(p->name), p->name, p->type, p->capability, p->rangelow, p->rangehigh, p->signal, p->afc,@@ -402,8 +386,8 @@ static void v4l_print_standard(const void *arg, bool write_only) {const struct v4l2_standard *p = arg; - pr_cont("index=%u, id=0x%Lx, name=%.*s, fps=%u/%u, " - "framelines=%u\n", p->index, + pr_cont("index=%u, id=0x%Lx, name=%.*s, fps=%u/%u, framelines=%u\n", + p->index, (unsigned long long)p->id, (int)sizeof(p->name), p->name, p->frameperiod.numerator, p->frameperiod.denominator,@@ -419,8 +403,7 @@ static void v4l_print_hw_freq_seek(const void *arg, bool write_only) {const struct v4l2_hw_freq_seek *p = arg; -pr_cont ("tuner=%u, type=%u, seek_upward=%u, wrap_around=%u, spacing=%u, " -"rangelow=%u, rangehigh=%u\n" , +pr_cont ("tuner=%u, type=%u, seek_upward=%u, wrap_around=%u, spacing=%u, rangelow=%u, rangehigh=%u\n" , p->tuner, p->type, p->seek_upward, p->wrap_around, p->spacing, p->rangelow, p->rangehigh); }@@ -442,8 +425,7 @@ static void v4l_print_buffer(const void *arg, bool write_only)const struct v4l2_plane *plane;int i; - pr_cont("%02ld:%02d:%02d.%08ld index=%d, type=%s, " - "flags=0x%08x, field=%s, sequence=%d, memory=%s", + pr_cont("%02ld:%02d:%02d.%08ld index=%d, type=%s, flags=0x%08x, field=%s, sequence=%d, memory=%s", p->timestamp.tv_sec / 3600, (int)(p->timestamp.tv_sec / 60) % 60, (int)(p->timestamp.tv_sec % 60),@@ -458,8 +440,7 @@ static void v4l_print_buffer(const void *arg, bool write_only)for (i =0 ; i < p->length; ++i) { plane = &p->m.planes[i];printk (KERN_DEBUG -"plane %d: bytesused=%d, data_offset=0x%08x, " -"offset/userptr=0x%lx, length=%d\n" , +"plane %d: bytesused=%d, data_offset=0x%08x, offset/userptr=0x%lx, length=%d\n" , i, plane->bytesused, plane->data_offset, plane->m.userptr, plane->length); }@@ -468,8 +449,7 @@ static void v4l_print_buffer(const void *arg, bool write_only) p->bytesused, p->m.userptr, p->length); } -printk (KERN_DEBUG "timecode=%02d:%02d:%02d type=%d, " -"flags=0x%08x, frames=%d, userbits=0x%08x\n" , +printk (KERN_DEBUG "timecode=%02d:%02d:%02d type=%d, flags=0x%08x, frames=%d, userbits=0x%08x\n" , tc->hours, tc->minutes, tc->seconds, tc->type, tc->flags, tc->frames, *(__u32 *)tc->userbits); }@@ -503,8 +483,7 @@ static void v4l_print_streamparm(const void *arg, bool write_only) p->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) {const struct v4l2_captureparm *c = &p->parm.capture; -pr_cont (", capability=0x%x, capturemode=0x%x, timeperframe=%d/%d, " -"extendedmode=%d, readbuffers=%d\n" , +pr_cont (", capability=0x%x, capturemode=0x%x, timeperframe=%d/%d, extendedmode=%d, readbuffers=%d\n" , c->capability, c->capturemode, c->timeperframe.numerator, c->timeperframe.denominator, c->extendedmode, c->readbuffers);@@ -512,8 +491,7 @@ static void v4l_print_streamparm(const void *arg, bool write_only) p->type == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE) {const struct v4l2_outputparm *c = &p->parm.output; -pr_cont (", capability=0x%x, outputmode=0x%x, timeperframe=%d/%d, " -"extendedmode=%d, writebuffers=%d\n" , +pr_cont (", capability=0x%x, outputmode=0x%x, timeperframe=%d/%d, extendedmode=%d, writebuffers=%d\n" , c->capability, c->outputmode, c->timeperframe.numerator, c->timeperframe.denominator, c->extendedmode, c->writebuffers);@@ -526,8 +504,7 @@ static void v4l_print_queryctrl(const void *arg, bool write_only) {const struct v4l2_queryctrl *p = arg; -pr_cont ("id=0x%x, type=%d, name=%.*s, min/max=%d/%d, " -"step=%d, default=%d, flags=0x%08x\n" , +pr_cont ("id=0x%x, type=%d, name=%.*s, min/max=%d/%d, step=%d, default=%d, flags=0x%08x\n" , p->id, p->type, (int )sizeof (p->name), p->name, p->minimum, p->maximum, p->step, p->default_value, p->flags);@@ -537,9 +514,7 @@ static void v4l_print_query_ext_ctrl(const void *arg, bool write_only) {const struct v4l2_query_ext_ctrl *p = arg; - pr_cont("id=0x%x, type=%d, name=%.*s, min/max=%lld/%lld, " - "step=%lld, default=%lld, flags=0x%08x, elem_size=%u, elems=%u, " - "nr_of_dims=%u, dims=%u,%u,%u,%u\n", + pr_cont("id=0x%x, type=%d, name=%.*s, min/max=%lld/%lld, step=%lld, default=%lld, flags=0x%08x, elem_size=%u, elems=%u, nr_of_dims=%u, dims=%u,%u,%u,%u\n", p->id, p->type, (int)sizeof(p->name), p->name, p->minimum, p->maximum, p->step, p->default_value, p->flags,@@ -583,9 +558,7 @@ static void v4l_print_cropcap(const void *arg, bool write_only) {const struct v4l2_cropcap *p = arg; - pr_cont("type=%s, bounds wxh=%dx%d, x,y=%d,%d, " - "defrect wxh=%dx%d, x,y=%d,%d, " - "pixelaspect %d/%d\n", + pr_cont("type=%s, bounds wxh=%dx%d, x,y=%d,%d, defrect wxh=%dx%d, x,y=%d,%d, pixelaspect %d/%d\n", prt_names(p->type, v4l2_type_names), p->bounds.width, p->bounds.height, p->bounds.left, p->bounds.top,@@ -618,8 +591,7 @@ static void v4l_print_jpegcompression(const void *arg, bool write_only) {const struct v4l2_jpegcompression *p = arg; -pr_cont ("quality=%d, APPn=%d, APP_len=%d, " -"COM_len=%d, jpeg_markers=0x%x\n" , +pr_cont ("quality=%d, APPn=%d, APP_len=%d, COM_len=%d, jpeg_markers=0x%x\n" , p->quality, p->APPn, p->APP_len, p->COM_len, p->jpeg_markers); }@@ -686,14 +658,7 @@ static void v4l_print_dv_timings(const void *arg, bool write_only)switch (p->type) {case V4L2_DV_BT_656_1120 : - pr_cont("type=bt-656/1120, interlaced=%u, " - "pixelclock=%llu, " - "width=%u, height=%u, polarities=0x%x, " - "hfrontporch=%u, hsync=%u, " - "hbackporch=%u, vfrontporch=%u, " - "vsync=%u, vbackporch=%u, " - "il_vfrontporch=%u, il_vsync=%u, " - "il_vbackporch=%u, standards=0x%x, flags=0x%x\n", + pr_cont("type=bt-656/1120, interlaced=%u, pixelclock=%llu, width=%u, height=%u, polarities=0x%x, hfrontporch=%u, hsync=%u, hbackporch=%u, vfrontporch=%u, vsync=%u, vbackporch=%u, il_vfrontporch=%u, il_vsync=%u, il_vbackporch=%u, standards=0x%x, flags=0x%x\n", p->bt.interlaced, p->bt.pixelclock, p->bt.width, p->bt.height, p->bt.polarities, p->bt.hfrontporch,@@ -723,8 +688,7 @@ static void v4l_print_dv_timings_cap(const void *arg, bool write_only)switch (p->type) {case V4L2_DV_BT_656_1120 : - pr_cont("type=bt-656/1120, width=%u-%u, height=%u-%u, " - "pixelclock=%llu-%llu, standards=0x%x, capabilities=0x%x\n", + pr_cont("type=bt-656/1120, width=%u-%u, height=%u-%u, pixelclock=%llu-%llu, standards=0x%x, capabilities=0x%x\n", p->bt.min_width, p->bt.max_width, p->bt.min_height, p->bt.max_height, p->bt.min_pixelclock, p->bt.max_pixelclock,@@ -805,8 +769,7 @@ static void v4l_print_event(const void *arg, bool write_only)const struct v4l2_event *p = arg;const struct v4l2_event_ctrl *c; -pr_cont ("type=0x%x, pending=%u, sequence=%u, id=%u, " -"timestamp=%lu.%9.9lu\n" , +pr_cont ("type=0x%x, pending=%u, sequence=%u, id=%u, timestamp=%lu.%9.9lu\n" , p->type, p->pending, p->sequence, p->id, p->timestamp.tv_sec, p->timestamp.tv_nsec);switch (p->type) {@@ -822,8 +785,7 @@ static void v4l_print_event(const void *arg, bool write_only)pr_cont ("value64=%lld, " , c->value64); else pr_cont("value=%d, ", c->value); -pr_cont ("flags=0x%x, minimum=%d, maximum=%d, step=%d, " -"default_value=%d\n" , +pr_cont ("flags=0x%x, minimum=%d, maximum=%d, step=%d, default_value=%d\n" , c->flags, c->minimum, c->maximum, c->step, c->default_value);break ;@@ -859,8 +821,7 @@ static void v4l_print_freq_band(const void *arg, bool write_only) {const struct v4l2_frequency_band *p = arg; -pr_cont ("tuner=%u, type=%u, index=%u, capability=0x%x, " -"rangelow=%u, rangehigh=%u, modulation=0x%x\n" , +pr_cont ("tuner=%u, type=%u, index=%u, capability=0x%x, rangelow=%u, rangehigh=%u, modulation=0x%x\n" , p->tuner, p->type, p->index, p->capability, p->rangelow, p->rangehigh, p->modulation);drivers/media/v4l2-core/videobuf-core.c +1
-2@@ -572,8 +572,7 @@ int videobuf_qbuf(struct videobuf_queue *q, struct v4l2_buffer *b)switch (b->memory) {case V4L2_MEMORY_MMAP :if (0 == buf->baddr) { -dprintk (1 ,"qbuf: mmap requested " -"but buffer addr is zero!\n" ); +dprintk (1 ,"qbuf: mmap requested but buffer addr is zero!\n" ); goto done; } if (q->type == V4L2_BUF_TYPE_VIDEO_OUTPUTdrivers/media/v4l2-core/videobuf2-core.c +11
-14@@ -358,8 +358,8 @@ static int __vb2_queue_alloc(struct vb2_queue *q, enum vb2_memory memory,if (memory ==VB2_MEMORY_MMAP ) { ret =__vb2_buf_mem_alloc (vb);if (ret) { -dprintk (1 ,"failed allocating memory for " -"buffer %d\n" , buffer); +dprintk (1 ,"failed allocating memory for buffer %d\n" , + buffer); q->bufs[vb->index] =NULL ;kfree (vb);break ;@@ -372,8 +372,8 @@ static int __vb2_queue_alloc(struct vb2_queue *q, enum vb2_memory memory,*/ ret =call_vb_qop (vb, buf_init, vb);if (ret) { -dprintk (1 ,"buffer %d %p initialization" -" failed\n" , buffer, vb); +dprintk (1 ,"buffer %d %p initialization failed\n" , + buffer, vb);__vb2_buf_mem_free (vb); q->bufs[vb->index] =NULL ;kfree (vb);@@ -997,13 +997,12 @@ static int __qbuf_userptr(struct vb2_buffer *vb, const void *pb) && vb->planes[plane].length == planes[plane].length)continue ; -dprintk (3 ,"userspace address for plane %d changed, " -"reacquiring memory\n" , plane); +dprintk (3 ,"userspace address for plane %d changed, reacquiring memory\n" , + plane);/* Check if the provided plane buffer is large enough */ if (planes[plane].length < vb->planes[plane].min_length) { -dprintk (1 ,"provided buffer size %u is less than " -"setup size %u for plane %d\n" , +dprintk (1 ,"provided buffer size %u is less than setup size %u for plane %d\n" , planes[plane].length, vb->planes[plane].min_length, plane);@@ -1032,8 +1031,8 @@ static int __qbuf_userptr(struct vb2_buffer *vb, const void *pb) planes[plane].m.userptr, planes[plane].length, dma_dir);if (IS_ERR (mem_priv)) { -dprintk (1 ,"failed acquiring userspace " -"memory for plane %d\n" , plane); +dprintk (1 ,"failed acquiring userspace memory for plane %d\n" , + plane); ret =PTR_ERR (mem_priv); goto err; }@@ -1123,8 +1122,7 @@ static int __qbuf_dmabuf(struct vb2_buffer *vb, const void *pb) planes[plane].length = dbuf->size;if (planes[plane].length < vb->planes[plane].min_length) { -dprintk (1 ,"invalid dmabuf length %u for plane %d, " -"minimum length %u\n" , +dprintk (1 ,"invalid dmabuf length %u for plane %d, minimum length %u\n" , planes[plane].length, plane, vb->planes[plane].min_length);dma_buf_put (dbuf);@@ -1472,8 +1470,7 @@ static int __vb2_wait_for_done_vb(struct vb2_queue *q, int nonblocking) }if (nonblocking) { -dprintk (1 ,"nonblocking and no buffers to dequeue, " -"will not wait\n" ); +dprintk (1 ,"nonblocking and no buffers to dequeue, will not wait\n" );return -EAGAIN ; }drivers/media/v4l2-core/videobuf2-v4l2.c +4
-6@@ -60,14 +60,13 @@ static int __verify_planes_array(struct vb2_buffer *vb, const struct v4l2_buffer/* Is memory for copying plane information present? */ if (b->m.planes ==NULL ) { -dprintk (1 ,"multi-planar buffer passed but " -"planes array not provided\n" ); +dprintk (1 ,"multi-planar buffer passed but planes array not provided\n" );return -EINVAL ; }if (b->length < vb->num_planes || b->length >VB2_MAX_PLANES ) { -dprintk (1 ,"incorrect planes array length, " -"expected %d, got %d\n" , vb->num_planes, b->length); +dprintk (1 ,"incorrect planes array length, expected %d, got %d\n" , + vb->num_planes, b->length);return -EINVAL ; }@@ -316,8 +315,7 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb,* that just says that it is either a top or a bottom field, * but not which of the two it is. */ -dprintk (1 ,"the field is incorrectly set to ALTERNATE " -"for an output buffer\n" ); +dprintk (1 ,"the field is incorrectly set to ALTERNATE for an output buffer\n" );return -EINVAL ; } vb->timestamp =0 ;drivers/media/v4l2-core/videobuf2-vmalloc.c +1
-2@@ -151,8 +151,7 @@ static void *vb2_vmalloc_vaddr(void *buf_priv)struct vb2_vmalloc_buf *buf = buf_priv;if (!buf->vaddr) { -pr_err ("Address of an unallocated plane requested " -"or cannot map user pointer\n" ); +pr_err ("Address of an unallocated plane requested or cannot map user pointer\n" );return NULL ; }
Signature · 4 lines
Kind regards, Sakari Ailus e-mail: [email protected] XMPP: [email protected]
Re: [PATCH v2 50/58] v4l2-core: don't break long lines
Em Wed, 19 Oct 2016 10:09:16 +0300
Sakari Ailus <[email protected]> escreveu:
Quoted 11 lines
Hi Mauro,
Quoted 8 lines · Mauro Carvalho Chehab
drivers/media/v4l2-core/v4l2-ioctl.c +0
-0@@ -174,8 +174,7 @@ static void v4l_print_querycap(const void *arg, bool write_only) {const struct v4l2_capability *p = arg;
Quoted 9 lines
drivers/media/v4l2-core/v4l2-ioctl.c static void v4l_print_querycap(const void *arg, bool write_only) · line 180
Quoted 6 lines
drivers/media/v4l2-core/v4l2-ioctl.c +1
-2- pr_cont("driver=%.*s, card=%.*s, bus=%.*s, version=0x%08x, " - "capabilities=0x%08x, device_caps=0x%08x\n", + pr_cont("driver=%.*s, card=%.*s, bus=%.*s, version=0x%08x, capabilities=0x%08x, device_caps=0x%08x\n", (int)sizeof(p->driver), p->driver, (int)sizeof(p->card), p->card, (int)sizeof(p->bus_info), p->bus_info,I still wouldn't do this to
v4l2-ioctl.c. It does not improve grappability because of the format strings.
The main reason that made me do this patch series is to identify the lack of KERN_CONT at the media subsystem.
The grep I'm using to identify missing KERN_CONT lines actually tests for a string line that doesn't end with "\n", like:
$ git grep '("' drivers/media/|grep -v KERN_|grep -v '\\n'|grep -v MODULEThat's said, the format strings don't hurt grep:
$ git grep -E "driver=.*bus=.*device_caps="
drivers/media/v4l2-core/v4l2-ioctl.c: pr_cont("driver=%.*s, card=%.*s, bus=%.*s, version=0x%08x, capabilities=0x%08x, device_caps=0x%08x\n",Quoted 2 lines
Some are also really long such as the one a
few chunks below.
Yeah, but it gives a bad coding style example. I prefer to have the core subsystem as close as possible of the coding style I would like to see at the drivers code I review. Btw, at least on my 1920x1050 monitor, if I open a console full screen, only one line of v4l2-ioctl.c is bigger than the terminal column size.
Quoted 6 lines
Other than that, this looks very nice now. Your script makes me wonder, though, whether there should be a tool to automatically improve coding style for cases such as this. I didn't realise so many strings were actually split. I'm sure also the rest of the kernel would benefit from such a tool. With the increased number of lines of code, the special cases that need to be handled manually must decrease as well or it becomes unfeasible.
Yeah, I was also thinking that there would be a way less places than what it was hit by this script.
The script on this patch is generic enough to be used to fix such cases on other subsystems, although it needs some polish to cover a few corner cases. I suspect it shouldn't be hard to integrate it to checkpatch.pl to be used with --fix.
Thanks,
Mauro
PATCH v2 51/58 dvb-frontends: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/dvb-frontends/au8522_common.c | 4 ++-- drivers/media/dvb-frontends/cx24110.c | 4 ++-- drivers/media/dvb-frontends/cx24113.c | 4 ++-- drivers/media/dvb-frontends/cx24116.c | 8 ++++---- drivers/media/dvb-frontends/cx24117.c | 4 ++-- drivers/media/dvb-frontends/cx24123.c | 4 ++-- drivers/media/dvb-frontends/ds3000.c | 15 +++++++-------- drivers/media/dvb-frontends/lgdt330x.c | 3 +-- drivers/media/dvb-frontends/m88rs2000.c | 7 +++---- drivers/media/dvb-frontends/mt312.c | 7 +++---- drivers/media/dvb-frontends/nxt200x.c | 11 +++++------ drivers/media/dvb-frontends/or51132.c | 6 ++---- drivers/media/dvb-frontends/or51211.c | 3 +-- drivers/media/dvb-frontends/s5h1409.c | 4 ++-- drivers/media/dvb-frontends/s5h1411.c | 4 ++-- drivers/media/dvb-frontends/s5h1432.c | 4 ++-- drivers/media/dvb-frontends/s921.c | 4 ++-- drivers/media/dvb-frontends/si21xx.c | 8 ++++---- drivers/media/dvb-frontends/sp887x.c | 3 +-- drivers/media/dvb-frontends/stv0288.c | 7 +++---- drivers/media/dvb-frontends/stv0297.c | 4 ++-- drivers/media/dvb-frontends/stv0299.c | 7 +++---- drivers/media/dvb-frontends/stv0900_sw.c | 3 +-- drivers/media/dvb-frontends/tda10021.c | 3 +-- drivers/media/dvb-frontends/tda10023.c | 6 ++---- drivers/media/dvb-frontends/tda10048.c | 12 ++++-------- drivers/media/dvb-frontends/ves1820.c | 8 ++++---- drivers/media/dvb-frontends/zl10036.c | 4 ++-- drivers/media/dvb-frontends/zl10039.c | 3 +-- 29 files changed, 72 insertions(+), 92 deletions(-)
drivers/media/dvb-frontends/au8522_common.c +2 -2
@@ -50,8 +50,8 @@ int au8522_writereg(struct au8522_state *state, u16 reg, u8 data) ret =i2c_transfer (state->i2c, &msg,1 );if (ret !=1 ) -printk ("%s: writereg error (reg == 0x%02x, val == 0x%04x, " -"ret == %i)\n" , __func__, reg, data, ret); +printk ("%s: writereg error (reg == 0x%02x, val == 0x%04x, ret == %i)\n" , + __func__, reg, data, ret);return (ret !=1 ) ?-1 :0 ; }
drivers/media/dvb-frontends/cx24110.c +2 -2
@@ -120,8 +120,8 @@ static int cx24110_writereg (struct cx24110_state* state, int reg, int data)int err;if ((err =i2c_transfer (state->i2c, &msg,1 )) !=1 ) { -dprintk ("%s: writereg error (err == %i, reg == 0x%02x," -" data == 0x%02x)\n" , __func__, err, reg, data); +dprintk ("%s: writereg error (err == %i, reg == 0x%02x, data == 0x%02x)\n" , + __func__, err, reg, data);return -EREMOTEIO ; }
drivers/media/dvb-frontends/cx24113.c +2 -2
@@ -108,8 +108,8 @@ static int cx24113_writereg(struct cx24113_state *state, int reg, int data) .flags = 0, .buf = buf, .len = 2 };int err =i2c_transfer (state->i2c, &msg,1 );if (err !=1 ) { -printk (KERN_DEBUG "%s: writereg error(err == %i, reg == 0x%02x," -" data == 0x%02x)\n" , __func__, err, reg, data); +printk (KERN_DEBUG "%s: writereg error(err == %i, reg == 0x%02x, data == 0x%02x)\n" , + __func__, err, reg, data);return err; }
drivers/media/dvb-frontends/cx24116.c +4 -4
@@ -209,8 +209,8 @@ static int cx24116_writereg(struct cx24116_state *state, int reg, int data) err =i2c_transfer (state->i2c, &msg,1 );if (err !=1 ) { -printk (KERN_ERR "%s: writereg error(err == %i, reg == 0x%02x," -" value == 0x%02x)\n" , __func__, err, reg, data); +printk (KERN_ERR "%s: writereg error(err == %i, reg == 0x%02x, value == 0x%02x)\n" , + __func__, err, reg, data);return -EREMOTEIO ; }
@@ -498,8 +498,8 @@ static int cx24116_firmware_ondemand(struct dvb_frontend *fe)printk (KERN_INFO "%s: Waiting for firmware upload(2)...\n" , __func__);if (ret) { -printk (KERN_ERR "%s: No firmware uploaded " -"(timeout or file not found?)\n" , __func__); +printk (KERN_ERR "%s: No firmware uploaded (timeout or file not found?)\n" , + __func__);return ret; }
drivers/media/dvb-frontends/cx24117.c +2 -2
@@ -474,8 +474,8 @@ static int cx24117_firmware_ondemand(struct dvb_frontend *fe) "%s: Waiting for firmware upload(2)...\n", __func__);if (ret) {dev_err (&state->priv->i2c->dev, -"%s: No firmware uploaded " -"(timeout or file not found?)\n" , __func__); +"%s: No firmware uploaded (timeout or file not found?)\n" , +__func__);return ret; }
drivers/media/dvb-frontends/cx24123.c +2 -2
@@ -255,8 +255,8 @@ static int cx24123_i2c_writereg(struct cx24123_state *state, err =i2c_transfer (state->i2c, &msg,1 );if (err !=1 ) { -printk ("%s: writereg error(err == %i, reg == 0x%02x," -" data == 0x%02x)\n" , __func__, err, reg, data); +printk ("%s: writereg error(err == %i, reg == 0x%02x, data == 0x%02x)\n" , + __func__, err, reg, data);return err; }
drivers/media/dvb-frontends/ds3000.c +7 -8
@@ -248,8 +248,8 @@ static int ds3000_writereg(struct ds3000_state *state, int reg, int data) err =i2c_transfer (state->i2c, &msg,1 );if (err !=1 ) { -printk (KERN_ERR "%s: writereg error(err == %i, reg == 0x%02x," -" value == 0x%02x)\n" , __func__, err, reg, data); +printk (KERN_ERR "%s: writereg error(err == %i, reg == 0x%02x, value == 0x%02x)\n" , + __func__, err, reg, data);return -EREMOTEIO ; }
@@ -296,8 +296,8 @@ static int ds3000_writeFW(struct ds3000_state *state, int reg, ret =i2c_transfer (state->i2c, &msg,1 );if (ret !=1 ) { -printk (KERN_ERR "%s: write error(err == %i, " -"reg == 0x%02x\n" , __func__, ret, reg); +printk (KERN_ERR "%s: write error(err == %i, reg == 0x%02x\n" , + __func__, ret, reg); ret = -EREMOTEIO ; goto error; }
@@ -364,8 +364,8 @@ static int ds3000_firmware_ondemand(struct dvb_frontend *fe) state->i2c->dev.parent);printk (KERN_INFO "%s: Waiting for firmware upload(2)...\n" , __func__);if (ret) { -printk (KERN_ERR "%s: No firmware uploaded (timeout or file not " -"found?)\n" , __func__); +printk (KERN_ERR "%s: No firmware uploaded (timeout or file not found?)\n" , + __func__);return ret; }
@@ -1144,8 +1144,7 @@ static struct dvb_frontend_ops ds3000_ops = {module_param (debug, int,0644 );MODULE_PARM_DESC (debug,"Activates frontend debugging (default:0)" ); -MODULE_DESCRIPTION ("DVB Frontend module for Montage Technology " -"DS3000 hardware" ); +MODULE_DESCRIPTION ("DVB Frontend module for Montage Technology DS3000 hardware" );MODULE_AUTHOR ("Konstantin Dimitrov <[email protected]>" );MODULE_LICENSE ("GPL" );MODULE_FIRMWARE (DS3000_DEFAULT_FIRMWARE );
drivers/media/dvb-frontends/lgdt330x.c +1 -2
@@ -405,8 +405,7 @@ static int lgdt330x_set_parameters(struct dvb_frontend *fe)return -1 ; }if (err <0 ) -printk (KERN_WARNING "lgdt330x: %s: error blasting " -"bytes to lgdt3303 for modulation type(%d)\n" , +printk (KERN_WARNING "lgdt330x: %s: error blasting bytes to lgdt3303 for modulation type(%d)\n" , __func__, p->modulation);/*
drivers/media/dvb-frontends/m88rs2000.c +3 -4
@@ -75,8 +75,8 @@ static int m88rs2000_writereg(struct m88rs2000_state *state, ret =i2c_transfer (state->i2c, &msg,1 );if (ret !=1 ) -deb_info ("%s: writereg error (reg == 0x%02x, val == 0x%02x, " -"ret == %i)\n" , __func__, reg, data, ret); +deb_info ("%s: writereg error (reg == 0x%02x, val == 0x%02x, ret == %i)\n" , + __func__, reg, data, ret);return (ret !=1 ) ? -EREMOTEIO :0 ; }
@@ -618,8 +618,7 @@ static int m88rs2000_set_frontend(struct dvb_frontend *fe) state->no_lock_count =0 ;if (c->delivery_system !=SYS_DVBS ) { -deb_info ("%s: unsupported delivery " -"system selected (%d)\n" , +deb_info ("%s: unsupported delivery system selected (%d)\n" , __func__, c->delivery_system);return -EOPNOTSUPP ; }
drivers/media/dvb-frontends/mt312.c +3 -4
@@ -457,8 +457,8 @@ static int mt312_read_status(struct dvb_frontend *fe, enum fe_status *s)if (ret <0 )return ret; -dprintk ("QPSK_STAT_H: 0x%02x, QPSK_STAT_L: 0x%02x," -" FEC_STATUS: 0x%02x\n" , status[0 ], status[1 ], status[2 ]); +dprintk ("QPSK_STAT_H: 0x%02x, QPSK_STAT_L: 0x%02x, FEC_STATUS: 0x%02x\n" , + status[0 ], status[1 ], status[2 ]);if (status[0 ] &0xc0 ) *s |=FE_HAS_SIGNAL ;/* signal noise ratio */
@@ -827,8 +827,7 @@ struct dvb_frontend *mt312_attach(const struct mt312_config *config, state->freq_mult =9 ;break ;default : -printk (KERN_WARNING "Only Zarlink VP310/MT312/ZL10313" -" are supported chips.\n" ); +printk (KERN_WARNING "Only Zarlink VP310/MT312/ZL10313 are supported chips.\n" ); goto error; }
drivers/media/dvb-frontends/nxt200x.c +5 -6
@@ -289,8 +289,7 @@ static void nxt200x_microcontroller_stop (struct nxt200x_state* state) counter++; } -pr_warn ("Timeout waiting for nxt200x to stop. This is ok after " -"firmware upload.\n" ); +pr_warn ("Timeout waiting for nxt200x to stop. This is ok after firmware upload.\n" );return ; }
@@ -893,8 +892,8 @@ static int nxt2002_init(struct dvb_frontend* fe) state->i2c->dev.parent);pr_debug ("%s: Waiting for firmware upload(2)...\n" , __func__);if (ret) { -pr_err ("%s: No firmware uploaded (timeout or file not found?)" -"\n" , __func__); +pr_err ("%s: No firmware uploaded (timeout or file not found?)\n" , + __func__);return ret; }
@@ -960,8 +959,8 @@ static int nxt2004_init(struct dvb_frontend* fe) state->i2c->dev.parent);pr_debug ("%s: Waiting for firmware upload(2)...\n" , __func__);if (ret) { -pr_err ("%s: No firmware uploaded (timeout or file not found?)" -"\n" , __func__); +pr_err ("%s: No firmware uploaded (timeout or file not found?)\n" , + __func__);return ret; }
drivers/media/dvb-frontends/or51132.c +2 -4
@@ -342,15 +342,13 @@ static int or51132_set_parameters(struct dvb_frontend *fe) fwname); ret =request_firmware (&fw, fwname, state->i2c->dev.parent);if (ret) { -printk (KERN_WARNING "or51132: No firmware up" -"loaded(timeout or file not found?)\n" ); +printk (KERN_WARNING "or51132: No firmware uploaded(timeout or file not found?)\n" );return ret; } ret =or51132_load_firmware (fe, fw);release_firmware (fw);if (ret) { -printk (KERN_WARNING "or51132: Writing firmware to " -"device failed!\n" ); +printk (KERN_WARNING "or51132: Writing firmware to device failed!\n" );return ret; }printk ("or51132: Firmware upload complete.\n" );
drivers/media/dvb-frontends/or51211.c +1 -2
@@ -377,8 +377,7 @@ static int or51211_init(struct dvb_frontend* fe) OR51211_DEFAULT_FIRMWARE);pr_info ("Got Hotplug firmware\n" );if (ret) { -pr_warn ("No firmware uploaded " -"(timeout or file not found?)\n" ); +pr_warn ("No firmware uploaded (timeout or file not found?)\n" );return ret; }
drivers/media/dvb-frontends/s5h1409.c +2 -2
@@ -321,8 +321,8 @@ static int s5h1409_writereg(struct s5h1409_state *state, u8 reg, u16 data) ret =i2c_transfer (state->i2c, &msg,1 );if (ret !=1 ) -printk (KERN_ERR "%s: error (reg == 0x%02x, val == 0x%04x, " -"ret == %i)\n" , __func__, reg, data, ret); +printk (KERN_ERR "%s: error (reg == 0x%02x, val == 0x%04x, ret == %i)\n" , + __func__, reg, data, ret);return (ret !=1 ) ?-1 :0 ; }
drivers/media/dvb-frontends/s5h1411.c +2 -2
@@ -350,8 +350,8 @@ static int s5h1411_writereg(struct s5h1411_state *state, ret =i2c_transfer (state->i2c, &msg,1 );if (ret !=1 ) -printk (KERN_ERR "%s: writereg error 0x%02x 0x%02x 0x%04x, " -"ret == %i)\n" , __func__, addr, reg, data, ret); +printk (KERN_ERR "%s: writereg error 0x%02x 0x%02x 0x%04x, ret == %i)\n" , + __func__, addr, reg, data, ret);return (ret !=1 ) ?-1 :0 ; }
drivers/media/dvb-frontends/s5h1432.c +2 -2
@@ -63,8 +63,8 @@ static int s5h1432_writereg(struct s5h1432_state *state, ret =i2c_transfer (state->i2c, &msg,1 );if (ret !=1 ) -printk (KERN_ERR "%s: writereg error 0x%02x 0x%02x 0x%04x, " -"ret == %i)\n" , __func__, addr, reg, data, ret); +printk (KERN_ERR "%s: writereg error 0x%02x 0x%02x 0x%04x, ret == %i)\n" , + __func__, addr, reg, data, ret);return (ret !=1 ) ?-1 :0 ; }
drivers/media/dvb-frontends/s921.c +2 -2
@@ -214,8 +214,8 @@ static int s921_i2c_writereg(struct s921_state *state, rc =i2c_transfer (state->i2c, &msg,1 );if (rc !=1 ) { -printk ("%s: writereg rcor(rc == %i, reg == 0x%02x," -" data == 0x%02x)\n" , __func__, rc, reg, data); +printk ("%s: writereg rcor(rc == %i, reg == 0x%02x, data == 0x%02x)\n" , + __func__, rc, reg, data);return rc; }
drivers/media/dvb-frontends/si21xx.c +4 -4
@@ -245,8 +245,8 @@ static int si21_writeregs(struct si21xx_state *state, u8 reg1, ret =i2c_transfer (state->i2c, &msg,1 );if (ret !=1 ) -dprintk ("%s: writereg error (reg1 == 0x%02x, data == 0x%02x, " -"ret == %i)\n" , __func__, reg1, data[0 ], ret); +dprintk ("%s: writereg error (reg1 == 0x%02x, data == 0x%02x, ret == %i)\n" , + __func__, reg1, data[0 ], ret);return (ret !=1 ) ? -EREMOTEIO :0 ; }
@@ -265,8 +265,8 @@ static int si21_writereg(struct si21xx_state *state, u8 reg, u8 data) ret =i2c_transfer (state->i2c, &msg,1 );if (ret !=1 ) -dprintk ("%s: writereg error (reg == 0x%02x, data == 0x%02x, " -"ret == %i)\n" , __func__, reg, data, ret); +dprintk ("%s: writereg error (reg == 0x%02x, data == 0x%02x, ret == %i)\n" , + __func__, reg, data, ret);return (ret !=1 ) ? -EREMOTEIO :0 ; }
drivers/media/dvb-frontends/sp887x.c +1 -2
@@ -63,8 +63,7 @@ static int sp887x_writereg (struct sp887x_state* state, u16 reg, u16 data)if (!(reg ==0xf1a && data ==0x000 && (ret == -EREMOTEIO || ret == -EFAULT ))) { -printk ("%s: writereg error " -"(reg %03x, data %03x, ret == %i)\n" , +printk ("%s: writereg error (reg %03x, data %03x, ret == %i)\n" , __func__, reg &0xffff , data &0xffff , ret);return ret; }
drivers/media/dvb-frontends/stv0288.c +3 -4
@@ -74,8 +74,8 @@ static int stv0288_writeregI(struct stv0288_state *state, u8 reg, u8 data) ret =i2c_transfer (state->i2c, &msg,1 );if (ret !=1 ) -dprintk ("%s: writereg error (reg == 0x%02x, val == 0x%02x, " -"ret == %i)\n" , __func__, reg, data, ret); +dprintk ("%s: writereg error (reg == 0x%02x, val == 0x%02x, ret == %i)\n" , + __func__, reg, data, ret);return (ret !=1 ) ? -EREMOTEIO :0 ; }
@@ -465,8 +465,7 @@ static int stv0288_set_frontend(struct dvb_frontend *fe)dprintk ("%s : FE_SET_FRONTEND\n" , __func__);if (c->delivery_system !=SYS_DVBS ) { -dprintk ("%s: unsupported delivery " -"system selected (%d)\n" , +dprintk ("%s: unsupported delivery system selected (%d)\n" , __func__, c->delivery_system);return -EOPNOTSUPP ; }
drivers/media/dvb-frontends/stv0297.c +2 -2
@@ -57,8 +57,8 @@ static int stv0297_writereg(struct stv0297_state *state, u8 reg, u8 data) ret =i2c_transfer (state->i2c, &msg,1 );if (ret !=1 ) -dprintk ("%s: writereg error (reg == 0x%02x, val == 0x%02x, " -"ret == %i)\n" , __func__, reg, data, ret); +dprintk ("%s: writereg error (reg == 0x%02x, val == 0x%02x, ret == %i)\n" , + __func__, reg, data, ret);return (ret !=1 ) ?-1 :0 ; }
drivers/media/dvb-frontends/stv0299.c +3 -4
@@ -88,8 +88,8 @@ static int stv0299_writeregI (struct stv0299_state* state, u8 reg, u8 data) ret =i2c_transfer (state->i2c, &msg,1 );if (ret !=1 ) -dprintk ("%s: writereg error (reg == 0x%02x, val == 0x%02x, " -"ret == %i)\n" , __func__, reg, data, ret); +dprintk ("%s: writereg error (reg == 0x%02x, val == 0x%02x, ret == %i)\n" , + __func__, reg, data, ret);return (ret !=1 ) ? -EREMOTEIO :0 ; }
@@ -761,8 +761,7 @@ module_param(debug, int, 0644);MODULE_PARM_DESC (debug,"Turn on/off frontend debugging (default:off)." );MODULE_DESCRIPTION ("ST STV0299 DVB Demodulator driver" ); -MODULE_AUTHOR ("Ralph Metzler, Holger Waechtler, Peter Schildmann, Felix Domke, " -"Andreas Oberritter, Andrew de Quincey, Kenneth Aafly" ); +MODULE_AUTHOR ("Ralph Metzler, Holger Waechtler, Peter Schildmann, Felix Domke, Andreas Oberritter, Andrew de Quincey, Kenneth Aafly" );MODULE_LICENSE ("GPL" );EXPORT_SYMBOL (stv0299_attach);
drivers/media/dvb-frontends/stv0900_sw.c +1 -2
@@ -1485,8 +1485,7 @@ static u32 stv0900_search_srate_coarse(struct dvb_frontend *fe) current_step++; direction *=-1 ; -dprintk ("lock: I2C_DEMOD_MODE_FIELD =0. Search started." -" tuner freq=%d agc2=0x%x srate_coarse=%d tmg_cpt=%d\n" , +dprintk ("lock: I2C_DEMOD_MODE_FIELD =0. Search started. tuner freq=%d agc2=0x%x srate_coarse=%d tmg_cpt=%d\n" , tuner_freq, agc2_integr, coarse_srate, timingcpt); if ((timingcpt >= 5) &&
drivers/media/dvb-frontends/tda10021.c +1 -2
@@ -77,8 +77,7 @@ static int _tda10021_writereg (struct tda10021_state* state, u8 reg, u8 data) ret =i2c_transfer (state->i2c, &msg,1 );if (ret !=1 ) -printk ("DVB: TDA10021(%d): %s, writereg error " -"(reg == 0x%02x, val == 0x%02x, ret == %i)\n" , +printk ("DVB: TDA10021(%d): %s, writereg error (reg == 0x%02x, val == 0x%02x, ret == %i)\n" , state->frontend.dvb->num, __func__, reg, data, ret);msleep (10 );
drivers/media/dvb-frontends/tda10023.c +2 -4
@@ -72,8 +72,7 @@ static u8 tda10023_readreg (struct tda10023_state* state, u8 reg) ret =i2c_transfer (state->i2c, msg,2 );if (ret !=2 ) {int num = state->frontend.dvb ? state->frontend.dvb->num :-1 ; -printk (KERN_ERR "DVB: TDA10023(%d): %s: readreg error " -"(reg == 0x%02x, ret == %i)\n" , +printk (KERN_ERR "DVB: TDA10023(%d): %s: readreg error (reg == 0x%02x, ret == %i)\n" , num, __func__, reg, ret); }return b1[0 ];
@@ -88,8 +87,7 @@ static int tda10023_writereg (struct tda10023_state* state, u8 reg, u8 data) ret =i2c_transfer (state->i2c, &msg,1 );if (ret !=1 ) {int num = state->frontend.dvb ? state->frontend.dvb->num :-1 ; -printk (KERN_ERR "DVB: TDA10023(%d): %s, writereg error " -"(reg == 0x%02x, val == 0x%02x, ret == %i)\n" , +printk (KERN_ERR "DVB: TDA10023(%d): %s, writereg error (reg == 0x%02x, val == 0x%02x, ret == %i)\n" , num, __func__, reg, data, ret); }return (ret !=1 ) ? -EREMOTEIO :0 ;
drivers/media/dvb-frontends/tda10048.c +4 -8
@@ -1063,32 +1063,28 @@ static void tda10048_establish_defaults(struct dvb_frontend *fe)/* Validate/default the config */ if (config->dtv6_if_freq_khz ==0 ) { config->dtv6_if_freq_khz =TDA10048_IF_4300 ; -printk (KERN_WARNING "%s() tda10048_config.dtv6_if_freq_khz " -"is not set (defaulting to %d)\n" , +printk (KERN_WARNING "%s() tda10048_config.dtv6_if_freq_khz is not set (defaulting to %d)\n" , __func__, config->dtv6_if_freq_khz); }if (config->dtv7_if_freq_khz ==0 ) { config->dtv7_if_freq_khz =TDA10048_IF_4300 ; -printk (KERN_WARNING "%s() tda10048_config.dtv7_if_freq_khz " -"is not set (defaulting to %d)\n" , +printk (KERN_WARNING "%s() tda10048_config.dtv7_if_freq_khz is not set (defaulting to %d)\n" , __func__, config->dtv7_if_freq_khz); }if (config->dtv8_if_freq_khz ==0 ) { config->dtv8_if_freq_khz =TDA10048_IF_4300 ; -printk (KERN_WARNING "%s() tda10048_config.dtv8_if_freq_khz " -"is not set (defaulting to %d)\n" , +printk (KERN_WARNING "%s() tda10048_config.dtv8_if_freq_khz is not set (defaulting to %d)\n" , __func__, config->dtv8_if_freq_khz); }if (config->clk_freq_khz ==0 ) { config->clk_freq_khz =TDA10048_CLK_16000 ; -printk (KERN_WARNING "%s() tda10048_config.clk_freq_khz " -"is not set (defaulting to %d)\n" , +printk (KERN_WARNING "%s() tda10048_config.clk_freq_khz is not set (defaulting to %d)\n" , __func__, config->clk_freq_khz); }
drivers/media/dvb-frontends/ves1820.c +4 -4
@@ -65,8 +65,8 @@ static int ves1820_writereg(struct ves1820_state *state, u8 reg, u8 data) ret =i2c_transfer (state->i2c, &msg,1 );if (ret !=1 ) -printk ("ves1820: %s(): writereg error (reg == 0x%02x, " -"val == 0x%02x, ret == %i)\n" , __func__, reg, data, ret); +printk ("ves1820: %s(): writereg error (reg == 0x%02x, val == 0x%02x, ret == %i)\n" , + __func__, reg, data, ret);return (ret !=1 ) ? -EREMOTEIO :0 ; }
@@ -84,8 +84,8 @@ static u8 ves1820_readreg(struct ves1820_state *state, u8 reg) ret =i2c_transfer (state->i2c, msg,2 );if (ret !=2 ) -printk ("ves1820: %s(): readreg error (reg == 0x%02x, " -"ret == %i)\n" , __func__, reg, ret); +printk ("ves1820: %s(): readreg error (reg == 0x%02x, ret == %i)\n" , + __func__, reg, ret);return b1[0 ]; }
drivers/media/dvb-frontends/zl10036.c +2 -2
@@ -85,8 +85,8 @@ static int zl10036_read_status_reg(struct zl10036_state *state)deb_i2c ("R(status): %02x [FL=%d]\n" , status, (status &STATUS_FL ) ?1 :0 );if (status &STATUS_POR ) -deb_info ("%s: Power-On-Reset bit enabled - " -"need to initialize the tuner\n" , __func__); +deb_info ("%s: Power-On-Reset bit enabled - need to initialize the tuner\n" , + __func__);return status; }
drivers/media/dvb-frontends/zl10039.c +1 -2
@@ -152,8 +152,7 @@ static int zl10039_init(struct dvb_frontend *fe)/* Reset logic */ ret =zl10039_writereg (state,GENERAL ,0x40 );if (ret <0 ) { -dprintk ("Note: i2c write error normal when resetting the " -"tuner\n" ); +dprintk ("Note: i2c write error normal when resetting the tuner\n" ); }/* Wake up */ ret =zl10039_writereg (state,GENERAL ,0x01 );
Signature · 1 line
2.7.4
PATCH v2 52/58 common: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/common/tveeprom.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/media/common/tveeprom.c +1 -2
@@ -510,8 +510,7 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, len = eeprom_data[i] &0x07 ; ++i; }else { -tveeprom_warn ("Encountered bad packet header [%02x]. " -"Corrupt or not a Hauppauge eeprom.\n" , +tveeprom_warn ("Encountered bad packet header [%02x]. Corrupt or not a Hauppauge eeprom.\n" , eeprom_data[i]);return ; }
Signature · 1 line
2.7.4
PATCH v2 53/58 firewire: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/firewire/firedtv-rc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/firewire/firedtv-rc.c +2 -2
@@ -184,8 +184,8 @@ void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code)else if (code >=0x4540 && code <=0x4542 ) code = oldtable[code -0x4521 ];else { -printk (KERN_DEBUG "firedtv: invalid key code 0x%04x " -"from remote control\n" , code); +printk (KERN_DEBUG "firedtv: invalid key code 0x%04x from remote control\n" , + code);return ; }
Signature · 1 line
2.7.4
Re: [PATCH v2 53/58] firewire: don't break long lines
Hi,
Quoted 67 lines · Mauro Carvalho Chehab
Due to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to
KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
useText::Tabs;while (<>) { if ($next ne "") { $c=$_; if ($c =~ /^\s+\"(.*)/) { $c2=$1; $next =~ s/\"\n$//; $n = expand($next); $funpos = index($n, '('); $pos = index($c2, '",'); if ($funpos && $pos > 0) { $s1 = substr $c2, 0, $pos + 2; $s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2; $s2 =~ s/^\s+//; $s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne ""); print unexpand("$next$s1\n"); print unexpand("$s2\n") if ($s2 ne ""); } else { print "$next$c2\n"; } $next=""; next; } else { print $next; } $next=""; } else { if (m/\"$/) { if (!m/\\n\"$/) { $next=$_; next; } } } print $_; }</script>
Reviewed-by Takashi Sakamoto <[email protected]>Acked-by Stefan Richter <[email protected]>Signed-off-by Mauro Carvalho Chehab <[email protected]>--- drivers/media/firewire/firedtv-rc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/media/firewire/firedtv-rc.c +0
-0
drivers/media/firewire/firedtv-rc.c void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code) · line 190
Quoted 9 lines
drivers/media/firewire/firedtv-rc.c +2
-2@@ -184,8 +184,8 @@ void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code)else if (code >=0x4540 && code <=0x4542 ) code = oldtable[code -0x4521 ];else { -printk (KERN_DEBUG "firedtv: invalid key code 0x%04x " -"from remote control\n" , code); +printk (KERN_DEBUG "firedtv: invalid key code 0x%04x from remote control\n" , + code);return ; }
I realized that we can use dev_dbg() instead of the printk(). What do you think about this patch? Anyway, the line is within 80 characters.
-------- 8< --------
Quoted 1 line
From
da3289a04226450d6dbabb5c81155ac17c11374dMon Sep 17 00:00:00 2001
From: Takashi Sakamoto <[email protected]>
Date: Wed, 19 Oct 2016 07:53:35 +0900
Subject: [PATCH] [media] firewire: use dev_dbg() instead of printk()
A structure for firedtv (struct firedtv) has a member for a pointer to struct device. In this case, we can use dev_dbg() for debug printing. This is more preferrable behaviour in device driver development.
--- drivers/media/firewire/firedtv-rc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
(quoted diff) +0 -0
b/drivers/media/firewire/firedtv-rc.c
index f82d4a9..04dea2a 100644
drivers/media/firewire/firedtv-rc.c +0 -0
@@ -184,8 +184,9 @@ void fdtv_handle_rc(struct firedtv *fdtv, unsigned
int code)
else if (code >= 0x4540 && code <= 0x4542)
code = oldtable[code - 0x4521];
else {
- printk(KERN_DEBUG "firedtv: invalid key code 0x%04x "
- "from remote control\n", code);
+ dev_dbg(fdtv->device,
+ "invalid key code 0x%04x from remote control\n",
+ code);
return;
}
Signature · 6 lines
2.7.4 Regards Takashi Sakamoto
Stefan Richter
maintainerRe: [PATCH v2 53/58] firewire: don't break long lines
Quoted 5 lines · On Oct 19 Takashi Sakamoto wrote:
drivers/media/firewire/firedtv-rc.c +0
-0@@ -184,8 +184,9 @@ void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code)
drivers/media/firewire/firedtv-rc.c void fdtv_handle_rc(struct firedtv *fdtv, unsigned · line 192
Quoted 10 lines
drivers/media/firewire/firedtv-rc.c +3
-2else if (code >=0x4540 && code <=0x4542 ) code = oldtable[code -0x4521 ];else { -printk (KERN_DEBUG "firedtv: invalid key code 0x%04x " -"from remote control\n" , code); +dev_dbg (fdtv->device, +"invalid key code 0x%04x from remote control\n" , + code);return ; }
Yes, dev_XYZ(fdtv->device, ...) is better here and is already used this way throughout the firedtv driver. firedtv-rc.c somehow fell through the cracks when firedtv was made to use dev_XYZ().
(On an unrelated note, this reminds me that I still need to take care of Mauro's patches "Add a keymap for FireDTV board" and "firedtv: Port it to use rc_core" from May 28, 2012.)
Signature · 3 lines
Stefan Richter -======----- =-=- =--== http://arcgraph.de/sr/
Re: [PATCH v2 53/58] firewire: don't break long lines
Em Wed, 19 Oct 2016 09:56:25 +0200
Stefan Richter <[email protected]> escreveu:
Quoted 21 lines · On Oct 19 Takashi Sakamoto wrote:
Quoted 5 lines
drivers/media/firewire/firedtv-rc.c +0
-0@@ -184,8 +184,9 @@ void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code)drivers/media/firewire/firedtv-rc.c void fdtv_handle_rc(struct firedtv *fdtv, unsigned · line 192
Quoted 10 lines
drivers/media/firewire/firedtv-rc.c +3
-2else if (code >=0x4540 && code <=0x4542 ) code = oldtable[code -0x4521 ];else { -printk (KERN_DEBUG "firedtv: invalid key code 0x%04x " -"from remote control\n" , code); +dev_dbg (fdtv->device, +"invalid key code 0x%04x from remote control\n" , + code);return ; }Yes,
dev_XYZ(fdtv->device, ...)is better here and is already used this way throughout the firedtv driver.firedtv-rc.csomehow fell through the cracks when firedtv was made to usedev_XYZ().
Quoted 3 lines
(On an unrelated note, this reminds me that I still need to take care of Mauro's patches "Add a keymap for FireDTV board" and "firedtv: Port it to use
rc_core" from May 28, 2012.)
Oh! I forgot about those a long time ago ;) Yeah, it would be great if you could look into those patches when you have some time.
Thanks,
Mauro
Re: [PATCH v2 53/58] firewire: don't break long lines
In reply to Takashi SakamotoEm Wed, 19 Oct 2016 08:03:01 +0900
Takashi Sakamoto <[email protected]> escreveu:
Quoted 19 lines
From: Takashi Sakamoto <[email protected]>
Date: Wed, 19 Oct 2016 07:53:35 +0900
Subject: [PATCH] [media] firewire: usedev_dbg()instead ofprintk()A structure for firedtv (struct firedtv) has a member for a pointer to struct device. In this case, we can use
dev_dbg()for debug printing. This is more preferrable behaviour in device driver development.Signed-off-by Takashi Sakamoto <[email protected]>--- drivers/media/firewire/firedtv-rc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/media/firewire/firedtv-rc.c +0
-0
drivers/media/firewire/firedtv-rc.c void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code) · line 191
Quoted 10 lines
drivers/media/firewire/firedtv-rc.c +3
-2@@ -184,8 +184,9 @@ void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code)else if (code >=0x4540 && code <=0x4542 ) code = oldtable[code -0x4521 ];else { -printk (KERN_DEBUG "firedtv: invalid key code 0x%04x " -"from remote control\n" , code); +dev_dbg (fdtv->device, +"invalid key code 0x%04x from remote control\n" , + code);return ; }
Looks good to me. Applied to my development tree:
https://git.linuxtv.org/mchehab/experimental.git/commit/?h=printk&id=e0de6d90145753bf40415d670471fcc536b2a26c https://git.linuxtv.org/mchehab/experimental.git/commit/?h=printk&id=9532ba4af6a7619bb028ddd3b829e6f163917b79
Stefan,
Would the above be OK for you?
Thanks,
Mauro
Stefan Richter
maintainerRe: [PATCH v2 53/58] firewire: don't break long lines
Quoted 4 lines · On Oct 19 Mauro Carvalho Chehab wrote:
Em Wed, 19 Oct 2016 08:03:01 +0900
Takashi Sakamoto <[email protected]> escreveu:Quoted 2 lines
A structure for firedtv (struct firedtv) has a member for a pointer to struct device. In this case, we can use
dev_dbg()for debug printing.
[...]
Quoted 3 lines
Stefan,
Would the above be OK for you?
ACK.
Signature · 3 lines
Stefan Richter -======----- =-=- =-=-- http://arcgraph.de/sr/
A message that is not in the archive (sent off-list or not yet received): 20161019100113.077e60f1@kant
Re: [PATCH v2 53/58] firewire: don't break long lines
Em Wed, 19 Oct 2016 10:01:13 +0200
Stefan Richter <[email protected]> escreveu:
Quoted 11 lines · On Oct 18 Mauro Carvalho Chehab wrote:
[...]
Quoted 2 lines
The patch was generated via the script below, and manually adjusted if needed.
[...]
Quoted 6 lines
Reviewed-by Takashi Sakamoto <[email protected]>Acked-by Stefan Richter <[email protected]>Signed-off-by Mauro Carvalho Chehab <[email protected]>--- drivers/media/firewire/firedtv-rc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 4 lines
[...]
Patch v1 also had a hunk in
drivers/media/firewire/firedtv-avc.c. What happened to it?
There was some mistake when I manipulated it manually, after re-run the script.
Btw, I liked more the Takashi's dev_dbg() patch for firedtv-rc.c.
So, I guess the better would be to apply his patch and the one enclosed here, with just the firedtv-avc.c change.
Thanks,
Mauro
[PATCH] firewire: don't break long lines
Due to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
drivers/media/firewire/firedtv-avc.c +2 -2
@@ -1181,8 +1181,8 @@ int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length)if (es_info_length >0 ) { pmt_cmd_id = msg[read_pos++];if (pmt_cmd_id !=1 && pmt_cmd_id !=4 ) -dev_err (fdtv->device,"invalid pmt_cmd_id %d " -"at stream level\n" , pmt_cmd_id); +dev_err (fdtv->device,"invalid pmt_cmd_id %d at stream level\n" , + pmt_cmd_id);if (es_info_length >sizeof (c->operand) -4 - write_pos) {
PATCH v2 54/58 i2c: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/i2c/as3645a.c | 13 +++++++------ drivers/media/i2c/msp3400-kthreads.c | 4 ++-- drivers/media/i2c/mt9m032.c | 5 +++-- drivers/media/i2c/mt9p031.c | 5 +++-- drivers/media/i2c/saa7115.c | 18 +++++++++++------- drivers/media/i2c/saa717x.c | 4 ++-- drivers/media/i2c/tvp5150.c | 14 ++++++++------ drivers/media/i2c/tvp7002.c | 6 +++--- drivers/media/i2c/upd64083.c | 4 +--- 9 files changed, 40 insertions(+), 33 deletions(-)
drivers/media/i2c/as3645a.c +7 -6
@@ -299,8 +299,8 @@ static int as3645a_read_fault(struct as3645a *flash)dev_dbg (&client->dev,"Inductor Peak limit fault\n" );if (rval &AS_FAULT_INFO_INDICATOR_LED ) -dev_dbg (&client->dev,"Indicator LED fault: " -"Short circuit or open loop\n" ); +dev_dbg (&client->dev, +"Indicator LED fault: Short circuit or open loop\n" );dev_dbg (&client->dev,"%u connected LEDs\n" , rval &AS_FAULT_INFO_LED_AMOUNT ?2 :1 );
@@ -315,8 +315,8 @@ static int as3645a_read_fault(struct as3645a *flash)dev_dbg (&client->dev,"Short circuit fault\n" );if (rval &AS_FAULT_INFO_OVER_VOLTAGE ) -dev_dbg (&client->dev,"Over voltage fault: " -"Indicates missing capacitor or open connection\n" ); +dev_dbg (&client->dev, +"Over voltage fault: Indicates missing capacitor or open connection\n" );return rval; }
@@ -588,8 +588,9 @@ static int as3645a_registered(struct v4l2_subdev *sd)/* Verify the chip model and version. */ if (model !=0x01 || rfu !=0x00 ) { -dev_err (&client->dev,"AS3645A not detected " -"(model %d rfu %d)\n" , model, rfu); +dev_err (&client->dev, +"AS3645A not detected (model %d rfu %d)\n" , + model, rfu); rval = -ENODEV ; goto power_off; }
drivers/media/i2c/msp3400-kthreads.c +2 -2
@@ -775,8 +775,8 @@ int msp3410d_thread(void *data)if (msp_amsound && !state->radio && (state->v4l2_std &V4L2_STD_SECAM ) && (val !=0x0009 )) {/* autodetection has failed, let backup */ -v4l_dbg (1 , msp_debug, client,"autodetection failed," -" switching to backup standard: %s (0x%04x)\n" , +v4l_dbg (1 , msp_debug, client, +"autodetection failed, switching to backup standard: %s (0x%04x)\n" , msp_stdlist[8 ].name ? msp_stdlist[8 ].name :"unknown" , val); state->std = val =0x0009 ;
drivers/media/i2c/mt9m032.c +3 -2
@@ -746,8 +746,9 @@ static int mt9m032_probe(struct i2c_client *client, chip_version =mt9m032_read (client,MT9M032_CHIP_VERSION );if (chip_version !=MT9M032_CHIP_VERSION_VALUE ) { -dev_err (&client->dev,"MT9M032 not detected, wrong version " -"0x%04x\n" , chip_version); +dev_err (&client->dev, +"MT9M032 not detected, wrong version 0x%04x\n" , + chip_version); ret = -ENODEV ; goto error_sensor; }
drivers/media/i2c/mt9p031.c +3 -2
@@ -929,8 +929,9 @@ static int mt9p031_registered(struct v4l2_subdev *subdev)mt9p031_power_off (mt9p031);if (data !=MT9P031_CHIP_VERSION_VALUE ) { -dev_err (&client->dev,"MT9P031 not detected, wrong version " -"0x%04x\n" , data); +dev_err (&client->dev, +"MT9P031 not detected, wrong version 0x%04x\n" , + data);return -ENODEV ; }
drivers/media/i2c/saa7115.c +11 -7
@@ -53,8 +53,7 @@#define VRES_60HZ (480+16)MODULE_DESCRIPTION ("Philips SAA7111/SAA7113/SAA7114/SAA7115/SAA7118 video decoder driver" ); -MODULE_AUTHOR ("Maxim Yevtyushkin, Kevin Thayer, Chris Kennedy, " -"Hans Verkuil, Mauro Carvalho Chehab" ); +MODULE_AUTHOR ("Maxim Yevtyushkin, Kevin Thayer, Chris Kennedy, Hans Verkuil, Mauro Carvalho Chehab" );MODULE_LICENSE ("GPL" );static bool debug;
@@ -1538,8 +1537,10 @@ static int saa711x_log_status(struct v4l2_subdev *sd)/* status for the saa7114 */ reg1f =saa711x_read (sd,R_1F_STATUS_BYTE_2_VD_DEC ); signalOk = (reg1f &0xc1 ) ==0x81 ; -v4l2_info (sd,"Video signal: %s\n" , signalOk ?"ok" :"bad" ); -v4l2_info (sd,"Frequency: %s\n" , (reg1f &0x20 ) ?"60 Hz" :"50 Hz" ); +v4l2_info (sd,"Video signal: %s\n" , + signalOk ?"ok" :"bad" ); +v4l2_info (sd,"Frequency: %s\n" , + (reg1f &0x20 ) ?"60 Hz" :"50 Hz" );return 0 ; }
@@ -1551,11 +1552,14 @@ static int saa711x_log_status(struct v4l2_subdev *sd) vcr = !(reg1f &0x10 );if (state->input >=6 ) -v4l2_info (sd,"Input: S-Video %d\n" , state->input -6 ); +v4l2_info (sd,"Input: S-Video %d\n" , + state->input -6 );else v4l2_info (sd,"Input: Composite %d\n" , state->input); -v4l2_info (sd,"Video signal: %s\n" , signalOk ? (vcr ?"VCR" :"broadcast/DVD" ) :"bad" ); -v4l2_info (sd,"Frequency: %s\n" , (reg1f &0x20 ) ?"60 Hz" :"50 Hz" ); +v4l2_info (sd,"Video signal: %s\n" , + signalOk ? (vcr ?"VCR" :"broadcast/DVD" ) :"bad" ); +v4l2_info (sd,"Frequency: %s\n" , + (reg1f &0x20 ) ?"60 Hz" :"50 Hz" );switch (reg1e &0x03 ) {case 1 :
drivers/media/i2c/saa717x.c +2 -2
@@ -735,8 +735,8 @@ static void get_inf_dev_status(struct v4l2_subdev *sd, reg_data3, stdres[reg_data3 &0x1f ], (reg_data3 &0x000020 ) ?",stereo" :"" , (reg_data3 & 0x000040) ? ",dual" : ""); - v4l2_dbg(1, debug, sd, "detailed status: " - "%s#%s#%s#%s#%s#%s#%s#%s#%s#%s#%s#%s#%s#%s\n", + v4l2_dbg(1, debug, sd, + "detailed status: %s#%s#%s#%s#%s#%s#%s#%s#%s#%s#%s#%s#%s#%s\n", (reg_data3 & 0x000080) ? " A2/EIAJ pilot tone " : "", (reg_data3 & 0x000100) ? " A2/EIAJ dual " : "", (reg_data3 & 0x000200) ? " A2/EIAJ stereo " : "",
drivers/media/i2c/tvp5150.c +8 -6
@@ -280,10 +280,10 @@ static inline void tvp5150_selmux(struct v4l2_subdev *sd)break ; } -v4l2_dbg (1 , debug, sd,"Selecting video route: route input=%i, output=%i " -"=> tvp5150 input=%i, opmode=%i\n" , - decoder->input, decoder->output, - input, opmode); +v4l2_dbg (1 , debug, sd, +"Selecting video route: route input=%i, output=%i => tvp5150 input=%i, opmode=%i\n" , + decoder->input, decoder->output, + input, opmode);tvp5150_write (sd,TVP5150_OP_MODE_CTL , opmode);tvp5150_write (sd,TVP5150_VD_IN_SRC_SEL_1 , input);
@@ -649,7 +649,8 @@ static int tvp5150_set_vbi(struct v4l2_subdev *sd,int pos=0 ;if (std ==V4L2_STD_ALL ) { -v4l2_err (sd,"VBI can't be configured without knowing number of lines\n" ); +v4l2_err (sd, +"VBI can't be configured without knowing number of lines\n" );return 0 ; }else if (std &V4L2_STD_625_50 ) {/* Don't follow NTSC Line number convension */
@@ -697,7 +698,8 @@ static int tvp5150_get_vbi(struct v4l2_subdev *sd,int i, ret =0 ;if (std ==V4L2_STD_ALL ) { -v4l2_err (sd,"VBI can't be configured without knowing number of lines\n" ); +v4l2_err (sd, +"VBI can't be configured without knowing number of lines\n" );return 0 ; }else if (std &V4L2_STD_625_50 ) {/* Don't follow NTSC Line number convension */
drivers/media/i2c/tvp7002.c +3 -3
@@ -663,7 +663,7 @@ static int tvp7002_query_dv(struct v4l2_subdev *sd, int *index)if (*index ==NUM_TIMINGS ) {v4l2_dbg (1 , debug, sd,"detection failed: lpf = %x, cpl = %x\n" , - lpfr, cpln); + lpfr, cpln);return -ENOLINK ; }
@@ -1057,8 +1057,8 @@ static int tvp7002_remove(struct i2c_client *c)struct v4l2_subdev *sd =i2c_get_clientdata (c);struct tvp7002 *device =to_tvp7002 (sd); -v4l2_dbg (1 , debug, sd,"Removing tvp7002 adapter" -"on address 0x%x\n" , c->addr); +v4l2_dbg (1 , debug, sd,"Removing tvp7002 adapter on address 0x%x\n" , + c->addr);v4l2_async_unregister_subdev (&device->sd);#if defined(CONFIG_MEDIA_CONTROLLER )media_entity_cleanup (&device->sd.entity);
drivers/media/i2c/upd64083.c +1 -3
@@ -139,9 +139,7 @@ static int upd64083_log_status(struct v4l2_subdev *sd)u8 buf[7 ];i2c_master_recv (client, buf,7 ); -v4l2_info (sd,"Status: SA00=%02x SA01=%02x SA02=%02x SA03=%02x " -"SA04=%02x SA05=%02x SA06=%02x\n" , - buf[0 ], buf[1 ], buf[2 ], buf[3 ], buf[4 ], buf[5 ], buf[6 ]); +v4l2_info (sd,"Status: SA00 to SA07 registers %*ph\n" ,7 , buf);return 0 ; }
Signature · 1 line
2.7.4
Re: [PATCH v2 54/58] i2c: don't break long lines
Hi Mauro,
Thanks for the patch.
Quoted 53 lines · Mauro Carvalho Chehab
Due to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to
KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
useText::Tabs;while (<>) { if ($next ne "") { $c=$_; if ($c =~ /^\s+\"(.*)/) { $c2=$1; $next =~ s/\"\n$//; $n = expand($next); $funpos = index($n, '('); $pos = index($c2, '",'); if ($funpos && $pos > 0) { $s1 = substr $c2, 0, $pos + 2; $s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2; $s2 =~ s/^\s+//; $s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne ""); print unexpand("$next$s1\n"); print unexpand("$s2\n") if ($s2 ne ""); } else { print "$next$c2\n"; } $next=""; next; } else { print $next; } $next=""; } else { if (m/\"$/) { if (!m/\\n\"$/) { $next=$_; next; } } } print $_; }
Quoted 3 lines
</script>
Signed-off-by Mauro Carvalho Chehab <[email protected]>
Cheers,
--Prabhakar Lad
Laurent Pinchart
maintainerRe: [PATCH v2 54/58] i2c: don't break long lines
In reply to Mauro Carvalho ChehabHi Mauro,
Thank you for the patch.
Quoted 16 lines · On Tuesday 18 Oct 2016 18:46:06 Mauro Carvalho Chehab wrote:
Due to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to
KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
useText::Tabs;
Quoted 12 lines
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
Quoted 3 lines
$s2 =~ s/^\s+//; $s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne
"");
Quoted 36 lines
print unexpand("$next$s1\n"); print unexpand("$s2\n") if ($s2 ne ""); } else { print "$next$c2\n"; } $next=""; next; } else { print $next; } $next=""; } else { if (m/\"$/) { if (!m/\\n\"$/) { $next=$_; next; } } } print $_; }</script>
Signed-off-by Mauro Carvalho Chehab <[email protected]>--- drivers/media/i2c/as3645a.c | 13 +++++++------ drivers/media/i2c/msp3400-kthreads.c | 4 ++-- drivers/media/i2c/mt9m032.c | 5 +++-- drivers/media/i2c/mt9p031.c | 5 +++-- drivers/media/i2c/saa7115.c | 18 +++++++++++------- drivers/media/i2c/saa717x.c | 4 ++-- drivers/media/i2c/tvp5150.c | 14 ++++++++------ drivers/media/i2c/tvp7002.c | 6 +++--- drivers/media/i2c/upd64083.c | 4 +--- 9 files changed, 40 insertions(+), 33 deletions(-)
[snip]
Quoted 4 lines
drivers/media/i2c/saa7115.c +0
-0
[snip]
drivers/media/i2c/saa7115.c static int saa711x_log_status(struct v4l2_subdev *sd) · line 1541
Quoted 5 lines
drivers/media/i2c/saa7115.c +0
-1@@ -1538,8 +1537,10 @@ static int saa711x_log_status(struct v4l2_subdev *sd)/* status for the saa7114 */ reg1f =saa711x_read (sd,R_1F_STATUS_BYTE_2_VD_DEC ); signalOk = (reg1f &0xc1 ) ==0x81 ; - v4l2_info(sd, "Video signal: %s\n", signalOk ? "ok" :
"bad");
No need to change this one, if fits on a single line.
drivers/media/i2c/saa7115.c static int saa711x_log_status(struct v4l2_subdev *sd) · line 1542
Quoted 1 line
drivers/media/i2c/saa7115.c +0
-1- v4l2_info(sd, "Frequency: %s\n", (reg1f & 0x20) ? "60
Hz" : "50
Quoted 7 lines
drivers/media/i2c/saa7115.c +3
-0Hz"); + v4l2_info(sd, "Video signal: %s\n", + signalOk ? "ok" : "bad"); +v4l2_info (sd,"Frequency: %s\n" , + (reg1f &0x20 ) ?"60 Hz" :"50 Hz" );return 0 ; }
[snip]
drivers/media/i2c/tvp5150.c static inline void tvp5150_selmux(struct v4l2_subdev · line 283
Quoted 9 lines
drivers/media/i2c/tvp5150.c +0
-1@@ -280,10 +280,10 @@ static inline void tvp5150_selmux(struct v4l2_subdev *sd) break; } - v4l2_dbg(1, debug, sd, "Selecting video route: route input=%i,
output=%i "
drivers/media/i2c/tvp5150.c static inline void tvp5150_selmux(struct v4l2_subdev *sd)
Quoted 5 lines
drivers/media/i2c/tvp5150.c +2
-3-"=> tvp5150 input=%i, opmode=%i\n" , - decoder->input, decoder->output, - input, opmode); + v4l2_dbg(1, debug, sd, + "Selecting video route: route input=%i, output=%i =>
tvp5150 input=%i, opmode=%i\n",
drivers/media/i2c/tvp5150.c static inline void tvp5150_selmux(struct v4l2_subdev *sd) · line 286
Quoted 2 lines
drivers/media/i2c/tvp5150.c +2
-0+ decoder->input, decoder->output, + input, opmode);
The three arguments can fit on a single line.
drivers/media/i2c/tvp5150.c static int tvp5150_set_vbi(struct v4l2_subdev *sd, · line 652
Quoted 8 lines
drivers/media/i2c/tvp5150.c +0
-1tvp5150_write (sd,TVP5150_OP_MODE_CTL , opmode);tvp5150_write (sd,TVP5150_VD_IN_SRC_SEL_1 , input);@@ -649,7 +649,8 @@ static int tvp5150_set_vbi(struct v4l2_subdev *sd,int pos=0 ;if (std ==V4L2_STD_ALL ) { - v4l2_err(sd, "VBI can't be configured without knowing number
of
drivers/media/i2c/tvp5150.c static int tvp5150_set_vbi(struct v4l2_subdev *sd, · line 654
Quoted 3 lines
drivers/media/i2c/tvp5150.c +2
-0lines\n"); + v4l2_err(sd, + "VBI can't be configured without knowing number of
lines\n");
I'm quite doubtful that this particular change improves readability :-)
drivers/media/i2c/tvp5150.c static int tvp5150_get_vbi(struct v4l2_subdev *sd, · line 700
Quoted 8 lines
drivers/media/i2c/tvp5150.c +0
-0return 0 ; }else if (std &V4L2_STD_625_50 ) {drivers/media/i2c/tvp5150.c +0
-1/* Don't follow NTSC Line number convension */ @@ -697,7 +698,8 @@ static int tvp5150_get_vbi(struct v4l2_subdev *sd,int i, ret =0 ;if (std ==V4L2_STD_ALL ) { - v4l2_err(sd, "VBI can't be configured without knowing number
of
drivers/media/i2c/tvp5150.c static int tvp5150_get_vbi(struct v4l2_subdev *sd, · line 703
Quoted 3 lines
drivers/media/i2c/tvp5150.c +2
-0lines\n"); + v4l2_err(sd, + "VBI can't be configured without knowing number of
lines\n");
Ditto.
Quoted 3 lines
drivers/media/i2c/tvp5150.c +0
-0return 0 ; }else if (std &V4L2_STD_625_50 ) {/* Don't follow NTSC Line number convension */
[snip]
Signature · 3 lines
Regards, Laurent Pinchart
Mauro Carvalho Chehab
Acked-by Lad, PrabhakarRe: [PATCH v2 54/58] i2c: don't break long lines
Em Thu, 20 Oct 2016 13:46:08 +0300
Laurent Pinchart <[email protected]> escreveu:
Quoted 85 lines
Hi Mauro,
Thank you for the patch.
Quoted 16 lines · On Tuesday 18 Oct 2016 18:46:06 Mauro Carvalho Chehab wrote:
Due to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to
KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
useText::Tabs;Quoted 12 lines
while (<>) { if ($next ne "") { $c=$_; if ($c =~ /^\s+\"(.*)/) { $c2=$1; $next =~ s/\"\n$//; $n = expand($next); $funpos = index($n, '('); $pos = index($c2, '",'); if ($funpos && $pos > 0) { $s1 = substr $c2, 0, $pos + 2; $s2 = ' ' x ($funpos + 1) . substr $c2,$pos + 2;
Quoted 3 lines
$s2 =~ s/^\s+//; $s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne"");
Quoted 36 lines
print unexpand("$next$s1\n"); print unexpand("$s2\n") if ($s2 ne ""); } else { print "$next$c2\n"; } $next=""; next; } else { print $next; } $next=""; } else { if (m/\"$/) { if (!m/\\n\"$/) { $next=$_; next; } } } print $_; }</script>
Signed-off-by Mauro Carvalho Chehab <[email protected]>--- drivers/media/i2c/as3645a.c | 13 +++++++------ drivers/media/i2c/msp3400-kthreads.c | 4 ++-- drivers/media/i2c/mt9m032.c | 5 +++-- drivers/media/i2c/mt9p031.c | 5 +++-- drivers/media/i2c/saa7115.c | 18 +++++++++++------- drivers/media/i2c/saa717x.c | 4 ++-- drivers/media/i2c/tvp5150.c | 14 ++++++++------ drivers/media/i2c/tvp7002.c | 6 +++--- drivers/media/i2c/upd64083.c | 4 +--- 9 files changed, 40 insertions(+), 33 deletions(-)[snip]
Quoted 4 lines
drivers/media/i2c/saa7115.c +0
-0[snip]
Quoted 8 lines
drivers/media/i2c/saa7115.c static int saa711x_log_status(struct v4l2_subdev *sd) · line 1541
Quoted 5 lines
drivers/media/i2c/saa7115.c +0
-1@@ -1538,8 +1537,10 @@ static int saa711x_log_status(struct v4l2_subdev *sd)/* status for the saa7114 */ reg1f =saa711x_read (sd,R_1F_STATUS_BYTE_2_VD_DEC ); signalOk = (reg1f &0xc1 ) ==0x81 ; - v4l2_info(sd, "Video signal: %s\n", signalOk ? "ok" :"bad");
No need to change this one, if fits on a single line.
I know, but visually, it looked better to make the same indentation as on the frequency print below.
Quoted 43 lines
drivers/media/i2c/saa7115.c static int saa711x_log_status(struct v4l2_subdev *sd) · line 1542
Quoted 2 lines
drivers/media/i2c/saa7115.c +0
-1- v4l2_info(sd, "Frequency: %s\n", (reg1f & 0x20) ? "60Hz" : "50
Quoted 7 lines
drivers/media/i2c/saa7115.c +3
-0Hz"); + v4l2_info(sd, "Video signal: %s\n", + signalOk ? "ok" : "bad"); +v4l2_info (sd,"Frequency: %s\n" , + (reg1f &0x20 ) ?"60 Hz" :"50 Hz" );return 0 ; }[snip]
drivers/media/i2c/tvp5150.c static inline void tvp5150_selmux(struct v4l2_subdev · line 283
Quoted 9 lines
drivers/media/i2c/tvp5150.c +0
-1@@ -280,10 +280,10 @@ static inline void tvp5150_selmux(struct v4l2_subdev *sd) break; } - v4l2_dbg(1, debug, sd, "Selecting video route: route input=%i,output=%i "
drivers/media/i2c/tvp5150.c static inline void tvp5150_selmux(struct v4l2_subdev · line 284
Quoted 5 lines
drivers/media/i2c/tvp5150.c +2
-3-"=> tvp5150 input=%i, opmode=%i\n" , - decoder->input, decoder->output, - input, opmode); + v4l2_dbg(1, debug, sd, + "Selecting video route: route input=%i, output=%i =>tvp5150 input=%i, opmode=%i\n",
drivers/media/i2c/tvp5150.c static inline void tvp5150_selmux(struct v4l2_subdev · line 286
Quoted 2 lines
drivers/media/i2c/tvp5150.c +2
-0+ decoder->input, decoder->output, + input, opmode);The three arguments can fit on a single line.
drivers/media/i2c/tvp5150.c static int tvp5150_set_vbi(struct v4l2_subdev *sd, · line 652
Quoted 8 lines
drivers/media/i2c/tvp5150.c +0
-1tvp5150_write (sd,TVP5150_OP_MODE_CTL , opmode);tvp5150_write (sd,TVP5150_VD_IN_SRC_SEL_1 , input);@@ -649,7 +649,8 @@ static int tvp5150_set_vbi(struct v4l2_subdev *sd,int pos=0 ;if (std ==V4L2_STD_ALL ) { - v4l2_err(sd, "VBI can't be configured without knowing numberof
Quoted 6 lines
drivers/media/i2c/tvp5150.c static int tvp5150_set_vbi(struct v4l2_subdev *sd, · line 654
Quoted 3 lines
drivers/media/i2c/tvp5150.c +2
-0lines\n"); + v4l2_err(sd, + "VBI can't be configured without knowing number oflines\n");
I'm quite doubtful that this particular change improves readability :-)
I have another patch pending on my tree getting rid of v4l2_err(). with that, the first argument becomes bigger:
- v4l2_err(sd,
- "VBI can't be configured without knowing number of lines\n");
+ dev_err(sd->dev,
+ "VBI can't be configured without knowing number of lines\n");
So, I prefer to keep the string on a separate line.
Quoted 10 lines
drivers/media/i2c/tvp5150.c static int tvp5150_get_vbi(struct v4l2_subdev *sd, · line 700
Quoted 9 lines
drivers/media/i2c/tvp5150.c +0
-0return 0 ; }else if (std &V4L2_STD_625_50 ) {drivers/media/i2c/tvp5150.c +0
-1/* Don't follow NTSC Line number convension */ @@ -697,7 +698,8 @@ static int tvp5150_get_vbi(struct v4l2_subdev *sd,int i, ret =0 ;if (std ==V4L2_STD_ALL ) { - v4l2_err(sd, "VBI can't be configured without knowing numberof
Quoted 6 lines
drivers/media/i2c/tvp5150.c static int tvp5150_get_vbi(struct v4l2_subdev *sd, · line 703
Quoted 3 lines
drivers/media/i2c/tvp5150.c +2
-0lines\n"); + v4l2_err(sd, + "VBI can't be configured without knowing number oflines\n");
Ditto.
Same as above.
Quoted 6 lines
Quoted 3 lines
drivers/media/i2c/tvp5150.c +0
-0return 0 ; }else if (std &V4L2_STD_625_50 ) {/* Don't follow NTSC Line number convension */
[snip]
Patch addressing the comments I agreed is attached.
Thanks,
Mauro
--
[PATCH] i2c: don't break long lines
Due to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
drivers/media/i2c/as3645a.c +7 -6
@@ -299,8 +299,8 @@ static int as3645a_read_fault(struct as3645a *flash)dev_dbg (&client->dev,"Inductor Peak limit fault\n" );if (rval &AS_FAULT_INFO_INDICATOR_LED ) -dev_dbg (&client->dev,"Indicator LED fault: " -"Short circuit or open loop\n" ); +dev_dbg (&client->dev, +"Indicator LED fault: Short circuit or open loop\n" );dev_dbg (&client->dev,"%u connected LEDs\n" , rval &AS_FAULT_INFO_LED_AMOUNT ?2 :1 );
@@ -315,8 +315,8 @@ static int as3645a_read_fault(struct as3645a *flash)dev_dbg (&client->dev,"Short circuit fault\n" );if (rval &AS_FAULT_INFO_OVER_VOLTAGE ) -dev_dbg (&client->dev,"Over voltage fault: " -"Indicates missing capacitor or open connection\n" ); +dev_dbg (&client->dev, +"Over voltage fault: Indicates missing capacitor or open connection\n" );return rval; }
@@ -588,8 +588,9 @@ static int as3645a_registered(struct v4l2_subdev *sd)/* Verify the chip model and version. */ if (model !=0x01 || rfu !=0x00 ) { -dev_err (&client->dev,"AS3645A not detected " -"(model %d rfu %d)\n" , model, rfu); +dev_err (&client->dev, +"AS3645A not detected (model %d rfu %d)\n" , + model, rfu); rval = -ENODEV ; goto power_off; }
drivers/media/i2c/msp3400-kthreads.c +2 -2
@@ -775,8 +775,8 @@ int msp3410d_thread(void *data)if (msp_amsound && !state->radio && (state->v4l2_std &V4L2_STD_SECAM ) && (val !=0x0009 )) {/* autodetection has failed, let backup */ -v4l_dbg (1 , msp_debug, client,"autodetection failed," -" switching to backup standard: %s (0x%04x)\n" , +v4l_dbg (1 , msp_debug, client, +"autodetection failed, switching to backup standard: %s (0x%04x)\n" , msp_stdlist[8 ].name ? msp_stdlist[8 ].name :"unknown" , val); state->std = val =0x0009 ;
drivers/media/i2c/mt9m032.c +3 -2
@@ -746,8 +746,9 @@ static int mt9m032_probe(struct i2c_client *client, chip_version =mt9m032_read (client,MT9M032_CHIP_VERSION );if (chip_version !=MT9M032_CHIP_VERSION_VALUE ) { -dev_err (&client->dev,"MT9M032 not detected, wrong version " -"0x%04x\n" , chip_version); +dev_err (&client->dev, +"MT9M032 not detected, wrong version 0x%04x\n" , + chip_version); ret = -ENODEV ; goto error_sensor; }
drivers/media/i2c/mt9p031.c +3 -2
@@ -929,8 +929,9 @@ static int mt9p031_registered(struct v4l2_subdev *subdev)mt9p031_power_off (mt9p031);if (data !=MT9P031_CHIP_VERSION_VALUE ) { -dev_err (&client->dev,"MT9P031 not detected, wrong version " -"0x%04x\n" , data); +dev_err (&client->dev, +"MT9P031 not detected, wrong version 0x%04x\n" , + data);return -ENODEV ; }
drivers/media/i2c/saa7115.c +11 -7
@@ -53,8 +53,7 @@#define VRES_60HZ (480+16)MODULE_DESCRIPTION ("Philips SAA7111/SAA7113/SAA7114/SAA7115/SAA7118 video decoder driver" ); -MODULE_AUTHOR ("Maxim Yevtyushkin, Kevin Thayer, Chris Kennedy, " -"Hans Verkuil, Mauro Carvalho Chehab" ); +MODULE_AUTHOR ("Maxim Yevtyushkin, Kevin Thayer, Chris Kennedy, Hans Verkuil, Mauro Carvalho Chehab" );MODULE_LICENSE ("GPL" );static bool debug;
@@ -1538,8 +1537,10 @@ static int saa711x_log_status(struct v4l2_subdev *sd)/* status for the saa7114 */ reg1f =saa711x_read (sd,R_1F_STATUS_BYTE_2_VD_DEC ); signalOk = (reg1f &0xc1 ) ==0x81 ; -v4l2_info (sd,"Video signal: %s\n" , signalOk ?"ok" :"bad" ); -v4l2_info (sd,"Frequency: %s\n" , (reg1f &0x20 ) ?"60 Hz" :"50 Hz" ); +v4l2_info (sd,"Video signal: %s\n" , + signalOk ?"ok" :"bad" ); +v4l2_info (sd,"Frequency: %s\n" , + (reg1f &0x20 ) ?"60 Hz" :"50 Hz" );return 0 ; }
@@ -1551,11 +1552,14 @@ static int saa711x_log_status(struct v4l2_subdev *sd) vcr = !(reg1f &0x10 );if (state->input >=6 ) -v4l2_info (sd,"Input: S-Video %d\n" , state->input -6 ); +v4l2_info (sd,"Input: S-Video %d\n" , + state->input -6 );else v4l2_info (sd,"Input: Composite %d\n" , state->input); -v4l2_info (sd,"Video signal: %s\n" , signalOk ? (vcr ?"VCR" :"broadcast/DVD" ) :"bad" ); -v4l2_info (sd,"Frequency: %s\n" , (reg1f &0x20 ) ?"60 Hz" :"50 Hz" ); +v4l2_info (sd,"Video signal: %s\n" , + signalOk ? (vcr ?"VCR" :"broadcast/DVD" ) :"bad" ); +v4l2_info (sd,"Frequency: %s\n" , + (reg1f &0x20 ) ?"60 Hz" :"50 Hz" );switch (reg1e &0x03 ) {case 1 :
drivers/media/i2c/saa717x.c +2 -2
@@ -735,8 +735,8 @@ static void get_inf_dev_status(struct v4l2_subdev *sd, reg_data3, stdres[reg_data3 &0x1f ], (reg_data3 &0x000020 ) ?",stereo" :"" , (reg_data3 & 0x000040) ? ",dual" : ""); - v4l2_dbg(1, debug, sd, "detailed status: " - "%s#%s#%s#%s#%s#%s#%s#%s#%s#%s#%s#%s#%s#%s\n", + v4l2_dbg(1, debug, sd, + "detailed status: %s#%s#%s#%s#%s#%s#%s#%s#%s#%s#%s#%s#%s#%s\n", (reg_data3 & 0x000080) ? " A2/EIAJ pilot tone " : "", (reg_data3 & 0x000100) ? " A2/EIAJ dual " : "", (reg_data3 & 0x000200) ? " A2/EIAJ stereo " : "",
drivers/media/i2c/tvp5150.c +8 -6
@@ -280,10 +280,10 @@ static inline void tvp5150_selmux(struct v4l2_subdev *sd)break ; } -v4l2_dbg (1 , debug, sd,"Selecting video route: route input=%i, output=%i " -"=> tvp5150 input=%i, opmode=%i\n" , - decoder->input, decoder->output, - input, opmode); +v4l2_dbg (1 , debug, sd, +"Selecting video route: route input=%i, output=%i => tvp5150 input=%i, opmode=%i\n" , + decoder->input, decoder->output, + input, opmode);tvp5150_write (sd,TVP5150_OP_MODE_CTL , opmode);tvp5150_write (sd,TVP5150_VD_IN_SRC_SEL_1 , input);
@@ -649,7 +649,8 @@ static int tvp5150_set_vbi(struct v4l2_subdev *sd,int pos=0 ;if (std ==V4L2_STD_ALL ) { -v4l2_err (sd,"VBI can't be configured without knowing number of lines\n" ); +v4l2_err (sd, +"VBI can't be configured without knowing number of lines\n" );return 0 ; }else if (std &V4L2_STD_625_50 ) {/* Don't follow NTSC Line number convension */
@@ -697,7 +698,8 @@ static int tvp5150_get_vbi(struct v4l2_subdev *sd,int i, ret =0 ;if (std ==V4L2_STD_ALL ) { -v4l2_err (sd,"VBI can't be configured without knowing number of lines\n" ); +v4l2_err (sd, +"VBI can't be configured without knowing number of lines\n" );return 0 ; }else if (std &V4L2_STD_625_50 ) {/* Don't follow NTSC Line number convension */
drivers/media/i2c/tvp7002.c +3 -3
@@ -663,7 +663,7 @@ static int tvp7002_query_dv(struct v4l2_subdev *sd, int *index)if (*index ==NUM_TIMINGS ) {v4l2_dbg (1 , debug, sd,"detection failed: lpf = %x, cpl = %x\n" , - lpfr, cpln); + lpfr, cpln);return -ENOLINK ; }
@@ -1057,8 +1057,8 @@ static int tvp7002_remove(struct i2c_client *c)struct v4l2_subdev *sd =i2c_get_clientdata (c);struct tvp7002 *device =to_tvp7002 (sd); -v4l2_dbg (1 , debug, sd,"Removing tvp7002 adapter" -"on address 0x%x\n" , c->addr); +v4l2_dbg (1 , debug, sd,"Removing tvp7002 adapter on address 0x%x\n" , + c->addr);v4l2_async_unregister_subdev (&device->sd);#if defined(CONFIG_MEDIA_CONTROLLER )media_entity_cleanup (&device->sd.entity);
drivers/media/i2c/upd64083.c +1 -3
@@ -139,9 +139,7 @@ static int upd64083_log_status(struct v4l2_subdev *sd)u8 buf[7 ];i2c_master_recv (client, buf,7 ); -v4l2_info (sd,"Status: SA00=%02x SA01=%02x SA02=%02x SA03=%02x " -"SA04=%02x SA05=%02x SA06=%02x\n" , - buf[0 ], buf[1 ], buf[2 ], buf[3 ], buf[4 ], buf[5 ], buf[6 ]); +v4l2_info (sd,"Status: SA00 to SA07 registers %*ph\n" ,7 , buf);return 0 ; }
PATCH v2 55/58 platform: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/platform/mx2_emmaprp.c | 10 +++++----- drivers/media/platform/pxa_camera.c | 6 ++---- drivers/media/platform/via-camera.c | 7 ++----- 3 files changed, 9 insertions(+), 14 deletions(-)
drivers/media/platform/mx2_emmaprp.c +5 -5
@@ -724,10 +724,10 @@ static int emmaprp_buf_prepare(struct vb2_buffer *vb) q_data =get_q_data (ctx, vb->vb2_queue->type);if (vb2_plane_size (vb,0 ) < q_data->sizeimage) { -dprintk (ctx->dev,"%s data will not fit into plane" -"(%lu < %lu)\n" , __func__, -vb2_plane_size (vb,0 ), - (long )q_data->sizeimage); +dprintk (ctx->dev, +"%s data will not fit into plane(%lu < %lu)\n" , + __func__,vb2_plane_size (vb,0 ), + (long )q_data->sizeimage);return -EINVAL ; }
@@ -937,7 +937,7 @@ static int emmaprp_probe(struct platform_device *pdev)snprintf (vfd->name,sizeof (vfd->name),"%s" , emmaprp_videodev.name); pcdev->vfd = vfd;v4l2_info (&pcdev->v4l2_dev,EMMAPRP_MODULE_NAME -" Device registered as /dev/video%d\n" , vfd->num); +" Device registered as /dev/video%d\n" , vfd->num);platform_set_drvdata (pdev, pcdev);
drivers/media/platform/pxa_camera.c +2 -4
@@ -2347,8 +2347,7 @@ static int pxa_camera_probe(struct platform_device *pdev)* Platform hasn't set available data widths. This is bad. * Warn and use a default. */ -dev_warn (&pdev->dev,"WARNING! Platform hasn't set available " -"data widths, using default 10 bit\n" ); +dev_warn (&pdev->dev,"WARNING! Platform hasn't set available data widths, using default 10 bit\n" ); pcdev->platform_flags |=PXA_CAMERA_DATAWIDTH_10 ; }if (pcdev->platform_flags &PXA_CAMERA_DATAWIDTH_8 )
@@ -2359,8 +2358,7 @@ static int pxa_camera_probe(struct platform_device *pdev) pcdev->width_flags |=1 <<9 ;if (!pcdev->mclk) {dev_warn (&pdev->dev, -"mclk == 0! Please, fix your platform data. " -"Using default 20MHz\n" ); +"mclk == 0! Please, fix your platform data. Using default 20MHz\n" ); pcdev->mclk =20000000 ; }
drivers/media/platform/via-camera.c +2 -5
@@ -39,15 +39,12 @@ MODULE_LICENSE("GPL");static bool flip_image;module_param (flip_image, bool,0444 );MODULE_PARM_DESC (flip_image, -"If set, the sensor will be instructed to flip the image " -"vertically." ); +"If set, the sensor will be instructed to flip the image vertically." );static bool override_serial;module_param (override_serial, bool,0444 );MODULE_PARM_DESC (override_serial, -"The camera driver will normally refuse to load if " -"the XO 1.5 serial port is enabled. Set this option " -"to force-enable the camera." ); +"The camera driver will normally refuse to load if the XO 1.5 serial port is enabled. Set this option to force-enable the camera." );/* * The structure describing our camera.
Signature · 1 line
2.7.4
PATCH v2 56/58 radio: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/radio/radio-gemtek.c | 8 ++------ drivers/media/radio/radio-wl1273.c | 3 +-- 2 files changed, 3 insertions(+), 8 deletions(-)
drivers/media/radio/radio-gemtek.c +2 -6
@@ -67,14 +67,10 @@ module_param(probe, bool, 0444);MODULE_PARM_DESC (probe,"Enable automatic device probing." );module_param (hardmute, bool,0644 ); -MODULE_PARM_DESC (hardmute,"Enable 'hard muting' by shutting down PLL, may " -"reduce static noise." ); +MODULE_PARM_DESC (hardmute,"Enable 'hard muting' by shutting down PLL, may reduce static noise." );module_param_array (io, int,NULL ,0444 ); -MODULE_PARM_DESC (io,"Force I/O ports for the GemTek Radio card if automatic " -"probing is disabled or fails. The most common I/O ports are: 0x20c " -"0x30c, 0x24c or 0x34c (0x20c, 0x248 and 0x28c have been reported to " -"work for the combined sound/radiocard)." ); +MODULE_PARM_DESC (io,"Force I/O ports for the GemTek Radio card if automatic probing is disabled or fails. The most common I/O ports are: 0x20c 0x30c, 0x24c or 0x34c (0x20c, 0x248 and 0x28c have been reported to work for the combined sound/radiocard)." );module_param_array (radio_nr, int,NULL ,0444 );MODULE_PARM_DESC (radio_nr,"Radio device numbers" );
drivers/media/radio/radio-wl1273.c +1 -2
@@ -2068,8 +2068,7 @@ static int wl1273_fm_radio_probe(struct platform_device *pdev) goto err_request_irq; } }else { -dev_err (radio->dev,WL1273_FM_DRIVER_NAME ": Core WL1273 IRQ" -" not configured" ); +dev_err (radio->dev,WL1273_FM_DRIVER_NAME ": Core WL1273 IRQ not configured" ); r = -EINVAL ; goto pdata_err; }
Signature · 1 line
2.7.4
PATCH v2 57/58 rc: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/rc/ati_remote.c | 3 +-- drivers/media/rc/ene_ir.c | 3 +-- drivers/media/rc/imon.c | 48 +++++++++++++++++------------------------- drivers/media/rc/ite-cir.c | 9 +++----- drivers/media/rc/mceusb.c | 4 +--- drivers/media/rc/rc-main.c | 3 +-- drivers/media/rc/redrat3.c | 18 ++++++---------- drivers/media/rc/streamzap.c | 11 +++++----- drivers/media/rc/winbond-cir.c | 9 +++----- 9 files changed, 40 insertions(+), 68 deletions(-)
drivers/media/rc/ati_remote.c +1 -2
@@ -527,8 +527,7 @@ static void ati_remote_input_report(struct urb *urb) remote_num = (data[3 ] >>4 ) &0x0f ;if (channel_mask & (1 << (remote_num +1 ))) {dbginfo (&ati_remote->interface->dev, -"Masked input from channel 0x%02x: data %02x, " -"mask= 0x%02lx\n" , +"Masked input from channel 0x%02x: data %02x, mask= 0x%02lx\n" , remote_num, data[2 ], channel_mask);return ; }
drivers/media/rc/ene_ir.c +1 -2
@@ -1210,8 +1210,7 @@ MODULE_PARM_DESC(txsim,MODULE_DEVICE_TABLE (pnp, ene_ids);MODULE_DESCRIPTION - ("Infrared input driver for KB3926B/C/D/E/F " -"(aka ENE0100/ENE0200/ENE0201/ENE0202) CIR port" ); + ("Infrared input driver for KB3926B/C/D/E/F (aka ENE0100/ENE0200/ENE0201/ENE0202) CIR port" );MODULE_AUTHOR ("Maxim Levitsky" );MODULE_LICENSE ("GPL" );
drivers/media/rc/imon.c +19 -29
127 lines not on this page · raw message
drivers/media/rc/ite-cir.c +3 -6
@@ -55,14 +55,12 @@ MODULE_PARM_DESC(debug, "Enable debugging output");/* low limit for RX carrier freq, Hz, 0 for no RX demodulation */ static int rx_low_carrier_freq;module_param (rx_low_carrier_freq, int,S_IRUGO |S_IWUSR ); -MODULE_PARM_DESC (rx_low_carrier_freq,"Override low RX carrier frequency, Hz, " -"0 for no RX demodulation" ); +MODULE_PARM_DESC (rx_low_carrier_freq,"Override low RX carrier frequency, Hz, 0 for no RX demodulation" );/* high limit for RX carrier freq, Hz, 0 for no RX demodulation */ static int rx_high_carrier_freq;module_param (rx_high_carrier_freq, int,S_IRUGO |S_IWUSR ); -MODULE_PARM_DESC (rx_high_carrier_freq,"Override high RX carrier frequency, " -"Hz, 0 for no RX demodulation" ); +MODULE_PARM_DESC (rx_high_carrier_freq,"Override high RX carrier frequency, Hz, 0 for no RX demodulation" );/* override tx carrier frequency */ static int tx_carrier_freq;
@@ -1484,8 +1482,7 @@ static int ite_probe(struct pnp_dev *pdev, const struct pnp_device_idif (model_number >=0 && model_number <ARRAY_SIZE (ite_dev_descs)) { model_no = model_number; -ite_pr (KERN_NOTICE ,"The model has been fixed by a module " -"parameter." ); +ite_pr (KERN_NOTICE ,"The model has been fixed by a module parameter." ); }ite_pr (KERN_NOTICE ,"Using model: %s\n" , ite_dev_descs[model_no].model);
drivers/media/rc/mceusb.c +1 -3
@@ -604,9 +604,7 @@ static void mceusb_dev_printdata(struct mceusb_dev *ir, char *buf,break ;case MCE_RSP_EQWAKEVERSION :if (!out) -dev_dbg (dev,"Wake version, proto: 0x%02x, " -"payload: 0x%02x, address: 0x%02x, " -"version: 0x%02x" , +dev_dbg (dev,"Wake version, proto: 0x%02x, payload: 0x%02x, address: 0x%02x, version: 0x%02x" , data1, data2, data3, data4);break ;case MCE_RSP_GETPORTSTATUS :
drivers/media/rc/rc-main.c +1 -2
@@ -660,8 +660,7 @@ static void ir_do_keydown(struct rc_dev *dev, enum rc_type protocol, dev->last_toggle = toggle; dev->last_keycode = keycode; -IR_dprintk (1 ,"%s: key down event, " -"key 0x%04x, protocol 0x%04x, scancode 0x%08x\n" , +IR_dprintk (1 ,"%s: key down event, key 0x%04x, protocol 0x%04x, scancode 0x%08x\n" , dev->input_name, keycode, protocol, scancode);input_report_key (dev->input_dev, keycode,1 );
drivers/media/rc/redrat3.c +6 -12
@@ -265,8 +265,7 @@ static void redrat3_dump_fw_error(struct redrat3_dev *rr3, int code)/* Codes 0x20 through 0x2f are IR Firmware Errors */ case 0x20 : -pr_cont ("Initial signal pulse not long enough " -"to measure carrier frequency\n" ); +pr_cont ("Initial signal pulse not long enough to measure carrier frequency\n" );break ;case 0x21 :pr_cont ("Not enough length values allocated for signal\n" );
@@ -278,18 +277,15 @@ static void redrat3_dump_fw_error(struct redrat3_dev *rr3, int code)pr_cont ("Too many signal repeats\n" );break ;case 0x28 : -pr_cont ("Insufficient memory available for IR signal " -"data memory allocation\n" ); +pr_cont ("Insufficient memory available for IR signal data memory allocation\n" );break ;case 0x29 : -pr_cont ("Insufficient memory available " -"for IrDa signal data memory allocation\n" ); +pr_cont ("Insufficient memory available for IrDa signal data memory allocation\n" );break ;/* Codes 0x30 through 0x3f are USB Firmware Errors */ case 0x30 : -pr_cont ("Insufficient memory available for bulk " -"transfer structure\n" ); +pr_cont ("Insufficient memory available for bulk transfer structure\n" );break ;/*
@@ -301,8 +297,7 @@ static void redrat3_dump_fw_error(struct redrat3_dev *rr3, int code)pr_cont ("Signal capture has been terminated\n" );break ;case 0x41 : -pr_cont ("Attempt to set/get and unknown signal I/O " -"algorithm parameter\n" ); +pr_cont ("Attempt to set/get and unknown signal I/O algorithm parameter\n" );break ;case 0x42 :pr_cont ("Signal capture already started\n" );
@@ -917,8 +912,7 @@ static struct rc_dev *redrat3_init_rc_dev(struct redrat3_dev *rr3) goto out; } -snprintf (rr3->name,sizeof (rr3->name),"RedRat3%s " -"Infrared Remote Transceiver (%04x:%04x)" , +snprintf (rr3->name,sizeof (rr3->name),"RedRat3%s Infrared Remote Transceiver (%04x:%04x)" , prod ==USB_RR3IIUSB_PRODUCT_ID ?"-II" :"" ,le16_to_cpu (rr3->udev->descriptor.idVendor), prod);
drivers/media/rc/streamzap.c +5 -6
@@ -297,8 +297,7 @@ static struct rc_dev *streamzap_init_rc_dev(struct streamzap_ir *sz) goto out; } -snprintf (sz->name,sizeof (sz->name),"Streamzap PC Remote Infrared " -"Receiver (%04x:%04x)" , +snprintf (sz->name,sizeof (sz->name),"Streamzap PC Remote Infrared Receiver (%04x:%04x)" ,le16_to_cpu (sz->usbdev->descriptor.idVendor),le16_to_cpu (sz->usbdev->descriptor.idProduct));usb_make_path (sz->usbdev, sz->phys,sizeof (sz->phys));
@@ -364,15 +363,15 @@ static int streamzap_probe(struct usb_interface *intf, sz->endpoint = &(iface_host->endpoint[0 ].desc);if (!usb_endpoint_dir_in (sz->endpoint)) { -dev_err (&intf->dev,"%s: endpoint doesn't match input device " -"02%02x\n" , __func__, sz->endpoint->bEndpointAddress); +dev_err (&intf->dev,"%s: endpoint doesn't match input device 02%02x\n" , + __func__, sz->endpoint->bEndpointAddress); retval = -ENODEV ; goto free_sz; }if (!usb_endpoint_xfer_int (sz->endpoint)) { -dev_err (&intf->dev,"%s: endpoint attributes don't match xfer " -"02%02x\n" , __func__, sz->endpoint->bmAttributes); +dev_err (&intf->dev,"%s: endpoint attributes don't match xfer 02%02x\n" , + __func__, sz->endpoint->bmAttributes); retval = -ENODEV ; goto free_sz; }
drivers/media/rc/winbond-cir.c +3 -6
@@ -227,8 +227,7 @@ struct wbcir_data {static enum wbcir_protocol protocol =IR_PROTOCOL_RC6 ;module_param (protocol, uint,0444 ); -MODULE_PARM_DESC (protocol,"IR protocol to use for the power-on command " -"(0 = RC5, 1 = NEC, 2 = RC6A, default)" ); +MODULE_PARM_DESC (protocol,"IR protocol to use for the power-on command (0 = RC5, 1 = NEC, 2 = RC6A, default)" );static bool invert;/* default = 0 */ module_param (invert, bool,0444 );
@@ -244,8 +243,7 @@ MODULE_PARM_DESC(wake_sc, "Scancode of the power-on IR command");static unsigned int wake_rc6mode =6 ;module_param (wake_rc6mode, uint,0644 ); -MODULE_PARM_DESC (wake_rc6mode,"RC6 mode for the power-on command " -"(0 = 0, 6 = 6A, default)" ); +MODULE_PARM_DESC (wake_rc6mode,"RC6 mode for the power-on command (0 = 0, 6 = 6A, default)" );
@@ -1050,8 +1048,7 @@ wbcir_probe(struct pnp_dev *device, const struct pnp_device_id *dev_id) goto exit_free_data; } -dev_dbg (&device->dev,"Found device " -"(w: 0x%lX, e: 0x%lX, s: 0x%lX, i: %u)\n" , +dev_dbg (&device->dev,"Found device (w: 0x%lX, e: 0x%lX, s: 0x%lX, i: %u)\n" , data->wbase, data->ebase, data->sbase, data->irq); data->led.name ="cir::activity" ;
Signature · 1 line
2.7.4
PATCH v2 58/58 tuners: don't break long lines
In reply to Mauro Carvalho ChehabDue to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code.
As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines.
So, join those continuation lines.
The patch was generated via the script below, and manually adjusted if needed.
</script>
use Text::Tabs;
while (<>) {
if ($next ne "") {
$c=$_;
if ($c =~ /^\s+\"(.*)/) {
$c2=$1;
$next =~ s/\"\n$//;
$n = expand($next);
$funpos = index($n, '(');
$pos = index($c2, '",');
if ($funpos && $pos > 0) {
$s1 = substr $c2, 0, $pos + 2;
$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
$s2 =~ s/^\s+//;
$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");
print unexpand("$next$s1\n");
print unexpand("$s2\n") if ($s2 ne "");
} else {
print "$next$c2\n";
}
$next="";
next;
} else {
print $next;
}
$next="";
} else {
if (m/\"$/) {
if (!m/\\n\"$/) {
$next=$_;
next;
}
}
}
print $_;
}</script>
--- drivers/media/tuners/fc0011.c | 7 ++---- drivers/media/tuners/mc44s803.c | 4 +-- drivers/media/tuners/tda18271-common.c | 4 +-- drivers/media/tuners/tda18271-fe.c | 3 +-- drivers/media/tuners/tda18271-maps.c | 6 +---- drivers/media/tuners/tda8290.c | 4 +-- drivers/media/tuners/tea5761.c | 6 ++--- drivers/media/tuners/tuner-simple.c | 45 ++++++++++++++-------------------- drivers/media/tuners/xc4000.c | 25 ++++++------------- 9 files changed, 39 insertions(+), 65 deletions(-)
drivers/media/tuners/fc0011.c +2 -5
@@ -262,8 +262,7 @@ static int fc0011_set_params(struct dvb_frontend *fe) regs[FC11_REG_VCOSEL ] |=FC11_VCOSEL_BW7M ;break ;default : -dev_warn (&priv->i2c->dev,"Unsupported bandwidth %u kHz. " -"Using 6000 kHz.\n" , +dev_warn (&priv->i2c->dev,"Unsupported bandwidth %u kHz. Using 6000 kHz.\n" , bandwidth); bandwidth =6000 ;/* fallthrough */
@@ -435,9 +434,7 @@ static int fc0011_set_params(struct dvb_frontend *fe)if (err)return err; - dev_dbg(&priv->i2c->dev, "Tuned to " - "fa=%02X fp=%02X xin=%02X%02X vco=%02X vcosel=%02X " - "vcocal=%02X(%u) bw=%u\n", + dev_dbg(&priv->i2c->dev, "Tuned to fa=%02X fp=%02X xin=%02X%02X vco=%02X vcosel=%02X vcocal=%02X(%u) bw=%u\n", (unsigned int)regs[FC11_REG_FA], (unsigned int)regs[FC11_REG_FP], (unsigned int)regs[FC11_REG_XINHI],
drivers/media/tuners/mc44s803.c +2 -2
@@ -349,8 +349,8 @@ struct dvb_frontend *mc44s803_attach(struct dvb_frontend *fe, id =MC44S803_REG_MS (reg,MC44S803_ID );if (id !=0x14 ) { -mc_printk (KERN_ERR ,"unsupported ID " -"(%x should be 0x14)\n" , id); +mc_printk (KERN_ERR ,"unsupported ID (%x should be 0x14)\n" , + id); goto error; }
drivers/media/tuners/tda18271-common.c +2 -2
@@ -251,8 +251,8 @@ static int __tda18271_write_regs(struct dvb_frontend *fe, int idx, int len, }if (ret !=1 ) -tda_err ("ERROR: idx = 0x%x, len = %d, " -"i2c_transfer returned: %d\n" , idx, max, ret); +tda_err ("ERROR: idx = 0x%x, len = %d, i2c_transfer returned: %d\n" , + idx, max, ret);return (ret ==1 ?0 : ret); }
drivers/media/tuners/tda18271-fe.c +1 -2
@@ -26,8 +26,7 @@int tda18271_debug;module_param_named (debug, tda18271_debug, int,0644 ); -MODULE_PARM_DESC (debug,"set debug level " -"(info=1, map=2, reg=4, adv=8, cal=16 (or-able))" ); +MODULE_PARM_DESC (debug,"set debug level (info=1, map=2, reg=4, adv=8, cal=16 (or-able))" );static int tda18271_cal_on_startup =-1 ;module_param_named (cal, tda18271_cal_on_startup, int,0644 );
drivers/media/tuners/tda18271-maps.c +1 -5
@@ -1024,11 +1024,7 @@ int tda18271_lookup_rf_band(struct dvb_frontend *fe, u32 *freq, u8 *rf_band)while ((map[i].rfmax *1000 ) < *freq) {if (tda18271_debug &DBG_ADV ) - tda_map("(%d) rfmax = %d < freq = %d, " - "rf1_def = %d, rf2_def = %d, rf3_def = %d, " - "rf1 = %d, rf2 = %d, rf3 = %d, " - "rf_a1 = %d, rf_a2 = %d, " - "rf_b1 = %d, rf_b2 = %d\n", + tda_map("(%d) rfmax = %d < freq = %d, rf1_def = %d, rf2_def = %d, rf3_def = %d, rf1 = %d, rf2 = %d, rf3 = %d, rf_a1 = %d, rf_a2 = %d, rf_b1 = %d, rf_b2 = %d\n", i, map[i].rfmax * 1000, *freq, map[i].rf1_def, map[i].rf2_def, map[i].rf3_def, map[i].rf1, map[i].rf2, map[i].rf3,
drivers/media/tuners/tda8290.c +2 -2
@@ -617,8 +617,8 @@ static int tda829x_find_tuner(struct dvb_frontend *fe)if (tuner_addrs ==0 ) { tuner_addrs =0x60 ; -tuner_info ("could not clearly identify tuner address, " -"defaulting to %x\n" , tuner_addrs); +tuner_info ("could not clearly identify tuner address, defaulting to %x\n" , + tuner_addrs); }else { tuner_addrs = tuner_addrs &0xff ;tuner_info ("setting tuner address to %x\n" , tuner_addrs);
drivers/media/tuners/tea5761.c +2 -4
@@ -274,13 +274,11 @@ int tea5761_autodetection(struct i2c_adapter* i2c_adap, u8 i2c_addr) }if ((buffer[13 ] !=0x2b ) || (buffer[14 ] !=0x57 ) || (buffer[15 ] !=0x061 )) { -printk (KERN_WARNING "Manufacturer ID= 0x%02x, Chip ID = %02x%02x." -" It is not a TEA5761\n" , +printk (KERN_WARNING "Manufacturer ID= 0x%02x, Chip ID = %02x%02x. It is not a TEA5761\n" , buffer[13 ], buffer[14 ], buffer[15 ]);return -EINVAL ; } -printk (KERN_WARNING "tea5761: TEA%02x%02x detected. " -"Manufacturer ID= 0x%02x\n" , +printk (KERN_WARNING "tea5761: TEA%02x%02x detected. Manufacturer ID= 0x%02x\n" , buffer[14 ], buffer[15 ], buffer[13 ]);return 0 ;
drivers/media/tuners/tuner-simple.c +19 -26
105 lines not on this page · raw message
drivers/media/tuners/xc4000.c +8 -17
@@ -43,14 +43,11 @@ MODULE_PARM_DESC(debug, "Debugging level (0 to 2, default: 0 (off)).");static int no_poweroff;module_param (no_poweroff, int,0644 ); -MODULE_PARM_DESC (no_poweroff,"Power management (1: disabled, 2: enabled, " -"0 (default): use device-specific default mode)." ); +MODULE_PARM_DESC (no_poweroff,"Power management (1: disabled, 2: enabled, 0 (default): use device-specific default mode)." );static int audio_std;module_param (audio_std, int,0644 ); -MODULE_PARM_DESC (audio_std,"Audio standard. XC4000 audio decoder explicitly " -"needs to know what audio standard is needed for some video standards " -"with audio A2 or NICAM. The valid settings are a sum of:\n" +MODULE_PARM_DESC (audio_std,"Audio standard. XC4000 audio decoder explicitly needs to know what audio standard is needed for some video standards with audio A2 or NICAM. The valid settings are a sum of:\n" " 1: use NICAM/B or A2/B instead of NICAM/A or A2/A\n" " 2: use A2 instead of NICAM or BTSC\n" " 4: use SECAM/K3 instead of K1\n"
@@ -60,8 +57,7 @@ MODULE_PARM_DESC(audio_std, "Audio standard. XC4000 audio decoder explicitly "static char firmware_name[30 ];module_param_string (firmware_name, firmware_name,sizeof (firmware_name),0 ); -MODULE_PARM_DESC (firmware_name,"Firmware file name. Allows overriding the " -"default firmware name." ); +MODULE_PARM_DESC (firmware_name,"Firmware file name. Allows overriding the default firmware name." );static DEFINE_MUTEX (xc4000_list_mutex);static LIST_HEAD (hybrid_tuner_instance_list);
@@ -290,8 +286,7 @@ static int xc4000_tuner_reset(struct dvb_frontend *fe)return -EREMOTEIO ; } }else { -printk (KERN_ERR "xc4000: no tuner reset callback function, " -"fatal\n" ); +printk (KERN_ERR "xc4000: no tuner reset callback function, fatal\n" );return -EINVAL ; }return 0 ;
@@ -679,8 +674,7 @@ static int seek_firmware(struct dvb_frontend *fe, unsigned int type,if (best_nr_diffs >0U ) {printk (KERN_WARNING -"Selecting best matching firmware (%u bits differ) for " -"type=(%x), id %016llx:\n" , +"Selecting best matching firmware (%u bits differ) for type=(%x), id %016llx:\n" , best_nr_diffs, type, (unsigned long long )*id); i = best_i; }
@@ -800,8 +794,7 @@ static int xc4000_fwupload(struct dvb_frontend *fe) n++;if (n >= n_array) { -printk (KERN_ERR "More firmware images in file than " -"were expected!\n" ); +printk (KERN_ERR "More firmware images in file than were expected!\n" ); goto corrupt; }
@@ -1055,8 +1048,7 @@ static int check_firmware(struct dvb_frontend *fe, unsigned int type, goto fail; } -dprintk (1 ,"Device is Xceive %d version %d.%d, " -"firmware version %d.%d\n" , +dprintk (1 ,"Device is Xceive %d version %d.%d, firmware version %d.%d\n" , hwmodel, hw_major, hw_minor, fw_major, fw_minor);/* Check firmware version against what we downloaded. */
@@ -1076,8 +1068,7 @@ static int check_firmware(struct dvb_frontend *fe, unsigned int type, }else if (priv->hwmodel ==0 || priv->hwmodel != hwmodel || priv->hwvers != ((hw_major <<8 ) | hw_minor)) {printk (KERN_WARNING -"Read invalid device hardware information - tuner " -"hung?\n" ); +"Read invalid device hardware information - tuner hung?\n" ); goto fail; }
Signature · 1 line
2.7.4