linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Raul E Rangel <rrangel@chromium.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-usb@vger.kernel.org, groeck@chromium.org, oneukum@suse.com,
	djkurtz@chromium.org, zwisler@chromium.org,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Dmitry Torokhov <dtor@chromium.org>,
	linux-kernel@vger.kernel.org,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Johan Hovold <johan@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mathias Nyman <mathias.nyman@linux.intel.com>,
	Raul Rangel <rrangel@chromium.org>
Subject: [v3] usb/hcd: Send a uevent signaling that the host controller had died
Date: Wed, 17 Apr 2019 14:20:17 -0600	[thread overview]
Message-ID: <20190417202017.GA204974@google.com> (raw)

On Wed, Apr 17, 2019 at 03:14:14PM -0400, Alan Stern wrote:
> On Wed, 17 Apr 2019, Raul E Rangel wrote:
> 
> > +/* Workqueue routine for when the root-hub has died. */
> > +static void hcd_died_work(struct work_struct *work)
> > +{
> > +	struct usb_hcd *hcd = container_of(work, struct usb_hcd, died_work);
> > +	char *env[] = {
> > +		"ERROR=DEAD",
> > +		NULL
> > +	};
> 
> This can now be
> 
> 	static const char *env[] = ...
> 
> right?  There's no need for the array to be reinitialized every time 
> the routine runs.
I originally tried to make it const, but kobject_uevent_env doesn't
declare the parameter as const, so the compiler yelled at me. I could
make it static, but a static without a const makes me wary. I can add it
if you think it's fine.
> 
> Alan Stern
>

WARNING: multiple messages have this Message-ID (diff)
From: Raul Rangel <rrangel@chromium.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: linux-usb@vger.kernel.org, groeck@chromium.org, oneukum@suse.com,
	djkurtz@chromium.org, zwisler@chromium.org,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Dmitry Torokhov <dtor@chromium.org>,
	linux-kernel@vger.kernel.org,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Johan Hovold <johan@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mathias Nyman <mathias.nyman@linux.intel.com>,
	Raul Rangel <rrangel@chromium.org>
Subject: Re: [PATCH v3] usb/hcd: Send a uevent signaling that the host controller had died
Date: Wed, 17 Apr 2019 14:20:17 -0600	[thread overview]
Message-ID: <20190417202017.GA204974@google.com> (raw)
Message-ID: <20190417202017.X_iAk7_TSAbGRbmdCDLxactGNbQiOQL9MIH_7gNE0VI@z> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1904171511510.1400-100000@iolanthe.rowland.org>

On Wed, Apr 17, 2019 at 03:14:14PM -0400, Alan Stern wrote:
> On Wed, 17 Apr 2019, Raul E Rangel wrote:
> 
> > +/* Workqueue routine for when the root-hub has died. */
> > +static void hcd_died_work(struct work_struct *work)
> > +{
> > +	struct usb_hcd *hcd = container_of(work, struct usb_hcd, died_work);
> > +	char *env[] = {
> > +		"ERROR=DEAD",
> > +		NULL
> > +	};
> 
> This can now be
> 
> 	static const char *env[] = ...
> 
> right?  There's no need for the array to be reinitialized every time 
> the routine runs.
I originally tried to make it const, but kobject_uevent_env doesn't
declare the parameter as const, so the compiler yelled at me. I could
make it static, but a static without a const makes me wary. I can add it
if you think it's fine.
> 
> Alan Stern
> 

         reply	other threads:[~2019-04-17 20:20 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-17 19:03 [v3] usb/hcd: Send a uevent signaling that the host controller had died Raul E Rangel
2019-04-17 19:03 ` [PATCH v3] " Raul E Rangel
2019-04-17 19:14 ` [v3] " Alan Stern
2019-04-17 19:14   ` [PATCH v3] " Alan Stern
2019-04-17 20:20   ` Raul E Rangel [this message]
2019-04-17 20:20     ` Raul Rangel
2019-04-17 20:39     ` [v3] " Alan Stern
2019-04-17 20:39       ` [PATCH v3] " Alan Stern
2019-04-17 22:10       ` [v3] " Raul E Rangel
2019-04-17 22:10         ` [PATCH v3] " Raul Rangel
2019-04-17 22:23         ` [v3] " Guenter Roeck
2019-04-17 22:23           ` [PATCH v3] " Guenter Roeck
2019-04-17 22:41           ` [v3] " Raul E Rangel
2019-04-17 22:41             ` [PATCH v3] " Raul Rangel
2019-04-17 23:20             ` [v3] " Guenter Roeck
2019-04-17 23:20               ` [PATCH v3] " Guenter Roeck
2019-04-18  6:51               ` [v3] " Greg Kroah-Hartman
2019-04-18  6:51                 ` [PATCH v3] " Greg Kroah-Hartman
2019-04-18 14:21                 ` [v3] " Alan Stern
2019-04-18 14:21                   ` [PATCH v3] " Alan Stern
2019-04-18 14:30                   ` [v3] " Greg Kroah-Hartman
2019-04-18 14:30                     ` [PATCH v3] " Greg Kroah-Hartman
2019-04-18 15:29                     ` [v3] " Raul E Rangel
2019-04-18 15:29                       ` [PATCH v3] " Raul Rangel
2019-04-18 20:59 ` kbuild test robot
2019-04-18 21:35 ` kbuild test robot
2019-04-19 12:16 ` [v3] " Greg Kroah-Hartman
2019-04-19 12:16   ` [PATCH v3] " Greg Kroah-Hartman

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=20190417202017.GA204974@google.com \
    --to=rrangel@chromium.org \
    --cc=bigeasy@linutronix.de \
    --cc=djkurtz@chromium.org \
    --cc=dtor@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=groeck@chromium.org \
    --cc=gustavo@embeddedor.com \
    --cc=johan@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mathias.nyman@linux.intel.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=oneukum@suse.com \
    --cc=stern@rowland.harvard.edu \
    --cc=zwisler@chromium.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).