serial: 8250: 8250_omap: Fix unused variable warning
commit 6f991850412963381017cfb0d691cbd4d6a551dc upstream. With commit 439c7183e5b9 ("serial: 8250: 8250_omap: Disable RX interrupt after DMA enable"), below warning is seen with W=1 and CONFIG_SERIAL_8250_DMA is disabled: drivers/tty/serial/8250/8250_omap.c:1199:42: warning: unused variable 'k3_soc_devices' [-Wunused-const-variable] Fix this by moving the code using k3_soc_devices array to omap_serial_fill_features_erratas() that handles other errata flags as well. Fixes: 439c7183e5b9 ("serial: 8250: 8250_omap: Disable RX interrupt after DMA enable") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> Link: https://lore.kernel.org/r/20201111112653.2710-2-vigneshr@ti.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
7ff0b71b68
commit
0b62660c6a
@@ -538,6 +538,11 @@ static void omap_8250_pm(struct uart_port *port, unsigned int state,
|
|||||||
static void omap_serial_fill_features_erratas(struct uart_8250_port *up,
|
static void omap_serial_fill_features_erratas(struct uart_8250_port *up,
|
||||||
struct omap8250_priv *priv)
|
struct omap8250_priv *priv)
|
||||||
{
|
{
|
||||||
|
const struct soc_device_attribute k3_soc_devices[] = {
|
||||||
|
{ .family = "AM65X", },
|
||||||
|
{ .family = "J721E", .revision = "SR1.0" },
|
||||||
|
{ /* sentinel */ }
|
||||||
|
};
|
||||||
u32 mvr, scheme;
|
u32 mvr, scheme;
|
||||||
u16 revision, major, minor;
|
u16 revision, major, minor;
|
||||||
|
|
||||||
@@ -585,6 +590,14 @@ static void omap_serial_fill_features_erratas(struct uart_8250_port *up,
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* AM65x SR1.0, AM65x SR2.0 and J721e SR1.0 don't
|
||||||
|
* don't have RHR_IT_DIS bit in IER2 register. So drop to flag
|
||||||
|
* to enable errata workaround.
|
||||||
|
*/
|
||||||
|
if (soc_device_match(k3_soc_devices))
|
||||||
|
priv->habit &= ~UART_HAS_RHR_IT_DIS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void omap8250_uart_qos_work(struct work_struct *work)
|
static void omap8250_uart_qos_work(struct work_struct *work)
|
||||||
@@ -1208,12 +1221,6 @@ static int omap8250_no_handle_irq(struct uart_port *port)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct soc_device_attribute k3_soc_devices[] = {
|
|
||||||
{ .family = "AM65X", },
|
|
||||||
{ .family = "J721E", .revision = "SR1.0" },
|
|
||||||
{ /* sentinel */ }
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct omap8250_dma_params am654_dma = {
|
static struct omap8250_dma_params am654_dma = {
|
||||||
.rx_size = SZ_2K,
|
.rx_size = SZ_2K,
|
||||||
.rx_trigger = 1,
|
.rx_trigger = 1,
|
||||||
@@ -1419,13 +1426,6 @@ static int omap8250_probe(struct platform_device *pdev)
|
|||||||
up.dma->rxconf.src_maxburst = RX_TRIGGER;
|
up.dma->rxconf.src_maxburst = RX_TRIGGER;
|
||||||
up.dma->txconf.dst_maxburst = TX_TRIGGER;
|
up.dma->txconf.dst_maxburst = TX_TRIGGER;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* AM65x SR1.0, AM65x SR2.0 and J721e SR1.0 don't
|
|
||||||
* don't have RHR_IT_DIS bit in IER2 register
|
|
||||||
*/
|
|
||||||
if (soc_device_match(k3_soc_devices))
|
|
||||||
priv->habit &= ~UART_HAS_RHR_IT_DIS;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
ret = serial8250_register_8250_port(&up);
|
ret = serial8250_register_8250_port(&up);
|
||||||
|
Reference in New Issue
Block a user