Re: [PATCH v4 1/3] media: atomisp: convert default struct values to use compound-literals with designated initializers.
On 2017-12-19, at 14:07:49 +0200, Sakari Ailus wrote: > On Sat, Dec 02, 2017 at 10:11:59PM +, Jeremy Sowden wrote: > > The CSS API uses a lot of nested anonymous structs defined in object > > macros to assign default values to its data-structures. These have > > been changed to use compound-literals and designated initializers to > > make them more comprehensible and less fragile. > > > > The compound-literals can also be used in assignment, which means we > > can get rid of some temporary variables whose only purpose is to be > > initialized by one of these anonymous structs and then serve as the > > rvalue in an assignment expression. > > > > Signed-off-by: Jeremy Sowden> > I don't think it's useful to change the struct definition macros only > to remove a large number of assigned fields in the next patch. How > about merging the two patches? I squashed all three, as you suggested. > Please also start a new thread when re-posting a set. Done. J. signature.asc Description: PGP signature
Re: [PATCH v4 1/3] media: atomisp: convert default struct values to use compound-literals with designated initializers.
Hi Jeremy, On Sat, Dec 02, 2017 at 10:11:59PM +, Jeremy Sowden wrote: > The CSS API uses a lot of nested anonymous structs defined in object > macros to assign default values to its data-structures. These have been > changed to use compound-literals and designated initializers to make > them more comprehensible and less fragile. > > The compound-literals can also be used in assignment, which means we can > get rid of some temporary variables whose only purpose is to be > initialized by one of these anonymous structs and then serve as the > rvalue in an assignment expression. > > Signed-off-by: Jeremy SowdenI don't think it's useful to change the struct definition macros only to remove a large number of assigned fields in the next patch. How about merging the two patches? Please also start a new thread when re-posting a set. Thanks. -- Sakari Ailus e-mail: sakari.ai...@iki.fi