linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Alan Cox <alan@linux.intel.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Steve Longerbeam <slongerbeam@gmail.com>,
	devel@driverdev.osuosl.org
Subject: Re: [PATCH 1/7] media: atomisp: fix ident for assert/return
Date: Wed, 01 Nov 2017 10:16:57 +0100	[thread overview]
Message-ID: <1509527817.8832.1.camel@pengutronix.de> (raw)
In-Reply-To: <7b2c3c762cad663021b3b3e7aac47b2a8c8d03a9.1509465351.git.mchehab@s-opensource.com>

Hi Mauro,

On Tue, 2017-10-31 at 12:04 -0400, Mauro Carvalho Chehab wrote:
> On lots of places, assert/return are starting at the first
> column, causing indentation issues, as complained by spatch:
> 
> drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/irq_private.h:32 irq_reg_store() warn: inconsistent indenting
> 
> Used this small script to fix such occurrences:
> 
> for i in $(git grep -l -E "^(assert|return)" drivers/staging/media/); do perl -ne 's/^(assert|return)/\t$1/; print $_' <$i >a && mv a $i; done

This also catches labels that start with "return". Adding some
whitespace to the regular expression may avoid these false positives.

> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
> ---
>  .../pci/atomisp2/css2400/camera/util/src/util.c    |  2 +-
>  .../hive_isp_css_common/host/event_fifo_private.h  |  2 +-
>  .../host/fifo_monitor_private.h                    | 28 +++++-----
>  .../css2400/hive_isp_css_common/host/gdc.c         |  8 +--
>  .../css2400/hive_isp_css_common/host/gp_device.c   |  2 +-
>  .../hive_isp_css_common/host/gp_device_private.h   | 16 +++---
>  .../hive_isp_css_common/host/gpio_private.h        |  4 +-
>  .../hive_isp_css_common/host/hmem_private.h        |  4 +-
>  .../host/input_formatter_private.h                 | 16 +++---
>  .../hive_isp_css_common/host/input_system.c        | 28 +++++-----
>  .../host/input_system_private.h                    | 64 +++++++++++-----------
>  .../css2400/hive_isp_css_common/host/irq.c         | 30 +++++-----
>  .../css2400/hive_isp_css_common/host/irq_private.h | 12 ++--
>  .../css2400/hive_isp_css_common/host/isp.c         |  4 +-
>  .../css2400/hive_isp_css_common/host/mmu.c         |  6 +-
>  .../css2400/hive_isp_css_common/host/mmu_private.h | 12 ++--
>  .../css2400/hive_isp_css_common/host/sp_private.h  | 60 ++++++++++----------
>  .../atomisp/pci/atomisp2/css2400/sh_css_hrt.c      |  2 +-
>  drivers/staging/media/imx/imx-media-capture.c      |  2 +-
[...]
> diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c
> index ea145bafb880..149f0e1753a1 100644
> --- a/drivers/staging/media/imx/imx-media-capture.c
> +++ b/drivers/staging/media/imx/imx-media-capture.c
> @@ -463,7 +463,7 @@ static int capture_start_streaming(struct vb2_queue *vq, unsigned int count)
>  
>  	return 0;
>  
> -return_bufs:
> +	return_bufs:
>  	spin_lock_irqsave(&priv->q_lock, flags);
>  	list_for_each_entry_safe(buf, tmp, &priv->ready_q, list) {
>  		list_del(&buf->list);

This label should stay at the first column.

regards
Philipp

  reply	other threads:[~2017-11-01  9:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31 16:04 [PATCH 0/7] Shut up several smatch warnings with atomisp Mauro Carvalho Chehab
2017-10-31 16:04 ` [PATCH 1/7] media: atomisp: fix ident for assert/return Mauro Carvalho Chehab
2017-11-01  9:16   ` Philipp Zabel [this message]
2017-11-01  9:28     ` Mauro Carvalho Chehab
2017-10-31 16:04 ` [PATCH 2/7] media: atomisp: fix spatch warnings at sh_css.c Mauro Carvalho Chehab
2017-10-31 16:04 ` [PATCH 3/7] media: atomisp: fix switch coding style at input_system.c Mauro Carvalho Chehab
2017-10-31 16:04 ` [PATCH 4/7] media: atomisp: fix other inconsistent identing Mauro Carvalho Chehab
2017-10-31 16:04 ` [PATCH 5/7] media: atomisp: get rid of wrong stddef.h include Mauro Carvalho Chehab
2017-10-31 16:04 ` [PATCH 6/7] media: atomisp: get rid of storage_class.h Mauro Carvalho Chehab
2017-10-31 16:04 ` [PATCH 7/7] media: atomisp: make function calls cleaner Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1509527817.8832.1.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=alan@linux.intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mchehab@s-opensource.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=slongerbeam@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).