linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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

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

Hi--

On 1/5/23 19:09, xurui wrote:
> 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)

I looked at all of the macro values here and this change makes sense to me,
although I know nothing about these registers.

Thanks.

>  
>  #define KORINA_REVID		0
>  #define KORINA_CLASS_CODE	0

-- 
~Randy

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

* Re: [RFC] MIPS: Fix a compilation issue
  2023-01-18  8:59 xurui
@ 2023-01-27 16:28 ` Thomas Bogendoerfer
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2023-01-27 16:28 UTC (permalink / raw)
  To: xurui; +Cc: ralf, linux-mips, linux-kernel, rdunlap

On Wed, Jan 18, 2023 at 04:59:12PM +0800, xurui wrote:
> 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

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

* [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

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-06  3:09 [RFC] MIPS: Fix a compilation issue xurui
2023-01-06 23:37 ` Randy Dunlap
2023-01-18  8:59 xurui
2023-01-27 16:28 ` Thomas Bogendoerfer

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