Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp155752pxy; Thu, 6 May 2021 23:33:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGl1qBbHDk7RKa1he+FgRSKK6M7wCWATfshMTLWYLGAnLPSjrKVBNxa9RYoc+DzHNgGwr4 X-Received: by 2002:a05:6402:1a38:: with SMTP id be24mr9585970edb.293.1620369237757; Thu, 06 May 2021 23:33:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620369237; cv=none; d=google.com; s=arc-20160816; b=JfnrppP5FE6f93WABWhbcXDJkSEpwR3dAfskyVBo6s3Y1Ta8h2BJDlxgQEIgEAXoK3 YsvzVTB3h14s2MtvvfqetYj8buqM5+Bt9lFPqgt86K+VmUAw+Y14Cwg5mrUvBNsrj0kd a7ShJxYmyl6EG5gJDqGEpLwM8F1u13xdQM4l8fTAr+Sp8UxXyDJsJq0B3aG/lX9WKS0h rKgO1V0nH1nr7FY0/eVhXTbwJ6YnqmB8nbqG07tyA5C0r6tvC7VcYHBcHtUZD98dZYlm jIF4khC8hi4HWMFiEPB64kx7DuEn/pBC353y8GWrKhOCHrCwkR4569+dFdB9I3xq5BAg uvDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=9d4Vd81OetG/y5H9ijvutjw4Se9XNRd6ViczRngmdB8=; b=Wvt6j+EWi5AipO/yRC7aXwpHqjJuANz60lS3EW/c0BRhl0mV+LPx7sKyPDbA6BPqME F48dKmN2n4ctl+TIVQOZn9KNTPNYrrtyRzHOcC4IpeHb8Tj8T88+pblXdahSdQd1fxmc 6h4Gg0z2WaA/uOiczV/r5uN45rPeCE4WCDPW4C72s3OWfVqQULoQcv1VqTbDQBSv6lT+ pGJw3XYA6+4hTfs+LodnzN3XLZNSHt1Hw5LeLekv1SkHx7UoMiskfZ+iMDXaKdXTIzPE Bke4pfSDbdt88hOkYUc2AsGtH/zKfFPSVTdCXl3QdAtQ/8yJVe7rxrtOsZnh8mmvEA2s jKbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t9si4107512edd.64.2021.05.06.23.33.33; Thu, 06 May 2021 23:33:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231461AbhEGCMk (ORCPT + 99 others); Thu, 6 May 2021 22:12:40 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:59263 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S232420AbhEGCMg (ORCPT ); Thu, 6 May 2021 22:12:36 -0400 X-UUID: 66ec45a462de4c40beea95eed277a073-20210507 X-UUID: 66ec45a462de4c40beea95eed277a073-20210507 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 425345166; Fri, 07 May 2021 10:11:30 +0800 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 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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; -- 2.18.0