From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hans.verkuil@cisco.com>,
linux-media@vger.kernel.org,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Subject: Re: [PATCH] RFC: media: v4l2-subdev: add subdev-wide config struct
Date: Tue, 20 Apr 2021 18:38:27 +0300 [thread overview]
Message-ID: <20210420153827.GS3@paasikivi.fi.intel.com> (raw)
In-Reply-To: <20210420153510.GR3@paasikivi.fi.intel.com>
A few more more mundane comments...
On Tue, Apr 20, 2021 at 06:35:10PM +0300, Sakari Ailus wrote:
...
> > +int v4l2_subdev_init_config(struct v4l2_subdev *sd, struct v4l2_subdev_config *cfg)
> > {
> > - struct v4l2_subdev_pad_config *cfg;
> > int ret;
> >
> > - if (!sd->entity.num_pads)
> > - return NULL;
> > -
> > - cfg = kvmalloc_array(sd->entity.num_pads, sizeof(*cfg),
> > - GFP_KERNEL | __GFP_ZERO);
> > - if (!cfg)
> > - return NULL;
> > + if (sd->entity.num_pads) {
> > + cfg->pad_configs = kvmalloc_array(sd->entity.num_pads, sizeof(*cfg->pad_configs),
> > + GFP_KERNEL | __GFP_ZERO);
Please also pay attention to line length and aligning arguments.
...
> > @@ -1093,20 +1097,17 @@ int v4l2_subdev_link_validate_default(struct v4l2_subdev *sd,
> > int v4l2_subdev_link_validate(struct media_link *link);
> >
> > /**
> > - * v4l2_subdev_alloc_pad_config - Allocates memory for pad config
> > + * v4l2_subdev_init_config - initialize v4l2_subdev_config
> > *
> > - * @sd: pointer to struct v4l2_subdev
> > + * Must call v4l2_subdev_uninit_config() when config is no longer needed.
> > */
> > -struct
> > -v4l2_subdev_pad_config *v4l2_subdev_alloc_pad_config(struct v4l2_subdev *sd);
> > +int v4l2_subdev_init_config(struct v4l2_subdev *sd, struct v4l2_subdev_config *cfg);
This should be wrapped, too... there are some others as well in this patch
I think.
--
Sakari Ailus
prev parent reply other threads:[~2021-04-20 15:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-09 13:36 [PATCH] RFC: media: v4l2-subdev: add subdev-wide config struct Tomi Valkeinen
2021-04-18 16:07 ` Laurent Pinchart
2021-04-20 11:52 ` Hans Verkuil
2021-04-20 15:35 ` Sakari Ailus
2021-04-20 15:38 ` Sakari Ailus [this message]
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=20210420153827.GS3@paasikivi.fi.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=hans.verkuil@cisco.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=tomi.valkeinen@ideasonboard.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).