linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] PCI: qcom: Use __be16 for catching cpu_to_be16() return instead of u16
@ 2021-11-30  6:42 Manivannan Sadhasivam
  2021-11-30  7:28 ` Krzysztof Wilczyński
  0 siblings, 1 reply; 6+ messages in thread
From: Manivannan Sadhasivam @ 2021-11-30  6:42 UTC (permalink / raw)
  To: lorenzo.pieralisi, bhelgaas
  Cc: svarbanov, bjorn.andersson, robh, linux-pci, linux-arm-msm,
	linux-kernel, Manivannan Sadhasivam, kernel test robot

cpu_to_be16() returns __be16 value but the driver uses u16 and that's
incorrect. Fix it by using __be16 as the datatype of bdf_be variable.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---

Changes in v2:

* Modified the commit message and subject to describe the actual issue
as per comments from Bjorn.

 drivers/pci/controller/dwc/pcie-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index 1c3d1116bb60..ddecd7f341c5 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -1343,7 +1343,7 @@ static int qcom_pcie_config_sid_sm8250(struct qcom_pcie *pcie)
 
 	/* Look for an available entry to hold the mapping */
 	for (i = 0; i < nr_map; i++) {
-		u16 bdf_be = cpu_to_be16(map[i].bdf);
+		__be16 bdf_be = cpu_to_be16(map[i].bdf);
 		u32 val;
 		u8 hash;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-11-30 15:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30  6:42 [PATCH v2] PCI: qcom: Use __be16 for catching cpu_to_be16() return instead of u16 Manivannan Sadhasivam
2021-11-30  7:28 ` Krzysztof Wilczyński
2021-11-30  8:04   ` Manivannan Sadhasivam
2021-11-30  8:12     ` Krzysztof Wilczyński
2021-11-30  8:13       ` Krzysztof Wilczyński
2021-11-30 15:43       ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).