From mboxrd@z Thu Jan 1 00:00:00 1970 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=-13.9 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,URIBL_BLOCKED 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 4CBFDC48BCF for ; Thu, 10 Jun 2021 03:37:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 0A069613CB for ; Thu, 10 Jun 2021 03:37:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0A069613CB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org 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=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KTAumPr9JUMNSg/YBj4id6ESdYaND7CrUyb1UBgCI9c=; b=WFJQGvwWygDHU2 al9ly0xb/mUO/RnYedV5sbdn3X/uxnlKZ27HMMJNdfEc3hJz5zAWrelabAjQCz+/twiMaNnWXXGOE kfp88f/MxPZR9hlsBxRcQo4MxyG0kzJD7dM8a+lKKSa0GEI0I57gwtR5FAb74QeeOaKMLysWE3eXj xSOSVkVdpXc946JdkesHKO1sKqSb3hHDuAaKMw7mk4mHK+6LtUxfODcDKHF0Xf3h1DoZ7hx1wpY/k oE5QMMb6rXzpswr6kULkOS7NBED67uOD+oSbT0OlhMCqf5ZFRV1/dQd8lw3Tdu1/MWKCHORY2x4cQ y5nNWqRmJcNAYpQSEBVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrBRw-00GeZe-3G; Thu, 10 Jun 2021 03:33:44 +0000 Received: from mail-pg1-x535.google.com ([2607:f8b0:4864:20::535]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrBRs-00GeLc-Nx for linux-arm-kernel@lists.infradead.org; Thu, 10 Jun 2021 03:33:42 +0000 Received: by mail-pg1-x535.google.com with SMTP id q15so21422555pgg.12 for ; Wed, 09 Jun 2021 20:31:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7oIVo7Xzbw9TVkKcvpifrqSvzyU32kz1bTpH+C80Wns=; b=S6u4QNuWHqphKFRnJIadQXQdMQsCC7NxnhI9qTnr6ftqvS7l4znkBCbGb2pMZJiMIR rQaw+QzRZnzNuzyZjx6/9d47myK85kBWR1swpwXRCheQQ0Y13A6Ynh4zIYub4GWLGUpe 2QTve5fmuvSwsQR2MdT86gN7Rg6pbFM8m6KMU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7oIVo7Xzbw9TVkKcvpifrqSvzyU32kz1bTpH+C80Wns=; b=UwLPUWnWhIw601zb8buOaawjh6jqz2T9Qj0nXzl4IMuWIkIzfOWSVhuA72ugXEcE5A xXH4Cw6tNxafit1FYtAQ1EIYML56A2Yfe5AssultES6mCLHtaTKEyulyKq7sOzo4K25y mlWdQlZYPFVAei5psgCvoFSjfOuZxfqsfIk4/t4uJ7GNn/pWPoGRoDcdVovyz89ofcGb b/3XG4YyCCkJo+zAU4PR4sf+CbxF43GhB2Uhgp/mprVw+k2fsthZqaRWTbcQV6h3ex+B hupuk7BC/sbbbqqnCRNn81oWX5TbyNWbKiUO2zpQNw6k2R9/bL7mj42rbIxOp9H6eukT 7AtA== X-Gm-Message-State: AOAM532Ex1wRjB/ey1EkUjck3NvNanbQcvTFjFJ9RT1mWJAkSRFC9kic mrUVUo/anhmF+bUFYa9YwgLdITdVX8qR96Kae5hQGA== X-Google-Smtp-Source: ABdhPJxFOr3K6ngAtBXDCOFBaf1TZc1JxsWX46LnWiU7oVYxdsIbn1LDXznYMFDG2KjGXlDY+RA8/uwdzZBwoByfIRk= X-Received: by 2002:a63:234f:: with SMTP id u15mr2906536pgm.257.1623295897282; Wed, 09 Jun 2021 20:31:37 -0700 (PDT) MIME-Version: 1.0 References: <20210507021127.54717-1-chunfeng.yun@mediatek.com> In-Reply-To: <20210507021127.54717-1-chunfeng.yun@mediatek.com> From: Ikjoon Jang Date: Thu, 10 Jun 2021 11:31:25 +0800 Message-ID: Subject: Re: [PATCH v3 1/4] usb: xhci-mtk: use bitfield instead of bool To: Chunfeng Yun Cc: Mathias Nyman , Greg Kroah-Hartman , Matthias Brugger , linux-usb@vger.kernel.org, "moderated list:ARM/Mediatek SoC support" , "moderated list:ARM/Mediatek SoC support" , open list , Eddie Hung , Sergei Shtylyov X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210609_203340_793196_1EFD887C X-CRM114-Status: GOOD ( 18.22 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, May 7, 2021 at 10:11 AM Chunfeng Yun wrote: > > 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 Reviewed-and-Tested-by: Ikjoon Jang > --- > 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; > -- > 2.18.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel