Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp448228pxj; Thu, 17 Jun 2021 06:29:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJysJP6w8tIrTrK2s7nLwzFsx76UWxs47frJ2Y5EhMdr7f+DdD4aEcbyN/ofRry3OYhSSbV6 X-Received: by 2002:aa7:c7c7:: with SMTP id o7mr6568932eds.231.1623936570920; Thu, 17 Jun 2021 06:29:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623936570; cv=none; d=google.com; s=arc-20160816; b=YZC8Haaj0dMpTcv/Kqm/SiM29KyfcEHy2UznoTpt/6GlbRqKCYtnbpQelRGbdaWYVY hN9A4X7eRso9iTEmvbxKtRR097tXAIA8AiYxsG9kXqdD8r6ycGRIT0izRYKmP03MrQLh 2ZJ5l0xcmXkVDQsZozPVbufey1GObFplIGdLxzSAPOwvvPjsiv1fgHsSvm2WzhzyKGuh t4bmr+sffLJXHCie4eNxUNEgI7EYIIaTRhwAsfajPC2L9WhAoZ2n5VSCAduSTXeWqFwR OTsfmS9z9aT2BquW2QrrH+T/1LGa00dCiyEp2xC1yxlJ1AHe8Ft3jReTYFOXWzV/qln5 Y5rQ== 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=ecdaiydRp3XYVf5Zn5zWCc6ECVaYOOzJTQkSsZBspO4=; b=CrlXkFjn7CcF+oOCFJMQyUumluFOcI+Nf3+FK8TwvBzSMFGQfJpCWN2OXE/8sZM9Od 9NVQjjO59mHbADQERqbLdVu7C224IgvDjlagqPyqQGFxs92YBh/ccKbiPVpkc9Jx5Ffi TL4Jss6gkNZqxiAPGAFZTHIxBaTIbBeLxzR7jqQZJHQnB85CpR4ukKbjcCvFr9s/RA5z w2M1gogURl2XweYa5a3x4vHcT3UYZjZjalLRBUSMy9QVe+ln4So7pctcpPVEqp8laTwM KVX7gb7awfONlbuKCVhPIcYdVKWi/CFLImp07xsxjiZvmbkYYzZ5slKVqB9bzvAL6Djq 9GaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uCWxl1+O; 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 z2si5389551edr.77.2021.06.17.06.29.06; Thu, 17 Jun 2021 06:29:30 -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=uCWxl1+O; 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 S232408AbhFQLOo (ORCPT + 99 others); Thu, 17 Jun 2021 07:14:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:53260 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231501AbhFQLOj (ORCPT ); Thu, 17 Jun 2021 07:14:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 35B9561369; Thu, 17 Jun 2021 11:12:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623928351; bh=Ocgp30BnZ8XoWmAPjRUOn8bkwl1ycXvMtwzaDtMaEJ8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=uCWxl1+Ory823yoEna0SAz0awtcGyw8neh4ehe/wf0i8uU0bF80EgjVsykwxScWer 28mx3Yal6+rzR5dcj/9AbQUMnD/wXdicCME9S5uXyhczbM0gUgPslv3kH6B0Iop0Rh yYwanpzA7XUupkvbXrvYkC/yJ1V5GDqLMWZXB7lc= Date: Thu, 17 Jun 2021 13:12:28 +0200 From: Greg KH To: Wesley Cheng Cc: balbi@kernel.org, robh+dt@kernel.org, agross@kernel.org, bjorn.andersson@linaro.org, frowand.list@gmail.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, jackp@codeaurora.org, fntoth@gmail.com, heikki.krogerus@linux.intel.com, andy.shevchenko@gmail.com Subject: Re: [PATCH v10 5/6] usb: dwc3: dwc3-qcom: Enable tx-fifo-resize property by default Message-ID: References: <1623923899-16759-1-git-send-email-wcheng@codeaurora.org> <1623923899-16759-6-git-send-email-wcheng@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1623923899-16759-6-git-send-email-wcheng@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 17, 2021 at 02:58:18AM -0700, Wesley Cheng wrote: > In order to take advantage of the TX fifo resizing logic, manually add > these properties to the DWC3 child node by default. This will allow > the DWC3 gadget to resize the TX fifos for the IN endpoints, which > help with performance. > > Signed-off-by: Wesley Cheng > --- > drivers/usb/dwc3/dwc3-qcom.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c > index 49e6ca9..44e0eaa1 100644 > --- a/drivers/usb/dwc3/dwc3-qcom.c > +++ b/drivers/usb/dwc3/dwc3-qcom.c > @@ -645,6 +645,7 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev) > struct dwc3_qcom *qcom = platform_get_drvdata(pdev); > struct device_node *np = pdev->dev.of_node, *dwc3_np; > struct device *dev = &pdev->dev; > + struct property *prop; > int ret; > > dwc3_np = of_get_compatible_child(np, "snps,dwc3"); > @@ -653,6 +654,14 @@ static int dwc3_qcom_of_register_core(struct platform_device *pdev) > return -ENODEV; > } > > + prop = devm_kzalloc(dev, sizeof(*prop), GFP_KERNEL); > + if (prop) { > + prop->name = "tx-fifo-resize"; > + ret = of_add_property(dwc3_np, prop); > + if (ret < 0) > + dev_info(dev, "unable to add tx-fifo-resize prop\n"); dev_err()? And you do not error out properly? > + } No failure if prop is NULL? This check looks backwards to me, error paths are in the if () statement, not "all is good". This feels backwards. greg k-h