mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	MIPS: sni: Fix the build
This patch fixes the following gcc 10 build error:
arch/mips/sni/time.c: In function ‘a20r_set_periodic’:
arch/mips/sni/time.c:15:26: error: unsigned conversion from ‘int’ to ‘u8’ {aka ‘volatile unsigned char’} changes value from ‘576’ to ‘64’ [-Werror=overflow]
   15 | #define SNI_COUNTER0_DIV ((SNI_CLOCK_TICK_RATE / SNI_COUNTER2_DIV) / HZ)
      |                          ^
arch/mips/sni/time.c:21:45: note: in expansion of macro ‘SNI_COUNTER0_DIV’
   21 |  *(volatile u8 *)(A20R_PT_CLOCK_BASE + 0) = SNI_COUNTER0_DIV;
      |                                             ^~~~~~~~~~~~~~~~
Cc: linux-mips@vger.kernel.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
			
			
This commit is contained in:
		
							parent
							
								
									67512a8cf5
								
							
						
					
					
						commit
						c91cf42f61
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -18,14 +18,14 @@ static int a20r_set_periodic(struct clock_event_device *evt) | ||||||
| { | { | ||||||
| 	*(volatile u8 *)(A20R_PT_CLOCK_BASE + 12) = 0x34; | 	*(volatile u8 *)(A20R_PT_CLOCK_BASE + 12) = 0x34; | ||||||
| 	wmb(); | 	wmb(); | ||||||
| 	*(volatile u8 *)(A20R_PT_CLOCK_BASE + 0) = SNI_COUNTER0_DIV; | 	*(volatile u8 *)(A20R_PT_CLOCK_BASE + 0) = SNI_COUNTER0_DIV & 0xff; | ||||||
| 	wmb(); | 	wmb(); | ||||||
| 	*(volatile u8 *)(A20R_PT_CLOCK_BASE + 0) = SNI_COUNTER0_DIV >> 8; | 	*(volatile u8 *)(A20R_PT_CLOCK_BASE + 0) = SNI_COUNTER0_DIV >> 8; | ||||||
| 	wmb(); | 	wmb(); | ||||||
| 
 | 
 | ||||||
| 	*(volatile u8 *)(A20R_PT_CLOCK_BASE + 12) = 0xb4; | 	*(volatile u8 *)(A20R_PT_CLOCK_BASE + 12) = 0xb4; | ||||||
| 	wmb(); | 	wmb(); | ||||||
| 	*(volatile u8 *)(A20R_PT_CLOCK_BASE + 8) = SNI_COUNTER2_DIV; | 	*(volatile u8 *)(A20R_PT_CLOCK_BASE + 8) = SNI_COUNTER2_DIV & 0xff; | ||||||
| 	wmb(); | 	wmb(); | ||||||
| 	*(volatile u8 *)(A20R_PT_CLOCK_BASE + 8) = SNI_COUNTER2_DIV >> 8; | 	*(volatile u8 *)(A20R_PT_CLOCK_BASE + 8) = SNI_COUNTER2_DIV >> 8; | ||||||
| 	wmb(); | 	wmb(); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Bart Van Assche
						Bart Van Assche