From patchwork Fri May 7 02:11:24 2021 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: 12243903 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=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,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 32239C433B4 for ; Fri, 7 May 2021 02:14:06 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6FAE06113D for ; Fri, 7 May 2021 02:14:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6FAE06113D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=Im4SWblZ84qdNpGaprjj+iFEM7p6HhUth2xkgQD/wCo=; b=nMiPE8eP3BUplDIgfiokYQRYbp r2jsp5IpZRsK2+8lh8V0PjrGpVm6sgNzEsbQpN4swNpGfMKMObDW59WMeaAt0UgYwfTAKDgSrrF+9 44NbuMRoCtHMWfz/hyGyL6FllVzWog9EI2mT7q1hTi+9HuPDhgQ6EEoG+wv0dtm4UyFmSnkquT6Wf pnEzA1bi4o0yBwAPlAKxyP6aKvvAAtvIpZNxFYzzXMdHPmVwD6sQ8W2Xi3JTiCxkfIMaFV+a+VOd+ ZaQeOI2m8EZxJVF7XU/vSYP9iY7cR/AwkhF2tNhuYFWFpcUCJ3in2MFk1i2X2xublaeCxX4x4uLHD 8TU3uNxw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lepyL-005q90-3o; Fri, 07 May 2021 02:12:09 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lepxu-005q4t-5O; Fri, 07 May 2021 02:11:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-ID:Content-Description:In-Reply-To:References; bh=+CRFEW7jC3GF7ncxsEto7imsYG75x1r73+pauOuqj1w=; b=A3Yr4iWzoQiz66D/ebud7QnpkN wqLabeAAp0gNZa4MKgsFljl9ttVtcKFQKJjplrGjIb0lky/6Weivnqh64kovD/JNlhyfPyWmoUbCd gf4Yl9i8dYCqtJkK1thq1+r5uIJZ9+65nKh7OveGoYEVF67xbfocP4BsIrgJ+ViVRVj00930m7Bk2 gVXfHbAMvapdiIYI6Z4hUPV2VeJh/xPTImyrjTBjrReoE8fuZpOxZt/NFd0yN/5JiwKDyeR8ZNW8P hu/ymQesjnDdOosAW+MHPzKqSHP6Uh2M7F+YaHbAOeynXQ5p813U/PWeQbMNaY/830l82simeRwJl Lkv49aYw==; Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lepxr-006WKP-F8; Fri, 07 May 2021 02:11:40 +0000 X-UUID: 0a8a0073eaec4017b9af1f86cfdaa292-20210506 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=+CRFEW7jC3GF7ncxsEto7imsYG75x1r73+pauOuqj1w=; b=QKeUkQHWTgmiiP3B1zU6V9G2HtNVczCnPXOq8aNLYXAD3v1j0xFcA6oPCQOtqtsVxstXnk6TNm/aIwKjFZXYADOuNtUIpaTORXiJiMBWpd/d36aX/OvCoqe6KX5KfgUVyOPBY2UZQvHtGVgQXNJwqavc6I3H/bLc6Nlm8Umzy40=; X-UUID: 0a8a0073eaec4017b9af1f86cfdaa292-20210506 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 656585801; Thu, 06 May 2021 19:11:32 -0700 Received: from MTKMBS06N1.mediatek.inc (172.21.101.129) by MTKMBS62DR.mediatek.inc (172.29.94.18) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 6 May 2021 19:11:30 -0700 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs06n1.mediatek.inc (172.21.101.129) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 7 May 2021 10:11:29 +0800 Received: from mtkslt301.mediatek.inc (10.21.14.114) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 7 May 2021 10:11:29 +0800 From: Chunfeng Yun To: Mathias Nyman CC: Chunfeng Yun , Greg Kroah-Hartman , Matthias Brugger , , , , , "Ikjoon Jang" , Eddie Hung , "Sergei Shtylyov" Subject: [PATCH v3 1/4] usb: xhci-mtk: use bitfield instead of bool Date: Fri, 7 May 2021 10:11:24 +0800 Message-ID: <20210507021127.54717-1-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210506_191139_535456_19220494 X-CRM114-Status: GOOD ( 11.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use bitfield instead of bool in struct Refer to coding-style.rst 17) Using bool: "If a structure has many true/false values, consider consolidating them into a bitfield with 1 bit members, or using an appropriate fixed width type, such as u8." Signed-off-by: Chunfeng Yun --- v3: split @has_ippc out into anather patch suggested by Greg v2: add more changelog suggested by Greg --- drivers/usb/host/xhci-mtk.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/host/xhci-mtk.h b/drivers/usb/host/xhci-mtk.h index cd3a37bb73e6..94a59b3d178f 100644 --- a/drivers/usb/host/xhci-mtk.h +++ b/drivers/usb/host/xhci-mtk.h @@ -138,17 +138,17 @@ struct xhci_hcd_mtk { struct mu3h_sch_bw_info *sch_array; struct list_head bw_ep_chk_list; struct mu3c_ippc_regs __iomem *ippc_regs; - bool has_ippc; int num_u2_ports; int num_u3_ports; int u3p_dis_msk; struct regulator *vusb33; struct regulator *vbus; struct clk_bulk_data clks[BULK_CLKS_NUM]; - bool lpm_support; - bool u2_lpm_disable; + unsigned int has_ippc:1; + unsigned int lpm_support:1; + unsigned int u2_lpm_disable:1; /* usb remote wakeup */ - bool uwk_en; + unsigned int uwk_en:1; struct regmap *uwk; u32 uwk_reg_base; u32 uwk_vers;