From patchwork Thu Aug 20 11:30:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 258812 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=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MIME_BASE64_TEXT, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 444CFC433E3 for ; Thu, 20 Aug 2020 11:38:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 16184204EA for ; Thu, 20 Aug 2020 11:38:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="Y6lBTbZD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730819AbgHTLe4 (ORCPT ); Thu, 20 Aug 2020 07:34:56 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:29940 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730154AbgHTLcv (ORCPT ); Thu, 20 Aug 2020 07:32:51 -0400 X-UUID: fc157446e9cb41f3bc3de99a6f4896b1-20200820 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=G7pvdWU6ecd0ZELjOP1tjCdcvdakfvhwkNEctXHsX3w=; b=Y6lBTbZDjgKKOj7caJpk1mtzuw3Z0Qn0ZUOokYIMZ3AvqlF1aAX+flQj5HdUBc2zNnKqSERYSZKPglPl706yIqqcrdRs/vfmc25ywYpt6JVRMg1cEHNI/sJelnAZosLxwsG8YJXWhVoGSZEhztyZi6RjGZOvlFxWiMJzvkb3bzc=; X-UUID: fc157446e9cb41f3bc3de99a6f4896b1-20200820 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 882762425; Thu, 20 Aug 2020 19:32:22 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 20 Aug 2020 19:32:20 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 20 Aug 2020 19:32:18 +0800 From: Chunfeng Yun To: Felipe Balbi , Florian Fainelli CC: Greg Kroah-Hartman , Matthias Brugger , Chunfeng Yun , Al Cooper , Sasi Kumar , Peter Chen , Minas Harutyunyan , Nathan Chancellor , Colin Ian King , , , , Subject: [PATCH v2 01/11] usb: gadget: bdc: fix improper SPDX comment style for header file Date: Thu, 20 Aug 2020 19:30:36 +0800 Message-ID: <1597923046-12535-1-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty MIME-Version: 1.0 X-TM-SNTS-SMTP: 921FA67EAD5DF1151DD75AC4BE3FAD03D1FB55737FB5FEAF8748B0F0395FC15B2000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org For C header files Documentation/process/license-rules.rst mandates C-like comments (opposed to C source files where C++ style should be used). Cc: Florian Fainelli Signed-off-by: Chunfeng Yun --- v2: add Cc Florian --- drivers/usb/gadget/udc/bdc/bdc.h | 2 +- drivers/usb/gadget/udc/bdc/bdc_cmd.h | 2 +- drivers/usb/gadget/udc/bdc/bdc_dbg.h | 2 +- drivers/usb/gadget/udc/bdc/bdc_ep.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) -- 1.9.1 Acked-by: Florian Fainelli Acked-by: Florian Fainelli Acked-by: Florian Fainelli Acked-by: Florian Fainelli Acked-by: Florian Fainelli diff --git a/drivers/usb/gadget/udc/bdc/bdc.h b/drivers/usb/gadget/udc/bdc/bdc.h index ac75e25..fcba77e 100644 --- a/drivers/usb/gadget/udc/bdc/bdc.h +++ b/drivers/usb/gadget/udc/bdc/bdc.h @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0+ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * bdc.h - header for the BRCM BDC USB3.0 device controller * diff --git a/drivers/usb/gadget/udc/bdc/bdc_cmd.h b/drivers/usb/gadget/udc/bdc/bdc_cmd.h index 29cc988..373e674 100644 --- a/drivers/usb/gadget/udc/bdc/bdc_cmd.h +++ b/drivers/usb/gadget/udc/bdc/bdc_cmd.h @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0+ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * bdc_cmd.h - header for the BDC debug functions * diff --git a/drivers/usb/gadget/udc/bdc/bdc_dbg.h b/drivers/usb/gadget/udc/bdc/bdc_dbg.h index 373d5ab..859d588 100644 --- a/drivers/usb/gadget/udc/bdc/bdc_dbg.h +++ b/drivers/usb/gadget/udc/bdc/bdc_dbg.h @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0+ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * bdc_dbg.h - header for the BDC debug functions * diff --git a/drivers/usb/gadget/udc/bdc/bdc_ep.h b/drivers/usb/gadget/udc/bdc/bdc_ep.h index a37ff803..5bbd73f 100644 --- a/drivers/usb/gadget/udc/bdc/bdc_ep.h +++ b/drivers/usb/gadget/udc/bdc/bdc_ep.h @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0+ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * bdc_ep.h - header for the BDC debug functions * From patchwork Thu Aug 20 11:30:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 258813 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=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MIME_BASE64_TEXT, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_GIT 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 36050C433E3 for ; Thu, 20 Aug 2020 11:34:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EDD81204EA for ; Thu, 20 Aug 2020 11:34:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="k21RXt0S" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730806AbgHTLey (ORCPT ); Thu, 20 Aug 2020 07:34:54 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:65115 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730515AbgHTLcv (ORCPT ); Thu, 20 Aug 2020 07:32:51 -0400 X-UUID: 92eb2cefcc3245b8b3d6ac66e0a18bbe-20200820 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=j1FJVeRcQs/rSkPb2rqMyqS7k33Dl5D8u5KqKPyupk0=; b=k21RXt0SsjOzvIbW+lWMGWvlyW/LXMiGg4YL4mHByhe0B9zPemU5vxJJKvnyHOCOPcmieqFjLaDuo2aY7Ave+U9rjRpdOA0SuNZywlxsrOWY9VOhA/e8ftYMBZ1iosEYOdo2/Pkgv0USe7wD/XhGwf3v1U1r62WWn+gryr7vNWg=; X-UUID: 92eb2cefcc3245b8b3d6ac66e0a18bbe-20200820 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 2045521470; Thu, 20 Aug 2020 19:32:24 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 20 Aug 2020 19:32:24 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 20 Aug 2020 19:32:21 +0800 From: Chunfeng Yun To: Felipe Balbi , Florian Fainelli CC: Greg Kroah-Hartman , Matthias Brugger , Chunfeng Yun , Al Cooper , Sasi Kumar , Peter Chen , Minas Harutyunyan , Nathan Chancellor , Colin Ian King , , , , Subject: [PATCH v2 03/11] usb: gadget: bdc: prefer pointer dereference to pointer type Date: Thu, 20 Aug 2020 19:30:38 +0800 Message-ID: <1597923046-12535-3-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1597923046-12535-1-git-send-email-chunfeng.yun@mediatek.com> References: <1597923046-12535-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: CCD8B9BA7298DE2119E2D27779CF308B4D8A81F0B8FF3AB8C30114730CC229892000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Prefer kzalloc(sizeof(*bd_table)...) over kzalloc(sizeof(struct bd_table) Cc: Florian Fainelli Signed-off-by: Chunfeng Yun --- v2: add Cc Florian --- drivers/usb/gadget/udc/bdc/bdc_ep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 diff --git a/drivers/usb/gadget/udc/bdc/bdc_ep.c b/drivers/usb/gadget/udc/bdc/bdc_ep.c index fafdc9f..76463de 100644 --- a/drivers/usb/gadget/udc/bdc/bdc_ep.c +++ b/drivers/usb/gadget/udc/bdc/bdc_ep.c @@ -147,7 +147,7 @@ static int ep_bd_list_alloc(struct bdc_ep *ep) /* Allocate memory for each table */ for (index = 0; index < num_tabs; index++) { /* Allocate memory for bd_table structure */ - bd_table = kzalloc(sizeof(struct bd_table), GFP_ATOMIC); + bd_table = kzalloc(sizeof(*bd_table), GFP_ATOMIC); if (!bd_table) goto fail; From patchwork Thu Aug 20 11:30:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 258815 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=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MIME_BASE64_TEXT, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_GIT 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 E8006C433DF for ; Thu, 20 Aug 2020 11:34:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B46ED204EA for ; Thu, 20 Aug 2020 11:34:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="nHLAe92Q" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730789AbgHTLel (ORCPT ); Thu, 20 Aug 2020 07:34:41 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:20365 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730579AbgHTLcw (ORCPT ); Thu, 20 Aug 2020 07:32:52 -0400 X-UUID: cd6d0fd3f0ed4643bbbc24b82b81f9f7-20200820 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=NlLOEjhrKP97DoQusjM5b+qRcLhq9hxp0Tc7oq1k5U8=; b=nHLAe92Q++YbEcpfahF0tKi0jkxMmNt9SSYMvBfJvVPfGllnOEy+UFstd00pauoaIoYxr4ZT823Q5gEcCk0Wo0YurWZnSlZm+615CfUd8ik/E9UBq252DsQrfcVgJS+6ZedKGcT6Th+N8aLQncK9HkLimyOn6N9qz28hqefM3uM=; X-UUID: cd6d0fd3f0ed4643bbbc24b82b81f9f7-20200820 Received: from mtkcas36.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1914301953; Thu, 20 Aug 2020 19:32:27 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 20 Aug 2020 19:32:27 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 20 Aug 2020 19:32:24 +0800 From: Chunfeng Yun To: Felipe Balbi , Florian Fainelli CC: Greg Kroah-Hartman , Matthias Brugger , Chunfeng Yun , Al Cooper , Sasi Kumar , Peter Chen , Minas Harutyunyan , Nathan Chancellor , Colin Ian King , , , , Subject: [PATCH v2 05/11] usb: gadget: bdc: fix check warning of block comments alignment Date: Thu, 20 Aug 2020 19:30:40 +0800 Message-ID: <1597923046-12535-5-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1597923046-12535-1-git-send-email-chunfeng.yun@mediatek.com> References: <1597923046-12535-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: E9AD71729CA0F72BE8F6134097CC8530DF810FA2BA5B743FCD2F930AA0EE64632000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org fix the warning: WARNING:BLOCK_COMMENT_STYLE: Block comments should align the * on each line Cc: Florian Fainelli Signed-off-by: Chunfeng Yun --- v2: add Cc Florian --- drivers/usb/gadget/udc/bdc/bdc.h | 2 +- drivers/usb/gadget/udc/bdc/bdc_ep.c | 2 +- drivers/usb/gadget/udc/bdc/bdc_udc.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) -- 1.9.1 diff --git a/drivers/usb/gadget/udc/bdc/bdc.h b/drivers/usb/gadget/udc/bdc/bdc.h index fcba77e..c0ee735 100644 --- a/drivers/usb/gadget/udc/bdc/bdc.h +++ b/drivers/usb/gadget/udc/bdc/bdc.h @@ -35,7 +35,7 @@ /* * Maximum size of ep0 response buffer for ch9 requests, * the set_sel request uses 6 so far, the max. -*/ + */ #define EP0_RESPONSE_BUFF 6 /* Start with SS as default */ #define EP0_MAX_PKT_SIZE 512 diff --git a/drivers/usb/gadget/udc/bdc/bdc_ep.c b/drivers/usb/gadget/udc/bdc/bdc_ep.c index 44f3a12..3fb36c8 100644 --- a/drivers/usb/gadget/udc/bdc/bdc_ep.c +++ b/drivers/usb/gadget/udc/bdc/bdc_ep.c @@ -68,7 +68,7 @@ static void ep_bd_list_free(struct bdc_ep *ep, u32 num_tabs) * check if the bd_table struct is allocated ? * if yes, then check if bd memory has been allocated, then * free the dma_pool and also the bd_table struct memory - */ + */ bd_table = bd_list->bd_table_array[index]; dev_dbg(bdc->dev, "bd_table:%p index:%d\n", bd_table, index); if (!bd_table) { diff --git a/drivers/usb/gadget/udc/bdc/bdc_udc.c b/drivers/usb/gadget/udc/bdc/bdc_udc.c index 248426a..0c1ab95 100644 --- a/drivers/usb/gadget/udc/bdc/bdc_udc.c +++ b/drivers/usb/gadget/udc/bdc/bdc_udc.c @@ -164,7 +164,7 @@ static void bdc_func_wake_timer(struct work_struct *work) /* * Check if host has started transferring on endpoints * FUNC_WAKE_ISSUED is cleared when transfer has started after resume - */ + */ if (bdc->devstatus & FUNC_WAKE_ISSUED) { dev_dbg(bdc->dev, "FUNC_WAKE_ISSUED FLAG IS STILL SET\n"); /* flag is still set, so again send func wake */ @@ -205,7 +205,7 @@ static void handle_link_state_change(struct bdc *bdc, u32 uspc) * if not then send function wake again every * TNotification secs until host initiates * transfer to BDC, USB3 spec Table 8.13 - */ + */ schedule_delayed_work( &bdc->func_wake_notify, msecs_to_jiffies(BDC_TNOTIFY)); @@ -379,7 +379,7 @@ static int bdc_udc_start(struct usb_gadget *gadget, * Run the controller from here and when BDC is connected to * Host then driver will receive a USPC SR with VBUS present * and then driver will do a softconnect. - */ + */ ret = bdc_run(bdc); if (ret) { dev_err(bdc->dev, "%s bdc run fail\n", __func__); From patchwork Thu Aug 20 11:30:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 258814 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=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MIME_BASE64_TEXT, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY,URIBL_BLOCKED,USER_AGENT_GIT 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 2BD14C433E1 for ; Thu, 20 Aug 2020 11:34:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F317A204EA for ; Thu, 20 Aug 2020 11:34:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="NFWm/ny2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730799AbgHTLeq (ORCPT ); Thu, 20 Aug 2020 07:34:46 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:48627 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730643AbgHTLcw (ORCPT ); Thu, 20 Aug 2020 07:32:52 -0400 X-UUID: 588f2b4e3c8e4e8db45b2eabea53c397-20200820 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=75cV0UNvaSFcEM+ct8jXkWIGJbUbdQ/lh05MDRsBTN0=; b=NFWm/ny2jgdfVodzFuGo0u/CZk9ClrQl3quJuZuUvlYYZ3e5bSmrr4rN2VNmSjIYaskEX8th/J3DLrJ8wI3Lr9A7Lf9HFP5qrvc+QydtJJzoYErbguwh9Rv16dd1auPaNeAvE20Va3VwObezAUP3A7JXBJWNKoeWBzyY8KI4yxU=; X-UUID: 588f2b4e3c8e4e8db45b2eabea53c397-20200820 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 287845818; Thu, 20 Aug 2020 19:32:32 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 20 Aug 2020 19:32:28 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 20 Aug 2020 19:32:27 +0800 From: Chunfeng Yun To: Felipe Balbi , Florian Fainelli CC: Greg Kroah-Hartman , Matthias Brugger , Chunfeng Yun , Al Cooper , Sasi Kumar , Peter Chen , Minas Harutyunyan , Nathan Chancellor , Colin Ian King , , , , Subject: [PATCH v2 07/11] usb: gadget: bdc: avoid precedence issues Date: Thu, 20 Aug 2020 19:30:42 +0800 Message-ID: <1597923046-12535-7-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1597923046-12535-1-git-send-email-chunfeng.yun@mediatek.com> References: <1597923046-12535-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 8AD06DDE1DD208043ADBFE70C9BAA1AC6B260E30948CDF1CCDA65F835038900B2000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Add () around macro argument to avoid precedence issues Cc: Florian Fainelli Signed-off-by: Chunfeng Yun --- v2: add Cc Florian --- drivers/usb/gadget/udc/bdc/bdc.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) -- 1.9.1 diff --git a/drivers/usb/gadget/udc/bdc/bdc.h b/drivers/usb/gadget/udc/bdc/bdc.h index 658abef..f8d5958 100644 --- a/drivers/usb/gadget/udc/bdc/bdc.h +++ b/drivers/usb/gadget/udc/bdc/bdc.h @@ -86,20 +86,20 @@ #define BDC_EPSTS5 0x74 #define BDC_EPSTS6 0x78 #define BDC_EPSTS7 0x7c -#define BDC_SRRBAL(n) (0x200 + (n * 0x10)) -#define BDC_SRRBAH(n) (0x204 + (n * 0x10)) -#define BDC_SRRINT(n) (0x208 + (n * 0x10)) -#define BDC_INTCTLS(n) (0x20c + (n * 0x10)) +#define BDC_SRRBAL(n) (0x200 + ((n) * 0x10)) +#define BDC_SRRBAH(n) (0x204 + ((n) * 0x10)) +#define BDC_SRRINT(n) (0x208 + ((n) * 0x10)) +#define BDC_INTCTLS(n) (0x20c + ((n) * 0x10)) /* Extended capability regs */ #define BDC_FSCNOC 0xcd4 #define BDC_FSCNIC 0xce4 -#define NUM_NCS(p) (p >> 28) +#define NUM_NCS(p) ((p) >> 28) /* Register bit fields and Masks */ /* BDC Configuration 0 */ #define BDC_PGS(p) (((p) & (0x7 << 8)) >> 8) -#define BDC_SPB(p) (p & 0x7) +#define BDC_SPB(p) ((p) & 0x7) /* BDC Capability1 */ #define BDC_P64 (1 << 0) @@ -113,7 +113,7 @@ #define BDC_CMD_DVC 0x1 #define BDC_CMD_CWS (0x1 << 5) #define BDC_CMD_CST(p) (((p) & (0xf << 6))>>6) -#define BDC_CMD_EPN(p) ((p & 0x1f) << 10) +#define BDC_CMD_EPN(p) (((p) & 0x1f) << 10) #define BDC_SUB_CMD_ADD (0x1 << 17) #define BDC_SUB_CMD_FWK (0x4 << 17) /* Reset sequence number */ @@ -163,7 +163,7 @@ #define BDC_SPEED_HS 0x3 #define BDC_SPEED_SS 0x4 -#define BDC_PST(p) (p & 0xf) +#define BDC_PST(p) ((p) & 0xf) #define BDC_PST_MASK 0xf /* USPPMS */ @@ -228,7 +228,7 @@ /* status report defines */ #define SR_XSF 0 #define SR_USPC 4 -#define SR_BD_LEN(p) (p & 0xffffff) +#define SR_BD_LEN(p) ((p) & 0xffffff) #define XSF_SUCC 0x1 #define XSF_SHORT 0x3 From patchwork Thu Aug 20 11:30:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 258816 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=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MIME_BASE64_TEXT, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY,USER_AGENT_GIT 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 46F8CC433E3 for ; Thu, 20 Aug 2020 11:34:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 00126204EA for ; Thu, 20 Aug 2020 11:34:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="A+GDDwH6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730501AbgHTLed (ORCPT ); Thu, 20 Aug 2020 07:34:33 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:23926 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730641AbgHTLcw (ORCPT ); Thu, 20 Aug 2020 07:32:52 -0400 X-UUID: 27818abae3ac436487b350805c46bc7e-20200820 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=O5d5u2bMk0CBgwkmmnX2HtVMierXd3uNnq40puMYOms=; b=A+GDDwH6CoLFLE63WKZsRohewcuaNh+SCDVtHGk3Ff0Y6T/GVeDNMpgdQFFtUwvvleXjwsuCfXwZEynAbCBdS7pyhyEVti2CEE4/TZyg2dg8q+dFzFpwab7/8OOzggTR4DFYj1lAd7tefR0X2JSv+9Ce2HL/kilJAcAN46eKMDU=; X-UUID: 27818abae3ac436487b350805c46bc7e-20200820 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1953557955; Thu, 20 Aug 2020 19:32:32 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31N1.mediatek.inc (172.27.4.69) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 20 Aug 2020 19:32:32 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 20 Aug 2020 19:32:30 +0800 From: Chunfeng Yun To: Felipe Balbi , Florian Fainelli CC: Greg Kroah-Hartman , Matthias Brugger , Chunfeng Yun , Al Cooper , Sasi Kumar , Peter Chen , Minas Harutyunyan , Nathan Chancellor , Colin Ian King , , , , Subject: [PATCH v2 09/11] usb: gadget: bdc: fix checkpatch.pl tab warning Date: Thu, 20 Aug 2020 19:30:44 +0800 Message-ID: <1597923046-12535-9-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1597923046-12535-1-git-send-email-chunfeng.yun@mediatek.com> References: <1597923046-12535-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 8AD96B2B9CDB820FDA1CADA560B661B267FB1976B87AC4D637527658234CDB6A2000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements WARNING:TABSTOP: Statements should start on a tabstop Cc: Florian Fainelli Signed-off-by: Chunfeng Yun --- v2: new patch --- drivers/usb/gadget/udc/bdc/bdc_cmd.c | 2 +- drivers/usb/gadget/udc/bdc/bdc_ep.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 1.9.1 diff --git a/drivers/usb/gadget/udc/bdc/bdc_cmd.c b/drivers/usb/gadget/udc/bdc/bdc_cmd.c index 44c2a5e..995f79c 100644 --- a/drivers/usb/gadget/udc/bdc/bdc_cmd.c +++ b/drivers/usb/gadget/udc/bdc/bdc_cmd.c @@ -163,7 +163,7 @@ int bdc_config_ep(struct bdc *bdc, struct bdc_ep *ep) usb_endpoint_xfer_isoc(desc)) { param2 |= si; if (usb_endpoint_xfer_isoc(desc) && comp_desc) - mul = comp_desc->bmAttributes; + mul = comp_desc->bmAttributes; } param2 |= mul << EPM_SHIFT; diff --git a/drivers/usb/gadget/udc/bdc/bdc_ep.c b/drivers/usb/gadget/udc/bdc/bdc_ep.c index 3fb36c8..d227d26 100644 --- a/drivers/usb/gadget/udc/bdc/bdc_ep.c +++ b/drivers/usb/gadget/udc/bdc/bdc_ep.c @@ -275,7 +275,7 @@ static inline int find_end_bdi(struct bdc_ep *ep, int next_hwd_bdi) end_bdi = next_hwd_bdi - 1; if (end_bdi < 0) end_bdi = ep->bd_list.max_bdi - 1; - else if ((end_bdi % (ep->bd_list.num_bds_table-1)) == 0) + else if ((end_bdi % (ep->bd_list.num_bds_table-1)) == 0) end_bdi--; return end_bdi; @@ -795,7 +795,7 @@ static int ep_dequeue(struct bdc_ep *ep, struct bdc_req *req) start_pending = true; end_pending = true; } else if (end_bdi >= curr_hw_dqpi || end_bdi <= eqp_bdi) { - end_pending = true; + end_pending = true; } } else { if (start_bdi >= curr_hw_dqpi) { From patchwork Thu Aug 20 11:30:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 258811 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=-11.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MIME_BASE64_TEXT, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, UNPARSEABLE_RELAY, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 BA583C433E3 for ; Thu, 20 Aug 2020 11:38:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 909FF2054F for ; Thu, 20 Aug 2020 11:38:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="JHB29HqJ" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730011AbgHTLeW (ORCPT ); Thu, 20 Aug 2020 07:34:22 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:28876 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730644AbgHTLcv (ORCPT ); Thu, 20 Aug 2020 07:32:51 -0400 X-UUID: 4b3863a1b24a441f852a3a7e30223cf4-20200820 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=njMU5VLie19Pssvi8+YgppuDMCXfmQYubWzISF4gV9Y=; b=JHB29HqJeuONQDk4mRL0MZeIudsGcDE6G6+Kbw/6yfT96wsm4leIUu5X9bUK6el/6BSRlu/dV6fCcjxLIcnCK0uYWRiiWBFmYw/ee4lX+sHGwUGWDf9jQhBgPzrmQVoxRKhKCTU/JEW7RYJCvU+NOoWqv9xKLEKiUJxxQengucM=; X-UUID: 4b3863a1b24a441f852a3a7e30223cf4-20200820 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1629179673; Thu, 20 Aug 2020 19:32:35 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 20 Aug 2020 19:32:35 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 20 Aug 2020 19:32:32 +0800 From: Chunfeng Yun To: Felipe Balbi , Florian Fainelli CC: Greg Kroah-Hartman , Matthias Brugger , Chunfeng Yun , Al Cooper , Sasi Kumar , Peter Chen , Minas Harutyunyan , Nathan Chancellor , Colin Ian King , , , , Subject: [PATCH v2 11/11] usb: gadget: bdc: fix checkpatch.pl repeated word warning Date: Thu, 20 Aug 2020 19:30:46 +0800 Message-ID: <1597923046-12535-11-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1597923046-12535-1-git-send-email-chunfeng.yun@mediatek.com> References: <1597923046-12535-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: B3585BA57539BB1FE94948FEBFECC89BEB16E80F879A3BED4E0C2E2CE777E7A62000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org fix the warning: WARNING:REPEATED_WORD: Possible repeated word: 'and' Cc: Florian Fainelli Signed-off-by: Chunfeng Yun --- v2: new patch --- drivers/usb/gadget/udc/bdc/bdc_ep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 diff --git a/drivers/usb/gadget/udc/bdc/bdc_ep.c b/drivers/usb/gadget/udc/bdc/bdc_ep.c index d227d26..8e2f20b 100644 --- a/drivers/usb/gadget/udc/bdc/bdc_ep.c +++ b/drivers/usb/gadget/udc/bdc/bdc_ep.c @@ -1405,7 +1405,7 @@ static int ep0_set_sel(struct bdc *bdc, } /* - * Queue a 0 byte bd only if wLength is more than the length and and length is + * Queue a 0 byte bd only if wLength is more than the length and length is * a multiple of MaxPacket then queue 0 byte BD */ static int ep0_queue_zlp(struct bdc *bdc)