linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeremy Sowden <jeremy@azazel.net>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-media@vger.kernel.org, devel@driverdev.osuosl.org
Subject: Re: [PATCH v2 1/3] media: atomisp: convert default struct values to use compound-literals with designated initializers.
Date: Sat, 2 Dec 2017 21:34:43 +0000	[thread overview]
Message-ID: <20171202213443.GC32301@azazel.net> (raw)
In-Reply-To: <20171202204147.GB32301@azazel.net>

[-- Attachment #1: Type: text/plain, Size: 2285 bytes --]

On 2017-12-02, at 20:41:48 +0000, Jeremy Sowden wrote:
> On 2017-12-02, at 10:35:06 +0000, Jeremy Sowden wrote:
> > On 2017-12-02, at 13:20:09 +0300, Dan Carpenter wrote:
> > > On Fri, Dec 01, 2017 at 05:19:37PM +0000, Jeremy Sowden wrote:
> > > > -#define DEFAULT_PIPE_INFO \
> > > > -{ \
> > > > -	{IA_CSS_BINARY_DEFAULT_FRAME_INFO},	/* output_info */ \
> > > > -	{IA_CSS_BINARY_DEFAULT_FRAME_INFO},	/* vf_output_info */ \
> > > > -	IA_CSS_BINARY_DEFAULT_FRAME_INFO,	/* raw_output_info */ \
> > > > -	{ 0, 0},				/* output system in res */ \
> > > > -	DEFAULT_SHADING_INFO,			/* shading_info */ \
> > > > -	DEFAULT_GRID_INFO,			/* grid_info */ \
> > > > -	0					/* num_invalid_frames */ \
> > > > -}
> > > > +#define DEFAULT_PIPE_INFO ( \
> > >
> > > Why does this have a ( now?  That can't compile can it??
> > >
> > > > +	(struct ia_css_pipe_info) { \
> > > > +		.output_info			= {IA_CSS_BINARY_DEFAULT_FRAME_INFO}, \
> > > > +		.vf_output_info			= {IA_CSS_BINARY_DEFAULT_FRAME_INFO}, \
> > > > +		.raw_output_info		= IA_CSS_BINARY_DEFAULT_FRAME_INFO, \
> > > > +		.output_system_in_res_info	= { 0, 0 }, \
> > > > +		.shading_info			= DEFAULT_SHADING_INFO, \
> > > > +		.grid_info			= DEFAULT_GRID_INFO, \
> > > > +		.num_invalid_frames		= 0 \
> > > > +	} \
> > > > +)
> >
> > Checkpatch got quite shouty, e.g.:
> >
> >   ERROR: Macros with complex values should be enclosed in parentheses
> >   #826: FILE: drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/common/ia_css_sdis_common_types.h:215:
> >   +#define DEFAULT_DVS_STAT_PUBLIC_DVS_GLOBAL_CFG \
> >   +(struct dvs_stat_public_dvs_global_cfg) { \
> >   +       .kappa          = 0, \
> >   +       .match_shift    = 0, \
> >   +       .ybin_mode      = 0, \
> >   +}
> >
> > so I just wrapped all of them.
>
> I've run checkpatch.pl against the unparenthesized patches, and it
> only objects to some of the macros.  I've also taken a look at the
> source of checkpatch.pl itself, and at first glance it appears that it
> should accept them.  I'll see if I can work out why it's complaining.

I think I've found a bug in checkpatch.pl.  I'll remove the parentheses
from my patches 'cause the error-reportd appear to be bogus, and pass on
my findings.

J.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-12-02 21:34 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-27 11:30 [PATCH 0/3] Sparse fixes for the Atom ISP Staging Driver Jeremy Sowden
2017-11-27 11:30 ` [PATCH 1/3] media: staging: atomisp: address member of struct ia_css_host_data is a pointer-to-char, so define default as NULL Jeremy Sowden
2017-11-27 11:30 ` [PATCH 2/3] media: staging: atomisp: defined as static some const arrays which don't need external linkage Jeremy Sowden
2017-11-27 12:21   ` Greg KH
2017-11-27 12:44     ` [PATCH v2 0/3] Sparse fixes for the Atom ISP Staging Driver Jeremy Sowden
2017-11-27 12:44       ` [PATCH v2 1/3] media: staging: atomisp: fix for sparse "using plain integer as NULL pointer" warnings Jeremy Sowden
2017-11-28 14:15         ` Dan Carpenter
2017-11-28 23:33           ` Jeremy Sowden
2017-11-29  0:04             ` Dan Carpenter
2017-11-29  8:38               ` Jeremy Sowden
2017-11-29 13:58                 ` Alan Cox
2017-11-30 21:40                 ` [PATCH 0/3] Clean up of data-structure initialization in the CSS API Jeremy Sowden
2017-11-30 21:40                   ` [PATCH 1/3] media: atomisp: convert default struct values to use compound-literals with designated initializers Jeremy Sowden
2017-12-01 15:07                     ` Dan Carpenter
2017-12-01 15:31                       ` Jeremy Sowden
2017-12-01 17:19                       ` [PATCH v2 0/3] media: atomisp: clean up of data-structure initialization in the CSS API Jeremy Sowden
2017-12-01 17:19                         ` [PATCH v2 1/3] media: atomisp: convert default struct values to use compound-literals with designated initializers Jeremy Sowden
2017-12-02 10:20                           ` Dan Carpenter
2017-12-02 10:35                             ` Jeremy Sowden
2017-12-02 20:41                               ` Jeremy Sowden
2017-12-02 21:34                                 ` Jeremy Sowden [this message]
2017-12-02 22:11                                   ` [PATCH v4 0/3] media: atomisp: clean up of data-structure initialization in the CSS API Jeremy Sowden
2017-12-02 22:11                                     ` [PATCH v4 1/3] media: atomisp: convert default struct values to use compound-literals with designated initializers Jeremy Sowden
2017-12-19 12:07                                       ` Sakari Ailus
2017-12-21 19:31                                         ` Jeremy Sowden
2017-12-02 22:12                                     ` [PATCH v4 2/3] media: atomisp: delete zero-valued struct members Jeremy Sowden
2017-12-02 22:12                                     ` [PATCH v4 3/3] media: atomisp: delete empty default struct values Jeremy Sowden
2017-12-19 12:08                                       ` Sakari Ailus
2017-12-03  5:39                                 ` [PATCH v2 1/3] media: atomisp: convert default struct values to use compound-literals with designated initializers Dan Carpenter
2017-12-03 10:54                                   ` Jeremy Sowden
2017-12-01 17:19                         ` [PATCH v2 2/3] media: atomisp: delete zero-valued struct members Jeremy Sowden
2017-12-01 17:41                           ` Alan Cox
2017-12-02 15:00                             ` Jeremy Sowden
2017-12-01 17:19                         ` [PATCH v2 3/3] media: atomisp: delete empty default struct values Jeremy Sowden
2017-12-01 21:45                       ` [PATCH v3 0/3] media: atomisp: clean up of data-structure initialization in the CSS API Jeremy Sowden
2017-12-01 21:45                         ` [PATCH v3 1/3] media: atomisp: convert default struct values to use compound-literals with designated initializers Jeremy Sowden
2017-12-01 21:45                         ` [PATCH v3 2/3] media: atomisp: delete zero-valued struct members Jeremy Sowden
2017-12-01 21:45                         ` [PATCH v3 3/3] media: atomisp: delete empty default struct values Jeremy Sowden
2017-11-30 21:40                   ` [PATCH 2/3] media: atomisp: delete zero-valued struct members Jeremy Sowden
2017-11-30 21:40                   ` [PATCH 3/3] media: atomisp: delete empty default struct values Jeremy Sowden
2017-11-27 12:44       ` [PATCH v2 2/3] media: staging: atomisp: fixes for "symbol was not declared. Should it be static?" sparse warnings Jeremy Sowden
2017-11-27 12:44       ` [PATCH v2 3/3] media: staging: atomisp: fixed some checkpatch integer type warnings Jeremy Sowden
2017-11-27 19:09         ` Alan Cox
2017-11-27 22:02           ` Jeremy Sowden
2017-11-28 10:27           ` [PATCH v2 0/3] Sparse fixes for the Atom ISP Staging Driver Jeremy Sowden
2017-11-28 10:27             ` [PATCH v3 1/2] media: staging: atomisp: fix for sparse "using plain integer as NULL pointer" warnings Jeremy Sowden
2017-11-28 10:27             ` [PATCH v3 2/2] media: staging: atomisp: fixes for "symbol was not declared. Should it be static?" sparse warnings Jeremy Sowden
2017-11-29  8:48             ` [PATCH v2 0/3] Sparse fixes for the Atom ISP Staging Driver Sakari Ailus
2017-11-29  9:08     ` [PATCH 2/3] media: staging: atomisp: defined as static some const arrays which don't need external linkage Sakari Ailus
2017-11-29  9:15       ` Greg KH
2017-11-29  9:26         ` Sakari Ailus
2017-11-27 11:30 ` [PATCH 3/3] media: staging: atomisp: prefer s16 to int16_t Jeremy Sowden
2017-11-29  8:47   ` Sakari Ailus

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=20171202213443.GC32301@azazel.net \
    --to=jeremy@azazel.net \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=linux-media@vger.kernel.org \
    /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).