Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4535988yba; Wed, 17 Apr 2019 13:40:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzOjPdVKF8ilk3bNk2KqvmcJCAHK8S6rKFbqIiRi7tl7ItIyt3ZleEBp3VbspBbQfNRDBg3 X-Received: by 2002:a63:7444:: with SMTP id e4mr85832130pgn.261.1555533629733; Wed, 17 Apr 2019 13:40:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555533629; cv=none; d=google.com; s=arc-20160816; b=UCCWJ95c82aR/nPmNSvqNrL7F8Q5WJKUwYlyXSNZznousVs17xRYdxPM25bCZKnQTN JZHthHxtsP2GRWXiFx6GHrPTl9O2C1M1lxgmFO7T9Sitnb22WLiUHiTJyVGXNY9ddIaG 5V3KgzZq/S9soZrbBw2GPeRW9ENuDpATpeyPNTMpESllYcH8qrBzfBoxKL6c3gmcgB3x ncvYroKiflxn1uG0ikYCGUdoW6kkFiHHvot0DukAuSgzNSQDh/0AC4XwNod+8FjxjJnD KyIagWrcUXbWCXccQGSKBK9ut2q69vzcm94sjwjxn3uKwZMfmxlLjX++rQUKif+4iuoz csRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=z/zto8Zqqz3noZkdPgmWSSboHWxv+YCTfNU2TEFH91M=; b=rM0kcgg2NLVGvJ/ITKb4jaLnYwJ+GoXxVSDDbqQ8yn6pJ63g1kmOYpfA4UIGJdSoOd s8WXSXdNN7MloXZQv0AdhMrmUkW2KdZq8TAy/utIs0MGQmNYbYM3yKWvmUF1/7b/wU5f ii2K52B0PmCCPj+xYGQ9XmI60nKZE4tweiLlb5BGiklSeCYxkorlqHe4WJLI6mPTarCD znfC4f2xChx4hnuEZMZ+vRJa3S25RvANNvXVHdQE5/8EO+EC4XBM+7HIyPhNu9NNy1+g JROgULk0GKh9kt7CtULB2J8oqlqJp8L0CsLwmDSi4QJIu+GwTayFuS57XtUeuqrp1ynQ vK7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o12si38329851plg.262.2019.04.17.13.40.14; Wed, 17 Apr 2019 13:40:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732524AbfDQUjY (ORCPT + 99 others); Wed, 17 Apr 2019 16:39:24 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:59426 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1727013AbfDQUjY (ORCPT ); Wed, 17 Apr 2019 16:39:24 -0400 Received: (qmail 5106 invoked by uid 2102); 17 Apr 2019 16:39:23 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 17 Apr 2019 16:39:23 -0400 Date: Wed, 17 Apr 2019 16:39:23 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Raul Rangel cc: linux-usb@vger.kernel.org, , , , , Sebastian Andrzej Siewior , Martin Blumenstingl , Dmitry Torokhov , , "Gustavo A. R. Silva" , Miquel Raynal , Johan Hovold , Greg Kroah-Hartman , Mathias Nyman Subject: Re: [PATCH v3] usb/hcd: Send a uevent signaling that the host controller had died In-Reply-To: <20190417202017.GA204974@google.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 17 Apr 2019, Raul Rangel wrote: > 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. This sounds like a golden opportunity! Submit a separate patch making the parameter to kobject_uevent_env be const (actually const char * const []), then submit this patch on top of that one. Alan Stern