From: Geliang Tang Date: Sat, 22 Apr 2017 01:21:11 +0000 (+0800) Subject: serial: pch_uart: use offset_in_page() macro X-Git-Tag: v4.13-rc1~183^2~56 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d1e06a4392d0e65f92d3e8c7020061aaeceed502;p=karo-tx-linux.git serial: pch_uart: use offset_in_page() macro Use offset_in_page() macro instead of open-coding. Signed-off-by: Geliang Tang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c index 42caccb5e87e..d3796dc26fa9 100644 --- a/drivers/tty/serial/pch_uart.c +++ b/drivers/tty/serial/pch_uart.c @@ -878,8 +878,7 @@ static int dma_handle_rx(struct eg20t_port *priv) sg_dma_len(sg) = priv->trigger_level; sg_set_page(&priv->sg_rx, virt_to_page(priv->rx_buf_virt), - sg_dma_len(sg), (unsigned long)priv->rx_buf_virt & - ~PAGE_MASK); + sg_dma_len(sg), offset_in_page(priv->rx_buf_virt)); sg_dma_address(sg) = priv->rx_buf_dma;