From patchwork Thu Aug 13 06:25:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 11711741 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2431C913 for ; Thu, 13 Aug 2020 06:25:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 004A92078D for ; Thu, 13 Aug 2020 06:25:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299942; bh=F6Hq+Pw4hBESaieLvWZYuv4PWYb+f/+tucoraQQDCCo=; h=From:To:Cc:Subject:Date:List-ID:From; b=xJ+n+aaasJZYZE8UXiM0ILZO9D6TdTJ4GG0Ox1J+BgaYVcySWJAwZkjWJBJqHmr97 FeXa/A3gLtDuFtqCbbddA6MiqAKpzpMUNIWpNfLoZSXNvJawMugukrz0fE0xHYGjxN TV452wgvzr1GOg6bdJjVvi2StneJ0Ri+9Fb/G0JA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726102AbgHMGZl (ORCPT ); Thu, 13 Aug 2020 02:25:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:37962 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725964AbgHMGZj (ORCPT ); Thu, 13 Aug 2020 02:25:39 -0400 Received: from saruman.elisa-laajakaista.fi (unknown [194.34.132.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6ED94206B5; Thu, 13 Aug 2020 06:25:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299939; bh=F6Hq+Pw4hBESaieLvWZYuv4PWYb+f/+tucoraQQDCCo=; h=From:To:Cc:Subject:Date:From; b=2JYrMe9jBJevSZPBQTLwr9Dw9n50xS4s9xKDR9grdeFJG7aS+RwAeh1+p4BZ6f9m7 VtlLSHlInvK5bn6jrAe02ta0I/SiqTgy1rup4WV0ujXKUC3YKUzFJzgVvuixMShxJ3 tew6tfI+xRyiMLhuorciHKyoPcUYVIjVGdD+pxWE= From: balbi@kernel.org To: Linux USB Cc: Felipe Balbi Subject: [PATCH 01/11] dwc3: meson: fix coccinelle WARNING Date: Thu, 13 Aug 2020 09:25:22 +0300 Message-Id: <20200813062532.829720-1-balbi@kernel.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Felipe Balbi Coccinelle suggests using PTR_ERR_OR_ZERO(). Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/dwc3-meson-g12a.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c index 88b75b5a039c..9c50a8f2929e 100644 --- a/drivers/usb/dwc3/dwc3-meson-g12a.c +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c @@ -626,10 +626,7 @@ static int dwc3_meson_gxl_setup_regmaps(struct dwc3_meson_g12a *priv, /* GXL controls the PHY mode in the PHY registers unlike G12A */ priv->usb_glue_regmap = devm_regmap_init_mmio(priv->dev, base, &phy_meson_g12a_usb_glue_regmap_conf); - if (IS_ERR(priv->usb_glue_regmap)) - return PTR_ERR(priv->usb_glue_regmap); - - return 0; + return PTR_ERR_OR_ZERO(priv->usb_glue_regmap); } static int dwc3_meson_g12a_setup_regmaps(struct dwc3_meson_g12a *priv, From patchwork Thu Aug 13 06:25:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 11711743 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4C96616B1 for ; Thu, 13 Aug 2020 06:25:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 35AD320791 for ; Thu, 13 Aug 2020 06:25:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299942; bh=4uTIK2w8MtZvJJn/E0Mq5SkQK2HfkkABx1AyI5zNJKk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=mJ1TSepBm2qS69hMpqVzEWdethBT/iVgmkADXsTZ60ykeHwvHgz4GhXfUgprl3z7w LJBb56uzWp1mYJ3jkiWGYO+eRrXx+65dtOjKBpK5bB6oVPi1PCnuGNx5E6VOzG+4x2 P/b1//25K7dCeWxFymSnhAIFkSMttqR9ZzL31aYU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726107AbgHMGZl (ORCPT ); Thu, 13 Aug 2020 02:25:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:37988 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726072AbgHMGZk (ORCPT ); Thu, 13 Aug 2020 02:25:40 -0400 Received: from saruman.elisa-laajakaista.fi (unknown [194.34.132.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A3F0D2078D; Thu, 13 Aug 2020 06:25:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299940; bh=4uTIK2w8MtZvJJn/E0Mq5SkQK2HfkkABx1AyI5zNJKk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Aw5rvs+/6S/WPNiqgmQodMpDOUJjASmwQDOhlHkOr7Y8niLeE83+ntqX9EUMU71d6 QHQ1Mb0I2BWBTMhF1Th0f3Rs+CPS24ewY/x75LOEGEdEhlLDUZ0Z6d1E/p/EolABdy 35mnYNDngNo7yagX4eYTsd2FmcOfPiQq2dNMUbgE= From: balbi@kernel.org To: Linux USB Cc: Felipe Balbi Subject: [PATCH 02/11] dwc3: debug: fix sparse warning Date: Thu, 13 Aug 2020 09:25:23 +0300 Message-Id: <20200813062532.829720-2-balbi@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200813062532.829720-1-balbi@kernel.org> References: <20200813062532.829720-1-balbi@kernel.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Felipe Balbi Fix the following sparse warning: drivers/usb/dwc3/trace.c: note: in included file (through drivers/usb/dwc3/trace.h): drivers/usb/dwc3/debug.h:374:39: warning: cast to non-scalar Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/debug.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/debug.h b/drivers/usb/dwc3/debug.h index 3d16dac4e5cc..8e03bcb77da8 100644 --- a/drivers/usb/dwc3/debug.h +++ b/drivers/usb/dwc3/debug.h @@ -371,7 +371,9 @@ static inline const char *dwc3_gadget_event_type_string(u8 event) static inline const char *dwc3_decode_event(char *str, size_t size, u32 event, u32 ep0state) { - const union dwc3_event evt = (union dwc3_event) event; + union dwc3_event evt; + + memcpy(&evt, &event, sizeof(event)); if (evt.type.is_devspec) return dwc3_gadget_event_string(str, size, &evt.devt); From patchwork Thu Aug 13 06:25:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 11711745 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A0AD0913 for ; Thu, 13 Aug 2020 06:25:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7696B206B5 for ; Thu, 13 Aug 2020 06:25:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299945; bh=SkbP4ZTX+OdxUjAQSgl4TfJe5CRXk0j/hLMKzcM4PMI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=zlvc981Qli+0N5FDRcOoc9wWBhXj1kJyrFrgySliK+SFq0hsGjbj1XzVAAtOdwova MVT8laKnUULa+nKgOanwK8SMGzTZ7rfrniYrYDpudHETC2hE2m33P2u2S4EhVJ9pYq YDSEiGLNdOdpTuIwqv450/OOh5T50X9P9v+c5OOY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725954AbgHMGZm (ORCPT ); Thu, 13 Aug 2020 02:25:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:38002 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726072AbgHMGZm (ORCPT ); Thu, 13 Aug 2020 02:25:42 -0400 Received: from saruman.elisa-laajakaista.fi (unknown [194.34.132.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D3D47206B5; Thu, 13 Aug 2020 06:25:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299941; bh=SkbP4ZTX+OdxUjAQSgl4TfJe5CRXk0j/hLMKzcM4PMI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TapbqcMSkUQn+PHslfU3j7/aFNCYBCyV0nQRn+NVkUsavhuADlICBZboRFGSXvJvp pOKZoqfUXN6uAsufv74IJEQdqw5cvVbkjgjAoj+v/h+XlZYuuGPCWGt19tpPuJ13Sy PHBOTNAi7AwvJUMoXfhaVktu79VnagpMNeNkKMok= From: balbi@kernel.org To: Linux USB Cc: Felipe Balbi Subject: [PATCH 03/11] dwc3: meson: fix checkpatch errors and warnings Date: Thu, 13 Aug 2020 09:25:24 +0300 Message-Id: <20200813062532.829720-3-balbi@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200813062532.829720-1-balbi@kernel.org> References: <20200813062532.829720-1-balbi@kernel.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Felipe Balbi no functional changes. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/dwc3-meson-g12a.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c index 9c50a8f2929e..6522187a40cf 100644 --- a/drivers/usb/dwc3/dwc3-meson-g12a.c +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c @@ -116,11 +116,11 @@ static struct clk_bulk_data meson_a1_clocks[] = { { .id = "xtal_usb_ctrl" }, }; -static const char *meson_gxm_phy_names[] = { +static const char * const meson_gxm_phy_names[] = { "usb2-phy0", "usb2-phy1", "usb2-phy2", }; -static const char *meson_g12a_phy_names[] = { +static const char * const meson_g12a_phy_names[] = { "usb2-phy0", "usb2-phy1", "usb3-phy0", }; @@ -132,7 +132,7 @@ static const char *meson_g12a_phy_names[] = { * correctly when only the "usb2-phy1" phy is specified on-par with the * DT bindings. */ -static const char *meson_a1_phy_names[] = { +static const char * const meson_a1_phy_names[] = { "usb2-phy0", "usb2-phy1" }; @@ -143,7 +143,7 @@ struct dwc3_meson_g12a_drvdata { bool otg_phy_host_port_disable; struct clk_bulk_data *clks; int num_clks; - const char **phy_names; + const char * const *phy_names; int num_phys; int (*setup_regmaps)(struct dwc3_meson_g12a *priv, void __iomem *base); int (*usb2_init_phy)(struct dwc3_meson_g12a *priv, int i, @@ -520,11 +520,7 @@ static int dwc3_meson_g12a_role_set(struct usb_role_switch *sw, return 0; if (priv->drvdata->otg_phy_host_port_disable) - dev_warn_once(priv->dev, "Manual OTG switch is broken on this "\ - "SoC, when manual switching from "\ - "Host to device, DWC3 controller "\ - "will need to be resetted in order "\ - "to recover usage of the Host port"); + dev_warn_once(priv->dev, "Broken manual OTG switch\n"); return dwc3_meson_g12a_otg_mode_set(priv, mode); } @@ -906,8 +902,8 @@ static int __maybe_unused dwc3_meson_g12a_resume(struct device *dev) return ret; } - if (priv->vbus && priv->otg_phy_mode == PHY_MODE_USB_HOST) { - ret = regulator_enable(priv->vbus); + if (priv->vbus && priv->otg_phy_mode == PHY_MODE_USB_HOST) { + ret = regulator_enable(priv->vbus); if (ret) return ret; } From patchwork Thu Aug 13 06:25:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 11711749 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 449A913B1 for ; Thu, 13 Aug 2020 06:25:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B2EB20791 for ; Thu, 13 Aug 2020 06:25:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299948; bh=4yEjk+cVQYA9n4X8Fems/byxVRMAGU/R28g8/ZrYIyY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=sxEDauBqmFgQHzfU2GdQLunN65Ny+zO1WgMyaINknTSG7roX/bHfrZB55rxgAlQth qyl4Ia7ZKNQk7wioaXoklB4UCvQv/cG5qjlh5P0zKibKSmYgZKTqpJXnkPjXzMGkpj Rh+2CoDb74XqLWaZPvucUk+tji8awf7AXXSJnRbo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726043AbgHMGZr (ORCPT ); Thu, 13 Aug 2020 02:25:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:38046 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726121AbgHMGZn (ORCPT ); Thu, 13 Aug 2020 02:25:43 -0400 Received: from saruman.elisa-laajakaista.fi (unknown [194.34.132.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0DDE32080C; Thu, 13 Aug 2020 06:25:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299942; bh=4yEjk+cVQYA9n4X8Fems/byxVRMAGU/R28g8/ZrYIyY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Nb4SdKMpP0vzFR8tGh7Kot08vQqJaTy3/iWPGuCMYEI2XksrCt9OCxx+lfuHckRlt z6kCrie2y5j4E8tkSDzxVY2TK/fbOn205l45lkRAun8H+8pYP0pQTI/ZaoI2aD6GRG QtjJXTL2cxhjV0cZeVvaAqSEEgISV2W41Cz3zB30= From: balbi@kernel.org To: Linux USB Cc: Felipe Balbi Subject: [PATCH 04/11] dwc3: ulpi: fix checkpatch warning Date: Thu, 13 Aug 2020 09:25:25 +0300 Message-Id: <20200813062532.829720-4-balbi@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200813062532.829720-1-balbi@kernel.org> References: <20200813062532.829720-1-balbi@kernel.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Felipe Balbi no functional changes. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/ulpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/ulpi.c b/drivers/usb/dwc3/ulpi.c index e6e6176386a4..aa213c9815f6 100644 --- a/drivers/usb/dwc3/ulpi.c +++ b/drivers/usb/dwc3/ulpi.c @@ -19,7 +19,7 @@ static int dwc3_ulpi_busyloop(struct dwc3 *dwc) { - unsigned count = 1000; + unsigned int count = 1000; u32 reg; while (count--) { From patchwork Thu Aug 13 06:25:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 11711747 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C42A913 for ; Thu, 13 Aug 2020 06:25:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6974420791 for ; Thu, 13 Aug 2020 06:25:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299947; bh=sDrMmYcP4o7K9LD9J2okuR9gIb8aKW38EpjKeOsy/90=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=b4Yj04lEsgPnWPT/0vr0zCMZvX3TQcfuSyIyLTq7MhRpSMh0BQTzczvd5cbjz3uEd ADZSAkeFiRU274Cl8mIB7RJTmA19HdVHcAORQqMiOH/vcp7PROIujXx40Frkm/kzVF GjCNftGKBL2fPiXElLheYLomYFqIHXp9U6V2t30Y= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726144AbgHMGZp (ORCPT ); Thu, 13 Aug 2020 02:25:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:38062 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726131AbgHMGZo (ORCPT ); Thu, 13 Aug 2020 02:25:44 -0400 Received: from saruman.elisa-laajakaista.fi (unknown [194.34.132.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A7012206B5; Thu, 13 Aug 2020 06:25:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299944; bh=sDrMmYcP4o7K9LD9J2okuR9gIb8aKW38EpjKeOsy/90=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pGYF8w4EZHa8EWzUiOBPqO+R+yoPZOQ6N0T+ryJjnEo40LpY33FhjvVIUY4ta6FgG 0IkB3Z2qJQax9She9ANU7nC5Ydj8U+mj7Mlh3erq6L7ow1PmnAbiGDTBUQVYQI6pLF A4yeC6HeCu2n0LN1XqYR0TyhWUy75sgQj+2IwNDY= From: balbi@kernel.org To: Linux USB Cc: Felipe Balbi Subject: [PATCH 05/11] dwc3: trace: fix checkpatch warnings Date: Thu, 13 Aug 2020 09:25:26 +0300 Message-Id: <20200813062532.829720-5-balbi@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200813062532.829720-1-balbi@kernel.org> References: <20200813062532.829720-1-balbi@kernel.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Felipe Balbi no functional changes Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/trace.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/usb/dwc3/trace.h b/drivers/usb/dwc3/trace.h index da1be01637c8..97f4f1125a41 100644 --- a/drivers/usb/dwc3/trace.h +++ b/drivers/usb/dwc3/trace.h @@ -104,8 +104,8 @@ DECLARE_EVENT_CLASS(dwc3_log_request, TP_STRUCT__entry( __string(name, req->dep->name) __field(struct dwc3_request *, req) - __field(unsigned, actual) - __field(unsigned, length) + __field(unsigned int, actual) + __field(unsigned int, length) __field(int, status) __field(int, zero) __field(int, short_not_ok) @@ -246,6 +246,7 @@ DECLARE_EVENT_CLASS(dwc3_log_trb, __entry->dequeue, __entry->bph, __entry->bpl, ({char *s; int pcm = ((__entry->size >> 24) & 3) + 1; + switch (__entry->type) { case USB_ENDPOINT_XFER_INT: case USB_ENDPOINT_XFER_ISOC: @@ -291,12 +292,12 @@ DECLARE_EVENT_CLASS(dwc3_log_ep, TP_ARGS(dep), TP_STRUCT__entry( __string(name, dep->name) - __field(unsigned, maxpacket) - __field(unsigned, maxpacket_limit) - __field(unsigned, max_streams) - __field(unsigned, maxburst) - __field(unsigned, flags) - __field(unsigned, direction) + __field(unsigned int, maxpacket) + __field(unsigned int, maxpacket_limit) + __field(unsigned int, max_streams) + __field(unsigned int, maxburst) + __field(unsigned int, flags) + __field(unsigned int, direction) __field(u8, trb_enqueue) __field(u8, trb_dequeue) ), From patchwork Thu Aug 13 06:25:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 11711751 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6191513B1 for ; Thu, 13 Aug 2020 06:25:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 496BE2080C for ; Thu, 13 Aug 2020 06:25:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299949; bh=RxZSywwUjM7t+PF7lnR/LsgIuwxf6BBZyopTs7zv51I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=TcyOvqzCLvoZuvgnCWj9LAAEl6Goji3j1F8XEeeOuv3RTdJGH+7moueNAm0xnwTVt bLGcclCEngWlyWx3GMjwvYZeW84KGevRjCCiJhzYQ6nevoJj2Ok3yJPWpIfTKA0RPW TBKPqMv7isxy3+NtpbciQJsitWEJpGA6B/4Oj8qg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726192AbgHMGZr (ORCPT ); Thu, 13 Aug 2020 02:25:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:38098 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726167AbgHMGZp (ORCPT ); Thu, 13 Aug 2020 02:25:45 -0400 Received: from saruman.elisa-laajakaista.fi (unknown [194.34.132.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DC77A2078B; Thu, 13 Aug 2020 06:25:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299945; bh=RxZSywwUjM7t+PF7lnR/LsgIuwxf6BBZyopTs7zv51I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0lV893FstK9YmHYQClN0dzK+/ZD+N74OpyxGMHJmfqRLM94El5vwHtRVN7zYv7evh 7snszShLEL3LCTRxN54w1aPJefgGl90RL6RuBhiEnRtQ4wopDCXzcOggzWdGrmdpif Cr7EGjL92Z385Ve+reCzuzgu8gzioHfXAiPigfx4= From: balbi@kernel.org To: Linux USB Cc: Felipe Balbi Subject: [PATCH 06/11] dwc3: debug: fix checkpatch warning Date: Thu, 13 Aug 2020 09:25:27 +0300 Message-Id: <20200813062532.829720-6-balbi@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200813062532.829720-1-balbi@kernel.org> References: <20200813062532.829720-1-balbi@kernel.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Felipe Balbi no functional changes Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/debug.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/debug.h b/drivers/usb/dwc3/debug.h index 8e03bcb77da8..8ab394942360 100644 --- a/drivers/usb/dwc3/debug.h +++ b/drivers/usb/dwc3/debug.h @@ -413,8 +413,8 @@ static inline const char *dwc3_gadget_generic_cmd_status_string(int status) #ifdef CONFIG_DEBUG_FS -extern void dwc3_debugfs_init(struct dwc3 *); -extern void dwc3_debugfs_exit(struct dwc3 *); +extern void dwc3_debugfs_init(struct dwc3 *d); +extern void dwc3_debugfs_exit(struct dwc3 *d); #else static inline void dwc3_debugfs_init(struct dwc3 *d) { } From patchwork Thu Aug 13 06:25:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 11711753 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 674B4913 for ; Thu, 13 Aug 2020 06:25:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4EAE12078D for ; Thu, 13 Aug 2020 06:25:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299950; bh=Xfu4dFBmXNFvSByz5OjqWRdtRbMq7N32vvQ7SmTVS8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ZVpJ+cTdD458ioCdJWb5XTeZ62CxSXJpEl3xQc4tPLK/IC8FEIewWidte29nC0pa2 A/UzVL0gCAffiuSeSdp9lD6ShzwyTqKSf5m412KNCbhvoTZY4s6GKBv460X2dGBWFO InmvpzYgaicxXg8NFFkGOevsr/HC9m+b+TZzOoMo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726244AbgHMGZt (ORCPT ); Thu, 13 Aug 2020 02:25:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:38114 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726174AbgHMGZr (ORCPT ); Thu, 13 Aug 2020 02:25:47 -0400 Received: from saruman.elisa-laajakaista.fi (unknown [194.34.132.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 17B6620716; Thu, 13 Aug 2020 06:25:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299946; bh=Xfu4dFBmXNFvSByz5OjqWRdtRbMq7N32vvQ7SmTVS8A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ptqGwN9mweFa9Cz4lfN1LY+t9YEtsRT3Jo60A/q+P9zZlLcJrMK7qEyDwqEts7+O7 kEitCVdFaujuhqbERQGex4D2lwkIqPhWer2T5gQ2iHyCk95eqGB2J6p3js98UYH4/g RrgNgLux3gjl7knIQUmPyO23coRiyAQ/btC8mNrI= From: balbi@kernel.org To: Linux USB Cc: Felipe Balbi Subject: [PATCH 07/11] dwc3: core: fix checkpatch warnings Date: Thu, 13 Aug 2020 09:25:28 +0300 Message-Id: <20200813062532.829720-7-balbi@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200813062532.829720-1-balbi@kernel.org> References: <20200813062532.829720-1-balbi@kernel.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Felipe Balbi no functional changes Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/core.h | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h index 2f04b3e42bf1..ce457950606e 100644 --- a/drivers/usb/dwc3/core.h +++ b/drivers/usb/dwc3/core.h @@ -634,7 +634,7 @@ struct dwc3_trb; struct dwc3_event_buffer { void *buf; void *cache; - unsigned length; + unsigned int length; unsigned int lpos; unsigned int count; unsigned int flags; @@ -694,7 +694,7 @@ struct dwc3_ep { struct dwc3 *dwc; u32 saved_state; - unsigned flags; + unsigned int flags; #define DWC3_EP_ENABLED BIT(0) #define DWC3_EP_STALL BIT(1) #define DWC3_EP_WEDGE BIT(2) @@ -893,9 +893,9 @@ struct dwc3_request { struct scatterlist *sg; struct scatterlist *start_sg; - unsigned num_pending_sgs; + unsigned int num_pending_sgs; unsigned int num_queued_sgs; - unsigned remaining; + unsigned int remaining; unsigned int status; #define DWC3_REQUEST_STATUS_QUEUED 0 @@ -908,11 +908,11 @@ struct dwc3_request { struct dwc3_trb *trb; dma_addr_t trb_dma; - unsigned num_trbs; + unsigned int num_trbs; - unsigned needs_extra_trb:1; - unsigned direction:1; - unsigned mapped:1; + unsigned int needs_extra_trb:1; + unsigned int direction:1; + unsigned int mapped:1; }; /* @@ -1010,8 +1010,8 @@ struct dwc3_scratchpad_array { * @has_lpm_erratum: true when core was configured with LPM Erratum. Note that * there's now way for software to detect this in runtime. * @is_utmi_l1_suspend: the core asserts output signal - * 0 - utmi_sleep_n - * 1 - utmi_l1_suspend_n + * 0 - utmi_sleep_n + * 1 - utmi_l1_suspend_n * @is_fpga: true when we are using the FPGA board * @pending_events: true when we have pending IRQs to be handled * @pullups_connected: true when Run/Stop bit is set @@ -1047,13 +1047,13 @@ struct dwc3_scratchpad_array { * instances in park mode. * @tx_de_emphasis_quirk: set if we enable Tx de-emphasis quirk * @tx_de_emphasis: Tx de-emphasis value - * 0 - -6dB de-emphasis - * 1 - -3.5dB de-emphasis - * 2 - No de-emphasis - * 3 - Reserved + * 0 - -6dB de-emphasis + * 1 - -3.5dB de-emphasis + * 2 - No de-emphasis + * 3 - Reserved * @dis_metastability_quirk: set to disable metastability quirk. * @imod_interval: set the interrupt moderation interval in 250ns - * increments or 0 to disable. + * increments or 0 to disable. */ struct dwc3 { struct work_struct drd_work; @@ -1456,9 +1456,10 @@ void dwc3_gadget_exit(struct dwc3 *dwc); int dwc3_gadget_set_test_mode(struct dwc3 *dwc, int mode); int dwc3_gadget_get_link_state(struct dwc3 *dwc); int dwc3_gadget_set_link_state(struct dwc3 *dwc, enum dwc3_link_state state); -int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned cmd, +int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned int cmd, struct dwc3_gadget_ep_cmd_params *params); -int dwc3_send_gadget_generic_command(struct dwc3 *dwc, unsigned cmd, u32 param); +int dwc3_send_gadget_generic_command(struct dwc3 *dwc, unsigned int cmd, + u32 param); #else static inline int dwc3_gadget_init(struct dwc3 *dwc) { return 0; } @@ -1472,7 +1473,7 @@ static inline int dwc3_gadget_set_link_state(struct dwc3 *dwc, enum dwc3_link_state state) { return 0; } -static inline int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned cmd, +static inline int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned int cmd, struct dwc3_gadget_ep_cmd_params *params) { return 0; } static inline int dwc3_send_gadget_generic_command(struct dwc3 *dwc, From patchwork Thu Aug 13 06:25:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 11711755 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 10A4E16B1 for ; Thu, 13 Aug 2020 06:25:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ED37A20838 for ; Thu, 13 Aug 2020 06:25:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299951; bh=3l06lVbHyKOg+g6w8AjVaqYHrYNKKb/MzVL/EIbgA7w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=xxJZt/42WzO0sKT5Anq0dlScsfPWDJ+Ni9BrNde3bJDZoHbiLrj+edEseeZPqoFr7 i07BI7LRxhUZzeoMoYijKGNtwt5NA9MZ8+gTZM4uyJ3GGYVhrGT1kxQr1K9sWfEG+V EVHPY3nWFz7ThADNatB+FAMqPeIbBXrZRqGRVyRg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726249AbgHMGZu (ORCPT ); Thu, 13 Aug 2020 02:25:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:38146 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726167AbgHMGZs (ORCPT ); Thu, 13 Aug 2020 02:25:48 -0400 Received: from saruman.elisa-laajakaista.fi (unknown [194.34.132.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 474B62078D; Thu, 13 Aug 2020 06:25:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299948; bh=3l06lVbHyKOg+g6w8AjVaqYHrYNKKb/MzVL/EIbgA7w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=InyJYVatEhZ2kY9mY8h+SyJcd6od85JJxzWYeqVHhrJC/qlA8G8IUzk3KFweUCHgg cSOvd73WZrKgh2DFnGvrHOlNSXDwK7C2gfCWTiUTvSp1/CuXgW/fQ4sLcuF5wzn+nQ Dg5VcgXbLlrTT1ykNE1OB5UKkPkatXQLAoRayrng= From: balbi@kernel.org To: Linux USB Cc: Felipe Balbi Subject: [PATCH 08/11] dwc3: gadget: fix checkpatch warnings Date: Thu, 13 Aug 2020 09:25:29 +0300 Message-Id: <20200813062532.829720-8-balbi@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200813062532.829720-1-balbi@kernel.org> References: <20200813062532.829720-1-balbi@kernel.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Felipe Balbi no functional changes Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/gadget.c | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index e44bfc3b5096..6b9f891b7e40 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -227,7 +227,8 @@ void dwc3_gadget_giveback(struct dwc3_ep *dep, struct dwc3_request *req, * Caller should take care of locking. Issue @cmd with a given @param to @dwc * and wait for its completion. */ -int dwc3_send_gadget_generic_command(struct dwc3 *dwc, unsigned cmd, u32 param) +int dwc3_send_gadget_generic_command(struct dwc3 *dwc, unsigned int cmd, + u32 param) { u32 timeout = 500; int status = 0; @@ -268,7 +269,7 @@ static int __dwc3_gadget_wakeup(struct dwc3 *dwc); * Caller should handle locking. This function will issue @cmd with given * @params to @dep and wait for its completion. */ -int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned cmd, +int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned int cmd, struct dwc3_gadget_ep_cmd_params *params) { const struct usb_endpoint_descriptor *desc = dep->endpoint.desc; @@ -564,6 +565,7 @@ static int dwc3_gadget_set_ep_config(struct dwc3_ep *dep, unsigned int action) /* Burst size is only needed in SuperSpeed mode */ if (dwc->gadget.speed >= USB_SPEED_SUPER) { u32 burst = dep->endpoint.maxburst; + params.param0 |= DWC3_DEPCFG_BURST_SIZE(burst - 1); } @@ -942,9 +944,10 @@ static u32 dwc3_calc_trbs_left(struct dwc3_ep *dep) } static void __dwc3_prepare_one_trb(struct dwc3_ep *dep, struct dwc3_trb *trb, - dma_addr_t dma, unsigned length, unsigned chain, unsigned node, - unsigned stream_id, unsigned short_not_ok, - unsigned no_interrupt, unsigned is_last) + dma_addr_t dma, unsigned int length, unsigned int chain, + unsigned int node, unsigned int stream_id, + unsigned int short_not_ok, unsigned int no_interrupt, + unsigned int is_last) { struct dwc3 *dwc = dep->dwc; struct usb_gadget *gadget = &dwc->gadget; @@ -1058,15 +1061,15 @@ static void __dwc3_prepare_one_trb(struct dwc3_ep *dep, struct dwc3_trb *trb, * @node: only for isochronous endpoints. First TRB needs different type. */ static void dwc3_prepare_one_trb(struct dwc3_ep *dep, - struct dwc3_request *req, unsigned chain, unsigned node) + struct dwc3_request *req, unsigned int chain, unsigned int node) { struct dwc3_trb *trb; + unsigned int stream_id = req->request.stream_id; + unsigned int short_not_ok = req->request.short_not_ok; + unsigned int no_interrupt = req->request.no_interrupt; + unsigned int is_last = req->request.is_last; unsigned int length; dma_addr_t dma; - unsigned stream_id = req->request.stream_id; - unsigned short_not_ok = req->request.short_not_ok; - unsigned no_interrupt = req->request.no_interrupt; - unsigned is_last = req->request.is_last; if (req->request.num_sgs > 0) { length = sg_dma_len(req->start_sg); @@ -1104,7 +1107,7 @@ static void dwc3_prepare_one_trb_sg(struct dwc3_ep *dep, unsigned int length = req->request.length; unsigned int maxp = usb_endpoint_maxp(dep->endpoint.desc); unsigned int rem = length % maxp; - unsigned chain = true; + unsigned int chain = true; /* * IOMMU driver is coalescing the list of sgs which shares a @@ -1586,9 +1589,8 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) return 0; if ((dep->flags & DWC3_EP_PENDING_REQUEST)) { - if (!(dep->flags & DWC3_EP_TRANSFER_STARTED)) { + if (!(dep->flags & DWC3_EP_TRANSFER_STARTED)) return __dwc3_gadget_start_isoc(dep); - } } } @@ -1726,8 +1728,8 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value, int protocol) if (value) { struct dwc3_trb *trb; - unsigned transfer_in_flight; - unsigned started; + unsigned int transfer_in_flight; + unsigned int started; if (dep->number > 1) trb = dwc3_ep_prev_trb(dep, dep->trb_enqueue); From patchwork Thu Aug 13 06:25:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 11711757 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B632113B1 for ; Thu, 13 Aug 2020 06:25:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9593D2080C for ; Thu, 13 Aug 2020 06:25:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299951; bh=aUkQhSpnz0EAP2TMP52WAGt/FB1bys0KsQpqMX4ZYEc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=VHbnOLleU6CuhvK7wMcs21KwH6GWYf8sqIFXSV9VvhzNVRzrAjj43d1+j811MI7sx ORYUwyiuEpHshFU6xnqtqN14MnhiARqMwdzPo4l5P9eJaym9Cr/jKXdtZ/GWcn5RAK zxxWwkRiPpIR5QbHBP3/ifJPcYQhPMa1ouO03kGc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726292AbgHMGZu (ORCPT ); Thu, 13 Aug 2020 02:25:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:38170 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726204AbgHMGZt (ORCPT ); Thu, 13 Aug 2020 02:25:49 -0400 Received: from saruman.elisa-laajakaista.fi (unknown [194.34.132.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 765002078B; Thu, 13 Aug 2020 06:25:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299949; bh=aUkQhSpnz0EAP2TMP52WAGt/FB1bys0KsQpqMX4ZYEc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PEQcJ2olTquq2JY5moDfi2G3cztapOrJUB4QgBDyAy2tfCaTU8QxBHrr9q97ErQZ+ pewWSOR07sAjx6Dx0yumoS5wFOqhGiah57rw4jD/N4WHH7Yxw5wDPOOUu+2MriqrPQ zelloZVbrxZ0pQRU4OwOU5JIH06SFHLfJL4xJRC0= From: balbi@kernel.org To: Linux USB Cc: Felipe Balbi Subject: [PATCH 09/11] dwc3: ep0: fix checkpatch warnings Date: Thu, 13 Aug 2020 09:25:30 +0300 Message-Id: <20200813062532.829720-9-balbi@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200813062532.829720-1-balbi@kernel.org> References: <20200813062532.829720-1-balbi@kernel.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Felipe Balbi no functional changes Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/ep0.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/ep0.c b/drivers/usb/dwc3/ep0.c index 59f2e8c31bd1..5bb4327ae237 100644 --- a/drivers/usb/dwc3/ep0.c +++ b/drivers/usb/dwc3/ep0.c @@ -105,7 +105,7 @@ static int __dwc3_gadget_ep0_queue(struct dwc3_ep *dep, * IRQ we were waiting for is long gone. */ if (dep->flags & DWC3_EP_PENDING_REQUEST) { - unsigned direction; + unsigned int direction; direction = !!(dep->flags & DWC3_EP0_DIR_IN); @@ -127,7 +127,7 @@ static int __dwc3_gadget_ep0_queue(struct dwc3_ep *dep, * handle it here. */ if (dwc->delayed_status) { - unsigned direction; + unsigned int direction; direction = !dwc->ep0_expect_in; dwc->delayed_status = false; @@ -172,7 +172,7 @@ static int __dwc3_gadget_ep0_queue(struct dwc3_ep *dep, * XferNotReady(STATUS). */ if (dwc->three_stage_setup) { - unsigned direction; + unsigned int direction; direction = dwc->ep0_expect_in; dwc->ep0state = EP0_DATA_PHASE; From patchwork Thu Aug 13 06:25:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 11711759 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F2E4313B1 for ; Thu, 13 Aug 2020 06:25:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D24552078D for ; Thu, 13 Aug 2020 06:25:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299952; bh=PUZCkfKqM56/EMsMa6LaRKqzxfbN7vt7o481UC1U8V4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=uV4FKQozjeRleQ+LJskOmDfOBuOLxZcF1olVl7pESD313JtCnwWZylbE5rlER1mXY 1fvtZoOMMsjsBbrWh9R7vBwTJVO4551Oee9hw7W+ZYc6uHesAYoO1nmBofv8SdLo6g x0vgpZBFAeNq6E5DiYdXRgpW+D4fCkRr5Ye87yzY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726427AbgHMGZw (ORCPT ); Thu, 13 Aug 2020 02:25:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:38198 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726334AbgHMGZu (ORCPT ); Thu, 13 Aug 2020 02:25:50 -0400 Received: from saruman.elisa-laajakaista.fi (unknown [194.34.132.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A64B320716; Thu, 13 Aug 2020 06:25:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299950; bh=PUZCkfKqM56/EMsMa6LaRKqzxfbN7vt7o481UC1U8V4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sqAiN2dQOO0dBbfnl2VxcQjxHbkqwef9eW/WnQDlVMQjHUe42wjb87PI1VX0WpT+d 7MhOab7+V0I7QP05FnNvDESY+OUEHnsddpAQxI5iKALamOwuZGPH9PCutYyJ8NzLbi SJNDzMV4LrhjJKiTLJi9LRmiSrNA2+7r5P8jAueQ= From: balbi@kernel.org To: Linux USB Cc: Felipe Balbi Subject: [PATCH 10/11] dwc3: qcom: fix checkpatch warnings Date: Thu, 13 Aug 2020 09:25:31 +0300 Message-Id: <20200813062532.829720-10-balbi@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200813062532.829720-1-balbi@kernel.org> References: <20200813062532.829720-1-balbi@kernel.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Felipe Balbi no functional changes Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/dwc3-qcom.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c index fcf7f79fb983..c703d552bbcf 100644 --- a/drivers/usb/dwc3/dwc3-qcom.c +++ b/drivers/usb/dwc3/dwc3-qcom.c @@ -444,7 +444,9 @@ static int dwc3_qcom_setup_irq(struct platform_device *pdev) { struct dwc3_qcom *qcom = platform_get_drvdata(pdev); const struct dwc3_acpi_pdata *pdata = qcom->acpi_pdata; - int irq, ret; + int irq; + int ret; + irq = dwc3_qcom_get_irq(pdev, "hs_phy_irq", pdata ? pdata->hs_phy_irq_index : -1); if (irq > 0) { @@ -563,7 +565,7 @@ static const struct property_entry dwc3_qcom_acpi_properties[] = { static int dwc3_qcom_acpi_register_core(struct platform_device *pdev) { - struct dwc3_qcom *qcom = platform_get_drvdata(pdev); + struct dwc3_qcom *qcom = platform_get_drvdata(pdev); struct device *dev = &pdev->dev; struct resource *res, *child_res = NULL; int irq; @@ -623,7 +625,7 @@ static int dwc3_qcom_acpi_register_core(struct platform_device *pdev) static int dwc3_qcom_of_register_core(struct platform_device *pdev) { - struct dwc3_qcom *qcom = platform_get_drvdata(pdev); + struct dwc3_qcom *qcom = platform_get_drvdata(pdev); struct device_node *np = pdev->dev.of_node, *dwc3_np; struct device *dev = &pdev->dev; int ret; From patchwork Thu Aug 13 06:25:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 11711761 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 036D5913 for ; Thu, 13 Aug 2020 06:25:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E17ED20791 for ; Thu, 13 Aug 2020 06:25:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299953; bh=XqBNb/nUTdIvLeD6DiA78f2UoG4UXyYLikbj5H38YGg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=hQrC2HWo2BYQjD+SFV9moUkhKKQRlVtFSPvSbFaDsesVSG6nIKYl25dntqcSvfasD 2yGP2ilsndF/6mZL9L4TQ2igfG6hWmPppJYp61W7RxUOH9rF8adjsNPePNzWv6VawB rcoJ0lzh831V1QS4UOqKsoeFcnt1iixdACDbswik= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726467AbgHMGZx (ORCPT ); Thu, 13 Aug 2020 02:25:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:38210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726419AbgHMGZw (ORCPT ); Thu, 13 Aug 2020 02:25:52 -0400 Received: from saruman.elisa-laajakaista.fi (unknown [194.34.132.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D73492078D; Thu, 13 Aug 2020 06:25:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597299951; bh=XqBNb/nUTdIvLeD6DiA78f2UoG4UXyYLikbj5H38YGg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JMcbXcUwuBdjcEaRLTGeM4QE18uT59O32g1jaPO96VK5rTRIsucAXPhMFkZASbGC4 EoZW7TkcLysA1nODFyMaQdnmYy2hpaDvXk5ZH4LU6+EYuDpNHpP5qp8HZHyDCsurp/ EPpPvsmO5zX6OId2+5ItAsBBv772wx09fI5Y+P4M= From: balbi@kernel.org To: Linux USB Cc: Felipe Balbi Subject: [PATCH 11/11] dwc3: debugfs: fix checkpatch warnings Date: Thu, 13 Aug 2020 09:25:32 +0300 Message-Id: <20200813062532.829720-11-balbi@kernel.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200813062532.829720-1-balbi@kernel.org> References: <20200813062532.829720-1-balbi@kernel.org> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Felipe Balbi no functional changes Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/debugfs.c | 56 ++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/drivers/usb/dwc3/debugfs.c b/drivers/usb/dwc3/debugfs.c index 2c7b6dd79cdf..608639a0dea7 100644 --- a/drivers/usb/dwc3/debugfs.c +++ b/drivers/usb/dwc3/debugfs.c @@ -397,13 +397,13 @@ static int dwc3_mode_show(struct seq_file *s, void *unused) switch (DWC3_GCTL_PRTCAP(reg)) { case DWC3_GCTL_PRTCAP_HOST: - seq_printf(s, "host\n"); + seq_puts(s, "host\n"); break; case DWC3_GCTL_PRTCAP_DEVICE: - seq_printf(s, "device\n"); + seq_puts(s, "device\n"); break; case DWC3_GCTL_PRTCAP_OTG: - seq_printf(s, "otg\n"); + seq_puts(s, "otg\n"); break; default: seq_printf(s, "UNKNOWN %08x\n", DWC3_GCTL_PRTCAP(reg)); @@ -464,22 +464,22 @@ static int dwc3_testmode_show(struct seq_file *s, void *unused) switch (reg) { case 0: - seq_printf(s, "no test\n"); + seq_puts(s, "no test\n"); break; case USB_TEST_J: - seq_printf(s, "test_j\n"); + seq_puts(s, "test_j\n"); break; case USB_TEST_K: - seq_printf(s, "test_k\n"); + seq_puts(s, "test_k\n"); break; case USB_TEST_SE0_NAK: - seq_printf(s, "test_se0_nak\n"); + seq_puts(s, "test_se0_nak\n"); break; case USB_TEST_PACKET: - seq_printf(s, "test_packet\n"); + seq_puts(s, "test_packet\n"); break; case USB_TEST_FORCE_ENABLE: - seq_printf(s, "test_force_enable\n"); + seq_puts(s, "test_force_enable\n"); break; default: seq_printf(s, "UNKNOWN %d\n", reg); @@ -760,27 +760,26 @@ static int dwc3_transfer_type_show(struct seq_file *s, void *unused) unsigned long flags; spin_lock_irqsave(&dwc->lock, flags); - if (!(dep->flags & DWC3_EP_ENABLED) || - !dep->endpoint.desc) { - seq_printf(s, "--\n"); + if (!(dep->flags & DWC3_EP_ENABLED) || !dep->endpoint.desc) { + seq_puts(s, "--\n"); goto out; } switch (usb_endpoint_type(dep->endpoint.desc)) { case USB_ENDPOINT_XFER_CONTROL: - seq_printf(s, "control\n"); + seq_puts(s, "control\n"); break; case USB_ENDPOINT_XFER_ISOC: - seq_printf(s, "isochronous\n"); + seq_puts(s, "isochronous\n"); break; case USB_ENDPOINT_XFER_BULK: - seq_printf(s, "bulk\n"); + seq_puts(s, "bulk\n"); break; case USB_ENDPOINT_XFER_INT: - seq_printf(s, "interrupt\n"); + seq_puts(s, "interrupt\n"); break; default: - seq_printf(s, "--\n"); + seq_puts(s, "--\n"); } out: @@ -798,11 +797,11 @@ static int dwc3_trb_ring_show(struct seq_file *s, void *unused) spin_lock_irqsave(&dwc->lock, flags); if (dep->number <= 1) { - seq_printf(s, "--\n"); + seq_puts(s, "--\n"); goto out; } - seq_printf(s, "buffer_addr,size,type,ioc,isp_imi,csp,chn,lst,hwo\n"); + seq_puts(s, "buffer_addr,size,type,ioc,isp_imi,csp,chn,lst,hwo\n"); for (i = 0; i < DWC3_TRB_NUM; i++) { struct dwc3_trb *trb = &dep->trb_pool[i]; @@ -884,7 +883,7 @@ static void dwc3_debugfs_create_endpoint_files(struct dwc3_ep *dep, const struct file_operations *fops = dwc3_ep_file_map[i].fops; const char *name = dwc3_ep_file_map[i].name; - debugfs_create_file(name, S_IRUGO, parent, dep, fops); + debugfs_create_file(name, 0444, parent, dep, fops); } } @@ -929,21 +928,18 @@ void dwc3_debugfs_init(struct dwc3 *dwc) root = debugfs_create_dir(dev_name(dwc->dev), usb_debug_root); dwc->root = root; - debugfs_create_regset32("regdump", S_IRUGO, root, dwc->regset); + debugfs_create_regset32("regdump", 0444, root, dwc->regset); + debugfs_create_file("lsp_dump", 0644, root, dwc, &dwc3_lsp_fops); - debugfs_create_file("lsp_dump", S_IRUGO | S_IWUSR, root, dwc, - &dwc3_lsp_fops); - - if (IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE)) { - debugfs_create_file("mode", S_IRUGO | S_IWUSR, root, dwc, + if (IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE)) + debugfs_create_file("mode", 0644, root, dwc, &dwc3_mode_fops); - } if (IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE) || IS_ENABLED(CONFIG_USB_DWC3_GADGET)) { - debugfs_create_file("testmode", S_IRUGO | S_IWUSR, root, dwc, - &dwc3_testmode_fops); - debugfs_create_file("link_state", S_IRUGO | S_IWUSR, root, dwc, + debugfs_create_file("testmode", 0644, root, dwc, + &dwc3_testmode_fops); + debugfs_create_file("link_state", 0644, root, dwc, &dwc3_link_state_fops); dwc3_debugfs_create_endpoint_dirs(dwc, root); }