Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp3593434rwb; Sun, 7 Aug 2022 03:07:56 -0700 (PDT) X-Google-Smtp-Source: AA6agR7msfcswHdNW1Idk5fBTZVuuAiQ+V8CgHyyV9TdSR6tkZgiD91hQLm08OpO56hfYjJfn8Qr X-Received: by 2002:a63:6345:0:b0:41d:649a:af3d with SMTP id x66-20020a636345000000b0041d649aaf3dmr1879250pgb.354.1659866876326; Sun, 07 Aug 2022 03:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659866876; cv=none; d=google.com; s=arc-20160816; b=G+voevMHgvKOeC60HmnpMfP0wCrxeJdreGmvrg2jJnUe7u9ghkdf8VpXB+BjWvrmx5 GlTcYwz5k9AJEk5v3cvrO/QPRIxNBhdc418MbIGA/5WN/KV9R5Ulafuz33gMed0EmtWZ nTt4pShr0L0EQHoikxB8GR1oSt6+Ghe5B+nTOTrv6IOQ8I6G/2DURPtNjAWVtD8LzoTN 0qpvhAFzfKE0yxUPkqrS/mqzOxSzLeGtcFCktIGUN8cz5TJISLVzpywm2HdUkpoffAX1 IcSWBb031349v/szwbVHPAdWYlpvrkK0u7QiDpWuLMkouvi6bcUqnj2VrefePd/JrKpH uiWg== 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=F23xCJw/JfLx9jvD5fBo+YnSY/9JqZd+ADe+8jMothk=; b=B2amENbK+bYRfEtFLZXH6zE4vZIp7cpSmarSnRNLuvd/TTvs+8y9XINQy1pGF7oD1U 2O1xKQdz8N4YaaGJSueSu/esEdgYVSUsuF1jNQ6gPlAmIr9e9spguduPjxavY+5yKlO2 EwwGUJ+khwuDExMtYECaOLYuLIS7cDIitDl5IMz8pSbrkuYee9gdRUaugT+rjOZqm5Pk fqd8Kie7WFO98vuVs96XJMrX+y7b1Cwfa57P3/6CB2dsnIQm5PD4PnWfiFQM6jM3Bo0A pnGPDn9SATd5pxrF88fSFoJgwGmENIneQkfRZdgUJTX+EhncF8OZixafY/nqm/lE6agH FCrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LvW2vSXH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l7-20020a170902f68700b00169ff93b923si1912511plg.48.2022.08.07.03.07.41; Sun, 07 Aug 2022 03:07:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LvW2vSXH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233713AbiHGJtz (ORCPT + 99 others); Sun, 7 Aug 2022 05:49:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231962AbiHGJtw (ORCPT ); Sun, 7 Aug 2022 05:49:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BA43B869; Sun, 7 Aug 2022 02:49:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 90F9A60E2C; Sun, 7 Aug 2022 09:49:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5667C433D6; Sun, 7 Aug 2022 09:49:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659865791; bh=TNFwdYXJjP8nzLizUc8hS+Xwx4sjB4RVvp6eTa7E2JI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LvW2vSXHKOytlYPj19On6aicF/MDYb2+szAiJbdg8H0Mm6HpUjml4Y7/JzcKqw8hm 2YTOO3MFDXGmgpYMiRcVE3+3W25dbKmbSi7N7S0PYC0Zhkft2+LmIl911jqu5dnUN8 kCTGzmUI15ZuRAV+9g7Md9NUZE0a2YNIS+Ou4Js9xauCsuflbPEfQ5/4Yr+CP4qE2B DTqjyn/PgeK2Je2I8r3WZ8Z4arASEywAvDKim+GxVwTF8F6CUXqWGWE2BIVp0h1v6q FEKtb/5PznrfsKObZz2cylt1KnTwILX07SXXO7Z7Y9H9A7pWv+Ftc5W9L1LVHWzaTh JyCio74k+Ft5g== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1oKcvL-00068u-NB; Sun, 07 Aug 2022 11:50:20 +0200 Date: Sun, 7 Aug 2022 11:50:19 +0200 From: Johan Hovold To: Matthias Kaehlcke Cc: Johan Hovold , Greg Kroah-Hartman , Felipe Balbi , Andy Gross , Bjorn Andersson , Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] usb: dwc3: qcom: clean up icc init Message-ID: References: <20220805074500.21469-1-johan+linaro@kernel.org> <20220805074500.21469-3-johan+linaro@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 05, 2022 at 10:52:22AM -0700, Matthias Kaehlcke wrote: > On Fri, Aug 05, 2022 at 09:45:00AM +0200, Johan Hovold wrote: > > Clean up the interconnect-initialisation helper by increasing > > indentation of (or merging) continuation lines and adding brackets > > around multi-line blocks in order to improve readability. > > > > Signed-off-by: Johan Hovold > > --- > > drivers/usb/dwc3/dwc3-qcom.c | 15 +++++++-------- > > 1 file changed, 7 insertions(+), 8 deletions(-) > > > > diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c > > index 196efa9f2545..f2ff4fe1490a 100644 > > --- a/drivers/usb/dwc3/dwc3-qcom.c > > +++ b/drivers/usb/dwc3/dwc3-qcom.c > > @@ -253,7 +253,7 @@ static int dwc3_qcom_interconnect_init(struct dwc3_qcom *qcom) > > qcom->icc_path_ddr = of_icc_get(dev, "usb-ddr"); > > if (IS_ERR(qcom->icc_path_ddr)) { > > dev_err(dev, "failed to get usb-ddr path: %ld\n", > > - PTR_ERR(qcom->icc_path_ddr)); > > + PTR_ERR(qcom->icc_path_ddr)); > > What's wrong with the existing indentation? It looks similar to the indentation > changes you do below for icc_set_bw(). The indentation of continuation lines in this driver is a bit inconsistent, but the above change matches the next conditional and the rest of the function (which does not use open-parenthesis alignment). > Maybe your preference is double indentation for continuation lines rather than > aligning them roughly with the opening parenthesis of the calling function? I generally prefer two tabs over excessive indentation involving space characters that need to be added or removed in continuation lines just because a symbol name is updated. > > return PTR_ERR(qcom->icc_path_ddr); > > } > > > > @@ -265,20 +265,19 @@ static int dwc3_qcom_interconnect_init(struct dwc3_qcom *qcom) > > } > > > > max_speed = usb_get_maximum_speed(&qcom->dwc3->dev); > > - if (max_speed >= USB_SPEED_SUPER || max_speed == USB_SPEED_UNKNOWN) > > + if (max_speed >= USB_SPEED_SUPER || max_speed == USB_SPEED_UNKNOWN) { > > ret = icc_set_bw(qcom->icc_path_ddr, > > - USB_MEMORY_AVG_SS_BW, USB_MEMORY_PEAK_SS_BW); > > - else > > + USB_MEMORY_AVG_SS_BW, USB_MEMORY_PEAK_SS_BW); > > + } else { > > ret = icc_set_bw(qcom->icc_path_ddr, > > - USB_MEMORY_AVG_HS_BW, USB_MEMORY_PEAK_HS_BW); > > - > > + USB_MEMORY_AVG_HS_BW, USB_MEMORY_PEAK_HS_BW); > > + } > > if (ret) { > > dev_err(dev, "failed to set bandwidth for usb-ddr path: %d\n", ret); > > return ret; > > } > > > > - ret = icc_set_bw(qcom->icc_path_apps, > > - APPS_USB_AVG_BW, APPS_USB_PEAK_BW); > > + ret = icc_set_bw(qcom->icc_path_apps, APPS_USB_AVG_BW, APPS_USB_PEAK_BW); > > if (ret) { > > dev_err(dev, "failed to set bandwidth for apps-usb path: %d\n", ret); > > return ret; Johan