Skip to content

Commit

Permalink
PCI: cadence: Use bitfield for *quirk_retrain_flag* instead of bool
Browse files Browse the repository at this point in the history
[ Upstream commit f445574 ]

No functional change. As we are intending to add additional 1-bit
members in struct j721e_pcie_data/struct cdns_pcie_rc, use bitfields
instead of bool since it takes less space. As discussed in [1],
the preference is to use bitfileds instead of bool inside structures.

[1] -> https://lore.kernel.org/linux-fsdevel/CA+55aFzKQ6Pj18TB8p4Yr0M4t+S+BsiHH=BJNmn=76-NcjTj-g@mail.gmail.com/

Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20210811123336.31357-2-kishon@ti.com
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
kishon authored and gregkh committed Sep 22, 2021
1 parent 53347ed commit cdade20
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/pci/controller/cadence/pci-j721e.c
Expand Up @@ -66,7 +66,7 @@ enum j721e_pcie_mode {

struct j721e_pcie_data {
enum j721e_pcie_mode mode;
bool quirk_retrain_flag;
unsigned int quirk_retrain_flag:1;
};

static inline u32 j721e_pcie_user_readl(struct j721e_pcie *pcie, u32 offset)
Expand Down
2 changes: 1 addition & 1 deletion drivers/pci/controller/cadence/pcie-cadence.h
Expand Up @@ -303,7 +303,7 @@ struct cdns_pcie_rc {
u32 vendor_id;
u32 device_id;
bool avail_ib_bar[CDNS_PCIE_RP_MAX_IB];
bool quirk_retrain_flag;
unsigned int quirk_retrain_flag:1;
};

/**
Expand Down

0 comments on commit cdade20

Please sign in to comment.