Commit d26da990 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] omap3isp: don't break long lines

Due to the 80-cols restrictions, and latter due to checkpatch
warnings, several strings were broken into multiple lines. This
is not considered a good practice anymore, as it makes harder
to grep for strings at the source code.

As we're right now fixing other drivers due to KERN_CONT, we need
to be able to identify what printk strings don't end with a "\n".
It is a way easier to detect those if we don't break long lines.

So, join those continuation lines.

The patch was generated via the script below, and manually
adjusted if needed.

</script>
use Text::Tabs;
while (<>) {
	if ($next ne "") {
		$c=$_;
		if ($c =~ /^\s+\"(.*)/) {
			$c2=$1;
			$next =~ s/\"\n$//;
			$n = expand($next);
			$funpos = index($n, '(');
			$pos = index($c2, '",');
			if ($funpos && $pos > 0) {
				$s1 = substr $c2, 0, $pos + 2;
				$s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2;
				$s2 =~ s/^\s+//;

				$s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne "");

				print unexpand("$next$s1\n");
				print unexpand("$s2\n") if ($s2 ne "");
			} else {
				print "$next$c2\n";
			}
			$next="";
			next;
		} else {
			print $next;
		}
		$next="";
	} else {
		if (m/\"$/) {
			if (!m/\\n\"$/) {
				$next=$_;
				next;
			}
		}
	}
	print $_;
}
</script>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent bc39030b
...@@ -480,8 +480,8 @@ void omap3isp_hist_dma_done(struct isp_device *isp) ...@@ -480,8 +480,8 @@ void omap3isp_hist_dma_done(struct isp_device *isp)
omap3isp_stat_pcr_busy(&isp->isp_hist)) { omap3isp_stat_pcr_busy(&isp->isp_hist)) {
/* Histogram cannot be enabled in this frame anymore */ /* Histogram cannot be enabled in this frame anymore */
atomic_set(&isp->isp_hist.buf_err, 1); atomic_set(&isp->isp_hist.buf_err, 1);
dev_dbg(isp->dev, "hist: Out of synchronization with " dev_dbg(isp->dev,
"CCDC. Ignoring next buffer.\n"); "hist: Out of synchronization with CCDC. Ignoring next buffer.\n");
} }
} }
......
...@@ -151,8 +151,8 @@ static int ccdc_lsc_validate_config(struct isp_ccdc_device *ccdc, ...@@ -151,8 +151,8 @@ static int ccdc_lsc_validate_config(struct isp_ccdc_device *ccdc,
} }
if (lsc_cfg->offset & 3) { if (lsc_cfg->offset & 3) {
dev_dbg(isp->dev, "CCDC: LSC: Offset must be a multiple of " dev_dbg(isp->dev,
"4\n"); "CCDC: LSC: Offset must be a multiple of 4\n");
return -EINVAL; return -EINVAL;
} }
...@@ -416,8 +416,9 @@ static int ccdc_lsc_config(struct isp_ccdc_device *ccdc, ...@@ -416,8 +416,9 @@ static int ccdc_lsc_config(struct isp_ccdc_device *ccdc,
return 0; return 0;
if (update != (OMAP3ISP_CCDC_CONFIG_LSC | OMAP3ISP_CCDC_TBL_LSC)) { if (update != (OMAP3ISP_CCDC_CONFIG_LSC | OMAP3ISP_CCDC_TBL_LSC)) {
dev_dbg(to_device(ccdc), "%s: Both LSC configuration and table " dev_dbg(to_device(ccdc),
"need to be supplied\n", __func__); "%s: Both LSC configuration and table need to be supplied\n",
__func__);
return -EINVAL; return -EINVAL;
} }
......
...@@ -753,8 +753,8 @@ void omap3isp_csi2_isr(struct isp_csi2_device *csi2) ...@@ -753,8 +753,8 @@ void omap3isp_csi2_isr(struct isp_csi2_device *csi2)
ISPCSI2_PHY_IRQSTATUS); ISPCSI2_PHY_IRQSTATUS);
isp_reg_writel(isp, cpxio1_irqstatus, isp_reg_writel(isp, cpxio1_irqstatus,
csi2->regs1, ISPCSI2_PHY_IRQSTATUS); csi2->regs1, ISPCSI2_PHY_IRQSTATUS);
dev_dbg(isp->dev, "CSI2: ComplexIO Error IRQ " dev_dbg(isp->dev, "CSI2: ComplexIO Error IRQ %x\n",
"%x\n", cpxio1_irqstatus); cpxio1_irqstatus);
pipe->error = true; pipe->error = true;
} }
...@@ -763,13 +763,8 @@ void omap3isp_csi2_isr(struct isp_csi2_device *csi2) ...@@ -763,13 +763,8 @@ void omap3isp_csi2_isr(struct isp_csi2_device *csi2)
ISPCSI2_IRQSTATUS_ECC_NO_CORRECTION_IRQ | ISPCSI2_IRQSTATUS_ECC_NO_CORRECTION_IRQ |
ISPCSI2_IRQSTATUS_COMPLEXIO2_ERR_IRQ | ISPCSI2_IRQSTATUS_COMPLEXIO2_ERR_IRQ |
ISPCSI2_IRQSTATUS_FIFO_OVF_IRQ)) { ISPCSI2_IRQSTATUS_FIFO_OVF_IRQ)) {
dev_dbg(isp->dev, "CSI2 Err:" dev_dbg(isp->dev,
" OCP:%d," "CSI2 Err: OCP:%d, Short_pack:%d, ECC:%d, CPXIO2:%d, FIFO_OVF:%d,\n",
" Short_pack:%d,"
" ECC:%d,"
" CPXIO2:%d,"
" FIFO_OVF:%d,"
"\n",
(csi2_irqstatus & (csi2_irqstatus &
ISPCSI2_IRQSTATUS_OCP_ERR_IRQ) ? 1 : 0, ISPCSI2_IRQSTATUS_OCP_ERR_IRQ) ? 1 : 0,
(csi2_irqstatus & (csi2_irqstatus &
......
...@@ -267,8 +267,8 @@ int omap3isp_csiphy_acquire(struct isp_csiphy *phy) ...@@ -267,8 +267,8 @@ int omap3isp_csiphy_acquire(struct isp_csiphy *phy)
int rval; int rval;
if (phy->vdd == NULL) { if (phy->vdd == NULL) {
dev_err(phy->isp->dev, "Power regulator for CSI PHY not " dev_err(phy->isp->dev,
"available\n"); "Power regulator for CSI PHY not available\n");
return -ENODEV; return -ENODEV;
} }
......
...@@ -304,8 +304,8 @@ int omap3isp_h3a_aewb_init(struct isp_device *isp) ...@@ -304,8 +304,8 @@ int omap3isp_h3a_aewb_init(struct isp_device *isp)
aewb_recover_cfg = devm_kzalloc(isp->dev, sizeof(*aewb_recover_cfg), aewb_recover_cfg = devm_kzalloc(isp->dev, sizeof(*aewb_recover_cfg),
GFP_KERNEL); GFP_KERNEL);
if (!aewb_recover_cfg) { if (!aewb_recover_cfg) {
dev_err(aewb->isp->dev, "AEWB: cannot allocate memory for " dev_err(aewb->isp->dev,
"recover configuration.\n"); "AEWB: cannot allocate memory for recover configuration.\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -321,8 +321,8 @@ int omap3isp_h3a_aewb_init(struct isp_device *isp) ...@@ -321,8 +321,8 @@ int omap3isp_h3a_aewb_init(struct isp_device *isp)
aewb_recover_cfg->subsample_hor_inc = OMAP3ISP_AEWB_MIN_SUB_INC; aewb_recover_cfg->subsample_hor_inc = OMAP3ISP_AEWB_MIN_SUB_INC;
if (h3a_aewb_validate_params(aewb, aewb_recover_cfg)) { if (h3a_aewb_validate_params(aewb, aewb_recover_cfg)) {
dev_err(aewb->isp->dev, "AEWB: recover configuration is " dev_err(aewb->isp->dev,
"invalid.\n"); "AEWB: recover configuration is invalid.\n");
return -EINVAL; return -EINVAL;
} }
......
...@@ -367,8 +367,8 @@ int omap3isp_h3a_af_init(struct isp_device *isp) ...@@ -367,8 +367,8 @@ int omap3isp_h3a_af_init(struct isp_device *isp)
af_recover_cfg = devm_kzalloc(isp->dev, sizeof(*af_recover_cfg), af_recover_cfg = devm_kzalloc(isp->dev, sizeof(*af_recover_cfg),
GFP_KERNEL); GFP_KERNEL);
if (!af_recover_cfg) { if (!af_recover_cfg) {
dev_err(af->isp->dev, "AF: cannot allocate memory for recover " dev_err(af->isp->dev,
"configuration.\n"); "AF: cannot allocate memory for recover configuration.\n");
return -ENOMEM; return -ENOMEM;
} }
...@@ -379,8 +379,8 @@ int omap3isp_h3a_af_init(struct isp_device *isp) ...@@ -379,8 +379,8 @@ int omap3isp_h3a_af_init(struct isp_device *isp)
af_recover_cfg->paxel.v_cnt = OMAP3ISP_AF_PAXEL_VERTICAL_COUNT_MIN; af_recover_cfg->paxel.v_cnt = OMAP3ISP_AF_PAXEL_VERTICAL_COUNT_MIN;
af_recover_cfg->paxel.line_inc = OMAP3ISP_AF_PAXEL_INCREMENT_MIN; af_recover_cfg->paxel.line_inc = OMAP3ISP_AF_PAXEL_INCREMENT_MIN;
if (h3a_af_validate_params(af, af_recover_cfg)) { if (h3a_af_validate_params(af, af_recover_cfg)) {
dev_err(af->isp->dev, "AF: recover configuration is " dev_err(af->isp->dev,
"invalid.\n"); "AF: recover configuration is invalid.\n");
return -EINVAL; return -EINVAL;
} }
......
...@@ -113,8 +113,9 @@ static int isp_stat_buf_check_magic(struct ispstat *stat, ...@@ -113,8 +113,9 @@ static int isp_stat_buf_check_magic(struct ispstat *stat,
ret = 0; ret = 0;
if (ret) { if (ret) {
dev_dbg(stat->isp->dev, "%s: beginning magic check does not " dev_dbg(stat->isp->dev,
"match.\n", stat->subdev.name); "%s: beginning magic check does not match.\n",
stat->subdev.name);
return ret; return ret;
} }
...@@ -122,8 +123,9 @@ static int isp_stat_buf_check_magic(struct ispstat *stat, ...@@ -122,8 +123,9 @@ static int isp_stat_buf_check_magic(struct ispstat *stat,
for (w = buf->virt_addr + buf_size, end = w + MAGIC_SIZE; for (w = buf->virt_addr + buf_size, end = w + MAGIC_SIZE;
w < end; w++) { w < end; w++) {
if (unlikely(*w != MAGIC_NUM)) { if (unlikely(*w != MAGIC_NUM)) {
dev_dbg(stat->isp->dev, "%s: ending magic check does " dev_dbg(stat->isp->dev,
"not match.\n", stat->subdev.name); "%s: ending magic check does not match.\n",
stat->subdev.name);
return -EINVAL; return -EINVAL;
} }
} }
...@@ -256,9 +258,9 @@ static void isp_stat_buf_next(struct ispstat *stat) ...@@ -256,9 +258,9 @@ static void isp_stat_buf_next(struct ispstat *stat)
{ {
if (unlikely(stat->active_buf)) if (unlikely(stat->active_buf))
/* Overwriting unused active buffer */ /* Overwriting unused active buffer */
dev_dbg(stat->isp->dev, "%s: new buffer requested without " dev_dbg(stat->isp->dev,
"queuing active one.\n", "%s: new buffer requested without queuing active one.\n",
stat->subdev.name); stat->subdev.name);
else else
stat->active_buf = isp_stat_buf_find_oldest_or_empty(stat); stat->active_buf = isp_stat_buf_find_oldest_or_empty(stat);
} }
...@@ -292,8 +294,9 @@ static struct ispstat_buffer *isp_stat_buf_get(struct ispstat *stat, ...@@ -292,8 +294,9 @@ static struct ispstat_buffer *isp_stat_buf_get(struct ispstat *stat,
return ERR_PTR(-EBUSY); return ERR_PTR(-EBUSY);
} }
if (isp_stat_buf_check_magic(stat, buf)) { if (isp_stat_buf_check_magic(stat, buf)) {
dev_dbg(stat->isp->dev, "%s: current buffer has " dev_dbg(stat->isp->dev,
"corrupted data\n.", stat->subdev.name); "%s: current buffer has corrupted data\n.",
stat->subdev.name);
/* Mark empty because it doesn't have valid data. */ /* Mark empty because it doesn't have valid data. */
buf->empty = 1; buf->empty = 1;
} else { } else {
...@@ -307,8 +310,9 @@ static struct ispstat_buffer *isp_stat_buf_get(struct ispstat *stat, ...@@ -307,8 +310,9 @@ static struct ispstat_buffer *isp_stat_buf_get(struct ispstat *stat,
spin_unlock_irqrestore(&stat->isp->stat_lock, flags); spin_unlock_irqrestore(&stat->isp->stat_lock, flags);
if (buf->buf_size > data->buf_size) { if (buf->buf_size > data->buf_size) {
dev_warn(stat->isp->dev, "%s: userspace's buffer size is " dev_warn(stat->isp->dev,
"not enough.\n", stat->subdev.name); "%s: userspace's buffer size is not enough.\n",
stat->subdev.name);
isp_stat_buf_release(stat); isp_stat_buf_release(stat);
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
} }
...@@ -531,20 +535,22 @@ int omap3isp_stat_config(struct ispstat *stat, void *new_conf) ...@@ -531,20 +535,22 @@ int omap3isp_stat_config(struct ispstat *stat, void *new_conf)
mutex_lock(&stat->ioctl_lock); mutex_lock(&stat->ioctl_lock);
dev_dbg(stat->isp->dev, "%s: configuring module with buffer " dev_dbg(stat->isp->dev,
"size=0x%08lx\n", stat->subdev.name, (unsigned long)buf_size); "%s: configuring module with buffer size=0x%08lx\n",
stat->subdev.name, (unsigned long)buf_size);
ret = stat->ops->validate_params(stat, new_conf); ret = stat->ops->validate_params(stat, new_conf);
if (ret) { if (ret) {
mutex_unlock(&stat->ioctl_lock); mutex_unlock(&stat->ioctl_lock);
dev_dbg(stat->isp->dev, "%s: configuration values are " dev_dbg(stat->isp->dev, "%s: configuration values are invalid.\n",
"invalid.\n", stat->subdev.name); stat->subdev.name);
return ret; return ret;
} }
if (buf_size != user_cfg->buf_size) if (buf_size != user_cfg->buf_size)
dev_dbg(stat->isp->dev, "%s: driver has corrected buffer size " dev_dbg(stat->isp->dev,
"request to 0x%08lx\n", stat->subdev.name, "%s: driver has corrected buffer size request to 0x%08lx\n",
stat->subdev.name,
(unsigned long)user_cfg->buf_size); (unsigned long)user_cfg->buf_size);
/* /*
...@@ -595,8 +601,9 @@ int omap3isp_stat_config(struct ispstat *stat, void *new_conf) ...@@ -595,8 +601,9 @@ int omap3isp_stat_config(struct ispstat *stat, void *new_conf)
/* Module has a valid configuration. */ /* Module has a valid configuration. */
stat->configured = 1; stat->configured = 1;
dev_dbg(stat->isp->dev, "%s: module has been successfully " dev_dbg(stat->isp->dev,
"configured.\n", stat->subdev.name); "%s: module has been successfully configured.\n",
stat->subdev.name);
mutex_unlock(&stat->ioctl_lock); mutex_unlock(&stat->ioctl_lock);
...@@ -762,8 +769,8 @@ int omap3isp_stat_enable(struct ispstat *stat, u8 enable) ...@@ -762,8 +769,8 @@ int omap3isp_stat_enable(struct ispstat *stat, u8 enable)
if (!stat->configured && enable) { if (!stat->configured && enable) {
spin_unlock_irqrestore(&stat->isp->stat_lock, irqflags); spin_unlock_irqrestore(&stat->isp->stat_lock, irqflags);
mutex_unlock(&stat->ioctl_lock); mutex_unlock(&stat->ioctl_lock);
dev_dbg(stat->isp->dev, "%s: cannot enable module as it's " dev_dbg(stat->isp->dev,
"never been successfully configured so far.\n", "%s: cannot enable module as it's never been successfully configured so far.\n",
stat->subdev.name); stat->subdev.name);
return -EINVAL; return -EINVAL;
} }
...@@ -859,8 +866,8 @@ static void __stat_isr(struct ispstat *stat, int from_dma) ...@@ -859,8 +866,8 @@ static void __stat_isr(struct ispstat *stat, int from_dma)
if (stat->state == ISPSTAT_ENABLED) { if (stat->state == ISPSTAT_ENABLED) {
spin_unlock_irqrestore(&stat->isp->stat_lock, irqflags); spin_unlock_irqrestore(&stat->isp->stat_lock, irqflags);
dev_err(stat->isp->dev, dev_err(stat->isp->dev,
"%s: interrupt occurred when module was still " "%s: interrupt occurred when module was still processing a buffer.\n",
"processing a buffer.\n", stat->subdev.name); stat->subdev.name);
ret = STAT_NO_BUF; ret = STAT_NO_BUF;
goto out; goto out;
} else { } else {
...@@ -964,8 +971,9 @@ static void __stat_isr(struct ispstat *stat, int from_dma) ...@@ -964,8 +971,9 @@ static void __stat_isr(struct ispstat *stat, int from_dma)
atomic_set(&stat->buf_err, 1); atomic_set(&stat->buf_err, 1);
ret = STAT_NO_BUF; ret = STAT_NO_BUF;
dev_dbg(stat->isp->dev, "%s: cannot process buffer, " dev_dbg(stat->isp->dev,
"device is busy.\n", stat->subdev.name); "%s: cannot process buffer, device is busy.\n",
stat->subdev.name);
} }
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment