From: Radu Rendec <rrendec@arista.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Wim Van Sebroeck <wim@iguana.be>, linux-watchdog@vger.kernel.org
Subject: Re: [2/2] watchdog: xen_wdt: remove info message and version number
Date: Mon, 06 Nov 2017 17:39:03 +0000 [thread overview]
Message-ID: <1509989943.7709.20.camel@arista.com> (raw)
In-Reply-To: <20171105153910.GA28756@roeck-us.net>
On Sun, 2017-11-05 at 07:39 -0800, Guenter Roeck wrote:
> On Fri, Nov 03, 2017 at 03:31:53PM +0000, Radu Rendec wrote:
> > The initial info message (early in the xen_wdt_init_module() function)
> > is not very useful and we already have a message on successful probe. If
> > the probe fails, additional messages are printed anyway.
> >
> > The version number serves no useful purpose and it ran out of favor
> > upstream anyway.
> >
>
> As I mentioned in the other patch, any chance to use
> module_platform_driver_probe() ? The
>
> if (!xen_domain())
> return -ENODEV;
>
> could be moved there.
I see your point, but I think module_platform_driver_probe() can't be
used here. The problem is that there's nothing else to create the
platform device, so if xen_wdt doesn't create it on its own, there will
be no (matching) platform device to be probed by the driver that
xen_wdt registers.
I looked at module_platform_driver_probe() and it's a convenience macro
that ultimately calls __platform_driver_probe(). The latter is just
__platform_driver_register() with some additional tricks around the
probe function.
The current version works because platform_device_register_simple()
(called by the module init function) conveniently allocates and
registers a matching platform device.
Looking at platform_device.h, I don't see any other macros that we
could use instead.
I already fixed the other issues in the previous patch so, unless you
think init/exit can be simplified in a different way, I am ready to
resend the (updated) patches.
Thanks,
Radu
next prev parent reply other threads:[~2017-11-06 17:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-03 15:31 [PATCH 0/2] xen_wdt: use the watchdog subsystem Radu Rendec
2017-11-03 15:31 ` [PATCH 1/2] watchdog: " Radu Rendec
2017-11-05 15:35 ` [1/2] " Guenter Roeck
2017-11-03 15:31 ` [PATCH 2/2] watchdog: xen_wdt: remove info message and version number Radu Rendec
2017-11-05 15:39 ` [2/2] " Guenter Roeck
2017-11-06 17:39 ` Radu Rendec [this message]
2017-11-06 18:04 ` Guenter Roeck
2017-11-06 19:04 ` [PATCH v2 0/2] xen_wdt: use the watchdog subsystem Radu Rendec
2017-11-06 19:04 ` [PATCH v2 1/2] watchdog: " Radu Rendec
2017-11-11 16:40 ` [v2,1/2] " Guenter Roeck
2017-11-14 15:05 ` Radu Rendec
2017-11-06 19:04 ` [PATCH v2 2/2] watchdog: xen_wdt: remove info message and version number Radu Rendec
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=1509989943.7709.20.camel@arista.com \
--to=rrendec@arista.com \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=wim@iguana.be \
/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