From: Sebastian Ene <sebastianene@google.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Rob Herring <robh+dt@kernel.org>,
qperret@google.com, maz@kernel.org,
linux-watchdog@vger.kernel.org, will@kernel.org,
vdonnefort@google.com
Subject: Re: [PATCH v8 2/2] misc: Add a mechanism to detect stalls on guest vCPUs
Date: Tue, 28 Jun 2022 14:11:36 +0000 [thread overview]
Message-ID: <YrsMGAVljIcypDl4@google.com> (raw)
In-Reply-To: <194f5edc-5877-af3f-9aa1-be1e275ea304@roeck-us.net>
On Tue, Jun 28, 2022 at 07:00:05AM -0700, Guenter Roeck wrote:
> On 6/28/22 02:54, Sebastian Ene wrote:
> [ ... ]
> > > > +static struct platform_device *virt_dev;
> > > > +
Hi,
> > >
> > > virt_dev is only used to call platform_set_drvdata() and platform_get_drvdata()
> > > on it. Why not just have a static variable named vm_stall_detect ?
> > >
> >
> > I think this should also work. I wanted to make use of the provided APIs
> > like platform_set/platform_get.
> >
>
> That doesn't mean such APIs should be used just to get used, though.
>
I will remove these calls and keep it static.
> > > > +
> > > > + vm_stall_detect = (struct vm_stall_detect_s __percpu *)
> > > > + platform_get_drvdata(virt_dev);
> > >
> > > platform_get_drvdata() returns void *; typecast to it is unnecessary.
> > >
> > >
> >
> > I needed this typecast because the variable is per-cpu and some
> > compilers(eg. gcc for ARCH=h8300) complain if we don't specify this
> > hint.
> >
> Hmm, interesting. I didn't know that. We live and learn.
> Though h8300 is gone now :-)
I had some Intel robot complaining about this in my previous series(v5) and
I fixed the warnings by adding these compiler hints.
>
> Did you reply in private on purpose ?
>
I misused my CC list but I will fix this in my reply.
> Thanks,
> Guenter
Thanks for the response,
Seb
prev parent reply other threads:[~2022-06-28 14:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-27 10:28 [PATCH v8 0/2] Detect stalls on guest vCPUS Sebastian Ene
2022-06-27 10:28 ` [PATCH v8 1/2] dt-bindings: vcpu_stall_detector: Add qemu,vcpu-stall-detector compatible Sebastian Ene
2022-07-01 15:33 ` Rob Herring
2022-06-27 10:28 ` [PATCH v8 2/2] misc: Add a mechanism to detect stalls on guest vCPUs Sebastian Ene
2022-06-27 14:33 ` Guenter Roeck
[not found] ` <YrrP3NvAuxso0rzO@google.com>
[not found] ` <194f5edc-5877-af3f-9aa1-be1e275ea304@roeck-us.net>
2022-06-28 14:11 ` Sebastian Ene [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=YrsMGAVljIcypDl4@google.com \
--to=sebastianene@google.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=maz@kernel.org \
--cc=qperret@google.com \
--cc=robh+dt@kernel.org \
--cc=vdonnefort@google.com \
--cc=will@kernel.org \
--cc=wim@linux-watchdog.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).