Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp327018pxj; Fri, 28 May 2021 05:06:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymc3nSP4xVDmu5IordwzCZaDPDkXCvEiAFSkVLUSGufFxrtdD+fotZMTywJWw39Kvi3Hy6 X-Received: by 2002:a05:6638:d09:: with SMTP id q9mr8367917jaj.32.1622203560658; Fri, 28 May 2021 05:06:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622203560; cv=none; d=google.com; s=arc-20160816; b=sMAKuoTiu1JNp89db3iEwIAVAQaxWncD94aQo3XzrzLEEXQ5ssu9kFRICDQcF4kbMj ltNuMNaq8CQO4riV8BJTvF7Na6UNTBlqlIkPEA+/cCBpLQW47B57Vml26NfFXjgvD+HZ VK4KKZwKhpU1gKduQJquAvm4+LVItMiYIPXi7YiSkl+BPkcafvHxwUEmWGw8/JGrRIjD xoA4Bl4OtHP/gR7RWqFtOfGMV3LIJLcrYAAN43Jaf3nHCA2zdR5yDh05LU26x1yDTNmq CMTObSe11ArJwLn25kv22zDT1oSKL2FYE43WuLz/96nwp7TeWyHLpOK3XOgLTdXw4Tmj el+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UQ53RUPh3pXJU5pjuFqAnA+k0bMqJKivZC/fAVimJcI=; b=XZktT0ThnPLHGFYDybHrFsplHXauvD7NfPOvhx/+x9hJv1vP2hEy/+ynwfOKfyO7Sl Z5izU4xX8WiKZwX2rUi7aEVpbAd5WnFcxE0HDK6A3UoTilm5mT01Vf8mjoEIU9GJZhqZ dFqgLoVD9W81vceB7m/LehbFTUZygloRhRZZ4s+FMSnUn7O/90j1iz1E/RkLOB+c6GF7 NBMvq4Wst0HROJiHxJp9JRhWealY1Sryh2iCgWHIxIRUr/DwLNGojZNZZphwnDqmn9MI 6X6/wagI3TBBFHnz4NgL/QUmFiO3Gy3JefmDUj1kFG64UKaTuE20waLnz9QJ3HCu/yeo L04Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=M7+n1Ye2; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p18si5669463jam.69.2021.05.28.05.05.41; Fri, 28 May 2021 05:06:00 -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=@linuxfoundation.org header.s=korg header.b=M7+n1Ye2; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235783AbhE1JZA (ORCPT + 99 others); Fri, 28 May 2021 05:25:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:51044 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230205AbhE1JY6 (ORCPT ); Fri, 28 May 2021 05:24:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1F0F26127A; Fri, 28 May 2021 09:23:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622193803; bh=vB6X+2/xMuG/B0/YcLafyqw4LlVbhOdEaGfPoutYQZo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M7+n1Ye2ZH0PZ6f5VyvDZqifDNELyuozh/OPXt4V5UEzR5KHqofgQTUKRHxiXqc/f 8S2sMVzc5BonAudTRmtRba09SjmnZVm6O83GpMx6r6eOZrFWUJndlOk9OU4XOimw7W 57MnEHLxUlletIISKwUaCY4l4MlwKj6n4ua3l+HE= Date: Fri, 28 May 2021 11:23:20 +0200 From: Greg Kroah-Hartman To: Phil Elwell Cc: Minas Harutyunyan , Sasha Levin , Artur Petrosyan , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] usb: dwc2: Fix build in periphal-only mode Message-ID: References: <20210528091349.2602410-1-phil@raspberrypi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210528091349.2602410-1-phil@raspberrypi.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 28, 2021 at 10:13:50AM +0100, Phil Elwell wrote: > The bus_suspended member of struct dwc2_hsotg is only present in builds > that support host-mode. > > Fixes: 24d209dba5a3 ("usb: dwc2: Fix hibernation between host and device modes.") > Signed-off-by: Phil Elwell > --- > drivers/usb/dwc2/core_intr.c | 4 ++++ > 1 file changed, 4 insertions(+) > > v2: Correct commit hash used in the Fixes line. > > diff --git a/drivers/usb/dwc2/core_intr.c b/drivers/usb/dwc2/core_intr.c > index a5ab03808da6..03d0c034cf57 100644 > --- a/drivers/usb/dwc2/core_intr.c > +++ b/drivers/usb/dwc2/core_intr.c > @@ -725,7 +725,11 @@ static inline void dwc_handle_gpwrdn_disc_det(struct dwc2_hsotg *hsotg, > dwc2_writel(hsotg, gpwrdn_tmp, GPWRDN); > > hsotg->hibernated = 0; > + > +#if IS_ENABLED(CONFIG_USB_DWC2_HOST) || \ > + IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE) > hsotg->bus_suspended = 0; > +#endif > > if (gpwrdn & GPWRDN_IDSTS) { > hsotg->op_state = OTG_STATE_B_PERIPHERAL; > -- > 2.25.1 > I do not understand, the field in the structure is present for all, why is this crazy #if needed here? I see that the commit you reference here did add the new line to set bus_suspended, which seemed to be the point here. Why will the #if values matter here? thanks, greg k-h