linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] MIPS: Fix a compilation issue
@ 2023-01-18  8:59 xurui
  2023-01-27 16:28 ` Thomas Bogendoerfer
  0 siblings, 1 reply; 4+ messages in thread
From: xurui @ 2023-01-18  8:59 UTC (permalink / raw)
  To: tsbogend, ralf; +Cc: linux-mips, linux-kernel, rdunlap, xurui

arch/mips/include/asm/mach-rc32434/pci.h:377:
cc1: error: result of ‘-117440512 << 16’ requires 44 bits to represent, but ‘int’ only has 32 bits [-Werror=shift-overflow=]

I guss we don`t need a left shift here?

Signed-off-by: xurui <xurui@kylinos.cn>
---
 arch/mips/include/asm/mach-rc32434/pci.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/mach-rc32434/pci.h b/arch/mips/include/asm/mach-rc32434/pci.h
index 9a6eefd12757..3eb767c8a4ee 100644
--- a/arch/mips/include/asm/mach-rc32434/pci.h
+++ b/arch/mips/include/asm/mach-rc32434/pci.h
@@ -374,7 +374,7 @@ struct pci_msu {
 				 PCI_CFG04_STAT_SSE | \
 				 PCI_CFG04_STAT_PE)
 
-#define KORINA_CNFG1		((KORINA_STAT<<16)|KORINA_CMD)
+#define KORINA_CNFG1		(KORINA_STAT | KORINA_CMD)
 
 #define KORINA_REVID		0
 #define KORINA_CLASS_CODE	0
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [RFC] MIPS: Fix a compilation issue
@ 2023-01-06  3:09 xurui
  2023-01-06 23:37 ` Randy Dunlap
  0 siblings, 1 reply; 4+ messages in thread
From: xurui @ 2023-01-06  3:09 UTC (permalink / raw)
  To: tsbogend; +Cc: linux-mips, linux-kernel, xurui

arch/mips/include/asm/mach-rc32434/pci.h:377:
cc1: error: result of ‘-117440512 << 16’ requires 44 bits to represent, but ‘int’ only has 32 bits [-Werror=shift-overflow=]

I guss we don`t need a left shift here?

Signed-off-by: xurui <xurui@kylinos.cn>
---
 arch/mips/include/asm/mach-rc32434/pci.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/include/asm/mach-rc32434/pci.h b/arch/mips/include/asm/mach-rc32434/pci.h
index 9a6eefd12757..3eb767c8a4ee 100644
--- a/arch/mips/include/asm/mach-rc32434/pci.h
+++ b/arch/mips/include/asm/mach-rc32434/pci.h
@@ -374,7 +374,7 @@ struct pci_msu {
 				 PCI_CFG04_STAT_SSE | \
 				 PCI_CFG04_STAT_PE)
 
-#define KORINA_CNFG1		((KORINA_STAT<<16)|KORINA_CMD)
+#define KORINA_CNFG1		(KORINA_STAT | KORINA_CMD)
 
 #define KORINA_REVID		0
 #define KORINA_CLASS_CODE	0
-- 
2.25.1


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

end of thread, other threads:[~2023-01-27 16:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-18  8:59 [RFC] MIPS: Fix a compilation issue xurui
2023-01-27 16:28 ` Thomas Bogendoerfer
  -- strict thread matches above, loose matches on Subject: below --
2023-01-06  3:09 xurui
2023-01-06 23:37 ` Randy Dunlap

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).