hw/char/exynos4210_uart: Drop unused local variable frame_size
The frame_size local variable in exynos4210_uart_update_parameters() is calculated but never used (and has been this way since the device was introduced in commit e5a4914efc7). The qemu_chr_fe_ioctl() doesn't need this information (if it really wanted it it could calculate it from the parity/data_bits/stop_bits), so just drop the variable entirely. Fixes: https://bugs.launchpad.net/bugs/1655702 Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1484589515-26353-1-git-send-email-peter.maydell@linaro.org
This commit is contained in:
		
							parent
							
								
									d05a86285c
								
							
						
					
					
						commit
						e62694a078
					
				@ -306,7 +306,7 @@ static void exynos4210_uart_update_irq(Exynos4210UartState *s)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static void exynos4210_uart_update_parameters(Exynos4210UartState *s)
 | 
					static void exynos4210_uart_update_parameters(Exynos4210UartState *s)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    int speed, parity, data_bits, stop_bits, frame_size;
 | 
					    int speed, parity, data_bits, stop_bits;
 | 
				
			||||||
    QEMUSerialSetParams ssp;
 | 
					    QEMUSerialSetParams ssp;
 | 
				
			||||||
    uint64_t uclk_rate;
 | 
					    uint64_t uclk_rate;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -314,9 +314,7 @@ static void exynos4210_uart_update_parameters(Exynos4210UartState *s)
 | 
				
			|||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    frame_size = 1; /* start bit */
 | 
					 | 
				
			||||||
    if (s->reg[I_(ULCON)] & 0x20) {
 | 
					    if (s->reg[I_(ULCON)] & 0x20) {
 | 
				
			||||||
        frame_size++; /* parity bit */
 | 
					 | 
				
			||||||
        if (s->reg[I_(ULCON)] & 0x28) {
 | 
					        if (s->reg[I_(ULCON)] & 0x28) {
 | 
				
			||||||
            parity = 'E';
 | 
					            parity = 'E';
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
@ -334,8 +332,6 @@ static void exynos4210_uart_update_parameters(Exynos4210UartState *s)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    data_bits = (s->reg[I_(ULCON)] & 0x3) + 5;
 | 
					    data_bits = (s->reg[I_(ULCON)] & 0x3) + 5;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    frame_size += data_bits + stop_bits;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    uclk_rate = 24000000;
 | 
					    uclk_rate = 24000000;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    speed = uclk_rate / ((16 * (s->reg[I_(UBRDIV)]) & 0xffff) +
 | 
					    speed = uclk_rate / ((16 * (s->reg[I_(UBRDIV)]) & 0xffff) +
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user