Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2420954pxk; Mon, 14 Sep 2020 12:54:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWjZMVo5Xp6CNp6FPr5KH4Qz4F4I7uM3WNOsyWU9EglDRp3Lgo8wYtyPi9J9s9YQN6DSSJ X-Received: by 2002:a17:906:7c82:: with SMTP id w2mr16087295ejo.87.1600113250786; Mon, 14 Sep 2020 12:54:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600113250; cv=none; d=google.com; s=arc-20160816; b=McmrEhLGdhROKy2FeULJT8U7cw+4DGrF0CryIhRISuuwTA4JGcmwW+L0QT46a1RaJU gQHBAuUaMabmbRIUBOS3OVZMnbYFpL6NYii1x0xQQ/jxaiQ4Ypv5GJABXdIPg0eiUHAr UjRIxFDZqKyNnPOhrnGuciMiIysGbUcF/FXR0OPsW9PjX80iGMyO+F02lzAFxU39ROBV hB09nIPDnmvgf2KWU1BHR3zU4NZA2Gv4zItL/UhBP/tUgvqqTxY6nZkolxKa1S8uKvx3 qX9PG0zKb+33ZXFtuyLBg4roEpLAXDuFqINIIXyo/7NOpJAEWFDK+AGJ0focvCNp3WjF xqHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=TcdXkIRAgGt9vXRg+9Us0U0AFK7n0jMIa5WCvYtwILM=; b=pyp1GeOEvtLdpS7hHu+4okHjo+trJCgB3GHbh2o15LP5WSw3xInCmqpG7ehKCBPcpx P9hiA3Ax0zwaVJ3ITMXeQAuwfRglK7awvyx41wcTWYBmbX33ubsHoDU3iJ8LFFkby0mh m2/L2Bls0LLo8r3hY/Y87JeHovhS0kZqq4Z7nSe6FDbZAhwC0U+wEaJkVreR2B10bEMt J5H4warEvSXekDPdiIfrRJF1q16qsyGRzHqPXin7hQsW0ugwow7f/WGhYUkk/BKlIxg/ mQSk//olHyRDM/6jZ8h0/8ENV1DL4m5c8WMFcUA49Zt58tFPNbpDvkADDuR1/IsaCLQM 88tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FPUKR3nH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i26si7494399ejx.591.2020.09.14.12.53.47; Mon, 14 Sep 2020 12:54:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FPUKR3nH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726057AbgINTwX (ORCPT + 99 others); Mon, 14 Sep 2020 15:52:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726044AbgINTwT (ORCPT ); Mon, 14 Sep 2020 15:52:19 -0400 Received: from mail-pj1-x1044.google.com (mail-pj1-x1044.google.com [IPv6:2607:f8b0:4864:20::1044]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB1B4C06178A for ; Mon, 14 Sep 2020 12:52:18 -0700 (PDT) Received: by mail-pj1-x1044.google.com with SMTP id u3so431794pjr.3 for ; Mon, 14 Sep 2020 12:52:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=TcdXkIRAgGt9vXRg+9Us0U0AFK7n0jMIa5WCvYtwILM=; b=FPUKR3nHDfH1uQGswRa0iOrC38WOiDscwoCFyblK+wa5WCHpKSpu1ohj2jx94vGuQ5 15v0sOLKFZkdvLVqK1eqcd5FPU1JHQMi993XU6BnOioTMeVpV9pO5xlrzwhbiuaRWHOK UgrxQphfAoIFH7PuCuZYNcdRBe0JGSIpA+who= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=TcdXkIRAgGt9vXRg+9Us0U0AFK7n0jMIa5WCvYtwILM=; b=Ryb/2QsIpH4XJR7y1gotzf6Y2RLF6luPk919d0g+6jvqdNcVGOKq9oBq9B5w7G8U5e lvjMbG/m5Fc7qh2BLPIfMD7BA64uSKBFb90ahFufKuBK6BPBfnVRlz5P2gM5bBKMJeMC K77rz21g7M3j7F/6By/qAUQZUo7I1bRsBf4cV1Hx9QHGPyFfD/qt6lBI5PySDCGvgtfT YzUIXwhofsRkDDc4iRfGGSqL2UzQ5sC/BIedoP2tOTTZq8pHDf4fr+fo3nwaiscZC8ae 4kBeSpSfxwOXzTHsgBHMvyTvy4p6w+dfJuxfALrHbCy0T0eKPSoZ8LwPdGBv4tppb0OP vKaA== X-Gm-Message-State: AOAM5330ZPzx/EVAvYL2diRXxEVGOUkCqnO43dHUh3ka76z5JYU9bdIu TvKIZBqRvhhog4qRq+nVSO5nHvTB0wbg3g== X-Received: by 2002:a17:90a:ead5:: with SMTP id ev21mr817563pjb.188.1600113137463; Mon, 14 Sep 2020 12:52:17 -0700 (PDT) Received: from localhost ([2620:15c:202:1:f693:9fff:fef4:e70a]) by smtp.gmail.com with ESMTPSA id jz6sm10163667pjb.22.2020.09.14.12.52.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 14 Sep 2020 12:52:16 -0700 (PDT) Date: Mon, 14 Sep 2020 12:52:15 -0700 From: Matthias Kaehlcke To: Greg Kroah-Hartman , Rob Herring , Frank Rowand Cc: Alan Stern , Krzysztof Kozlowski , Bastien Nocera , Ravi Chandra Sadineni , linux-usb@vger.kernel.org, Stephen Boyd , devicetree@vger.kernel.org, Douglas Anderson , Peter Chen , linux-kernel@vger.kernel.org, "Alexander A. Klimov" , Masahiro Yamada Subject: Re: [PATCH 2/2] USB: misc: Add onboard_usb_hub driver Message-ID: <20200914195215.GD2022397@google.com> References: <20200914112716.1.I248292623d3d0f6a4f0c5bc58478ca3c0062b49a@changeid> <20200914112716.2.I7c9a1f1d6ced41dd8310e8a03da666a32364e790@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200914112716.2.I7c9a1f1d6ced41dd8310e8a03da666a32364e790@changeid> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I just noticed that building this results in a compilation error, due to a missing brace. I tested this patch, but with another patch on top with debug logs, the other patch adds the brace. I'll still hold off a bit before sending v2, for if others have comments. On Mon, Sep 14, 2020 at 11:27:49AM -0700, Matthias Kaehlcke wrote: > diff --git a/drivers/usb/misc/onboard_usb_hub.c b/drivers/usb/misc/onboard_usb_hub.c > new file mode 100644 > index 000000000000..e5a816d0b124 > --- /dev/null > +++ b/drivers/usb/misc/onboard_usb_hub.c > > +static int onboard_hub_suspend(struct platform_device *pdev, pm_message_t msg) > +{ > + struct onboard_hub *hub = dev_get_drvdata(&pdev->dev); > + int rc = 0; > + > + if (!hub->cfg.power_off_in_suspend) > + return 0; > + > + hub->has_wakeup_capable_descendants = false; > + > + if (hub->cfg.wakeup_source) { > + struct udev_node *node; > + > + mutex_lock(&hub->lock); > + > + list_for_each_entry(node, &hub->udev_list, list) { > + if (usb_wakeup_enabled_descendants(node->udev)) { > + hub->has_wakeup_capable_descendants = true; > + break; missing brace here: } > + } > + > + mutex_unlock(&hub->lock); > + } > + > + if (!hub->has_wakeup_capable_descendants) > + rc = onboard_hub_power_off(hub); > + > + return rc; > +}