From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 048DDC433DF for ; Tue, 18 Aug 2020 09:32:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CC3B4207DF for ; Tue, 18 Aug 2020 09:32:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597743164; bh=CJKF84bwlgUagqoXRgPcpYTxYPoOrC07nTYTVUSLdtk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=jeL8AMTqaydQCE26Kwgd+j5/LoodHKIq00KzujxD6mRtjmALEKXZLfU2qDRXALRu7 ErYMUOP853WIb2J8h56MoMd3zTtccuHhEIri2cid0b80VZNCUUQkOvuZly2aVgX54q KX4d4A8AD2in5Yfg6865aj1V2iu4luXxNXfQpsqo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726341AbgHRJco (ORCPT ); Tue, 18 Aug 2020 05:32:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:36948 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726165AbgHRJcn (ORCPT ); Tue, 18 Aug 2020 05:32:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1CA002078B; Tue, 18 Aug 2020 09:32:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597743162; bh=CJKF84bwlgUagqoXRgPcpYTxYPoOrC07nTYTVUSLdtk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pBYqitvUe2uxZu7KgyXeUAVwMUO8R8EkXp0eCo+dCNbUFWmk2IgzsOQ/5OsR3/eQA RaaXLT3NRSvywuwcLgNz6eOto6xIRw+pz6pIPFE7b7vCbTmUuL/Lh9yFt1UcP+Mqul E9LcLN8m2gMEtOWaABR9hD07E8Qi0D22D+VccBfI= Date: Tue, 18 Aug 2020 11:33:05 +0200 From: Greg KH To: Peter Chen Cc: balbi@kernel.org, linux-usb@vger.kernel.org, linux-imx@nxp.com, stern@rowland.harvard.edu Subject: Re: [PATCH v2 6/6] Revert "usb: udc: allow adding and removing the same gadget device" Message-ID: <20200818093305.GA34785@kroah.com> References: <20200810022510.6516-1-peter.chen@nxp.com> <20200810022510.6516-7-peter.chen@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200810022510.6516-7-peter.chen@nxp.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Mon, Aug 10, 2020 at 10:25:10AM +0800, Peter Chen wrote: > We have already allocated gadget structure dynamically at UDC (dwc3) > driver, so commit fac323471df6 ("usb: udc: allow adding and removing > the same gadget device")could be reverted. > > Cc: Greg Kroah-Hartman > Cc: Alan Stern > Signed-off-by: Peter Chen > --- > Changes from v1: > - No changes. > > drivers/usb/gadget/udc/core.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c > index 473e74088b1f..43351b0af569 100644 > --- a/drivers/usb/gadget/udc/core.c > +++ b/drivers/usb/gadget/udc/core.c > @@ -1386,7 +1386,6 @@ void usb_del_gadget_udc(struct usb_gadget *gadget) > { > usb_del_gadget(gadget); > usb_put_gadget(gadget); > - memset(&gadget->dev, 0x00, sizeof(gadget->dev)); Shouldn't you do this patch earlier in the series, as the usb_put_gadget() call could have freed the memory that is being cleared here? Otherwise, this series looks good, thanks for doing it. greg k-h