Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1353612pxv; Fri, 2 Jul 2021 01:27:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqvIfCQfza1ignB0h4uITwcanaRnCf7A/jaZs1t2GjSETqbftGt8tbo2rK4cW0aUNtF7gD X-Received: by 2002:aa7:c496:: with SMTP id m22mr5265748edq.128.1625214452143; Fri, 02 Jul 2021 01:27:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625214452; cv=none; d=google.com; s=arc-20160816; b=vG0OlHPRaZqJOEDA0UB/8IZK/cbBzDgmjNray/gF2wH0savMtrrweAAhHuhOddBe/9 yEYenI633dTLwgBZAwCqseuwjGhel/rwalOdw4j8f6fJVgVrjLmuDDsfES1h5pJ/w3Q7 s+JIojDsv6D5rl935ZKAJpAYP/mNh1zyfX4Xa3zt5R5r0hCFhhuP1a0LvaivaPdUfmE8 6gh/06XTAsD2q6yk/VqCzRcCP6kkkVGFg4XV6WscqsPiFWKe/u63QIU6QxHW34k8ISaj xBfik+UVVAPBAMtn+ywy299bz7fueY0J0BkNMUkfarvdE9ZcDdA/d+Cln5oXdE4a3mXH Hq0A== 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=znNW827q0yQ924dmP+qO7o5GkuuM3c+1PzXjuaWIy0U=; b=tIbb7bJsOBDUh9LdxdS8rZc3DevvYCbEYzVXSWvlFA/YSeYxL5MwXFlbJqMOHWAVuK CZczW8TpZKNyu1dMOiAQC8gU7iQ/t0ApwNIdfXOVDJrTLSqR2XIDJY/09IENSBVH1LWo +NEehurxcH3MxwQfum9Qmm/2nKlXJWJMyzRHhh2JU2KKty6jjNz9TwydLY1IPjatlrc9 syEoZcM+yPsnKLFXxXLIa6jiHQCvEsy3xnKKZZ2yuVqIP1N9U2vLG9fBmmTbeP60NkFK WSk9r0vTdGzvzep4OWwXhtJN7m9YTitrdUTO1ihLOvhdGzyfdnwK2Zt4GzOA11X9JIR7 4RKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Gas3jGgI; 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 i25si2457686edq.83.2021.07.02.01.27.07; Fri, 02 Jul 2021 01:27:32 -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=Gas3jGgI; 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 S230333AbhGBIWW (ORCPT + 99 others); Fri, 2 Jul 2021 04:22:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:51742 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230149AbhGBIWW (ORCPT ); Fri, 2 Jul 2021 04:22:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B826A61289; Fri, 2 Jul 2021 08:19:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1625213990; bh=AWYQNC3rvZNhl/Ddxs99aViYr0yWm46slFcCjx7kqXE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Gas3jGgIvaPUEQyKIr48k7mGCCG5RB1q99BQKo7aK9V6pFhTNZgQT2JV+TV0Ypviq dFhYcV1jhdLLU1rUAsMlGEEYGGUq6fwnsSln6y+Bf2v+j8H85ZUCKInf5mJA0aVc+T Hn35Lji5TWliVcthck2rEDYlEE29JtuRP4TQUrTM= Date: Fri, 2 Jul 2021 10:19:47 +0200 From: Greg KH To: Wesley Cheng Cc: robh+dt@kernel.org, agross@kernel.org, bjorn.andersson@linaro.org, balbi@kernel.org, linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, jackp@codeaurora.org, fntoth@gmail.com Subject: Re: [PATCH v11 4/5] usb: dwc3: dwc3-qcom: Enable tx-fifo-resize property by default Message-ID: References: <1625043642-29822-1-git-send-email-wcheng@codeaurora.org> <1625043642-29822-5-git-send-email-wcheng@codeaurora.org> <83237faa-9840-5d31-43da-8ce551e75067@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83237faa-9840-5d31-43da-8ce551e75067@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 02, 2021 at 01:10:13AM -0700, Wesley Cheng wrote: > > > On 7/1/2021 10:06 PM, Greg KH wrote: > > On Wed, Jun 30, 2021 at 02:00:41AM -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 | 21 +++++++++++++++++++++ > >> 1 file changed, 21 insertions(+) > >> > >> diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c > >> index 49e6ca9..cec4f4a 100644 > >> --- a/drivers/usb/dwc3/dwc3-qcom.c > >> +++ b/drivers/usb/dwc3/dwc3-qcom.c > >> @@ -640,6 +640,25 @@ static int dwc3_qcom_acpi_register_core(struct platform_device *pdev) > >> return ret; > >> } > >> > >> +#ifdef CONFIG_OF > >> +static void dwc3_qcom_add_dt_props(struct device *dev, struct device_node *np) > >> +{ > >> + struct property *prop; > >> + int ret; > >> + > >> + prop = devm_kzalloc(dev, sizeof(*prop), GFP_KERNEL); > >> + if (prop) { > >> + prop->name = "tx-fifo-resize"; > >> + ret = of_add_property(np, prop); > >> + if (ret < 0) > >> + dev_info(dev, "unable to add tx-fifo-resize prop\n"); > > Hi Greg, > > > > Is that really an "informational" error? :( > > > > > We can remove it. If anything we can always check the sysfs if the > property is present or not. Sorry for being vague. That message should be dev_err(), and not dev_info(), right? > >> + } > > > > So if you can not allocate memory, you just fail quietly? Are you sure > > that is ok? > > > > Please properly handle errors. > > > OK, will handle the case where we can't allocate memory for the property. And the case for when of_add_property() fails. thanks, greg k-h