Patch "PCI: cadence: Use bitfield for *quirk_retrain_flag* instead of bool" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    PCI: cadence: Use bitfield for *quirk_retrain_flag* instead of bool

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pci-cadence-use-bitfield-for-quirk_retrain_flag-inst.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 03b87df74be4dfbe499737548b52164d551a4471
Author: Kishon Vijay Abraham I <kishon@xxxxxx>
Date:   Wed Aug 11 18:03:32 2021 +0530

    PCI: cadence: Use bitfield for *quirk_retrain_flag* instead of bool
    
    [ Upstream commit f4455748b2126a9ba2bcc9cfb2fbcaa08de29bb2 ]
    
    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@xxxxxxxxxxxxxx/
    
    Suggested-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20210811123336.31357-2-kishon@xxxxxx
    Signed-off-by: Kishon Vijay Abraham I <kishon@xxxxxx>
    Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c
index d34ca0fda0f6..973b309ac9ba 100644
--- a/drivers/pci/controller/cadence/pci-j721e.c
+++ b/drivers/pci/controller/cadence/pci-j721e.c
@@ -63,7 +63,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)
diff --git a/drivers/pci/controller/cadence/pcie-cadence.h b/drivers/pci/controller/cadence/pcie-cadence.h
index 6705a5fedfbb..60981877f65b 100644
--- a/drivers/pci/controller/cadence/pcie-cadence.h
+++ b/drivers/pci/controller/cadence/pcie-cadence.h
@@ -299,7 +299,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;
 };
 
 /**



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux