devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomasz Figa <tfiga@chromium.org>
To: "Yeh, Andy" <andy.yeh@intel.com>
Cc: jacopo@jmondi.org, Alan Chiang <alanx.chiang@intel.com>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	devicetree@vger.kernel.org
Subject: Re: RESEND[PATCH v6 2/2] media: dw9807: Add dw9807 vcm driver
Date: Wed, 11 Apr 2018 04:20:35 +0000	[thread overview]
Message-ID: <CAAFQd5DZCN2f=dpaAbWGRb70zPXY3_Hc1g8ecmRcp1ty6yQDSg@mail.gmail.com> (raw)
In-Reply-To: <8E0971CCB6EA9D41AF58191A2D3978B61D5681E4@PGSMSX111.gar.corp.intel.com>

Hi Andy,

On Wed, Apr 11, 2018 at 12:54 AM Yeh, Andy <andy.yeh@intel.com> wrote:

> Hi Jacopo,

> Excuse for late reply, we were busy in past weeks for major milestone.
Please kindly check the revised V7 which has been uploaded.
> https://patchwork.linuxtv.org/patch/48589/

> Responded to your comments as below.

> Cc in Tomasz for unintentionally missed.

> Regards, Andy
[snip]
> > +static int dw9807_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh
> > +*fh) {
> > +     int rval;
> > +
> > +     rval = pm_runtime_get_sync(sd->dev);
> > +     if (rval < 0) {
> > +             pm_runtime_put_noidle(sd->dev);

> > If you fail to get pm context, no need to put it back (I presume)

> According to Sakari Ailus's comment on LinuxTV.
> (pm_runtime_get() must be followed by pm_runtime_put() whether the former
> succeeds or not.)
> So it is no need to modify.

Andy is right. pm_runtime_get() always acquires a PM runtime count, even in
case of error.

[snip]
> > +static const struct of_device_id dw9807_of_table[] = {
> > +     { .compatible = "dongwoon,dw9807" },
> > +     { { 0 } }

> > { } is enough.
> According to Sakari Ailus's comment on LinuxTV.
> { } is GCC specific while { { 0 } } isn't.
> And if I remove it, compile error will occur.

Hmm, we're in the heavy nitpicking territory here, but

{ },

is the typical pattern used throughout the kernel. I personally actually
put a comment inside:

{ /* sentinel */ },

Just my opinion. I'm fine with keeping it either way, if no need to re-spin
for other changes.

Best regards,
Tomasz

      reply	other threads:[~2018-04-11  4:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-16 17:05 RESEND[PATCH v6 0/2] DW9807 DT binding and driver patches Andy Yeh
2018-03-16 17:05 ` RESEND[PATCH v6 1/2] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil Andy Yeh
2018-03-26 22:22   ` Rob Herring
2018-03-16 17:05 ` RESEND[PATCH v6 2/2] media: dw9807: Add dw9807 vcm driver Andy Yeh
2018-03-20 10:28   ` jacopo mondi
2018-03-20 11:36     ` Sakari Ailus
2018-03-21 15:58     ` Yeh, Andy
2018-03-21 17:06       ` sakari.ailus
2018-03-27  1:06         ` Yeh, Andy
2018-04-10 15:52     ` Yeh, Andy
2018-04-11  4:20       ` Tomasz Figa [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='CAAFQd5DZCN2f=dpaAbWGRb70zPXY3_Hc1g8ecmRcp1ty6yQDSg@mail.gmail.com' \
    --to=tfiga@chromium.org \
    --cc=alanx.chiang@intel.com \
    --cc=andy.yeh@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jacopo@jmondi.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@linux.intel.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).