All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-watchdog@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org,
	Wolfram Sang <wsa+renesas@sang-engineering.com>
Subject: Re: [RFC PATCH] watchdog: HACK: disable bind attributes with NOWAYOUT
Date: Tue, 28 Aug 2018 16:18:50 +0200	[thread overview]
Message-ID: <20180828141850.opoduyldzvp2e53v@ninjato> (raw)
In-Reply-To: <3d3a5bde-b8bd-0810-5571-cdc64cd57ee4@roeck-us.net>

[-- Attachment #1: Type: text/plain, Size: 887 bytes --]

Hi Guenter,

> > -	if (nowayout)
> > +	if (nowayout) {
> >   		set_bit(WDOG_NO_WAY_OUT, &wdd->status);
> > +		wdd->parent->driver->suppress_bind_attrs = true;
> 
> That makes sense to me. We can not assume that wdd->parent is set, so it won't work as-is.

Good point!

> Not sure what a "correct" solution might be. Passing "parent" as argument doesn't really
> solve any layering argument

I totally agree. I opted for passing a pointer to the driver to modify:

void watchdog_set_nowayout(struct watchdog_device *wdd, struct driver
			   *drv, bool nowayout)

I'd think this would work from a layering perspective.

> Did you ensure that the attributes are not already created by the time
> suppress_bind_attrs is set ?

Not yet. I first wanted to make sure if it makes sense, at all. But will
do for later versions.

Thanks for the review,

   Wolfram


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-08-28 14:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-28 10:29 [RFC PATCH] watchdog: HACK: disable bind attributes with NOWAYOUT Wolfram Sang
2018-08-28 14:03 ` Guenter Roeck
2018-08-28 14:18   ` Wolfram Sang [this message]
2018-08-28 16:37     ` Wolfram Sang

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=20180828141850.opoduyldzvp2e53v@ninjato \
    --to=wsa@the-dreams.de \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=wsa+renesas@sang-engineering.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.