cron job: media_tree daily build: ERRORS

2016-10-18 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for
the kernels and architectures in the list below.

Results of the daily build of media_tree:

date:   Wed Oct 19 05:00:12 CEST 2016
media-tree git hash:43ea43b9d8b27b7acd443ec59319faa3cdb8a616
media_build git hash:   dac8db4dd7fa3cc87715cb19ace554e080690b39
v4l-utils git hash: 79186f9d3d9d3b6bee4a611bd92435d11807
gcc version:i686-linux-gcc (GCC) 6.2.0
sparse version: v0.5.0-3553-g78b2ea6
smatch version: v0.5.0-3553-g78b2ea6
host hardware:  x86_64
host os:4.7.0-164

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-multi: OK
linux-git-arm-pxa: OK
linux-git-blackfin-bf561: OK
linux-git-i686: OK
linux-git-m32r: WARNINGS
linux-git-mips: OK
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: OK
linux-2.6.36.4-i686: WARNINGS
linux-2.6.37.6-i686: WARNINGS
linux-2.6.38.8-i686: ERRORS
linux-2.6.39.4-i686: WARNINGS
linux-3.0.60-i686: WARNINGS
linux-3.1.10-i686: ERRORS
linux-3.2.37-i686: ERRORS
linux-3.3.8-i686: ERRORS
linux-3.4.27-i686: WARNINGS
linux-3.5.7-i686: WARNINGS
linux-3.6.11-i686: WARNINGS
linux-3.7.4-i686: WARNINGS
linux-3.8-i686: WARNINGS
linux-3.9.2-i686: WARNINGS
linux-3.10.1-i686: WARNINGS
linux-3.11.1-i686: OK
linux-3.13.11-i686: WARNINGS
linux-3.14.9-i686: WARNINGS
linux-3.15.2-i686: WARNINGS
linux-3.16.7-i686: WARNINGS
linux-3.17.8-i686: WARNINGS
linux-3.18.7-i686: WARNINGS
linux-3.19-i686: WARNINGS
linux-4.0.9-i686: WARNINGS
linux-4.1.33-i686: WARNINGS
linux-4.2.8-i686: WARNINGS
linux-4.3.6-i686: WARNINGS
linux-4.4.22-i686: WARNINGS
linux-4.5.7-i686: WARNINGS
linux-4.6.7-i686: WARNINGS
linux-4.7.5-i686: WARNINGS
linux-4.8-i686: OK
linux-4.9-rc1-i686: OK
linux-2.6.36.4-x86_64: WARNINGS
linux-2.6.37.6-x86_64: WARNINGS
linux-2.6.38.8-x86_64: ERRORS
linux-2.6.39.4-x86_64: WARNINGS
linux-3.0.60-x86_64: WARNINGS
linux-3.1.10-x86_64: ERRORS
linux-3.2.37-x86_64: ERRORS
linux-3.3.8-x86_64: ERRORS
linux-3.4.27-x86_64: WARNINGS
linux-3.5.7-x86_64: WARNINGS
linux-3.6.11-x86_64: WARNINGS
linux-3.7.4-x86_64: WARNINGS
linux-3.8-x86_64: WARNINGS
linux-3.9.2-x86_64: WARNINGS
linux-3.10.1-x86_64: WARNINGS
linux-3.11.1-x86_64: OK
linux-3.13.11-x86_64: WARNINGS
linux-3.14.9-x86_64: WARNINGS
linux-3.15.2-x86_64: WARNINGS
linux-3.16.7-x86_64: WARNINGS
linux-3.17.8-x86_64: WARNINGS
linux-3.18.7-x86_64: WARNINGS
linux-3.19-x86_64: WARNINGS
linux-4.0.9-x86_64: WARNINGS
linux-4.1.33-x86_64: WARNINGS
linux-4.2.8-x86_64: WARNINGS
linux-4.3.6-x86_64: WARNINGS
linux-4.4.22-x86_64: WARNINGS
linux-4.5.7-x86_64: WARNINGS
linux-4.6.7-x86_64: WARNINGS
linux-4.7.5-x86_64: WARNINGS
linux-4.8-x86_64: OK
linux-4.9-rc1-x86_64: OK
apps: WARNINGS
spec-git: OK
smatch: ERRORS
sparse: WARNINGS

Detailed results are available here:

http://www.xs4all.nl/~hverkuil/logs/Wednesday.log

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Wednesday.tar.bz2

The Media Infrastructure API from this daily build is here:

http://www.xs4all.nl/~hverkuil/spec/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] media: s5p-mfc collapse two error message into one

2016-10-18 Thread Shuah Khan
s5p_mfc_alloc_priv_buf() prints two message to report invalid memory
configuration error. Collapse them into a single message.

Signed-off-by: Shuah Khan 
---
 drivers/media/platform/s5p-mfc/s5p_mfc_opr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
index eee16a1..44d2325 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c
@@ -49,8 +49,7 @@ int s5p_mfc_alloc_priv_buf(struct device *dev, dma_addr_t 
base,
}
 
if (b->dma < base) {
-   mfc_err("Invaling memory configuration!\n");
-   mfc_err("Allocated buffer (%pad) is lower than memory base 
address (%pad)\n",
+   mfc_err("Invalid memory configuration - buffer (%pad) is below 
base memory address(%pad)\n",
>dma, );
dma_free_coherent(dev, b->size, b->virt, b->dma);
return -ENOMEM;
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 53/58] firewire: don't break long lines

2016-10-18 Thread Takashi Sakamoto
Hi,

On Oct 19 2016 05:46, 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.
> 
> 
> 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 $_;
> }
> 
> 
> Reviewed-by: Takashi Sakamoto 
> Acked-by: Stefan Richter 
> Signed-off-by: Mauro Carvalho Chehab 
> ---
>  drivers/media/firewire/firedtv-rc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/firewire/firedtv-rc.c 
> b/drivers/media/firewire/firedtv-rc.c
> index f82d4a93feb3..46dde73944df 100644
> --- a/drivers/media/firewire/firedtv-rc.c
> +++ b/drivers/media/firewire/firedtv-rc.c
> @@ -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< 

>From da3289a04226450d6dbabb5c81155ac17c11374d Mon Sep 17 00:00:00 2001
From: Takashi Sakamoto 
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.

Signed-off-by: Takashi Sakamoto 
---
 drivers/media/firewire/firedtv-rc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/media/firewire/firedtv-rc.c
b/drivers/media/firewire/firedtv-rc.c
index f82d4a9..04dea2a 100644
--- a/drivers/media/firewire/firedtv-rc.c
+++ b/drivers/media/firewire/firedtv-rc.c
@@ -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;
}

-- 
2.7.4


Regards

Takashi Sakamoto
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


em28xx WinTV dualHD in Raspbian

2016-10-18 Thread ps00de
Hi there,

I am running an updated raspbian image with kernel 4.4.23-v7+, matching
linux-headers-4.4.23-v7+_4.4.23-v7+-2_armhf from here:
https://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/ and
dvb-demod-si2168-b40-01.fw (see linuxtv-wiki).

Before the last apt-get upgrade this works great, but now, it ends up in
recognizing the device but not create /dev/dvb.

Log: 
Oct 18 23:07:59 mediapi kernel: [ 7587.975803] usb 1-1.3: new high-speed USB
device number 6 using dwc_otg
Oct 18 23:07:59 mediapi kernel: [ 7588.076796] usb 1-1.3: New USB device
found, idVendor=2040, idProduct=0265
Oct 18 23:07:59 mediapi kernel: [ 7588.076817] usb 1-1.3: New USB device
strings: Mfr=3, Product=1, SerialNumber=2
Oct 18 23:07:59 mediapi kernel: [ 7588.076842] usb 1-1.3: Product: dualHD
Oct 18 23:07:59 mediapi kernel: [ 7588.076853] usb 1-1.3: Manufacturer: HCW
Oct 18 23:07:59 mediapi kernel: [ 7588.076864] usb 1-1.3: SerialNumber:
0011540068
Oct 18 23:08:00 mediapi kernel: [ 7589.111483] media: Linux media interface:
v0.10
Oct 18 23:08:00 mediapi kernel: [ 7589.121622] Linux video capture
interface: v2.00
Oct 18 23:08:00 mediapi kernel: [ 7589.126137] em28xx: New device HCW dualHD
@ 480 Mbps (2040:0265, interface 0, class 0)
Oct 18 23:08:00 mediapi kernel: [ 7589.126157] em28xx: DVB interface 0
found: isoc
Oct 18 23:08:00 mediapi kernel: [ 7589.127012] em28xx: chip ID is em28174
Oct 18 23:08:01 mediapi kernel: [ 7590.338459] em28174 #0: EEPROM ID = 26 00
01 00, EEPROM hash = 0x7ee3cbc8
Oct 18 23:08:01 mediapi kernel: [ 7590.338482] em28174 #0: EEPROM info:
Oct 18 23:08:01 mediapi kernel: [ 7590.338496] em28174 #0:     microcode
start address = 0x0004, boot configuration = 0x01
Oct 18 23:08:01 mediapi kernel: [ 7590.346046] em28174 #0:     AC97 audio (5
sample rates)
Oct 18 23:08:01 mediapi kernel: [ 7590.346064] em28174 #0:     500mA max
power
Oct 18 23:08:01 mediapi kernel: [ 7590.346079] em28174 #0:     Table at
offset 0x27, strings=0x0e6a, 0x1888, 0x087e
Oct 18 23:08:01 mediapi kernel: [ 7590.347683] em28174 #0: Identified as
Hauppauge WinTV-dualHD DVB (card=99)
Oct 18 23:08:01 mediapi kernel: [ 7590.355143] tveeprom 4-0050: Hauppauge
model 204109, rev B2I6, serial# 11540068
Oct 18 23:08:01 mediapi kernel: [ 7590.355170] tveeprom 4-0050: tuner model
is SiLabs Si2157 (idx 186, type 4)
Oct 18 23:08:01 mediapi kernel: [ 7590.355188] tveeprom 4-0050: TV standards
PAL(B/G) NTSC(M) PAL(I) SECAM(L/L') PAL(D/D1/K) ATSC/DVB Digital (eeprom
0xfc)
Oct 18 23:08:01 mediapi kernel: [ 7590.355204] tveeprom 4-0050: audio
processor is None (idx 0)
Oct 18 23:08:01 mediapi kernel: [ 7590.355219] tveeprom 4-0050: has no
radio, has IR receiver, has no IR transmitter
Oct 18 23:08:01 mediapi kernel: [ 7590.355233] em28174 #0: dvb set to isoc
mode.
Oct 18 23:08:01 mediapi rsyslogd-2007: action 'action 17' suspended, next
retry is Tue Oct 18 23:08:31 2016 [try http://www.rsyslog.com/e/2007 ]
Oct 18 23:08:01 mediapi kernel: [ 7590.357918] usbcore: registered new
interface driver em28xx
Oct 18 23:08:01 mediapi kernel: [ 7590.369200] em28xx_dvb: disagrees about
version of symbol dvb_dmxdev_init
Oct 18 23:08:01 mediapi kernel: [ 7590.369228] em28xx_dvb: Unknown symbol
dvb_dmxdev_init (err -22)
[…] (multiple „disagrees“ and „unknown symbol“)
ct 18 23:08:01 mediapi kernel: [ 7590.417607] em28174 #0: Registering input
extension
Oct 18 23:08:01 mediapi kernel: [ 7590.455841] Registered IR keymap
rc-hauppauge
Oct 18 23:08:01 mediapi kernel: [ 7590.456798] input: em28xx IR (em28174 #0)
as /devices/platform/soc/3f98.usb/usb1/1-1/1-1.3/rc/rc0/input0
Oct 18 23:08:01 mediapi kernel: [ 7590.457059] rc rc0: em28xx IR (em28174
#0) as /devices/platform/soc/3f98.usb/usb1/1-1/1-1.3/rc/rc0
Oct 18 23:08:01 mediapi kernel: [ 7590.457715] em28174 #0: Input extension
successfully initalized
Oct 18 23:08:01 mediapi kernel: [ 7590.457734] em28xx: Registered (Em28xx
Input Extension) extension


Before it stopped working, I have executed the apt upgrade, installed the
new kernel header and run 
git clone git://linuxtv.org/media_build.git
cd media_build 
./build
sudo make install

No errors appeared.

What I am doing wrong? The last git clone was approx. in August.


2nd question: Is there anything new in supporting both tuners of the dualHD
stick?


Thanks,
Patrick


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 39/58] hdpvr: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/usb/hdpvr/hdpvr-core.c 
b/drivers/media/usb/hdpvr/hdpvr-core.c
index a61d8fd63c12..15f016ad5b89 100644
--- a/drivers/media/usb/hdpvr/hdpvr-core.c
+++ b/drivers/media/usb/hdpvr/hdpvr-core.c
@@ -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(>v4l2_dev, "untested firmware, the driver might"
- " not work.\n");
+   v4l2_info(>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
diff --git a/drivers/media/usb/hdpvr/hdpvr-i2c.c 
b/drivers/media/usb/hdpvr/hdpvr-i2c.c
index 9b641c4d4431..fcab55038d99 100644
--- a/drivers/media/usb/hdpvr/hdpvr-i2c.c
+++ b/drivers/media/usb/hdpvr/hdpvr-i2c.c
@@ -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(>v4l2_dev, "refusing 2-phase i2c xfer "
- "with conflicting target addresses\n");
+   v4l2_warn(>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(>v4l2_dev, "refusing complex xfer with "
- "r0=%d, r1=%d\n", msgs[0].flags & I2C_M_RD,
+   v4l2_warn(>v4l2_dev, "refusing complex xfer with 
r0=%d, r1=%d\n",
+ msgs[0].flags & I2C_M_RD,
  msgs[1].flags & I2C_M_RD);
  

[PATCH v2 41/58] pwc: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/pwc/pwc-if.c  | 4 ++--
 drivers/media/usb/pwc/pwc-v4l.c | 6 ++
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c
index ff657644b6b3..22420c14ac98 100644
--- a/drivers/media/usb/pwc/pwc-if.c
+++ b/drivers/media/usb/pwc/pwc-if.c
@@ -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;
diff --git a/drivers/media/usb/pwc/pwc-v4l.c b/drivers/media/usb/pwc/pwc-v4l.c
index 3d987984602f..92f04db6bbae 100644
--- a/drivers/media/usb/pwc/pwc-v4l.c
+++ b/drivers/media/usb/pwc/pwc-v4l.c
@@ -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,
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 19/58] tw68: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/tw68/tw68-video.c | 16 +++-
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/media/pci/tw68/tw68-video.c 
b/drivers/media/pci/tw68/tw68-video.c
index a45e02367321..58c4dd75bfa1 100644
--- a/drivers/media/pci/tw68/tw68-video.c
+++ b/drivers/media/pci/tw68/tw68-video.c
@@ -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);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 16/58] saa7164: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/pci/saa7164/saa7164-buffer.c 
b/drivers/media/pci/saa7164/saa7164-buffer.c
index f30758e24f5d..62c34504199d 100644
--- a/drivers/media/pci/saa7164/saa7164-buffer.c
+++ b/drivers/media/pci/saa7164/saa7164-buffer.c
@@ -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)),
diff --git a/drivers/media/pci/saa7164/saa7164-bus.c 
b/drivers/media/pci/saa7164/saa7164-bus.c
index a18fe5d47238..e305c02f9dc9 100644
--- a/drivers/media/pci/saa7164/saa7164-bus.c
+++ b/drivers/media/pci/saa7164/saa7164-bus.c
@@ -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;
}
diff --git a/drivers/media/pci/saa7164/saa7164-cards.c 
b/drivers/media/pci/saa7164/saa7164-cards.c
index c2b738227f58..15a98c638c55 100644
--- a/drivers/media/pci/saa7164/saa7164-cards.c
+++ b/drivers/media/pci/saa7164/saa7164-cards.c
@@ -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= insmod "
-   "option:\n", dev->name);
+   printk(KERN_ERR "%s: Here are valid choices for the card= insmod 
option:\n",
+  dev->name);
 
for (i = 0; i < saa7164_bcount; i++)
printk(KERN_ERR "%s:card=%d -> %s\n",
diff --git a/drivers/media/pci/saa7164/saa7164-cmd.c 

[PATCH v2 35/58] dvb-usb: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/usb/dvb-usb/cinergyT2-core.c 
b/drivers/media/usb/dvb-usb/cinergyT2-core.c
index 9fd1527494eb..f4d9122245ac 100644
--- a/drivers/media/usb/dvb-usb/cinergyT2-core.c
+++ b/drivers/media/usb/dvb-usb/cinergyT2-core.c
@@ -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 */
diff --git a/drivers/media/usb/dvb-usb/cinergyT2-fe.c 
b/drivers/media/usb/dvb-usb/cinergyT2-fe.c
index b3ec743a7a2e..93f0cae36d1f 100644
--- a/drivers/media/usb/dvb-usb/cinergyT2-fe.c
+++ b/drivers/media/usb/dvb-usb/cinergyT2-fe.c
@@ -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 *),
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 = (0x - le16_to_cpu(status.gain));
diff --git a/drivers/media/usb/dvb-usb/dib0700_core.c 
b/drivers/media/usb/dvb-usb/dib0700_core.c
index f3196658fb70..855cfc7bf309 100644
--- a/drivers/media/usb/dvb-usb/dib0700_core.c
+++ b/drivers/media/usb/dvb-usb/dib0700_core.c
@@ -16,10 +16,7 @@ MODULE_PARM_DESC(debug, "set debugging level 
(1=info,2=fw,4=fwdata,8=data (or-ab
 static int nb_packet_buffer_size = 21;
 module_param(nb_packet_buffer_size, int, 0644);
 

[PATCH v2 37/58] em28xx: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/em28xx/em28xx-cards.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/usb/em28xx/em28xx-cards.c 
b/drivers/media/usb/em28xx/em28xx-cards.c
index bcd6ac61d9f8..898fab136534 100644
--- a/drivers/media/usb/em28xx/em28xx-cards.c
+++ b/drivers/media/usb/em28xx/em28xx-cards.c
@@ -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= { {
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 15/58] saa7134: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/pci/saa7134/saa7134-alsa.c 
b/drivers/media/pci/saa7134/saa7134-alsa.c
index dc0e2fc5f68b..8a35ecfb75e3 100644
--- a/drivers/media/pci/saa7134/saa7134-alsa.c
+++ b/drivers/media/pci/saa7134/saa7134-alsa.c
@@ -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;
diff --git a/drivers/media/pci/saa7134/saa7134-cards.c 
b/drivers/media/pci/saa7134/saa7134-cards.c
index c480a7e87593..2b60af493de4 100644
--- a/drivers/media/pci/saa7134/saa7134-cards.c
+++ b/drivers/media/pci/saa7134/saa7134-cards.c
@@ -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(>i2c_adap, , 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(>i2c_adap, , 1);
diff --git a/drivers/media/pci/saa7134/saa7134-core.c 
b/drivers/media/pci/saa7134/saa7134-core.c
index ffb66a9ae23e..133389ea218d 100644
--- a/drivers/media/pci/saa7134/saa7134-core.c
+++ b/drivers/media/pci/saa7134/saa7134-core.c
@@ -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 

[PATCH v2 36/58] dvb-usb-v2: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c 
b/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c
index 283495c84ba3..6427137a09ef 100644
--- a/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c
+++ b/drivers/media/usb/dvb-usb-v2/mxl111sf-i2c.c
@@ -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, [i]) :
mxl111sf_i2c_sw_xfer_msg(state, [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);
diff --git a/drivers/media/usb/dvb-usb-v2/mxl111sf.c 
b/drivers/media/usb/dvb-usb-v2/mxl111sf.c
index 5d676b533a3a..80c635980526 100644
--- a/drivers/media/usb/dvb-usb-v2/mxl111sf.c
+++ b/drivers/media/usb/dvb-usb-v2/mxl111sf.c
@@ -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 

[PATCH v2 21/58] exynos4-is: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/exynos4-is/media-dev.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/platform/exynos4-is/media-dev.c 
b/drivers/media/platform/exynos4-is/media-dev.c
index 1a1154a9dfa4..e3a8709138fa 100644
--- a/drivers/media/platform/exynos4-is/media-dev.c
+++ b/drivers/media/platform/exynos4-is/media-dev.c
@@ -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;
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 38/58] gspca: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c
index af2395a76d8b..fa2cbb981905 100644
--- a/drivers/media/usb/gspca/gspca.c
+++ b/drivers/media/usb/gspca/gspca.c
@@ -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;
diff --git a/drivers/media/usb/gspca/m5602/m5602_core.c 
b/drivers/media/usb/gspca/m5602/m5602_core.c
index e4a0658e3f83..f1dcd9021983 100644
--- a/drivers/media/usb/gspca/m5602/m5602_core.c
+++ b/drivers/media/usb/gspca/m5602/m5602_core.c
@@ -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");
diff --git a/drivers/media/usb/gspca/mr97310a.c 
b/drivers/media/usb/gspca/mr97310a.c
index 

[PATCH v2 18/58] ttpci: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/pci/ttpci/av7110.c b/drivers/media/pci/ttpci/av7110.c
index 382caf200ba1..de84aa1b41f1 100644
--- a/drivers/media/pci/ttpci/av7110.c
+++ b/drivers/media/pci/ttpci/av7110.c
@@ -100,8 +100,7 @@ MODULE_PARM_DESC(adac,"audio DAC type: 0 TI, 1 CRYSTAL, 2 
MSP (use if autodetect
 module_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, , 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 = 0x;
@@ -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(, "dvb-ttpci-01.fw", >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");
-   

[PATCH v2 17/58] solo6x10: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/solo6x10/solo6x10-v4l2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/pci/solo6x10/solo6x10-v4l2.c 
b/drivers/media/pci/solo6x10/solo6x10-v4l2.c
index b4be47969b6b..896bec6627aa 100644
--- a/drivers/media/pci/solo6x10/solo6x10-v4l2.c
+++ b/drivers/media/pci/solo6x10/solo6x10-v4l2.c
@@ -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(_dev->pdev->dev, "Display as /dev/video%d with "
-"%d inputs (%d extended)\n", solo_dev->vfd->num,
+   dev_info(_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;
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 25/58] s5p-mfc: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index 52081ddc9bf2..cf787eae11b7 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -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;
 }
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
index 81e1e4ce6c24..f4301d5bbd32 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c
@@ -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(>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);
-- 
2.7.4


--
To unsubscribe from this list: 

[PATCH v2 33/58] cpia2: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/cpia2/cpia2_usb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/media/usb/cpia2/cpia2_usb.c 
b/drivers/media/usb/cpia2/cpia2_usb.c
index 13620cdf0599..2e03f244c59f 100644
--- a/drivers/media/usb/cpia2/cpia2_usb.c
+++ b/drivers/media/usb/cpia2/cpia2_usb.c
@@ -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 {
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 14/58] pt1: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/pt1/pt1.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/media/pci/pt1/pt1.c b/drivers/media/pci/pt1/pt1.c
index e7e4428109c3..d5ee82aee9e8 100644
--- a/drivers/media/pci/pt1/pt1.c
+++ b/drivers/media/pci/pt1/pt1.c
@@ -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;
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 22/58] marvell-ccic: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/marvell-ccic/mcam-core.c | 26 +++--
 1 file changed, 7 insertions(+), 19 deletions(-)

diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c 
b/drivers/media/platform/marvell-ccic/mcam-core.c
index af59bf4dca2d..a8bda6679422 100644
--- a/drivers/media/platform/marvell-ccic/mcam-core.c
+++ b/drivers/media/platform/marvell-ccic/mcam-core.c
@@ -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 

[PATCH v2 20/58] davinci: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Acked-by: Lad, Prabhakar 
Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/platform/davinci/dm355_ccdc.c 
b/drivers/media/platform/davinci/dm355_ccdc.c
index c90b9a4f0c24..65c2973167c6 100644
--- a/drivers/media/platform/davinci/dm355_ccdc.c
+++ b/drivers/media/platform/davinci/dm355_ccdc.c
@@ -334,8 +334,8 @@ static int ccdc_set_params(void __user *params)
 
x = copy_from_user(_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;
}
 
diff --git a/drivers/media/platform/davinci/dm644x_ccdc.c 
b/drivers/media/platform/davinci/dm644x_ccdc.c
index 6fba32bec974..c7523a7e0594 100644
--- a/drivers/media/platform/davinci/dm644x_ccdc.c
+++ b/drivers/media/platform/davinci/dm644x_ccdc.c
@@ -354,8 +354,8 @@ static int ccdc_set_params(void __user *params)
 
x = copy_from_user(_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;
}
 
diff --git a/drivers/media/platform/davinci/vpbe.c 
b/drivers/media/platform/davinci/vpbe.c
index 9a6c2cc38acb..7d2670732805 100644
--- a/drivers/media/platform/davinci/vpbe.c
+++ b/drivers/media/platform/davinci/vpbe.c
@@ -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(_dev->v4l2_dev, "encoder %s"
-" failed to register",
+   v4l2_err(_dev->v4l2_dev, "encoder %s 
failed to register",
 enc_info->module_name);
ret = -ENODEV;
goto fail_kfree_encoders;
}
} else
-   v4l2_warn(_dev->v4l2_dev, "non-i2c encoders"
-" currently not supported");
+   v4l2_warn(_dev->v4l2_dev, "non-i2c 

[PATCH v2 40/58] pvrusb2: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/usb/pvrusb2/pvrusb2-audio.c 
b/drivers/media/usb/pvrusb2/pvrusb2-audio.c
index 5f953d837bf1..3bac50a248d4 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-audio.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-audio.c
@@ -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;
}
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c 
b/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c
index f82f0f0f2c04..7f29a0464f36 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-cs53l32a.c
@@ -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;
}
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c 
b/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c
index 7d675fae1846..30eef97ef2ef 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-cx2584x-v4l.c
@@ -137,9 +137,7 @@ void pvr2_cx25840_subdev_update(struct 

[PATCH v2 26/58] c8sectpfe: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Acked-by: Peter Griffin 
Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c 
b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
index 30c148b9d65e..42b123ff2953 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
@@ -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(>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, 

[PATCH v2 43/58] stkwebcam: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/stkwebcam/stk-sensor.c | 4 ++--
 drivers/media/usb/stkwebcam/stk-webcam.c | 3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/media/usb/stkwebcam/stk-sensor.c 
b/drivers/media/usb/stkwebcam/stk-sensor.c
index e546b014d7ad..13ad8fdf05bb 100644
--- a/drivers/media/usb/stkwebcam/stk-sensor.c
+++ b/drivers/media/usb/stkwebcam/stk-sensor.c
@@ -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;
 }
 
diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c 
b/drivers/media/usb/stkwebcam/stk-webcam.c
index db200c9d796d..267a22f24f82 100644
--- a/drivers/media/usb/stkwebcam/stk-webcam.c
+++ b/drivers/media/usb/stkwebcam/stk-webcam.c
@@ -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;
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 48/58] uvc: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
index c2ee6e39fd0c..747415d4fa60 100644
--- a/drivers/media/usb/uvc/uvc_ctrl.c
+++ b/drivers/media/usb/uvc/uvc_ctrl.c
@@ -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, );
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 

[PATCH v2 45/58] ttusb-budget: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c 
b/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
index d52d4a8d39ad..361e40b56045 100644
--- a/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c
@@ -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);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 31/58] au0828: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/au0828/au0828-video.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/usb/au0828/au0828-video.c 
b/drivers/media/usb/au0828/au0828-video.c
index 85dd9a8e83ff..7a10eaa38f67 100644
--- a/drivers/media/usb/au0828/au0828-video.c
+++ b/drivers/media/usb/au0828/au0828-video.c
@@ -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, >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);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 23/58] omap: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/omap/omap_vout.c  | 24 +---
 drivers/media/platform/omap/omap_vout_vrfb.c |  5 +++--
 2 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/drivers/media/platform/omap/omap_vout.c 
b/drivers/media/platform/omap/omap_vout.c
index e668dde6d857..c39b5463e0b3 100644
--- a/drivers/media/platform/omap/omap_vout.c
+++ b/drivers/media/platform/omap/omap_vout.c
@@ -408,8 +408,8 @@ static int omapvid_setup_overlay(struct omap_vout_device 
*vout,
v4l2_dbg(1, debug, >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.width, 
info.height,
+   "out_height=%d rotation_type=%d screen_width=%d\n", __func__,
+   ovl->is_enabled(ovl), , 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(>vid_dev->v4l2_dev, "dma_map_single 
failed\n");
+   v4l2_err(>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(>vid_dev->v4l2_dev, "failed to change mode in"
-   " streamoff\n");
+   v4l2_err(>vid_dev->v4l2_dev,
+"failed to change mode in streamoff\n");
 
INIT_LIST_HEAD(>dma_queue);
ret = videobuf_streamoff(>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(>dev, ": Could not register "

[PATCH v2 46/58] ttusb-dec: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/ttusb-dec/ttusb_dec.c | 20 
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/media/usb/ttusb-dec/ttusb_dec.c 
b/drivers/media/usb/ttusb-dec/ttusb_dec.c
index 35d5003ff809..559c823a4fe8 100644
--- a/drivers/media/usb/ttusb-dec/ttusb_dec.c
+++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c
@@ -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(, [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 

[PATCH v2 42/58] siano: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/siano/smsusb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c
index c2e25876e93b..a4dcaec31d02 100644
--- a/drivers/media/usb/siano/smsusb.c
+++ b/drivers/media/usb/siano/smsusb.c
@@ -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;
}
}
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 11/58] dm1105: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/dm1105/dm1105.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/pci/dm1105/dm1105.c 
b/drivers/media/pci/dm1105/dm1105.c
index 5dd504741b12..a589aa78d1d9 100644
--- a/drivers/media/pci/dm1105/dm1105.c
+++ b/drivers/media/pci/dm1105/dm1105.c
@@ -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= "
-  "insmod option:\n");
+   printk(KERN_ERR "Here is a list of valid choices for the card= 
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);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 10/58] ddbridge: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/ddbridge/ddbridge-core.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c 
b/drivers/media/pci/ddbridge/ddbridge-core.c
index 18e3a4deee64..a6c9fe235974 100644
--- a/drivers/media/pci/ddbridge/ddbridge-core.c
+++ b/drivers/media/pci/ddbridge/ddbridge-core.c
@@ -824,8 +824,7 @@ static int dvb_input_attach(struct ddb_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)
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 44/58] tm6000: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/usb/tm6000/tm6000-alsa.c 
b/drivers/media/usb/tm6000/tm6000-alsa.c
index f16fbd1f9f51..422322541af6 100644
--- a/drivers/media/usb/tm6000/tm6000-alsa.c
+++ b/drivers/media/usb/tm6000/tm6000-alsa.c
@@ -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");
diff --git a/drivers/media/usb/tm6000/tm6000-core.c 
b/drivers/media/usb/tm6000/tm6000-core.c
index 7c32353c59db..8d104e5c4be3 100644
--- a/drivers/media/usb/tm6000/tm6000-core.c
+++ b/drivers/media/usb/tm6000/tm6000-core.c
@@ -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 

[PATCH v2 30/58] wl128x: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/radio/wl128x/fmdrv_common.c | 30 +-
 drivers/media/radio/wl128x/fmdrv_rx.c |  8 
 2 files changed, 17 insertions(+), 21 deletions(-)

diff --git a/drivers/media/radio/wl128x/fmdrv_common.c 
b/drivers/media/radio/wl128x/fmdrv_common.c
index 642b89c66bcb..6f254e80ffa6 100644
--- a/drivers/media/radio/wl128x/fmdrv_common.c
+++ b/drivers/media/radio/wl128x/fmdrv_common.c
@@ -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(>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(>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(>irq_info.timer, jiffies + FM_DRV_TX_TIMEOUT);
@@ -564,8 +562,7 @@ 

[PATCH v2 27/58] ti-vpe: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Acked-by: Benoit Parrot 
Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/ti-vpe/vpdma.c | 22 ++
 drivers/media/platform/ti-vpe/vpe.c   |  3 +--
 2 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/drivers/media/platform/ti-vpe/vpdma.c 
b/drivers/media/platform/ti-vpe/vpdma.c
index 3e2e3a33e6ed..4aff05915051 100644
--- a/drivers/media/platform/ti-vpe/vpdma.c
+++ b/drivers/media/platform/ti-vpe/vpdma.c
@@ -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", >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));
 
diff --git a/drivers/media/platform/ti-vpe/vpe.c 

[PATCH v2 24/58] omap3isp: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/platform/omap3isp/isp.c 
b/drivers/media/platform/omap3isp/isp.c
index 0321d84addc7..2e1b17ef82a3 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -480,8 +480,8 @@ void omap3isp_hist_dma_done(struct isp_device *isp)
omap3isp_stat_pcr_busy(>isp_hist)) {
/* Histogram cannot be enabled in this frame anymore */
atomic_set(>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");
}
 }
 
diff --git a/drivers/media/platform/omap3isp/ispccdc.c 
b/drivers/media/platform/omap3isp/ispccdc.c
index 882310eb45cc..7207558d722c 100644
--- a/drivers/media/platform/omap3isp/ispccdc.c
+++ b/drivers/media/platform/omap3isp/ispccdc.c
@@ -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;
}
 
diff --git a/drivers/media/platform/omap3isp/ispcsi2.c 
b/drivers/media/platform/omap3isp/ispcsi2.c
index f75a1be29d84..7dae2fe0d42d 100644
--- a/drivers/media/platform/omap3isp/ispcsi2.c
+++ b/drivers/media/platform/omap3isp/ispcsi2.c
@@ -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 

[PATCH v2 29/58] si4713: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/radio/si4713/si4713.c | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/media/radio/si4713/si4713.c 
b/drivers/media/radio/si4713/si4713.c
index 0b04b56571da..bc2a8b5442ae 100644
--- a/drivers/media/radio/si4713/si4713.c
+++ b/drivers/media/radio/si4713/si4713.c
@@ -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, >sd, "%s: response: %d x 10 kHz "
-   "(power %d, antcap %d, rnl %d)\n", __func__,
-   *frequency, *power, *antcap, *noise);
+   v4l2_dbg(1, debug, >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, >sd,
"%s: status=0x%02x\n", __func__, val[0]);
*cbleft = (s8)val[2] - val[3];
-   v4l2_dbg(1, debug, >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, >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;
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 47/58] usbvision: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/usbvision/usbvision-core.c  | 20 ++--
 drivers/media/usb/usbvision/usbvision-video.c |  4 ++--
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/media/usb/usbvision/usbvision-core.c 
b/drivers/media/usb/usbvision/usbvision-core.c
index c23bf73a68ea..bf041a9e69db 100644
--- a/drivers/media/usb/usbvision/usbvision-core.c
+++ b/drivers/media/usb/usbvision/usbvision-core.c
@@ -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;
}
 
diff --git 

[PATCH v2 12/58] ivtv: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/pci/ivtv/ivtv-alsa-main.c 
b/drivers/media/pci/ivtv/ivtv-alsa-main.c
index 8a86b61a896d..374f45f81ab3 100644
--- a/drivers/media/pci/ivtv/ivtv-alsa-main.c
+++ b/drivers/media/pci/ivtv/ivtv-alsa-main.c
@@ -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 = >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;
 }
diff --git a/drivers/media/pci/ivtv/ivtv-driver.c 
b/drivers/media/pci/ivtv/ivtv-driver.c
index 374033a5bdaf..15ac3af3c488 100644
--- a/drivers/media/pci/ivtv/ivtv-driver.c
+++ b/drivers/media/pci/ivtv/ivtv-driver.c
@@ -885,8 +885,8 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev 
*pdev,
pci_read_config_byte(pdev, PCI_LATENCY_TIMER, _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, _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, 0x);
 
-   IVTV_DEBUG_INFO("%d (rev %d) at 

[PATCH v2 32/58] b2c2: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/b2c2/flexcop-usb.c | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/media/usb/b2c2/flexcop-usb.c 
b/drivers/media/usb/b2c2/flexcop-usb.c
index d4bdba60b0f7..086afe25df76 100644
--- a/drivers/media/usb/b2c2/flexcop-usb.c
+++ b/drivers/media/usb/b2c2/flexcop-usb.c
@@ -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;
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 13/58] meye: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/meye/meye.c | 12 
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c
index ba887e8e1b17..11d81389ab1e 100644
--- a/drivers/media/pci/meye/meye.c
+++ b/drivers/media/pci/meye/meye.c
@@ -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();
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(_driver);
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 53/58] firewire: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Reviewed-by: Takashi Sakamoto 
Acked-by: Stefan Richter 
Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/firewire/firedtv-rc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/firewire/firedtv-rc.c 
b/drivers/media/firewire/firedtv-rc.c
index f82d4a93feb3..46dde73944df 100644
--- a/drivers/media/firewire/firedtv-rc.c
+++ b/drivers/media/firewire/firedtv-rc.c
@@ -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;
}
 
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 56/58] radio: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/radio/radio-gemtek.c | 8 ++--
 drivers/media/radio/radio-wl1273.c | 3 +--
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/media/radio/radio-gemtek.c 
b/drivers/media/radio/radio-gemtek.c
index cff1eb144a5c..ca051ccbc3e4 100644
--- a/drivers/media/radio/radio-gemtek.c
+++ b/drivers/media/radio/radio-gemtek.c
@@ -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");
diff --git a/drivers/media/radio/radio-wl1273.c 
b/drivers/media/radio/radio-wl1273.c
index a93f681aa9d6..9ce4b12299b4 100644
--- a/drivers/media/radio/radio-wl1273.c
+++ b/drivers/media/radio/radio-wl1273.c
@@ -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;
}
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 57/58] rc: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/rc/ati_remote.c b/drivers/media/rc/ati_remote.c
index 9f5b59706741..0884b7dc0e71 100644
--- a/drivers/media/rc/ati_remote.c
+++ b/drivers/media/rc/ati_remote.c
@@ -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(_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;
}
diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c
index d1c61cd035f6..bd5512e64aea 100644
--- a/drivers/media/rc/ene_ir.c
+++ b/drivers/media/rc/ene_ir.c
@@ -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");
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
index d62b1f38292c..bd807fa4cb9f 100644
--- a/drivers/media/rc/imon.c
+++ b/drivers/media/rc/imon.c
@@ -441,13 +441,11 @@ MODULE_PARM_DESC(debug, "Debug messages: 0=no, 1=yes 
(default: no)");
 /* lcd, vfd, vga or none? should be auto-detected, but can be overridden... */
 static int display_type;
 module_param(display_type, int, S_IRUGO);
-MODULE_PARM_DESC(display_type, "Type of attached display. 0=autodetect, "
-"1=vfd, 2=lcd, 3=vga, 4=none (default: autodetect)");
+MODULE_PARM_DESC(display_type, "Type of attached display. 0=autodetect, 1=vfd, 
2=lcd, 3=vga, 4=none (default: autodetect)");
 
 static int pad_stabilize = 1;
 module_param(pad_stabilize, int, S_IRUGO | S_IWUSR);
-MODULE_PARM_DESC(pad_stabilize, "Apply stabilization algorithm to iMON PAD "
-"presses in arrow key mode. 0=disable, 1=enable (default).");
+MODULE_PARM_DESC(pad_stabilize, "Apply stabilization algorithm to iMON PAD 
presses in arrow key mode. 0=disable, 1=enable (default).");
 
 /*
  * In certain use cases, mouse mode isn't really helpful, and could actually
@@ -455,14 +453,12 @@ MODULE_PARM_DESC(pad_stabilize, "Apply stabilization 
algorithm to iMON PAD "
  */
 static bool nomouse;
 module_param(nomouse, bool, S_IRUGO | 

[PATCH v2 58/58] tuners: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/tuners/fc0011.c b/drivers/media/tuners/fc0011.c
index 3932aa81e18c..2dda8d993c14 100644
--- a/drivers/media/tuners/fc0011.c
+++ b/drivers/media/tuners/fc0011.c
@@ -262,8 +262,7 @@ static int fc0011_set_params(struct dvb_frontend *fe)
regs[FC11_REG_VCOSEL] |= FC11_VCOSEL_BW7M;
break;
default:
-   dev_warn(>i2c->dev, "Unsupported bandwidth %u kHz. "
-"Using 6000 kHz.\n",
+   dev_warn(>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(>i2c->dev, "Tuned to "
-   "fa=%02X fp=%02X xin=%02X%02X vco=%02X vcosel=%02X "
-   "vcocal=%02X(%u) bw=%u\n",
+   dev_dbg(>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],
diff --git a/drivers/media/tuners/mc44s803.c b/drivers/media/tuners/mc44s803.c
index f1b764074661..d5681669d3cd 100644
--- a/drivers/media/tuners/mc44s803.c
+++ b/drivers/media/tuners/mc44s803.c
@@ -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;
}
 
diff --git a/drivers/media/tuners/tda18271-common.c 
b/drivers/media/tuners/tda18271-common.c
index a26bb33102b8..7e81cd887c13 100644
--- a/drivers/media/tuners/tda18271-common.c
+++ b/drivers/media/tuners/tda18271-common.c
@@ -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);
 }
diff --git a/drivers/media/tuners/tda18271-fe.c 

[PATCH v2 28/58] si470x: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/radio/si470x/radio-si470x-i2c.c 
b/drivers/media/radio/si470x/radio-si470x-i2c.c
index ee0470a3196b..9b81969d76b5 100644
--- a/drivers/media/radio/si470x/radio-si470x-i2c.c
+++ b/drivers/media/radio/si470x/radio-si470x-i2c.c
@@ -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(>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(>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(>dev,
"If you have some trouble using this driver,\n");
dev_warn(>dev,
-   "please report to V4L ML at "
-   "linux-media@vger.kernel.org\n");
+   "please report to V4L ML at 
linux-media@vger.kernel.org\n");
}
 
/* set initial frequency */
diff --git a/drivers/media/radio/si470x/radio-si470x-usb.c 
b/drivers/media/radio/si470x/radio-si470x-usb.c
index 4b132c29f290..1add136d37a3 100644
--- a/drivers/media/radio/si470x/radio-si470x-usb.c
+++ b/drivers/media/radio/si470x/radio-si470x-usb.c
@@ -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(>intf->dev, "si470x_get_scratch: "
-   "si470x_get_report returned %d\n", retval);
+   dev_warn(>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(>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(>dev,
"but the 

[PATCH v2 34/58] cx231xx: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/cx231xx/cx231xx-core.c | 10 --
 drivers/media/usb/cx231xx/cx231xx-dvb.c  |  4 ++--
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/media/usb/cx231xx/cx231xx-core.c 
b/drivers/media/usb/cx231xx/cx231xx-core.c
index 8b099fe1d592..550ec932f931 100644
--- a/drivers/media/usb/cx231xx/cx231xx-core.c
+++ b/drivers/media/usb/cx231xx/cx231xx-core.c
@@ -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) {
diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c 
b/drivers/media/usb/cx231xx/cx231xx-dvb.c
index 1417515d30eb..2868546999ca 100644
--- a/drivers/media/usb/cx231xx/cx231xx-dvb.c
+++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c
@@ -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;
}
 
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 49/58] zr364xx: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/usb/zr364xx/zr364xx.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/usb/zr364xx/zr364xx.c 
b/drivers/media/usb/zr364xx/zr364xx.c
index cc128db85723..3950708cbb32 100644
--- a/drivers/media/usb/zr364xx/zr364xx.c
+++ b/drivers/media/usb/zr364xx/zr364xx.c
@@ -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(>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)
>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;
}
}
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 02/58] cx25840: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/i2c/cx25840/cx25840-core.c | 11 +++
 drivers/media/i2c/cx25840/cx25840-ir.c   |  7 +++
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/media/i2c/cx25840/cx25840-core.c 
b/drivers/media/i2c/cx25840/cx25840-core.c
index 142ae28803bb..0dcf450052ac 100644
--- a/drivers/media/i2c/cx25840/cx25840-core.c
+++ b/drivers/media/i2c/cx25840/cx25840-core.c
@@ -873,10 +873,7 @@ void cx25840_std_setup(struct i2c_client *client)
"Chroma sub-carrier freq = %d.%06d 
MHz\n",
fsc / 100, fsc % 100);
 
-   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");
diff --git a/drivers/media/i2c/cx25840/cx25840-ir.c 
b/drivers/media/i2c/cx25840/cx25840-ir.c
index 4b782012cadc..15fbd9607cee 100644
--- a/drivers/media/i2c/cx25840/cx25840-ir.c
+++ b/drivers/media/i2c/cx25840/cx25840-ir.c
@@ -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 

[PATCH v2 05/58] b2c2: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/pci/b2c2/flexcop-dma.c | 6 ++
 drivers/media/pci/b2c2/flexcop-pci.c | 7 +++
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/media/pci/b2c2/flexcop-dma.c 
b/drivers/media/pci/b2c2/flexcop-dma.c
index 2881e0d956ad..913dc97f8b49 100644
--- a/drivers/media/pci/b2c2/flexcop-dma.c
+++ b/drivers/media/pci/b2c2/flexcop-dma.c
@@ -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;
}
 
diff --git a/drivers/media/pci/b2c2/flexcop-pci.c 
b/drivers/media/pci/b2c2/flexcop-pci.c
index 4cac1fc233f2..99ce28442a75 100644
--- a/drivers/media/pci/b2c2/flexcop-pci.c
+++ b/drivers/media/pci/b2c2/flexcop-pci.c
@@ -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;
}
 
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 00/58] don't break long lines on strings

2016-10-18 Thread Mauro Carvalho Chehab

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 +-
 

[PATCH v2 51/58] dvb-frontends: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/dvb-frontends/au8522_common.c 
b/drivers/media/dvb-frontends/au8522_common.c
index f135126bc373..cf4ac240a01f 100644
--- a/drivers/media/dvb-frontends/au8522_common.c
+++ b/drivers/media/dvb-frontends/au8522_common.c
@@ -50,8 +50,8 @@ int au8522_writereg(struct au8522_state *state, u16 reg, u8 
data)
ret = i2c_transfer(state->i2c, , 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;
 }
diff --git a/drivers/media/dvb-frontends/cx24110.c 
b/drivers/media/dvb-frontends/cx24110.c
index 6cb81ec12847..cbac5e6c47d3 100644
--- a/drivers/media/dvb-frontends/cx24110.c
+++ b/drivers/media/dvb-frontends/cx24110.c
@@ -120,8 +120,8 @@ static int cx24110_writereg (struct cx24110_state* state, 
int reg, int data)
int err;
 
if ((err = i2c_transfer(state->i2c, , 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",
+ 

[PATCH v2 55/58] platform: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Acked-by: Robert Jarzmik 
Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/platform/mx2_emmaprp.c 
b/drivers/media/platform/mx2_emmaprp.c
index e68d271b10af..03e47e0f778d 100644
--- a/drivers/media/platform/mx2_emmaprp.c
+++ b/drivers/media/platform/mx2_emmaprp.c
@@ -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(>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);
 
diff --git a/drivers/media/platform/pxa_camera.c 
b/drivers/media/platform/pxa_camera.c
index c12209c701d3..bcdac4932fb1 100644
--- a/drivers/media/platform/pxa_camera.c
+++ b/drivers/media/platform/pxa_camera.c
@@ -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(>dev, "WARNING! Platform hasn't set available "
-"data widths, using default 10 bit\n");
+   dev_warn(>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(>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 = 2000;
}
 
diff --git a/drivers/media/platform/via-camera.c 
b/drivers/media/platform/via-camera.c
index 7ca12deba89c..e16f70a5df1d 100644
--- a/drivers/media/platform/via-camera.c
+++ 

[PATCH v2 08/58] cx23885: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/pci/cx23885/cimax2.c 
b/drivers/media/pci/cx23885/cimax2.c
index 631e4f24aea6..43febef2f649 100644
--- a/drivers/media/pci/cx23885/cimax2.c
+++ b/drivers/media/pci/cx23885/cimax2.c
@@ -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]);
 
diff --git a/drivers/media/pci/cx23885/cx23885-417.c 
b/drivers/media/pci/cx23885/cx23885-417.c
index da892f3e3c29..0444db081b5c 100644
--- a/drivers/media/pci/cx23885/cx23885-417.c
+++ b/drivers/media/pci/cx23885/cx23885-417.c
@@ -770,8 +770,8 @@ static int cx23885_mbox_func(void *priv,
mc417_memory_read(dev, dev->cx23417_mailbox - 4, );
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, );
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");
 

[PATCH v2 06/58] bt8xx: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/pci/bt8xx/bttv-cards.c 
b/drivers/media/pci/bt8xx/bttv-cards.c
index 8a17cc0bfa07..4ad50f978e0e 100644
--- a/drivers/media/pci/bt8xx/bttv-cards.c
+++ b/drivers/media/pci/bt8xx/bttv-cards.c
@@ -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   */
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c 
b/drivers/media/pci/bt8xx/bttv-driver.c
index 97b91a9f9fa9..fb4aefbcc8f8 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -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)");
 

[PATCH v2 54/58] i2c: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/i2c/as3645a.c b/drivers/media/i2c/as3645a.c
index 2e90e4094b79..d2f56014a150 100644
--- a/drivers/media/i2c/as3645a.c
+++ b/drivers/media/i2c/as3645a.c
@@ -299,8 +299,8 @@ static int as3645a_read_fault(struct as3645a *flash)
dev_dbg(>dev, "Inductor Peak limit fault\n");
 
if (rval & AS_FAULT_INFO_INDICATOR_LED)
-   dev_dbg(>dev, "Indicator LED fault: "
-   "Short circuit or open loop\n");
+   dev_dbg(>dev,
+   "Indicator LED fault: Short circuit or open loop\n");
 
dev_dbg(>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(>dev, "Short circuit fault\n");
 
if (rval & AS_FAULT_INFO_OVER_VOLTAGE)
-   dev_dbg(>dev, "Over voltage fault: "
-   "Indicates missing capacitor or open connection\n");
+   dev_dbg(>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(>dev, "AS3645A not detected "
-   "(model %d rfu %d)\n", model, rfu);
+   dev_err(>dev,
+   "AS3645A not detected (model %d rfu %d)\n",
+   model, rfu);
rval = -ENODEV;
goto power_off;
}
diff --git a/drivers/media/i2c/msp3400-kthreads.c 
b/drivers/media/i2c/msp3400-kthreads.c
index 17120804fab7..2f72bba64d99 100644
--- a/drivers/media/i2c/msp3400-kthreads.c
+++ b/drivers/media/i2c/msp3400-kthreads.c
@@ -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 : 

[PATCH v2 01/58] b2c2: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/common/b2c2/flexcop-eeprom.c 
b/drivers/media/common/b2c2/flexcop-eeprom.c
index a25373a9bd84..844c7836c2a6 100644
--- a/drivers/media/common/b2c2/flexcop-eeprom.c
+++ b/drivers/media/common/b2c2/flexcop-eeprom.c
@@ -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);
diff --git a/drivers/media/common/b2c2/flexcop-i2c.c 
b/drivers/media/common/b2c2/flexcop-i2c.c
index e41cd23f8e45..58d39a59fc09 100644
--- a/drivers/media/common/b2c2/flexcop-i2c.c
+++ b/drivers/media/common/b2c2/flexcop-i2c.c
@@ -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;
 }
 
diff --git a/drivers/media/common/b2c2/flexcop-misc.c 
b/drivers/media/common/b2c2/flexcop-misc.c
index b8eff235367d..bb0d95fe64f9 100644
--- a/drivers/media/common/b2c2/flexcop-misc.c
+++ b/drivers/media/common/b2c2/flexcop-misc.c
@@ -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 "
-   "linux-...@linuxtv.org.",
+   err("unknown FlexCop Revision: %x. Please report this to 
linux-...@linuxtv.org.",
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. */
 }
 
diff --git 

[PATCH v2 07/58] cx18: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/pci/cx18/cx18-alsa-main.c 
b/drivers/media/pci/cx18/cx18-alsa-main.c
index 0b0e8015ad34..a2f80ed8684f 100644
--- a/drivers/media/pci/cx18/cx18-alsa-main.c
+++ b/drivers/media/pci/cx18/cx18-alsa-main.c
@@ -217,8 +217,8 @@ static int cx18_alsa_load(struct cx18 *cx)
 
s = >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;
 }
diff --git a/drivers/media/pci/cx18/cx18-av-core.c 
b/drivers/media/pci/cx18/cx18-av-core.c
index 30bbe8d1ea55..7f7306fd9a7f 100644
--- a/drivers/media/pci/cx18/cx18-av-core.c
+++ b/drivers/media/pci/cx18/cx18-av-core.c
@@ -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 / 800, (pll / 8) % 100);
 
-   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 "
-   

[PATCH v2 03/58] smiapp: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Acked-by: Sakari Ailus 
Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/i2c/smiapp/smiapp-regs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/smiapp/smiapp-regs.c 
b/drivers/media/i2c/smiapp/smiapp-regs.c
index 1e501c06d18c..d6779e35d36f 100644
--- a/drivers/media/i2c/smiapp/smiapp-regs.c
+++ b/drivers/media/i2c/smiapp/smiapp-regs.c
@@ -268,8 +268,8 @@ int smiapp_write_no_quirk(struct smiapp_sensor *sensor, u32 
reg, u32 val)
if (r == 1) {
if (retries)
dev_err(>dev,
-   "sensor i2c stall encountered. "
-   "retries: %d\n", retries);
+   "sensor i2c stall encountered. retries: 
%d\n",
+   retries);
return 0;
}
 
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 09/58] cx88: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/pci/cx88/cx88-alsa.c 
b/drivers/media/pci/cx88/cx88-alsa.c
index 723f06462104..c2efd14293bf 100644
--- a/drivers/media/pci/cx88/cx88-alsa.c
+++ b/drivers/media/pci/cx88/cx88-alsa.c
@@ -120,9 +120,7 @@ MODULE_AUTHOR("Mauro Carvalho Chehab 
");
 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(>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, _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));
 
diff --git a/drivers/media/pci/cx88/cx88-cards.c 
b/drivers/media/pci/cx88/cx88-cards.c
index 8f2556ec3971..31295b36dafc 100644
--- a/drivers/media/pci/cx88/cx88-cards.c
+++ b/drivers/media/pci/cx88/cx88-cards.c
@@ -2847,8 +2847,7 @@ static void leadtek_eeprom(struct cx88_core *core, u8 
*eeprom_data)

[PATCH v2 52/58] common: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/common/tveeprom.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/common/tveeprom.c b/drivers/media/common/tveeprom.c
index 47da0378cad8..e0e2cb706087 100644
--- a/drivers/media/common/tveeprom.c
+++ b/drivers/media/common/tveeprom.c
@@ -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;
}
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 04/58] soc_camera: don't break long lines

2016-10-18 Thread 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.


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 $_;
}


Signed-off-by: Mauro Carvalho Chehab 
---
 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(-)

diff --git a/drivers/media/i2c/soc_camera/ov772x.c 
b/drivers/media/i2c/soc_camera/ov772x.c
index 7e68762b3a4b..985a3672b243 100644
--- a/drivers/media/i2c/soc_camera/ov772x.c
+++ b/drivers/media/i2c/soc_camera/ov772x.c
@@ -1064,8 +1064,7 @@ static int ov772x_probe(struct i2c_client *client,
 
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) {
dev_err(>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;
}
 
diff --git a/drivers/media/i2c/soc_camera/ov9740.c 
b/drivers/media/i2c/soc_camera/ov9740.c
index 0da632d7d33a..f11f76cdacad 100644
--- a/drivers/media/i2c/soc_camera/ov9740.c
+++ b/drivers/media/i2c/soc_camera/ov9740.c
@@ -881,8 +881,7 @@ static int ov9740_video_probe(struct i2c_client *client)
goto done;
}
 
-   dev_info(>dev, "ov9740 Model ID 0x%04x, Revision 0x%02x, "
-"Manufacturer 0x%02x, SMIA Version 0x%02x\n",
+   dev_info(>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(>hdl);
diff --git a/drivers/media/i2c/soc_camera/tw9910.c 
b/drivers/media/i2c/soc_camera/tw9910.c
index 4002c07f3857..c9c49ed707b8 100644
--- a/drivers/media/i2c/soc_camera/tw9910.c
+++ b/drivers/media/i2c/soc_camera/tw9910.c
@@ -947,8 +947,7 @@ static int tw9910_probe(struct i2c_client *client,
 
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) {
dev_err(>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;
}
 
-- 
2.7.4


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 1/5] media: i2c: max2175: Add MAX2175 support

2016-10-18 Thread Laurent Pinchart
Hi Ramesh,

Thank you for the patch.

On Wednesday 12 Oct 2016 15:10:25 Ramesh Shanmugasundaram wrote:
> This patch adds driver support for MAX2175 chip. This is Maxim
> Integrated's RF to Bits tuner front end chip designed for software-defined
> radio solutions. This driver exposes the tuner as a sub-device instance
> with standard and custom controls to configure the device.
> 
> Signed-off-by: Ramesh Shanmugasundaram
>  ---
>  .../devicetree/bindings/media/i2c/max2175.txt  |   60 +
>  drivers/media/i2c/Kconfig  |4 +
>  drivers/media/i2c/Makefile |2 +
>  drivers/media/i2c/max2175/Kconfig  |8 +
>  drivers/media/i2c/max2175/Makefile |4 +
>  drivers/media/i2c/max2175/max2175.c| 1624 +
>  drivers/media/i2c/max2175/max2175.h|  124 ++
>  7 files changed, 1826 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/i2c/max2175.txt
>  create mode 100644 drivers/media/i2c/max2175/Kconfig
>  create mode 100644 drivers/media/i2c/max2175/Makefile
>  create mode 100644 drivers/media/i2c/max2175/max2175.c
>  create mode 100644 drivers/media/i2c/max2175/max2175.h
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/max2175.txt
> b/Documentation/devicetree/bindings/media/i2c/max2175.txt new file mode
> 100644
> index 000..2250d5f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/i2c/max2175.txt
> @@ -0,0 +1,60 @@
> +Maxim Integrated MAX2175 RF to Bits tuner
> +-
> +
> +The MAX2175 IC is an advanced analog/digital hybrid-radio receiver with
> +RF to Bits® front-end designed for software-defined radio solutions.
> +
> +Required properties:
> +
> +- compatible: "maxim,max2175" for MAX2175 RF-to-bits tuner.
> +- clocks: phandle to the fixed xtal clock.
> +- clock-names: name of the fixed xtal clock.
> +- port: video interface child port node of a tuner that defines the local

As Rob pointed out in his review of patch 3/5, this isn't video.

> +  and remote endpoints. The remote endpoint is assumed to be an SDR device
> +  that is capable of receiving the digital samples from the tuner.
> +
> +Optional properties:
> +
> +- maxim,slave   : empty property indicates this is a slave of 
another
> +  master tuner. This is used to define two tuners in
> +  diversity mode (1 master, 1 slave). By default each
> +  tuner is an individual master.

Would it be useful to make that property a phandle to the master tuner, to 
give drivers a way to access the master ? I haven't checked whether there 
could be use cases for that.

> +- maxim,refout-load: load capacitance value (in pF) on reference output
> +  drive level. The mapping of these load values to
> +  respective bit values are given below.
> +  0 - Reference output disabled
> +  1 - 10pF load
> +  2 - 20pF load
> +  3 - 30pF load
> +  4 - 40pF load
> +  5 - 60pF load
> +  6 - 70pF load

As Geert pointed out, you can simply specify the value in pF.

> +
> +Example:
> +
> +
> +Board specific DTS file
> +
> +/* Fixed XTAL clock node */
> +maxim_xtal: maximextal {
> + compatible = "fixed-clock";
> + #clock-cells = <0>;
> + clock-frequency = <36864000>;
> +};
> +
> +/* A tuner device instance under i2c bus */
> +max2175_0: tuner@60 {
> + #clock-cells = <0>;

Is the tuner a clock provider ? If it isn't you don't need this property.

> + compatible = "maxim,max2175";
> + reg = <0x60>;
> + clocks = <_xtal>;
> + clock-names = "xtal";
> + maxim,refout-load = <10>;
> +
> + port {
> + max2175_0_ep: endpoint {
> + remote-endpoint = <_rx_v4l2_sdr_device>;
> + };
> + };
> +
> +};

[snip]

> diff --git a/drivers/media/i2c/max2175/Makefile
> b/drivers/media/i2c/max2175/Makefile new file mode 100644
> index 000..9bb46ac
> --- /dev/null
> +++ b/drivers/media/i2c/max2175/Makefile
> @@ -0,0 +1,4 @@
> +#
> +# Makefile for Maxim RF to Bits tuner device
> +#
> +obj-$(CONFIG_SDR_MAX2175) += max2175.o

If there's a single source file you might want to move it to 
drivers/media/i2c/.

> diff --git a/drivers/media/i2c/max2175/max2175.c
> b/drivers/media/i2c/max2175/max2175.c new file mode 100644
> index 000..71b60c2
> --- /dev/null
> +++ b/drivers/media/i2c/max2175/max2175.c
> @@ -0,0 +1,1624 @@
> +/*
> + * Maxim Integrated MAX2175 RF to Bits tuner driver
> + *
> + * This driver & most of the hard coded values are based on the reference
> + * application delivered by Maxim for this chip.
> + *
> + * Copyright (C) 2016 Maxim Integrated Products
> + * Copyright (C) 2016 Renesas Electronics Corporation

Re: [RFC 5/5] doc_rst: media: New SDR formats SC16, SC18 & SC20

2016-10-18 Thread Laurent Pinchart
Hi Ramesh,

Thank you for the patch.

On Wednesday 12 Oct 2016 15:10:29 Ramesh Shanmugasundaram wrote:
> This patch adds documentation for the three new SDR formats
> 
> V4L2_SDR_FMT_SCU16BE
> V4L2_SDR_FMT_SCU18BE
> V4L2_SDR_FMT_SCU20BE
> 
> Signed-off-by: Ramesh Shanmugasundaram
>  ---
>  .../media/uapi/v4l/pixfmt-sdr-scu16be.rst  | 44 ++
>  .../media/uapi/v4l/pixfmt-sdr-scu18be.rst  | 48 +++
>  .../media/uapi/v4l/pixfmt-sdr-scu20be.rst  | 48 +++
>  Documentation/media/uapi/v4l/sdr-formats.rst   |  3 ++
>  4 files changed, 143 insertions(+)
>  create mode 100644 Documentation/media/uapi/v4l/pixfmt-sdr-scu16be.rst
>  create mode 100644 Documentation/media/uapi/v4l/pixfmt-sdr-scu18be.rst
>  create mode 100644 Documentation/media/uapi/v4l/pixfmt-sdr-scu20be.rst
> 
> diff --git a/Documentation/media/uapi/v4l/pixfmt-sdr-scu16be.rst
> b/Documentation/media/uapi/v4l/pixfmt-sdr-scu16be.rst new file mode 100644
> index 000..d6c2123
> --- /dev/null
> +++ b/Documentation/media/uapi/v4l/pixfmt-sdr-scu16be.rst
> @@ -0,0 +1,44 @@
> +.. -*- coding: utf-8; mode: rst -*-
> +
> +.. _V4L2-SDR-FMT-SCU16BE:
> +
> +**
> +V4L2_SDR_FMT_SCU16BE ('SCU16')

The value between parentheses is the ASCII representation of the 4CC, it 
should be SC16. Same comment for the other formats.

> +**
> +
> +Sliced complex unsigned 16-bit big endian IQ sample
> +
> +
> +Description
> +===
> +
> +This format contains a sequence of complex number samples. Each complex
> +number consist of two parts called In-phase and Quadrature (IQ). Both I
> +and Q are represented as a 16 bit unsigned big endian number. I value
> +starts first and Q value starts at an offset equalling half of the buffer
> +size. 14 bit data is stored in 16 bit space with unused stuffed bits
> +padded with 0.

Please specify here how the 14-bit numbers are aligned (i.e. padding in bits 
15:14 or bits 1:0 or any other strange option). Same comment for the other 
formats.

> +
> +**Byte Order.**
> +Each cell is one byte.
> +
> +
> +.. flat-table::
> +:header-rows:  0
> +:stub-columns: 0
> +
> +-  .. row 1

Please use the more compact table stable

* - start + 0:
  - I'\ :sub:`0[D13:D6]`
  ...

Same comment for the other formats.

> +
> +   -  start + 0:
> +
> +   -  I'\ :sub:`0[D13:D6]`
> +
> +   -  I'\ :sub:`0[D5:D0]`
> +
> +-  .. row 2
> +
> +   -  start + buffer_size/2:
> +
> +   -  Q'\ :sub:`0[D13:D6]`
> +
> +   -  Q'\ :sub:`0[D5:D0]`

The format looks planar, does it use one V4L2 plane (as does NV12) or two V4L2 
planes (as does NV12M) ? Same question for the other formats.

> diff --git a/Documentation/media/uapi/v4l/pixfmt-sdr-scu18be.rst
> b/Documentation/media/uapi/v4l/pixfmt-sdr-scu18be.rst new file mode 100644
> index 000..e6e0aff
> --- /dev/null
> +++ b/Documentation/media/uapi/v4l/pixfmt-sdr-scu18be.rst
> @@ -0,0 +1,48 @@
> +.. -*- coding: utf-8; mode: rst -*-
> +
> +.. _V4L2-SDR-FMT-SCU18BE:
> +
> +**
> +V4L2_SDR_FMT_SCU18BE ('SCU18')
> +**
> +
> +Sliced complex unsigned 18-bit big endian IQ sample
> +
> +
> +Description
> +===
> +
> +This format contains a sequence of complex number samples. Each complex
> +number consist of two parts called In-phase and Quadrature (IQ). Both I
> +and Q are represented as a 18 bit unsigned big endian number. I value
> +starts first and Q value starts at an offset equalling half of the buffer
> +size. 16 bit data is stored in 18 bit space with unused stuffed bits
> +padded with 0.

Your example below suggests that 18 bit data is stored in 24 bits. Similar 
comment for SCU20.

> +
> +**Byte Order.**
> +Each cell is one byte.
> +
> +
> +.. flat-table::
> +:header-rows:  0
> +:stub-columns: 0
> +
> +-  .. row 1
> +
> +   -  start + 0:
> +
> +   -  I'\ :sub:`0[D17:D10]`
> +
> +   -  I'\ :sub:`0[D9:D2]`
> +
> +   -  I'\ :sub:`0[D1:D0]`
> +
> +-  .. row 2
> +
> +   -  start + buffer_size/2:
> +
> +   -  Q'\ :sub:`0[D17:D10]`
> +
> +   -  Q'\ :sub:`0[D9:D2]`
> +
> +   -  Q'\ :sub:`0[D1:D0]`
> diff --git a/Documentation/media/uapi/v4l/pixfmt-sdr-scu20be.rst
> b/Documentation/media/uapi/v4l/pixfmt-sdr-scu20be.rst new file mode 100644
> index 000..374e0a3
> --- /dev/null
> +++ b/Documentation/media/uapi/v4l/pixfmt-sdr-scu20be.rst
> @@ -0,0 +1,48 @@
> +.. -*- coding: utf-8; mode: rst -*-
> +
> +.. _V4L2-SDR-FMT-SCU20BE:
> +
> +**
> +V4L2_SDR_FMT_SCU20BE ('SCU20')
> +**
> +
> +Sliced complex unsigned 20-bit big endian IQ sample
> +
> +
> +Description
> +===
> +
> +This format contains a sequence of complex number samples. Each complex
> +number consist of two parts called In-phase and Quadrature (IQ). Both I
> +and Q are 

Re: [PATCH v3 2/2] Add support for Omnivision OV5647

2016-10-18 Thread Pavel Machek
Hi!

> +/*
> + * A V4L2 driver for OmniVision OV5647 cameras.
> + *
> + * Based on Samsung S5K6AAFX SXGA 1/6" 1.3M CMOS Image Sensor driver
> + * Copyright (C) 2011 Sylwester Nawrocki 
> + *
> + * Based on Omnivision OV7670 Camera Driver
> + * Copyright (C) 2006-7 Jonathan Corbet 
> + *
> + * Copyright (C) 2016, Synopsys, Inc.
> + *
> + */

If you do copyrights, you should also specify license.

> +static bool debug;
> +module_param(debug, bool, 0644);
> +MODULE_PARM_DESC(debug, "Debug level (0-1)");

Please remove, we have generic infrastructure for debugging.

> +/*
> + * The ov5647 sits on i2c with ID 0x6c
> + */
> +#define OV5647_I2C_ADDR 0x6c
> +#define SENSOR_NAME "ov5647"
> +
> +#define OV5647_REG_CHIPID_H  0x300A
> +#define OV5647_REG_CHIPID_L  0x300B
> +
> +#define REG_TERM 0xfffe
> +#define VAL_TERM 0xfe
> +#define REG_DLY  0x
> +
> +/*define the voltage level of control signal*/

"/* ", " */".

> +#define CSI_STBY_ON  1
> +#define CSI_STBY_OFF 0
> +#define CSI_RST_ON   0
> +#define CSI_RST_OFF  1
> +#define CSI_PWR_ON   1
> +#define CSI_PWR_OFF  0
> +#define CSI_AF_PWR_ON1
> +#define CSI_AF_PWR_OFF   0
...
> +enum power_seq_cmd {
> + CSI_SUBDEV_PWR_OFF = 0x00,
> + CSI_SUBDEV_PWR_ON = 0x01,
> +};

Pick one style for defines/enums?

> +struct regval_list {
> + uint16_t addr;
> + uint8_t data;
> +};

u8/u16?

> +/**
> +* @short I2C Write operation
> +* @param[in] i2c_client I2C client
> +* @param[in] reg register address
> +* @param[in] val value to write
> +* @return Error code
> +*/

" *"?

> +static int ov5647_write(struct v4l2_subdev *sd, uint16_t reg, uint8_t val)
> +{
> + int ret;
> + unsigned char data[3] = { reg >> 8, reg & 0xff, val};

" }".

> +static int ov5647_write_array(struct v4l2_subdev *subdev,
> + struct regval_list *regs, int array_size)
> +{
> + int i = 0;
> + int ret = 0;
> +
> + if (!regs)
> + return -EINVAL;
> +
> + while (i < array_size) {
> + if (regs->addr == REG_DLY)
> + mdelay(regs->data);
> + else
> + ret = ov5647_write(subdev, regs->addr, regs->data);

The "REG_DLY" is never used AFAICT? Remove?

> + if (ret == -EIO)
> + return ret;
> +

ov5647_write() can return errors other then EIO. Are they handled correctly?

> +/**
> + * @short Set SW standby
> + * @param[in] subdev v4l2 subdev
> + * @param[in] on_off standby on or off
> + * @return Error code
> + */
> +static int sensor_s_sw_stby(struct v4l2_subdev *subdev, int on_off)
> +{
> + int ret;
> + unsigned char rdval;
> +
> + ret = ov5647_read(subdev, 0x0100, );
> + if (ret != 0)
> + return ret;
> +
> + if (on_off == CSI_STBY_ON)
> + ret = ov5647_write(subdev, 0x0100, rdval&0xfe);
> +
> + else
> + ret = ov5647_write(subdev, 0x0100, rdval|0x01);

I'd get rid of CSI_STBY_ON, and convert arg to bool, as you don't
really handle other values. Plus, naming it "set_sw_standby()" would
make core slightly more readable. Also kill the empty line before
else.

> +/**
> +* @short Initialize sensor
> +* @param[in] subdev v4l2 subdev
> +* @param[in] val not used
> +* @return Error code
> +*/
> +static int __sensor_init(struct v4l2_subdev *subdev)
> +{
> + int ret;
> + uint8_t resetval;
> + unsigned char rdval;

u8 for both?

> + ov5647_read(subdev, 0x0100, );
> + if (!resetval&0x01) {
> + v4l2_dbg(1, debug, subdev,
> + "DEVICE WAS IN SOFTWARE STANDBY");

No shouting please? If it is important maybe it should have higher
priority?

> +static int sensor_power(struct v4l2_subdev *subdev, int on)
> +{
> + int ret;
> + struct ov5647 *ov5647 = to_state(subdev);
> +
> + ret = 0;
> + mutex_lock(>lock);
> +
> + switch (on) {
> + case CSI_SUBDEV_PWR_OFF:
...
> + case CSI_SUBDEV_PWR_ON:
...
> + default:
> + return -EINVAL;
> + }
> +
> + mutex_unlock(>lock);

I'd really convert this to bool. Note how it returns with lock held?


> +int ov5647_detect(struct v4l2_subdev *sd)
> +{
> + unsigned char v;
> + int ret;
> +
> + ret = sensor_power(sd, 1);
> + if (ret < 0)
> + return ret;
> + ret = ov5647_read(sd, OV5647_REG_CHIPID_H, );
> + if (ret < 0)
> + return ret;
> + if (v != 0x56) /* OV manuf. id. */
> + return -ENODEV;
> + ret = ov5647_read(sd, OV5647_REG_CHIPID_L, );
> + if (ret < 0)
> + return ret;
> + if (v != 0x47)
> + return -ENODEV;

I guess invalid chipid deserves a printk?

> +* Refer to Linux errors.

Useful?

> +/**
> +* @short of_device_id structure
> +*/
> +static const struct i2c_device_id ov5647_id[] = {

Umm. The comment looks useless and wrong.


Re: [RFC 3/5] media: platform: rcar_drif: Add DRIF support

2016-10-18 Thread Laurent Pinchart
Hello,

On Tuesday 18 Oct 2016 16:29:24 Geert Uytterhoeven wrote:
> On Wed, Oct 12, 2016 at 4:10 PM, Ramesh Shanmugasundaram wrote:
> > This patch adds Digital Radio Interface (DRIF) support to R-Car Gen3 SoCs.
> > The driver exposes each instance of DRIF as a V4L2 SDR device. A DRIF
> > device represents a channel and each channel can have one or two
> > sub-channels respectively depending on the target board.
> > 
> > DRIF supports only Rx functionality. It receives samples from a RF
> > frontend tuner chip it is interfaced with. The combination of DRIF and the
> > tuner device, which is registered as a sub-device, determines the receive
> > sample rate and format.
> > 
> > In order to be compliant as a V4L2 SDR device, DRIF needs to bind with
> > the tuner device, which can be provided by a third party vendor. DRIF acts
> > as a slave device and the tuner device acts as a master transmitting the
> > samples. The driver allows asynchronous binding of a tuner device that
> > is registered as a v4l2 sub-device. The driver can learn about the tuner
> > it is interfaced with based on port endpoint properties of the device in
> > device tree. The V4L2 SDR device inherits the controls exposed by the
> > tuner device.
> > 
> > The device can also be configured to use either one or both of the data
> > pins at runtime based on the master (tuner) configuration.
> 
> Thanks for your patch!
> 
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/media/renesas,drif.txt
> > @@ -0,0 +1,109 @@
> > +Renesas R-Car Gen3 DRIF controller (DRIF)
> > +-
> > +
> > +Required properties:
> > +
> > +- compatible: "renesas,drif-r8a7795" if DRIF controller is a part of
> > R8A7795 SoC.
>
> "renesas,r8a7795-drif", as Rob already pointed out.
> 
> > + "renesas,rcar-gen3-drif" for a generic R-Car Gen3 compatible
> > device.
> > + When compatible with the generic version, nodes must list
> > the
> > + SoC-specific version corresponding to the platform first
> > + followed by the generic version.
> > +
> > +- reg: offset and length of each sub-channel.
> > +- interrupts: associated with each sub-channel.
> > +- clocks: phandles and clock specifiers for each sub-channel.
> > +- clock-names: clock input name strings: "fck0", "fck1".
> > +- pinctrl-0: pin control group to be used for this controller.
> > +- pinctrl-names: must be "default".
> > +- dmas: phandles to the DMA channels for each sub-channel.
> > +- dma-names: names for the DMA channels: "rx0", "rx1".
> > +
> > +Required child nodes:
> > +-
> > +- Each DRIF channel can have one or both of the sub-channels enabled in a
> > +  setup. The sub-channels are represented as a child node. The name of
> > the
> > +  child nodes are "sub-channel0" and "sub-channel1" respectively. Each
> > child
> > +  node supports the "status" property only, which is used to
> > enable/disable
> > +  the respective sub-channel.
> > 
> > +Example
> > +
> > +
> > +SoC common dtsi file
> > +
> > +drif0: rif@e6f4 {
> > +   compatible = "renesas,drif-r8a7795",
> > +  "renesas,rcar-gen3-drif";
> > +   reg = <0 0xe6f4 0 0x64>, <0 0xe6f5 0 0x64>;
> > +   interrupts = ,
> > +  ;
> > +   clocks = < CPG_MOD 515>, < CPG_MOD 514>;
> > +   clock-names = "fck0", "fck1";
> > +   dmas = < 0x20>, < 0x22>;
> > +   dma-names = "rx0", "rx1";
> 
> I could not find the DMAC channels in the datasheet?
> Most modules are either tied to dmac0, or two both dmac1 and dmac2.
> In the latter case, you want to list two sets of dmas, one for each DMAC.
> 
> > +   power-domains = < R8A7795_PD_ALWAYS_ON>;
> > +   status = "disabled";
> > +
> > +   sub-channel0 {
> > +   status = "disabled";
> > +   };
> > +
> > +   sub-channel1 {
> > +   status = "disabled";
> > +   };
> > +
> > +};
> 
> As you're modelling this in DT under a single device node, this means you
> cannot use runtime PM to manage the module clocks of the individual
> channels.
> 
> An alternative could be to have two separate nodes for each channel,
> and tie them together using a phandle.

A quick glance at the documentation shows no dependency between the two 
channels at a software level. They both share the same clock and 
synchronization input pins, but from a hardware point of view that seems to be 
it. It thus looks like we could indeed model the two channels as separate 
nodes, without tying them together.

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] kernel-cmd and tabs

2016-10-18 Thread Markus Heiser
Hi Mauro,

this patch adress the problems you reported with the kernel-cmd directive [1].
The problem was, that my nested parse didn't handled tabs well (sorry for being
slow-witted this morning ;-).

The patch is based on your git.linuxtv.org/mchehab/experimental.git lkml-books
branch.

[1] https://www.mail-archive.com/linux-doc@vger.kernel.org/msg06828.html

Markus Heiser (1):
  doc-rst: reST-directive kernel-cmd parse with tabs

 Documentation/sphinx/kernel_cmd.py | 17 +
 1 file changed, 13 insertions(+), 4 deletions(-)

-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] doc-rst: reST-directive kernel-cmd parse with tabs

2016-10-18 Thread Markus Heiser
Add a 'tab-width' option to the kernel-cmd, and convert
whitespace (tabs) well. The default 'tab-width' is 8.  This is also a
bugfix, since without this patch, tabs in command's output are not
handled.

Signed-off-by: Markus Heiser 
---
 Documentation/sphinx/kernel_cmd.py | 17 +
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/Documentation/sphinx/kernel_cmd.py 
b/Documentation/sphinx/kernel_cmd.py
index 43f02b0..bbe8fa9 100644
--- a/Documentation/sphinx/kernel_cmd.py
+++ b/Documentation/sphinx/kernel_cmd.py
@@ -27,6 +27,10 @@ u"""
 
 PATH=$(srctree)/scripts:$(srctree)/Documentation/sphinx:...
 
+``tab-width``
+
+  Tabulator width of output, default is 8.
+
 ``depends ``
 
   If the stdout of the command line depends on files, you can add them as
@@ -70,7 +74,7 @@ from sphinx.ext.autodoc import AutodocReporter
 
 from docutils import nodes
 from docutils.parsers.rst import Directive, directives
-from docutils.statemachine import ViewList
+from docutils import statemachine
 from docutils.utils.error_reporting import ErrorString
 
 
@@ -105,7 +109,8 @@ class KernelCmd(Directive):
 option_spec = {
 "depends"   : directives.unchanged,
 "code-block": directives.unchanged,
-"debug" : directives.flag
+"debug" : directives.flag,
+"tab-width" : directives.nonnegative_int
 }
 
 def warn(self, message, **replace):
@@ -148,6 +153,7 @@ class KernelCmd(Directive):
 shell_env["srctree"] = srctree
 
 lines = self.runCmd(cmd, shell=True, cwd=cwd, env=shell_env)
+
 nodeList = self.nestedParse(lines, fname)
 return nodeList
 
@@ -176,7 +182,7 @@ class KernelCmd(Directive):
 return unicode(out)
 
 def nestedParse(self, lines, fname):
-content = ViewList()
+content = statemachine.ViewList()
 node= nodes.section()
 
 if "code-block" in self.options:
@@ -191,7 +197,10 @@ class KernelCmd(Directive):
 code_block += "\n" + l
 lines = code_block + "\n\n"
 
-for c, l in enumerate(lines.split("\n")):
+tab_width = self.options.get('tab-width', 8)
+lines = statemachine.string2lines(lines, tab_width, 
convert_whitespace=True)
+
+for c, l in enumerate(lines):
 content.append(l, fname, c)
 
 buf  = self.state.memo.title_styles, self.state.memo.section_level, 
self.state.memo.reporter
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 22/57] [media] davinci: don't break long lines

2016-10-18 Thread Lad, Prabhakar
Hi Mauro,

Thanks for the patch.

On Fri, Oct 14, 2016 at 9:20 PM, Mauro Carvalho Chehab
 wrote:
> Due to the 80-cols 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. So, join those continuation
> lines.
>
> Signed-off-by: Mauro Carvalho Chehab 

Acked-by: Lad, Prabhakar 

Cheers,
--Prabhakar Lad
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] [media] vb2: Add support for use_dma_bidirectional queue flag

2016-10-18 Thread Thierry Escande

Hi Sakari,

On 17/10/2016 12:06, Sakari Ailus wrote:

Hi Thierry,

Thanks for the set. A few comments below.

On Fri, Oct 14, 2016 at 02:08:14PM +0200, Thierry Escande wrote:

From: Pawel Osciak 

When this flag is set for CAPTURE queues by the driver on calling
vb2_queue_init(), it forces the buffers on the queue to be
allocated/mapped with DMA_BIDIRECTIONAL direction flag, instead of
DMA_FROM_DEVICE. This allows the device not only to write to the
buffers, but also read out from them. This may be useful e.g. for codec
hardware, which may be using CAPTURE buffers as reference to decode
other buffers.


Just out of curiosity --- when do you return these buffers back to the user?
Once they're no longer needed as reference frames?
Tbh, I don't now. This is used by a rockchip vpu driver not yet 
upstreamed in the chromeos v4.4 kernel tree. Pawel might answer this 
question I guess.






This flag is ignored for OUTPUT queues, as we don't want to allow HW to
be able to write to OUTPUT buffers.

Signed-off-by: Pawel Osciak 
Tested-by: Pawel Osciak 
Reviewed-by: Tomasz Figa 
Signed-off-by: Thierry Escande 
---
 drivers/media/v4l2-core/videobuf2-v4l2.c | 8 ++--
 include/media/videobuf2-core.h   | 4 
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c 
b/drivers/media/v4l2-core/videobuf2-v4l2.c
index fde1e2d..9255291 100644
--- a/drivers/media/v4l2-core/videobuf2-v4l2.c
+++ b/drivers/media/v4l2-core/videobuf2-v4l2.c
@@ -659,8 +659,12 @@ int vb2_queue_init(struct vb2_queue *q)
 * queues will always initialize waiting_for_buffers to false.
 */
q->quirk_poll_must_check_waiting_for_buffers = true;
-   q->dma_dir = V4L2_TYPE_IS_OUTPUT(q->type)
-  ? DMA_TO_DEVICE : DMA_FROM_DEVICE;
+
+   if (V4L2_TYPE_IS_OUTPUT(q->type))
+   q->dma_dir = DMA_TO_DEVICE;
+   else
+   q->dma_dir = q->use_dma_bidirectional
+  ? DMA_BIDIRECTIONAL : DMA_FROM_DEVICE;

return vb2_core_queue_init(q);
 }
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
index 38410dd..e613c74 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -433,6 +433,9 @@ struct vb2_buf_ops {
  * @quirk_poll_must_check_waiting_for_buffers: Return POLLERR at poll when QBUF
  *  has not been called. This is a vb1 idiom that has been adopted
  *  also by vb2.
+ * @use_dma_bidirectional: use DMA_BIDIRECTIONAL for CAPTURE buffers; this
+ * allows HW to read from the CAPTURE buffers in
+ * addition to writing; ignored for OUTPUT queues
  * @lock:  pointer to a mutex that protects the vb2_queue struct. The
  * driver can set this to a mutex to let the v4l2 core serialize
  * the queuing ioctls. If the driver wants to handle locking
@@ -500,6 +503,7 @@ struct vb2_queue {
unsignedfileio_write_immediately:1;
unsignedallow_zero_bytesused:1;
unsigned   quirk_poll_must_check_waiting_for_buffers:1;
+   unsigneduse_dma_bidirectional:1;


This field is in the same struct as dma_dir which it directly affects.

How about adding a macro instead to give you the queue DMA direction
instead?

E.g.

#define vb2_dma_dir(q) \
(V4L2_TYPE_IS_OUTPUT((q)->type) ? DMA_TO_DEVICE : \
 (q)->use_dma_bidirectional ? DMA_BIDIRECTIONAL : DMA_FROM_DEVICE)

I would call this capture_dma_bidirectional as it only affects capture. Or
simply choose DMA_BIDIRECTIONAL whenever the flag is set.

Sure. Will do.

Regards,
 Thierry
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 3/3] ARM: dts: gose: add composite video input

2016-10-18 Thread Laurent Pinchart
Hi Ulrich,

(CC'ing the device tree mailing list - for real this time)

Thank you for the patch.

On Tuesday 18 Oct 2016 17:02:23 Ulrich Hecht wrote:
> Signed-off-by: Ulrich Hecht 
> ---
>  arch/arm/boot/dts/r8a7793-gose.dts | 36 ++
>  1 file changed, 36 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/r8a7793-gose.dts
> b/arch/arm/boot/dts/r8a7793-gose.dts index a47ea4b..2606021 100644
> --- a/arch/arm/boot/dts/r8a7793-gose.dts
> +++ b/arch/arm/boot/dts/r8a7793-gose.dts
> @@ -390,6 +390,11 @@
>   groups = "vin0_data24", "vin0_sync", "vin0_clkenb", 
"vin0_clk";
>   function = "vin0";
>   };
> +
> + vin1_pins: vin1 {
> + groups = "vin1_data8", "vin1_clk";
> + function = "vin1";
> + };
>  };
> 
>   {
> @@ -515,6 +520,19 @@
>   reg = <0x12>;
>   };
> 
> + composite-in@20 {
> + compatible = "adi,adv7180";
> + reg = <0x20>;
> + remote = <>;
> +
> + port {
> + adv7180: endpoint {
> + bus-width = <8>;
> + remote-endpoint = <>;
> + };
> + };

As explained before, you need to update the ADV7180 DT bindings first to 
document ports. I've discussed this with Hans last week, and we agreed that DT 
should model physical ports. Unfortunately the ADV7180 comes in four different 
packages with different feature sets that affect ports.

ADV7180  K CP32 Z   32-Lead Lead Frame Chip Scale Package
ADV7180  B CP32 Z   32-Lead Lead Frame Chip Scale Package
ADV7180 WB CP32 Z   32-Lead Lead Frame Chip Scale Package

ADV7180  B CP   Z   40-Lead Lead Frame Chip Scale Package
ADV7180 WB CP   Z   40-Lead Lead Frame Chip Scale Package

ADV7180  K ST48 Z   48-Lead Low Profile Quad Flat Package
ADV7180  B ST48 Z   48-Lead Low Profile Quad Flat Package
ADV7180 WB ST48 Z   48-Lead Low Profile Quad Flat Package

ADV7180  B ST   Z   64-Lead Low Profile Quad Flat Package
ADV7180 WB ST   Z   64-Lead Low Profile Quad Flat Package

W tells whether the part is qualified for automotive applications. It has no 
impact from a software point of view. K and B indicate the temperature range, 
and also have no software impact. The Z suffix indicates that the part is RoHS 
compliant (they all are) and also has no impact.

Unfortunately the W and K/B qualifiers come before the package qualifier. I'm 
not sure whether we could simply drop W, K/B and W and specify the following 
compatible strings

- adv7180cp32
- adv7180cp
- adv7180st48
- adv7180st

or if we need more compatible strings that would match the full chip name. 
Feedback on that from the device tree maintainers would be appreciated.

Regardless of what compatible strings end up being used, the bindings should 
document 3 or 6 input ports depending on the model, and one output port. You 
can number the input ports from 0 to 2 or 0 to 5 depending on the model and 
the output port 3 or 6. Another option would be to number the output port 0 
and the input ports 1 to 3 or 1 to 6 depending on the model. That would give a 
fixed number for the output port across all models, but might be a bit 
consuming as most bindings number input ports before output ports.

For the Gose board you should then add one composite connector to the device 
tree ("composite-video-connector") and connect it to port 0 of the 
ADV7180WBCP32.

> + };
> +
>   hdmi@39 {
>   compatible = "adi,adv7511w";
>   reg = <0x39>;
> @@ -622,3 +640,21 @@
>   };
>   };
>  };
> +
> +/* composite video input */
> + {
> + pinctrl-0 = <_pins>;
> + pinctrl-names = "default";
> +
> + status = "okay";
> +
> + port {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + vin1ep: endpoint {
> + remote-endpoint = <>;
> + bus-width = <8>;
> + };
> + };
> +};

-- 
Regards,

Laurent Pinchart
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 3/3] ARM: dts: gose: add composite video input

2016-10-18 Thread Laurent Pinchart
Hi Ulrich,

(CC'ing the device tree mailing list)

Thank you for the patch.

On Tuesday 18 Oct 2016 17:02:23 Ulrich Hecht wrote:
> Signed-off-by: Ulrich Hecht 
> ---
>  arch/arm/boot/dts/r8a7793-gose.dts | 36 ++
>  1 file changed, 36 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/r8a7793-gose.dts
> b/arch/arm/boot/dts/r8a7793-gose.dts index a47ea4b..2606021 100644
> --- a/arch/arm/boot/dts/r8a7793-gose.dts
> +++ b/arch/arm/boot/dts/r8a7793-gose.dts
> @@ -390,6 +390,11 @@
>   groups = "vin0_data24", "vin0_sync", "vin0_clkenb", 
"vin0_clk";
>   function = "vin0";
>   };
> +
> + vin1_pins: vin1 {
> + groups = "vin1_data8", "vin1_clk";
> + function = "vin1";
> + };
>  };
> 
>   {
> @@ -515,6 +520,19 @@
>   reg = <0x12>;
>   };
> 
> + composite-in@20 {
> + compatible = "adi,adv7180";
> + reg = <0x20>;
> + remote = <>;
> +
> + port {
> + adv7180: endpoint {
> + bus-width = <8>;
> + remote-endpoint = <>;
> + };
> + };

As explained before, you need to update the ADV7180 DT bindings first to 
document ports. I've discussed this with Hans last week, and we agreed that DT 
should model physical ports. Unfortunately the ADV7180 comes in four different 
packages with different feature sets that affect ports.

ADV7180  K CP32 Z   32-Lead Lead Frame Chip Scale Package
ADV7180  B CP32 Z   32-Lead Lead Frame Chip Scale Package
ADV7180 WB CP32 Z   32-Lead Lead Frame Chip Scale Package

ADV7180  B CP   Z   40-Lead Lead Frame Chip Scale Package
ADV7180 WB CP   Z   40-Lead Lead Frame Chip Scale Package

ADV7180  K ST48 Z   48-Lead Low Profile Quad Flat Package
ADV7180  B ST48 Z   48-Lead Low Profile Quad Flat Package
ADV7180 WB ST48 Z   48-Lead Low Profile Quad Flat Package

ADV7180  B ST   Z   64-Lead Low Profile Quad Flat Package
ADV7180 WB ST   Z   64-Lead Low Profile Quad Flat Package

W tells whether the part is qualified for automotive applications. It has no 
impact from a software point of view. K and B indicate the temperature range, 
and also have no software impact. The Z suffix indicates that the part is RoHS 
compliant (they all are) and also has no impact.

Unfortunately the W and K/B qualifiers come before the package qualifier. I'm 
not sure whether we could simply drop W, K/B and W and specify the following 
compatible strings

- adv7180cp32
- adv7180cp
- adv7180st48
- adv7180st

or if we need more compatible strings that would match the full chip name. 
Feedback on that from the device tree maintainers would be appreciated.

Regardless of what compatible strings end up being used, the bindings should 
document 3 or 6 input ports depending on the model, and one output port. You 
can number the input ports from 0 to 2 or 0 to 5 depending on the model and 
the output port 3 or 6. Another option would be to number the output port 0 
and the input ports 1 to 3 or 1 to 6 depending on the model. That would give a 
fixed number for the output port across all models, but might be a bit 
consuming as most bindings number input ports before output ports.

For the Gose board you should then add one composite connector to the device 
tree ("composite-video-connector") and connect it to port 0 of the 
ADV7180WBCP32.

> + };
> +
>   hdmi@39 {
>   compatible = "adi,adv7511w";
>   reg = <0x39>;
> @@ -622,3 +640,21 @@
>   };
>   };
>  };
> +
> +/* composite video input */
> + {
> + pinctrl-0 = <_pins>;
> + pinctrl-names = "default";
> +
> + status = "okay";
> +
> + port {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + vin1ep: endpoint {
> + remote-endpoint = <>;
> + bus-width = <8>;
> + };
> + };
> +};

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags

2016-10-18 Thread Michal Hocko
On Thu 13-10-16 01:20:10, Lorenzo Stoakes wrote:
> This patch series adjusts functions in the get_user_pages* family such that
> desired FOLL_* flags are passed as an argument rather than implied by flags.
> 
> The purpose of this change is to make the use of FOLL_FORCE explicit so it is
> easier to grep for and clearer to callers that this flag is being used. The 
> use
> of FOLL_FORCE is an issue as it overrides missing VM_READ/VM_WRITE flags for 
> the
> VMA whose pages we are reading from/writing to, which can result in surprising
> behaviour.
> 
> The patch series came out of the discussion around commit 38e0885, which
> addressed a BUG_ON() being triggered when a page was faulted in with PROT_NONE
> set but having been overridden by FOLL_FORCE. do_numa_page() was run on the
> assumption the page _must_ be one marked for NUMA node migration as an actual
> PROT_NONE page would have been dealt with prior to this code path, however
> FOLL_FORCE introduced a situation where this assumption did not hold.
> 
> See https://marc.info/?l=linux-mm=147585445805166 for the patch proposal.

I like this cleanup. Tracking FOLL_FORCE users was always a nightmare
and the flag behavior is really subtle so we should better be explicit
about it. I haven't gone through each patch separately but rather
applied the whole series and checked the resulting diff. This all seems
OK to me and feel free to add
Acked-by: Michal Hocko 

I am wondering whether we can go further. E.g. it is not really clear to
me whether we need an explicit FOLL_REMOTE when we can in fact check
mm != current->mm and imply that. Maybe there are some contexts which
wouldn't work, I haven't checked.

Then I am also wondering about FOLL_TOUCH behavior.
__get_user_pages_unlocked has only few callers which used to be
get_user_pages_unlocked before 1e9877902dc7e ("mm/gup: Introduce
get_user_pages_remote()"). To me a dropped FOLL_TOUCH seems
unintentional. Now that get_user_pages_unlocked has gup_flags argument I
guess we might want to get rid of the __g-u-p-u version altogether, no?

__get_user_pages is quite low level and imho shouldn't be exported. It's
only user - kvm - should rather pull those two functions to gup instead
and export them. There is nothing really KVM specific in them.

I also cannot say I would be entirely thrilled about get_user_pages_locked,
we only have one user which can simply do lock g-u-p unlock AFAICS.

I guess there is more work in that area and I do not want to impose all
that work on you, but I couldn't resist once I saw you playing in that
area ;) Definitely a good start!
-- 
Michal Hocko
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 2/3] ARM: dts: gose: add HDMI input

2016-10-18 Thread Laurent Pinchart
Hi Ulrich,

Thank you for the patch.

On Tuesday 18 Oct 2016 17:02:22 Ulrich Hecht wrote:
> Identical to the setup on Lager.

You probably mean on Koelsch ?

> Signed-off-by: Ulrich Hecht 
> ---
>  arch/arm/boot/dts/r8a7793-gose.dts | 64 +++
>  1 file changed, 64 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/r8a7793-gose.dts
> b/arch/arm/boot/dts/r8a7793-gose.dts index dc311eb..a47ea4b 100644
> --- a/arch/arm/boot/dts/r8a7793-gose.dts
> +++ b/arch/arm/boot/dts/r8a7793-gose.dts
> @@ -253,6 +253,17 @@
>   };
>   };
> 
> + hdmi-in {
> + compatible = "hdmi-connector";
> + type = "a";
> +
> + port {
> + hdmi_con_in: endpoint {
> + remote-endpoint = <_in>;
> + };
> + };
> + };
> +
>   hdmi-out {
>   compatible = "hdmi-connector";
>   type = "a";

For consistency you might want to rename the hdmi-out endpoint like you did 
for Lager and Koelsch.

With that fixed,

Reviewed-by: Laurent Pinchart 

> @@ -374,6 +385,11 @@
>   groups = "audio_clk_a";
>   function = "audio_clk";
>   };
> +
> + vin0_pins: vin0 {
> + groups = "vin0_data24", "vin0_sync", "vin0_clkenb", 
"vin0_clk";
> + function = "vin0";
> + };
>  };
> 
>   {
> @@ -531,6 +547,33 @@
>   };
>   };
> 
> + hdmi-in@4c {
> + compatible = "adi,adv7612";
> + reg = <0x4c>;
> + interrupt-parent = <>;
> + interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
> + default-input = <0>;
> +
> + port {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + port@0 {
> + reg = <0>;
> + adv7612_in: endpoint {
> + remote-endpoint = <_con_in>;
> + };
> + };
> +
> + port@2 {
> + reg = <2>;
> + adv7612_out: endpoint {
> + remote-endpoint = <>;
> + };
> + };
> + };
> + };
> +
>   eeprom@50 {
>   compatible = "renesas,r1ex24002", "atmel,24c02";
>   reg = <0x50>;
> @@ -558,3 +601,24 @@
>   {
>   shared-pin;
>  };
> +
> +/* HDMI video input */
> + {
> + status = "okay";
> + pinctrl-0 = <_pins>;
> + pinctrl-names = "default";
> +
> + port {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + vin0ep2: endpoint {
> + remote-endpoint = <_out>;
> + bus-width = <24>;
> + hsync-active = <0>;
> + vsync-active = <0>;
> + pclk-sample = <1>;
> + data-active = <1>;
> + };
> + };
> +};

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 1/3] ARM: dts: r8a7793: Enable VIN0-VIN2

2016-10-18 Thread Laurent Pinchart
Hi Ulrich,

Thank you for the patch.

On Tuesday 18 Oct 2016 17:02:21 Ulrich Hecht wrote:
> Signed-off-by: Ulrich Hecht 

Reviewed-by: Laurent Pinchart 

> ---
>  arch/arm/boot/dts/r8a7793.dtsi | 27 +++
>  1 file changed, 27 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi
> index a7d11b9..629d3d6 100644
> --- a/arch/arm/boot/dts/r8a7793.dtsi
> +++ b/arch/arm/boot/dts/r8a7793.dtsi
> @@ -852,6 +852,33 @@
>   status = "disabled";
>   };
> 
> + vin0: video@e6ef {
> + compatible = "renesas,vin-r8a7793", "renesas,rcar-gen2-vin";
> + reg = <0 0xe6ef 0 0x1000>;
> + interrupts = ;
> + clocks = <_clks R8A7793_CLK_VIN0>;
> + power-domains = < R8A7793_PD_ALWAYS_ON>;
> + status = "disabled";
> + };
> +
> + vin1: video@e6ef1000 {
> + compatible = "renesas,vin-r8a7793", "renesas,rcar-gen2-vin";
> + reg = <0 0xe6ef1000 0 0x1000>;
> + interrupts = ;
> + clocks = <_clks R8A7793_CLK_VIN1>;
> + power-domains = < R8A7793_PD_ALWAYS_ON>;
> + status = "disabled";
> + };
> +
> + vin2: video@e6ef2000 {
> + compatible = "renesas,vin-r8a7793", "renesas,rcar-gen2-vin";
> + reg = <0 0xe6ef2000 0 0x1000>;
> + interrupts = ;
> + clocks = <_clks R8A7793_CLK_VIN2>;
> + power-domains = < R8A7793_PD_ALWAYS_ON>;
> + status = "disabled";
> + };
> +
>   qspi: spi@e6b1 {
>   compatible = "renesas,qspi-r8a7793", "renesas,qspi";
>   reg = <0 0xe6b1 0 0x2c>;

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/2] Renesas Lager/Koelsch HDMI input

2016-10-18 Thread Laurent Pinchart
Hi Ulrich,

Thank you for the patches.

For the whole series,

Reviewed-by: Laurent Pinchart 

On Tuesday 18 Oct 2016 17:01:32 Ulrich Hecht wrote:
> Hi!
> 
> This series enables HDMI input on the Lager and Koelsch boards.
> It sits on renesas-next-20161017-v4.9-rc1.
> 
> I have tried to address all concerns raised by reviewers (correctly, I
> hope), see below for details.
> 
> CU
> Uli
>  
> Changes since v1:
> - modeled decoder inputs/outputs and connectors
> - removed unnecessary "remote" nodes
> - r8a7790-lager.dts: "ok" -> "okay"
> - r8a7791-koelsch.dts: set ADV7612 interrupt to GP4_2 
> 
> Hans Verkuil (1):
>   ARM: dts: koelsch: add HDMI input
> 
> William Towle (1):
>   ARM: dts: lager: Add entries for VIN HDMI input support
> 
> arch/arm/boot/dts/r8a7790-lager.dts   | 66 ++--
> arch/arm/boot/dts/r8a7791-koelsch.dts | 68 ++--
> 2 files changed, 130 insertions(+), 4 deletions(-)

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [RFC 3/5] media: platform: rcar_drif: Add DRIF support

2016-10-18 Thread Ramesh Shanmugasundaram
Hi Rob,

Thank you for the review comments.

> Subject: Re: [RFC 3/5] media: platform: rcar_drif: Add DRIF support
> 
> On Wed, Oct 12, 2016 at 03:10:27PM +0100, Ramesh Shanmugasundaram wrote:
> > This patch adds Digital Radio Interface (DRIF) support to R-Car Gen3
> SoCs.
> > The driver exposes each instance of DRIF as a V4L2 SDR device. A DRIF
> > device represents a channel and each channel can have one or two
> > sub-channels respectively depending on the target board.
> >
> > DRIF supports only Rx functionality. It receives samples from a RF
> > frontend tuner chip it is interfaced with. The combination of DRIF and
> > the tuner device, which is registered as a sub-device, determines the
> > receive sample rate and format.
> >
> > In order to be compliant as a V4L2 SDR device, DRIF needs to bind with
> > the tuner device, which can be provided by a third party vendor. DRIF
> > acts as a slave device and the tuner device acts as a master
> > transmitting the samples. The driver allows asynchronous binding of a
> > tuner device that is registered as a v4l2 sub-device. The driver can
> > learn about the tuner it is interfaced with based on port endpoint
> > properties of the device in device tree. The V4L2 SDR device inherits
> > the controls exposed by the tuner device.
> >
> > The device can also be configured to use either one or both of the
> > data pins at runtime based on the master (tuner) configuration.
> >
> > Signed-off-by: Ramesh Shanmugasundaram
> > 
> > ---
> >  .../devicetree/bindings/media/renesas,drif.txt |  109 ++
> >  drivers/media/platform/Kconfig |   25 +
> >  drivers/media/platform/Makefile|1 +
> >  drivers/media/platform/rcar_drif.c | 1534
> 
> >  4 files changed, 1669 insertions(+)
> >  create mode 100644
> > Documentation/devicetree/bindings/media/renesas,drif.txt
> >  create mode 100644 drivers/media/platform/rcar_drif.c
> >
> > diff --git a/Documentation/devicetree/bindings/media/renesas,drif.txt
> > b/Documentation/devicetree/bindings/media/renesas,drif.txt
> > new file mode 100644
> > index 000..24239d9
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/media/renesas,drif.txt
> > @@ -0,0 +1,109 @@
> > +Renesas R-Car Gen3 DRIF controller (DRIF)
> 
> Define what is DRIF here, not just in the commit text.

Agreed.

> 
> > +-
> > +
> > +Required properties:
> > +
> > +- compatible: "renesas,drif-r8a7795" if DRIF controller is a part of
> R8A7795 SoC.
> 
> renesas,r8a7795-drif would be the normal ordering.

Agreed.

> 
> > + "renesas,rcar-gen3-drif" for a generic R-Car Gen3 compatible
> device.
> > + When compatible with the generic version, nodes must list the
> > + SoC-specific version corresponding to the platform first
> > + followed by the generic version.
> > +
> > +- reg: offset and length of each sub-channel.
> > +- interrupts: associated with each sub-channel.
> > +- clocks: phandles and clock specifiers for each sub-channel.
> > +- clock-names: clock input name strings: "fck0", "fck1".
> > +- pinctrl-0: pin control group to be used for this controller.
> > +- pinctrl-names: must be "default".
> > +- dmas: phandles to the DMA channels for each sub-channel.
> > +- dma-names: names for the DMA channels: "rx0", "rx1".
> > +
> > +Required child nodes:
> > +-
> > +- Each DRIF channel can have one or both of the sub-channels enabled
> > +in a
> > +  setup. The sub-channels are represented as a child node. The name
> > +of the
> > +  child nodes are "sub-channel0" and "sub-channel1" respectively.
> > +Each child
> > +  node supports the "status" property only, which is used to
> > +enable/disable
> > +  the respective sub-channel.
> > +
> > +Optional properties:
> > +
> > +- port: video interface child port node of a channel that defines the
> > +local
> 
> This is an audio device, why does it have a video port?

Apologies for the wording. I intend to refer a regular port node like mentioned 
here - https://www.kernel.org/doc/Documentation/devicetree/bindings/graph.txt

> 
> > +  and remote endpoints. The remote endpoint is assumed to a tuner
> > +subdevice
> > +  endpoint.
> > +- power-domains: phandle to respective power domain.
> > +- renesas,syncmd   : sync mode
> > +0 (Frame start sync pulse mode. 1-bit width pulse
> > +   indicates start of a frame)
> > +1 (L/R sync or I2S mode) (default)
> > +- renesas,lsb-first: empty property indicates lsb bit is received
> first.
> > +When not defined msb bit is received first (default)
> > +- renesas,syncac-pol-high  : empty property indicates sync signal
> polarity.
> > +When defined, active high or high->low sync signal.
> > +When not 

[PATCH 1/1] doc-rst: v4l: Add documentation on CSI-2 bus configuration

2016-10-18 Thread Sakari Ailus
Document the interface between the CSI-2 transmitter and receiver drivers.

Signed-off-by: Sakari Ailus 
---
Hi folks,

We've got multiple CSI-2 tranmitter and receiver drivers currently in the
kernel. Some receivers require information on dynamic bus parameters and
some of the transmitter drivers implement that. It's time to document what
is expected of both so we will not end up with multiple non-interoperable
implementations.

Regards,
Sakari

 Documentation/media/kapi/csi2.rst  | 35 +++
 Documentation/media/media_kapi.rst |  1 +
 2 files changed, 36 insertions(+)
 create mode 100644 Documentation/media/kapi/csi2.rst

diff --git a/Documentation/media/kapi/csi2.rst 
b/Documentation/media/kapi/csi2.rst
new file mode 100644
index 000..856a509
--- /dev/null
+++ b/Documentation/media/kapi/csi2.rst
@@ -0,0 +1,35 @@
+MIPI CSI-2
+==
+
+CSI-2 is a data bus intended for transferring images from cameras to
+the host SoC. It is defined by the `MIPI alliance`_.
+
+.. _`MIPI alliance`: http://www.mipi.org/
+
+Transmitter drivers
+---
+
+CSI-2 transmitter, such as a sensor or a TV tuner, drivers need to
+provide the CSI-2 receiver with information on the CSI-2 bus
+configuration. These include the V4L2_CID_LINK_FREQ control and
+(:c:type:`v4l2_subdev_video_ops`->s_stream() callback). Both must be
+present on the sub-device represents the CSI-2 transmitter. The
+V4L2_CID_LINK_FREQ control is used to tell the receiver driver the
+frequency (and not the symbol rate) of the link and the
+:c:type:`v4l2_subdev_video_ops`->s_stream() callback provides an
+ability to start and stop the stream.
+
+The transmitter drivers must configure the CSI-2 transmitter to *LP-11
+mode* whenever the transmitter is powered on but not active. Some
+transmitters do this automatically but some have to be explicitly
+programmed to do so.
+
+Receiver drivers
+
+
+Before the receiver driver may enable the CSI-2 transmitter by using
+the :c:type:`v4l2_subdev_video_ops`->s_stream(), it must have powered
+the transmitter up by using the
+:c:type:`v4l2_subdev_core_ops`->s_power() callback. This may take
+place either indirectly by using :c:func:`v4l2_pipeline_pm_use` or
+directly.
diff --git a/Documentation/media/media_kapi.rst 
b/Documentation/media/media_kapi.rst
index f282ca2..bc06389 100644
--- a/Documentation/media/media_kapi.rst
+++ b/Documentation/media/media_kapi.rst
@@ -33,3 +33,4 @@ For more details see the file COPYING in the source 
distribution of Linux.
 kapi/rc-core
 kapi/mc-core
 kapi/cec-core
+kapi/csi2
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [RFC 1/5] media: i2c: max2175: Add MAX2175 support

2016-10-18 Thread Ramesh Shanmugasundaram
Hi Geert,

Thank you for the review. 

> Subject: Re: [RFC 1/5] media: i2c: max2175: Add MAX2175 support
> 
[...]
> 
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/media/i2c/max2175.txt
> > @@ -0,0 +1,60 @@
> > +Maxim Integrated MAX2175 RF to Bits tuner
> > +-
> > +
> > +The MAX2175 IC is an advanced analog/digital hybrid-radio receiver
> > +with RF to Bits® front-end designed for software-defined radio
> solutions.
> > +
> > +Required properties:
> > +
> > +- compatible: "maxim,max2175" for MAX2175 RF-to-bits tuner.
> > +- clocks: phandle to the fixed xtal clock.
> > +- clock-names: name of the fixed xtal clock.
> > +- port: video interface child port node of a tuner that defines the
> > +local
> > +  and remote endpoints. The remote endpoint is assumed to be an SDR
> > +device
> > +  that is capable of receiving the digital samples from the tuner.
> > +
> > +Optional properties:
> > +
> > +- maxim,slave : empty property indicates this is a slave of another
> > +master tuner. This is used to define two tuners in
> > +diversity mode (1 master, 1 slave). By default each
> > +tuner is an individual master.
> > +- maxim,refout-load: load capacitance value (in pF) on reference output
> > +drive level. The mapping of these load values to
> > +respective bit values are given below.
> > +0 - Reference output disabled
> > +1 - 10pF load
> > +2 - 20pF load
> > +3 - 30pF load
> > +4 - 40pF load
> > +5 - 60pF load
> > +6 - 70pF load
> 
> For properties involving units, usually the unit is made part of the
> property name, e.g. maxim,refout-load-pF = 40.
> This avoids confusion, and allows for extension later.

Agreed. I have modified it as

- maxim,refout-load-pF: load capacitance value (in pF) on reference
output drive level. The default is refout disabled
or no load. The possible load values are 
10pF
20pF
30pF
40pF
60pF
70pF

> 
> > +/* A tuner device instance under i2c bus */
> > +max2175_0: tuner@60 {
> > +   #clock-cells = <0>;
> > +   compatible = "maxim,max2175";
> > +   reg = <0x60>;
> > +   clocks = <_xtal>;
> > +   clock-names = "xtal";
> > +   maxim,refout-load = <10>;
> 
> 10 is not listed above. Perhaps you meant 10 pF?

Yes.

> 
> > --- /dev/null
> > +++ b/drivers/media/i2c/max2175/max2175.c
> > @@ -0,0 +1,1624 @@
> 
> > +/* NOTE: Any addition/deletion in the below list should be reflected
> > +in
> > + * max2175_modetag enum
> > + */
> 
> You can drop the above comment if you make this explicit using C99
> designated initializers, cfr. below.
> 
> > +static const struct max2175_rxmode eu_rx_modes[] = { /* Indexed by EU
> modetag */
> > +   /* EU modes */
> > +   { MAX2175_BAND_VHF, 18264, 0, { 0, 0, 0, 0 } },
> 
> [MAX2175_DAB_1_2] = { MAX2175_BAND_VHF, 18264, 0, { 0, 0, 0, 0 } },
> 
> > +};
> > +
> > +static const struct max2175_rxmode na_rx_modes[] = { /* Indexed by NA
> modetag */
> > +   /* NA modes */
> > +   { MAX2175_BAND_FM, 98255520, 1, { 0, 0, 0, 0 } },
> 
> [MAX2175_NA_FM_1_0] = { MAX2175_BAND_FM, 98255520, 1, { 0, 0, 0, 0 } },
> 

Thank you. Using designated initializers now.

> > +struct max2175_ctx {
> > +   struct v4l2_subdev sd;
> > +   struct i2c_client *client;
> > +   struct device *dev;
> > +
> > +   /* Cached configuration */
> > +   u8 regs[256];
> > +   enum max2175_modetag mode;  /* Receive mode tag */
> > +   u32 freq;   /* In Hz */
> > +   struct max2175_rxmode *rx_modes;
> > +
> > +   /* Device settings */
> > +   bool master;
> > +   u32 decim_ratio;
> > +   u64 xtal_freq;
> > +
> > +   /* ROM values */
> > +   u8 rom_bbf_bw_am;
> > +   u8 rom_bbf_bw_fm;
> > +   u8 rom_bbf_bw_dab;
> > +
> > +   /* Local copy of old settings */
> > +   u8 i2s_test;
> > +
> > +   u8 nbd_gain;
> > +   u8 nbd_threshold;
> > +   u8 wbd_gain;
> > +   u8 wbd_threshold;
> > +   u8 bbd_threshold;
> > +   u8 bbdclip_threshold;
> > +   u8 lt_wbd_threshold;
> > +   u8 lt_wbd_gain;
> > +
> > +   /* Controls */
> > +   struct v4l2_ctrl_handler ctrl_hdl;
> > +   struct v4l2_ctrl *lna_gain; /* LNA gain value */
> > +   struct v4l2_ctrl *if_gain;  /* I/F gain value */
> > +   struct v4l2_ctrl *pll_lock; /* PLL lock */
> > +   struct v4l2_ctrl *i2s_en;   /* I2S output enable */
> > +   struct v4l2_ctrl *i2s_mode; /* I2S mode value */
> > +   struct v4l2_ctrl 

[PATCH v2 0/3] r8a7793 Gose video input support

2016-10-18 Thread Ulrich Hecht
Hi!

This is a by-the-datasheet implementation of analog and digital video input
on the Gose board.

I have tried to address all concerns raised by reviewers, with the exception
of the composite input patch, which has been left as is for now.

CU
Uli


Changes since v1:
- r8a7793.dtsi: added VIN2
- modeled HDMI decoder input/output and connector
- added "renesas,rcar-gen2-vin" compat strings
- removed unnecessary "remote" node and aliases
- set ADV7612 interrupt to GP4_2


Ulrich Hecht (3):
  ARM: dts: r8a7793: Enable VIN0-VIN2
  ARM: dts: gose: add HDMI input
  ARM: dts: gose: add composite video input

 arch/arm/boot/dts/r8a7793-gose.dts | 100 +
 arch/arm/boot/dts/r8a7793.dtsi |  27 ++
 2 files changed, 127 insertions(+)

-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 2/3] ARM: dts: gose: add HDMI input

2016-10-18 Thread Ulrich Hecht
Identical to the setup on Lager.

Signed-off-by: Ulrich Hecht 
---
 arch/arm/boot/dts/r8a7793-gose.dts | 64 ++
 1 file changed, 64 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7793-gose.dts 
b/arch/arm/boot/dts/r8a7793-gose.dts
index dc311eb..a47ea4b 100644
--- a/arch/arm/boot/dts/r8a7793-gose.dts
+++ b/arch/arm/boot/dts/r8a7793-gose.dts
@@ -253,6 +253,17 @@
};
};
 
+   hdmi-in {
+   compatible = "hdmi-connector";
+   type = "a";
+
+   port {
+   hdmi_con_in: endpoint {
+   remote-endpoint = <_in>;
+   };
+   };
+   };
+
hdmi-out {
compatible = "hdmi-connector";
type = "a";
@@ -374,6 +385,11 @@
groups = "audio_clk_a";
function = "audio_clk";
};
+
+   vin0_pins: vin0 {
+   groups = "vin0_data24", "vin0_sync", "vin0_clkenb", "vin0_clk";
+   function = "vin0";
+   };
 };
 
  {
@@ -531,6 +547,33 @@
};
};
 
+   hdmi-in@4c {
+   compatible = "adi,adv7612";
+   reg = <0x4c>;
+   interrupt-parent = <>;
+   interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
+   default-input = <0>;
+
+   port {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   port@0 {
+   reg = <0>;
+   adv7612_in: endpoint {
+   remote-endpoint = <_con_in>;
+   };
+   };
+
+   port@2 {
+   reg = <2>;
+   adv7612_out: endpoint {
+   remote-endpoint = <>;
+   };
+   };
+   };
+   };
+
eeprom@50 {
compatible = "renesas,r1ex24002", "atmel,24c02";
reg = <0x50>;
@@ -558,3 +601,24 @@
  {
shared-pin;
 };
+
+/* HDMI video input */
+ {
+   status = "okay";
+   pinctrl-0 = <_pins>;
+   pinctrl-names = "default";
+
+   port {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   vin0ep2: endpoint {
+   remote-endpoint = <_out>;
+   bus-width = <24>;
+   hsync-active = <0>;
+   vsync-active = <0>;
+   pclk-sample = <1>;
+   data-active = <1>;
+   };
+   };
+};
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 1/3] ARM: dts: r8a7793: Enable VIN0-VIN2

2016-10-18 Thread Ulrich Hecht
Signed-off-by: Ulrich Hecht 
---
 arch/arm/boot/dts/r8a7793.dtsi | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi
index a7d11b9..629d3d6 100644
--- a/arch/arm/boot/dts/r8a7793.dtsi
+++ b/arch/arm/boot/dts/r8a7793.dtsi
@@ -852,6 +852,33 @@
status = "disabled";
};
 
+   vin0: video@e6ef {
+   compatible = "renesas,vin-r8a7793", "renesas,rcar-gen2-vin";
+   reg = <0 0xe6ef 0 0x1000>;
+   interrupts = ;
+   clocks = <_clks R8A7793_CLK_VIN0>;
+   power-domains = < R8A7793_PD_ALWAYS_ON>;
+   status = "disabled";
+   };
+
+   vin1: video@e6ef1000 {
+   compatible = "renesas,vin-r8a7793", "renesas,rcar-gen2-vin";
+   reg = <0 0xe6ef1000 0 0x1000>;
+   interrupts = ;
+   clocks = <_clks R8A7793_CLK_VIN1>;
+   power-domains = < R8A7793_PD_ALWAYS_ON>;
+   status = "disabled";
+   };
+
+   vin2: video@e6ef2000 {
+   compatible = "renesas,vin-r8a7793", "renesas,rcar-gen2-vin";
+   reg = <0 0xe6ef2000 0 0x1000>;
+   interrupts = ;
+   clocks = <_clks R8A7793_CLK_VIN2>;
+   power-domains = < R8A7793_PD_ALWAYS_ON>;
+   status = "disabled";
+   };
+
qspi: spi@e6b1 {
compatible = "renesas,qspi-r8a7793", "renesas,qspi";
reg = <0 0xe6b1 0 0x2c>;
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 3/3] ARM: dts: gose: add composite video input

2016-10-18 Thread Ulrich Hecht
Signed-off-by: Ulrich Hecht 
---
 arch/arm/boot/dts/r8a7793-gose.dts | 36 
 1 file changed, 36 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7793-gose.dts 
b/arch/arm/boot/dts/r8a7793-gose.dts
index a47ea4b..2606021 100644
--- a/arch/arm/boot/dts/r8a7793-gose.dts
+++ b/arch/arm/boot/dts/r8a7793-gose.dts
@@ -390,6 +390,11 @@
groups = "vin0_data24", "vin0_sync", "vin0_clkenb", "vin0_clk";
function = "vin0";
};
+
+   vin1_pins: vin1 {
+   groups = "vin1_data8", "vin1_clk";
+   function = "vin1";
+   };
 };
 
  {
@@ -515,6 +520,19 @@
reg = <0x12>;
};
 
+   composite-in@20 {
+   compatible = "adi,adv7180";
+   reg = <0x20>;
+   remote = <>;
+
+   port {
+   adv7180: endpoint {
+   bus-width = <8>;
+   remote-endpoint = <>;
+   };
+   };
+   };
+
hdmi@39 {
compatible = "adi,adv7511w";
reg = <0x39>;
@@ -622,3 +640,21 @@
};
};
 };
+
+/* composite video input */
+ {
+   pinctrl-0 = <_pins>;
+   pinctrl-names = "default";
+
+   status = "okay";
+
+   port {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   vin1ep: endpoint {
+   remote-endpoint = <>;
+   bus-width = <8>;
+   };
+   };
+};
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 0/2] Renesas Lager/Koelsch HDMI input

2016-10-18 Thread Ulrich Hecht
Hi!

This series enables HDMI input on the Lager and Koelsch boards.
It sits on renesas-next-20161017-v4.9-rc1.

I have tried to address all concerns raised by reviewers (correctly, I hope),
see below for details.

CU
Uli


Changes since v1:
- modeled decoder inputs/outputs and connectors
- removed unnecessary "remote" nodes
- r8a7790-lager.dts: "ok" -> "okay"
- r8a7791-koelsch.dts: set ADV7612 interrupt to GP4_2


Hans Verkuil (1):
  ARM: dts: koelsch: add HDMI input

William Towle (1):
  ARM: dts: lager: Add entries for VIN HDMI input support

 arch/arm/boot/dts/r8a7790-lager.dts   | 66 --
 arch/arm/boot/dts/r8a7791-koelsch.dts | 68 +--
 2 files changed, 130 insertions(+), 4 deletions(-)

-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 1/2] ARM: dts: lager: Add entries for VIN HDMI input support

2016-10-18 Thread Ulrich Hecht
From: William Towle 

Add DT entries for vin0, vin0_pins, and adv7612.

Sets the 'default-input' property for ADV7612, enabling image and video
capture without the need to have userspace specifying routing.

Signed-off-by: William Towle 
Signed-off-by: Rob Taylor 
[uli: added interrupt, renamed endpoint, merged default-input]
Signed-off-by: Ulrich Hecht 
---
 arch/arm/boot/dts/r8a7790-lager.dts | 66 +++--
 1 file changed, 64 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/r8a7790-lager.dts 
b/arch/arm/boot/dts/r8a7790-lager.dts
index 52b56fc..4342682 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -231,12 +231,23 @@
};
};
 
+   hdmi-in {
+   compatible = "hdmi-connector";
+   type = "a";
+
+   port {
+   hdmi_con_in: endpoint {
+   remote-endpoint = <_in>;
+   };
+   };
+   };
+
hdmi-out {
compatible = "hdmi-connector";
type = "a";
 
port {
-   hdmi_con: endpoint {
+   hdmi_con_out: endpoint {
remote-endpoint = <_out>;
};
};
@@ -427,6 +438,11 @@
function = "usb2";
};
 
+   vin0_pins: vin0 {
+   groups = "vin0_data24", "vin0_sync", "vin0_clkenb", "vin0_clk";
+   function = "vin0";
+   };
+
vin1_pins: vin1 {
groups = "vin1_data8", "vin1_clk";
function = "vin1";
@@ -646,7 +662,34 @@
port@1 {
reg = <1>;
adv7511_out: endpoint {
-   remote-endpoint = <_con>;
+   remote-endpoint = <_con_out>;
+   };
+   };
+   };
+   };
+
+   hdmi-in@4c {
+   compatible = "adi,adv7612";
+   reg = <0x4c>;
+   interrupt-parent = <>;
+   interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
+   default-input = <0>;
+
+   ports {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   port@0 {
+   reg = <0>;
+   adv7612_in: endpoint {
+   remote-endpoint = <_con_in>;
+   };
+   };
+
+   port@2 {
+   reg = <2>;
+   adv7612_out: endpoint {
+   remote-endpoint = <>;
};
};
};
@@ -722,6 +765,25 @@
status = "okay";
 };
 
+/* HDMI video input */
+ {
+   pinctrl-0 = <_pins>;
+   pinctrl-names = "default";
+
+   status = "okay";
+
+   port {
+   vin0ep2: endpoint {
+   remote-endpoint = <_out>;
+   bus-width = <24>;
+   hsync-active = <0>;
+   vsync-active = <0>;
+   pclk-sample = <1>;
+   data-active = <1>;
+   };
+   };
+};
+
 /* composite video input */
  {
pinctrl-0 = <_pins>;
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 2/2] ARM: dts: koelsch: add HDMI input

2016-10-18 Thread Ulrich Hecht
From: Hans Verkuil 

Add support in the dts for the HDMI input. Based on the Lager dts
patch from Ultich Hecht.

Signed-off-by: Hans Verkuil 
[uli: removed "renesas," prefixes from pfc nodes]
Signed-off-by: Ulrich Hecht 
---
 arch/arm/boot/dts/r8a7791-koelsch.dts | 68 +--
 1 file changed, 66 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts 
b/arch/arm/boot/dts/r8a7791-koelsch.dts
index f17bfa0..c457b43 100644
--- a/arch/arm/boot/dts/r8a7791-koelsch.dts
+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
@@ -265,12 +265,23 @@
};
};
 
+   hdmi-in {
+   compatible = "hdmi-connector";
+   type = "a";
+
+   port {
+   hdmi_con_in: endpoint {
+   remote-endpoint = <_in>;
+   };
+   };
+   };
+
hdmi-out {
compatible = "hdmi-connector";
type = "a";
 
port {
-   hdmi_con: endpoint {
+   hdmi_con_out: endpoint {
remote-endpoint = <_out>;
};
};
@@ -414,6 +425,11 @@
function = "usb1";
};
 
+   vin0_pins: vin0 {
+   groups = "vin0_data24", "vin0_sync", "vin0_clkenb", "vin0_clk";
+   function = "vin0";
+   };
+
vin1_pins: vin1 {
groups = "vin1_data8", "vin1_clk";
function = "vin1";
@@ -617,7 +633,34 @@
port@1 {
reg = <1>;
adv7511_out: endpoint {
-   remote-endpoint = <_con>;
+   remote-endpoint = <_con_out>;
+   };
+   };
+   };
+   };
+
+   hdmi-in@4c {
+   compatible = "adi,adv7612";
+   reg = <0x4c>;
+   interrupt-parent = <>;
+   interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
+   default-input = <0>;
+
+   ports {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   port@0 {
+   reg = <0>;
+   adv7612_in: endpoint {
+   remote-endpoint = <_con_in>;
+   };
+   };
+
+   port@2 {
+   reg = <2>;
+   adv7612_out: endpoint {
+   remote-endpoint = <>;
};
};
};
@@ -699,6 +742,27 @@
cpu0-supply = <_dvfs>;
 };
 
+/* HDMI video input */
+ {
+   status = "okay";
+   pinctrl-0 = <_pins>;
+   pinctrl-names = "default";
+
+   port {
+   #address-cells = <1>;
+   #size-cells = <0>;
+
+   vin0ep2: endpoint {
+   remote-endpoint = <_out>;
+   bus-width = <24>;
+   hsync-active = <0>;
+   vsync-active = <0>;
+   pclk-sample = <1>;
+   data-active = <1>;
+   };
+   };
+};
+
 /* composite video input */
  {
status = "okay";
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 3/5] media: platform: rcar_drif: Add DRIF support

2016-10-18 Thread Geert Uytterhoeven
Hi Ramesh,

On Wed, Oct 12, 2016 at 4:10 PM, Ramesh Shanmugasundaram
 wrote:
> This patch adds Digital Radio Interface (DRIF) support to R-Car Gen3 SoCs.
> The driver exposes each instance of DRIF as a V4L2 SDR device. A DRIF
> device represents a channel and each channel can have one or two
> sub-channels respectively depending on the target board.
>
> DRIF supports only Rx functionality. It receives samples from a RF
> frontend tuner chip it is interfaced with. The combination of DRIF and the
> tuner device, which is registered as a sub-device, determines the receive
> sample rate and format.
>
> In order to be compliant as a V4L2 SDR device, DRIF needs to bind with
> the tuner device, which can be provided by a third party vendor. DRIF acts
> as a slave device and the tuner device acts as a master transmitting the
> samples. The driver allows asynchronous binding of a tuner device that
> is registered as a v4l2 sub-device. The driver can learn about the tuner
> it is interfaced with based on port endpoint properties of the device in
> device tree. The V4L2 SDR device inherits the controls exposed by the
> tuner device.
>
> The device can also be configured to use either one or both of the data
> pins at runtime based on the master (tuner) configuration.

Thanks for your patch!

> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/renesas,drif.txt
> @@ -0,0 +1,109 @@
> +Renesas R-Car Gen3 DRIF controller (DRIF)
> +-
> +
> +Required properties:
> +
> +- compatible: "renesas,drif-r8a7795" if DRIF controller is a part of R8A7795 
> SoC.

"renesas,r8a7795-drif", as Rob already pointed out.

> + "renesas,rcar-gen3-drif" for a generic R-Car Gen3 compatible 
> device.
> + When compatible with the generic version, nodes must list the
> + SoC-specific version corresponding to the platform first
> + followed by the generic version.
> +
> +- reg: offset and length of each sub-channel.
> +- interrupts: associated with each sub-channel.
> +- clocks: phandles and clock specifiers for each sub-channel.
> +- clock-names: clock input name strings: "fck0", "fck1".
> +- pinctrl-0: pin control group to be used for this controller.
> +- pinctrl-names: must be "default".
> +- dmas: phandles to the DMA channels for each sub-channel.
> +- dma-names: names for the DMA channels: "rx0", "rx1".
> +
> +Required child nodes:
> +-
> +- Each DRIF channel can have one or both of the sub-channels enabled in a
> +  setup. The sub-channels are represented as a child node. The name of the
> +  child nodes are "sub-channel0" and "sub-channel1" respectively. Each child
> +  node supports the "status" property only, which is used to enable/disable
> +  the respective sub-channel.

> +Example
> +
> +
> +SoC common dtsi file
> +
> +drif0: rif@e6f4 {
> +   compatible = "renesas,drif-r8a7795",
> +  "renesas,rcar-gen3-drif";
> +   reg = <0 0xe6f4 0 0x64>, <0 0xe6f5 0 0x64>;
> +   interrupts = ,
> +  ;
> +   clocks = < CPG_MOD 515>, < CPG_MOD 514>;
> +   clock-names = "fck0", "fck1";
> +   dmas = < 0x20>, < 0x22>;
> +   dma-names = "rx0", "rx1";

I could not find the DMAC channels in the datasheet?
Most modules are either tied to dmac0, or two both dmac1 and dmac2.
In the latter case, you want to list two sets of dmas, one for each DMAC.

> +   power-domains = < R8A7795_PD_ALWAYS_ON>;
> +   status = "disabled";
> +
> +   sub-channel0 {
> +   status = "disabled";
> +   };
> +
> +   sub-channel1 {
> +   status = "disabled";
> +   };
> +
> +};

As you're modelling this in DT under a single device node, this means you
cannot use runtime PM to manage the module clocks of the individual channels.

An alternative could be to have two separate nodes for each channel,
and tie them together using a phandle.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [media] v4l: rcar-fcp: Don't force users to check for disabled FCP support

2016-10-18 Thread Laurent Pinchart
Hi Greg,

On Tuesday 18 Oct 2016 16:05:21 Greg KH wrote:
> On Tue, Oct 18, 2016 at 04:24:20PM +0300, Laurent Pinchart wrote:
> > commit fd44aa9a254b18176ec3792a18e7de6977030ca8 upstream.
> > 
> > The rcar_fcp_enable() function immediately returns successfully when the
> > FCP device pointer is NULL to avoid forcing the users to check the FCP
> > device manually before every call. However, the stub version of the
> > function used when the FCP driver is disabled returns -ENOSYS
> > unconditionally, resulting in a different API contract for the two
> > versions of the function.
> > 
> > As a user that requires FCP support will fail at probe time when calling
> > rcar_fcp_get() if the FCP driver is disabled, the stub version of the
> > rcar_fcp_enable() function will only be called with a NULL FCP device.
> > We can thus return 0 unconditionally to align the behaviour with the
> > normal version of the function.
> > 
> > Fixes: 94fcdf829793 ("[media] v4l: vsp1: Add FCP support")
> > Reported-by: Sergei Shtylyov 
> > Signed-off-by: Laurent Pinchart
> > 
> > Reviewed-by: Geert Uytterhoeven 
> > Signed-off-by: Mauro Carvalho Chehab 
> > ---
> > 
> >  include/media/rcar-fcp.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> What stable kernel(s) do you want this applied to?

That's for v4.8, sorry for not having mentioned it.

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [media] v4l: rcar-fcp: Don't force users to check for disabled FCP support

2016-10-18 Thread Greg KH
On Tue, Oct 18, 2016 at 04:24:20PM +0300, Laurent Pinchart wrote:
> commit fd44aa9a254b18176ec3792a18e7de6977030ca8 upstream.
> 
> The rcar_fcp_enable() function immediately returns successfully when the
> FCP device pointer is NULL to avoid forcing the users to check the FCP
> device manually before every call. However, the stub version of the
> function used when the FCP driver is disabled returns -ENOSYS
> unconditionally, resulting in a different API contract for the two
> versions of the function.
> 
> As a user that requires FCP support will fail at probe time when calling
> rcar_fcp_get() if the FCP driver is disabled, the stub version of the
> rcar_fcp_enable() function will only be called with a NULL FCP device.
> We can thus return 0 unconditionally to align the behaviour with the
> normal version of the function.
> 
> Fixes: 94fcdf829793 ("[media] v4l: vsp1: Add FCP support")
> Reported-by: Sergei Shtylyov 
> Signed-off-by: Laurent Pinchart 
> Reviewed-by: Geert Uytterhoeven 
> Signed-off-by: Mauro Carvalho Chehab 
> ---
>  include/media/rcar-fcp.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

What stable kernel(s) do you want this applied to?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 04/10] mm: replace get_user_pages_locked() write/force parameters with gup_flags

2016-10-18 Thread Lorenzo Stoakes
On Tue, Oct 18, 2016 at 02:54:25PM +0200, Jan Kara wrote:
> > @@ -1282,7 +1282,7 @@ long get_user_pages(unsigned long start, unsigned 
> > long nr_pages,
> > int write, int force, struct page **pages,
> > struct vm_area_struct **vmas);
> >  long get_user_pages_locked(unsigned long start, unsigned long nr_pages,
> > -   int write, int force, struct page **pages, int *locked);
> > +   unsigned int gup_flags, struct page **pages, int *locked);
>
> Hum, the prototype is inconsistent with e.g. __get_user_pages_unlocked()
> where gup_flags come after **pages argument. Actually it makes more sense
> to have it before **pages so that input arguments come first and output
> arguments second but I don't care that much. But it definitely should be
> consistent...

It was difficult to decide quite how to arrange parameters as there was
inconsitency with regards to parameter ordering already - for example
__get_user_pages() places its flags argument before pages whereas, as you note,
__get_user_pages_unlocked() puts them afterwards.

I ended up compromising by trying to match the existing ordering of the function
as much as I could by replacing write, force pairs with gup_flags in the same
location (with the exception of get_user_pages_unlocked() which I felt should
match __get_user_pages_unlocked() in signature) or if there was already a
gup_flags parameter as in the case of __get_user_pages_unlocked() I simply
removed the write, force pair and left the flags as the last parameter.

I am happy to rearrange parameters as needed, however I am not sure if it'd be
worthwhile for me to do so (I am keen to try to avoid adding too much noise here
:)

If we were to rearrange parameters for consistency I'd suggest adjusting
__get_user_pages_unlocked() to put gup_flags before pages and do the same with
get_user_pages_unlocked(), let me know what you think.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 1/2] Add OV5647 device tree documentation

2016-10-18 Thread Ramiro Oliveira
On 10/18/2016 2:14 PM, Rob Herring wrote:
> On Wed, Oct 12, 2016 at 05:02:21PM +0100, Ramiro Oliveira wrote:
>> Signed-off-by: Ramiro Oliveira 
>> ---
>>  .../devicetree/bindings/media/i2c/ov5647.txt  | 19 
>> +++
>>  1 file changed, 19 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/media/i2c/ov5647.txt
>>
>> diff --git a/Documentation/devicetree/bindings/media/i2c/ov5647.txt 
>> b/Documentation/devicetree/bindings/media/i2c/ov5647.txt
>> new file mode 100644
>> index 000..4c91b3b
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/media/i2c/ov5647.txt
>> @@ -0,0 +1,19 @@
>> +Omnivision OV5647 raw image sensor
>> +-
>> +
>> +OV5647 is a raw image sensor with MIPI CSI-2 and CCP2 image data interfaces
>> +and CCI (I2C compatible) control bus.
>> +
>> +Required properties:
>> +
>> +- compatible: "ovti,ov5647";
>> +- reg   : I2C slave address of the sensor;
>> +
>> +The common video interfaces bindings (see video-interfaces.txt) should be
>> +used to specify link to the image data receiver. The OV5647 device
>> +node should contain one 'port' child node with an 'endpoint' subnode.
>> +
>> +Following properties are valid for the endpoint node:
>> +
>> +- data-lanes : (optional) specifies MIPI CSI-2 data lanes as covered in
>> +  video-interfaces.txt.  The sensor supports only two data lanes.
> What's the default if not present?

Since the sensor only supports 2 data lanes, this information will not be used,
even if it is available in the DT. So the default will be 2.

>
>> -- 
>> 2.9.3
>>
>>

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] [media] v4l: rcar-fcp: Don't force users to check for disabled FCP support

2016-10-18 Thread Laurent Pinchart
commit fd44aa9a254b18176ec3792a18e7de6977030ca8 upstream.

The rcar_fcp_enable() function immediately returns successfully when the
FCP device pointer is NULL to avoid forcing the users to check the FCP
device manually before every call. However, the stub version of the
function used when the FCP driver is disabled returns -ENOSYS
unconditionally, resulting in a different API contract for the two
versions of the function.

As a user that requires FCP support will fail at probe time when calling
rcar_fcp_get() if the FCP driver is disabled, the stub version of the
rcar_fcp_enable() function will only be called with a NULL FCP device.
We can thus return 0 unconditionally to align the behaviour with the
normal version of the function.

Fixes: 94fcdf829793 ("[media] v4l: vsp1: Add FCP support")
Reported-by: Sergei Shtylyov 
Signed-off-by: Laurent Pinchart 
Reviewed-by: Geert Uytterhoeven 
Signed-off-by: Mauro Carvalho Chehab 
---
 include/media/rcar-fcp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/media/rcar-fcp.h b/include/media/rcar-fcp.h
index 4c7fc77eaf29..8723f05c6321 100644
--- a/include/media/rcar-fcp.h
+++ b/include/media/rcar-fcp.h
@@ -29,7 +29,7 @@ static inline struct rcar_fcp_device *rcar_fcp_get(const 
struct device_node *np)
 static inline void rcar_fcp_put(struct rcar_fcp_device *fcp) { }
 static inline int rcar_fcp_enable(struct rcar_fcp_device *fcp)
 {
-   return -ENOSYS;
+   return 0;
 }
 static inline void rcar_fcp_disable(struct rcar_fcp_device *fcp) { }
 #endif
-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2 1/1] v4l: Document that m2m devices have a file handle specific context

2016-10-18 Thread Sakari Ailus
Memory-to-memory V4L2 devices all have file handle specific context.
Say this in the API documentation so that the user space may rely on it
being the case.

Signed-off-by: Sakari Ailus 
---
since v1:

- Added a note to struct v4l2_m2m_queue_ctx documentation as well.

 Documentation/media/uapi/v4l/dev-codec.rst | 2 +-
 include/media/v4l2-mem2mem.h   | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/media/uapi/v4l/dev-codec.rst 
b/Documentation/media/uapi/v4l/dev-codec.rst
index d9f2184..c61e938 100644
--- a/Documentation/media/uapi/v4l/dev-codec.rst
+++ b/Documentation/media/uapi/v4l/dev-codec.rst
@@ -26,7 +26,7 @@ parameters
The MPEG controls actually support many more codecs than
just MPEG. See :ref:`mpeg-controls`.
 
-Memory-to-memory devices can often be used as a shared resource: you can
+Memory-to-memory devices function as a shared resource: you can
 open the video node multiple times, each application setting up their
 own codec properties that are local to the file handle, and each can use
 it independently from the others. The driver will arbitrate access to
diff --git a/include/media/v4l2-mem2mem.h b/include/media/v4l2-mem2mem.h
index 1b35534..3ccd01b 100644
--- a/include/media/v4l2-mem2mem.h
+++ b/include/media/v4l2-mem2mem.h
@@ -90,6 +90,9 @@ struct v4l2_m2m_queue_ctx {
  * %TRANS_QUEUED, %TRANS_RUNNING and %TRANS_ABORT.
  * @finished: Wait queue used to signalize when a job queue finished.
  * @priv: Instance private data
+ *
+ * The memory to memory context is specific to a file handle, NOT to e.g.
+ * a device.
  */
 struct v4l2_m2m_ctx {
/* optional cap/out vb2 queues lock */
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


DVB-T2 with H.265 (HEVC) ?

2016-10-18 Thread Markus Heiser
Hi,

does anyone know (or has experiences) about a DVB-T2 device with H.265?

-- Markus -- 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 1/2] Add OV5647 device tree documentation

2016-10-18 Thread Rob Herring
On Wed, Oct 12, 2016 at 05:02:21PM +0100, Ramiro Oliveira wrote:
> Signed-off-by: Ramiro Oliveira 
> ---
>  .../devicetree/bindings/media/i2c/ov5647.txt  | 19 
> +++
>  1 file changed, 19 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/i2c/ov5647.txt
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/ov5647.txt 
> b/Documentation/devicetree/bindings/media/i2c/ov5647.txt
> new file mode 100644
> index 000..4c91b3b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/i2c/ov5647.txt
> @@ -0,0 +1,19 @@
> +Omnivision OV5647 raw image sensor
> +-
> +
> +OV5647 is a raw image sensor with MIPI CSI-2 and CCP2 image data interfaces
> +and CCI (I2C compatible) control bus.
> +
> +Required properties:
> +
> +- compatible : "ovti,ov5647";
> +- reg: I2C slave address of the sensor;
> +
> +The common video interfaces bindings (see video-interfaces.txt) should be
> +used to specify link to the image data receiver. The OV5647 device
> +node should contain one 'port' child node with an 'endpoint' subnode.
> +
> +Following properties are valid for the endpoint node:
> +
> +- data-lanes : (optional) specifies MIPI CSI-2 data lanes as covered in
> +  video-interfaces.txt.  The sensor supports only two data lanes.

What's the default if not present?

> -- 
> 2.9.3
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC 3/5] media: platform: rcar_drif: Add DRIF support

2016-10-18 Thread Rob Herring
On Wed, Oct 12, 2016 at 03:10:27PM +0100, Ramesh Shanmugasundaram wrote:
> This patch adds Digital Radio Interface (DRIF) support to R-Car Gen3 SoCs.
> The driver exposes each instance of DRIF as a V4L2 SDR device. A DRIF
> device represents a channel and each channel can have one or two
> sub-channels respectively depending on the target board.
> 
> DRIF supports only Rx functionality. It receives samples from a RF
> frontend tuner chip it is interfaced with. The combination of DRIF and the
> tuner device, which is registered as a sub-device, determines the receive
> sample rate and format.
> 
> In order to be compliant as a V4L2 SDR device, DRIF needs to bind with
> the tuner device, which can be provided by a third party vendor. DRIF acts
> as a slave device and the tuner device acts as a master transmitting the
> samples. The driver allows asynchronous binding of a tuner device that
> is registered as a v4l2 sub-device. The driver can learn about the tuner
> it is interfaced with based on port endpoint properties of the device in
> device tree. The V4L2 SDR device inherits the controls exposed by the
> tuner device.
> 
> The device can also be configured to use either one or both of the data
> pins at runtime based on the master (tuner) configuration.
> 
> Signed-off-by: Ramesh Shanmugasundaram 
> 
> ---
>  .../devicetree/bindings/media/renesas,drif.txt |  109 ++
>  drivers/media/platform/Kconfig |   25 +
>  drivers/media/platform/Makefile|1 +
>  drivers/media/platform/rcar_drif.c | 1534 
> 
>  4 files changed, 1669 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/renesas,drif.txt
>  create mode 100644 drivers/media/platform/rcar_drif.c
> 
> diff --git a/Documentation/devicetree/bindings/media/renesas,drif.txt 
> b/Documentation/devicetree/bindings/media/renesas,drif.txt
> new file mode 100644
> index 000..24239d9
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/renesas,drif.txt
> @@ -0,0 +1,109 @@
> +Renesas R-Car Gen3 DRIF controller (DRIF)

Define what is DRIF here, not just in the commit text.

> +-
> +
> +Required properties:
> +
> +- compatible: "renesas,drif-r8a7795" if DRIF controller is a part of R8A7795 
> SoC.

renesas,r8a7795-drif would be the normal ordering.

> +   "renesas,rcar-gen3-drif" for a generic R-Car Gen3 compatible 
> device.
> +   When compatible with the generic version, nodes must list the
> +   SoC-specific version corresponding to the platform first
> +   followed by the generic version.
> +
> +- reg: offset and length of each sub-channel.
> +- interrupts: associated with each sub-channel.
> +- clocks: phandles and clock specifiers for each sub-channel.
> +- clock-names: clock input name strings: "fck0", "fck1".
> +- pinctrl-0: pin control group to be used for this controller.
> +- pinctrl-names: must be "default".
> +- dmas: phandles to the DMA channels for each sub-channel.
> +- dma-names: names for the DMA channels: "rx0", "rx1".
> +
> +Required child nodes:
> +-
> +- Each DRIF channel can have one or both of the sub-channels enabled in a
> +  setup. The sub-channels are represented as a child node. The name of the
> +  child nodes are "sub-channel0" and "sub-channel1" respectively. Each child
> +  node supports the "status" property only, which is used to enable/disable
> +  the respective sub-channel.
> +
> +Optional properties:
> +
> +- port: video interface child port node of a channel that defines the local

This is an audio device, why does it have a video port?

> +  and remote endpoints. The remote endpoint is assumed to a tuner subdevice
> +  endpoint.
> +- power-domains: phandle to respective power domain.
> +- renesas,syncmd   : sync mode
> +  0 (Frame start sync pulse mode. 1-bit width pulse
> + indicates start of a frame)
> +  1 (L/R sync or I2S mode) (default)
> +- renesas,lsb-first: empty property indicates lsb bit is received first.
> +  When not defined msb bit is received first (default)
> +- renesas,syncac-pol-high  : empty property indicates sync signal polarity.
> +  When defined, active high or high->low sync signal.
> +  When not defined, active low or low->high sync signal
> +  (default)
> +- renesas,dtdl : delay between sync signal and start of reception.
> +  Must contain one of the following values:
> +  0   (no bit delay)
> +  50  (0.5-clock-cycle delay)
> +  100 (1-clock-cycle delay) (default)
> +  150 (1.5-clock-cycle delay)
> +  200 (2-clock-cycle delay)
> +- 

Re: [PATCH 04/10] mm: replace get_user_pages_locked() write/force parameters with gup_flags

2016-10-18 Thread Jan Kara
On Thu 13-10-16 01:20:14, Lorenzo Stoakes wrote:
> This patch removes the write and force parameters from get_user_pages_locked()
> and replaces them with a gup_flags parameter to make the use of FOLL_FORCE
> explicit in callers as use of this flag can result in surprising behaviour 
> (and
> hence bugs) within the mm subsystem.
> 
> Signed-off-by: Lorenzo Stoakes 
> ---
>  include/linux/mm.h |  2 +-
>  mm/frame_vector.c  |  8 +++-
>  mm/gup.c   | 12 +++-
>  mm/nommu.c |  5 -
>  4 files changed, 15 insertions(+), 12 deletions(-)
> 
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 6adc4bc..27ab538 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -1282,7 +1282,7 @@ long get_user_pages(unsigned long start, unsigned long 
> nr_pages,
>   int write, int force, struct page **pages,
>   struct vm_area_struct **vmas);
>  long get_user_pages_locked(unsigned long start, unsigned long nr_pages,
> - int write, int force, struct page **pages, int *locked);
> + unsigned int gup_flags, struct page **pages, int *locked);

Hum, the prototype is inconsistent with e.g. __get_user_pages_unlocked()
where gup_flags come after **pages argument. Actually it makes more sense
to have it before **pages so that input arguments come first and output
arguments second but I don't care that much. But it definitely should be
consistent...

Honza
-- 
Jan Kara 
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/1] v4l: Document that m2m devices have a file handle specific context

2016-10-18 Thread Sakari Ailus
Memory-to-memory V4L2 devices all have file handle specific context.
Say this in the API documentation so that the user space may rely on it
being the case.

Signed-off-by: Sakari Ailus 
---
 Documentation/media/uapi/v4l/dev-codec.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/media/uapi/v4l/dev-codec.rst 
b/Documentation/media/uapi/v4l/dev-codec.rst
index d9f2184..c61e938 100644
--- a/Documentation/media/uapi/v4l/dev-codec.rst
+++ b/Documentation/media/uapi/v4l/dev-codec.rst
@@ -26,7 +26,7 @@ parameters
The MPEG controls actually support many more codecs than
just MPEG. See :ref:`mpeg-controls`.
 
-Memory-to-memory devices can often be used as a shared resource: you can
+Memory-to-memory devices function as a shared resource: you can
 open the video node multiple times, each application setting up their
 own codec properties that are local to the file handle, and each can use
 it independently from the others. The driver will arbitrate access to
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 03/10] mm: replace get_user_pages_unlocked() write/force parameters with gup_flags

2016-10-18 Thread Jan Kara
On Thu 13-10-16 01:20:13, Lorenzo Stoakes wrote:
> This patch removes the write and force parameters from 
> get_user_pages_unlocked()
> and replaces them with a gup_flags parameter to make the use of FOLL_FORCE
> explicit in callers as use of this flag can result in surprising behaviour 
> (and
> hence bugs) within the mm subsystem.
> 
> Signed-off-by: Lorenzo Stoakes 

Looks good. You can add:

Reviewed-by: Jan Kara 

Honza
-- 
Jan Kara 
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 02/10] mm: remove write/force parameters from __get_user_pages_unlocked()

2016-10-18 Thread Jan Kara
On Thu 13-10-16 01:20:12, Lorenzo Stoakes wrote:
> This patch removes the write and force parameters from
> __get_user_pages_unlocked() to make the use of FOLL_FORCE explicit in callers 
> as
> use of this flag can result in surprising behaviour (and hence bugs) within 
> the
> mm subsystem.
> 
> Signed-off-by: Lorenzo Stoakes 

The patch looks good. You can add:

Reviewed-by: Jan Kara 

Honza
-- 
Jan Kara 
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


  1   2   >