Skip to content

Commit

Permalink
msm_geni_serial: Guard unused variables CONFIG_DEBUG_FS
Browse files Browse the repository at this point in the history
../drivers/tty/serial/msm_geni_serial.c:539:7: warning: unused variable 'geni_status' [-Wunused-variable]
                u32 geni_status = geni_read_reg_nolog(uport->membase,
                    ^
../drivers/tty/serial/msm_geni_serial.c:541:7: warning: unused variable 'geni_ios' [-Wunused-variable]
                u32 geni_ios = geni_read_reg_nolog(uport->membase, SE_GENI_IOS);
                    ^
../drivers/tty/serial/msm_geni_serial.c:542:7: warning: unused variable 'rx_fifo_status' [-Wunused-variable]
                u32 rx_fifo_status = geni_read_reg_nolog(uport->membase,
                    ^
../drivers/tty/serial/msm_geni_serial.c:544:7: warning: unused variable 'rx_dma' [-Wunused-variable]
                u32 rx_dma =
                    ^
../drivers/tty/serial/msm_geni_serial.c:632:31: warning: unused variable 'port' [-Wunused-variable]
        struct msm_geni_serial_port *port = GET_DEV_PORT(uport);
                                     ^
../drivers/tty/serial/msm_geni_serial.c:797:31: warning: unused variable 'port' [-Wunused-variable]
        struct msm_geni_serial_port *port = GET_DEV_PORT(uport);
                                     ^
../drivers/tty/serial/msm_geni_serial.c:1415:31: warning: unused variable 'port' [-Wunused-variable]
        struct msm_geni_serial_port *port = GET_DEV_PORT(uport);
                                     ^
../drivers/tty/serial/msm_geni_serial.c:1627:31: warning: unused variable 'port' [-Wunused-variable]
        struct msm_geni_serial_port *port = GET_DEV_PORT(uport);
                                     ^

Signed-off-by: Charsi-Tejas <[email protected]>
  • Loading branch information
Codecity001 authored and tejas101k committed Jul 19, 2023
1 parent 0404604 commit 029410d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/tty/serial/msm_geni_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,13 +536,15 @@ static void wait_for_transfers_inflight(struct uart_port *uport)
}
}
if (check_transfers_inflight(uport)) {
#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_IPC_LOGGING)
u32 geni_status = geni_read_reg_nolog(uport->membase,
SE_GENI_STATUS);
u32 geni_ios = geni_read_reg_nolog(uport->membase, SE_GENI_IOS);
u32 rx_fifo_status = geni_read_reg_nolog(uport->membase,
SE_GENI_RX_FIFO_STATUS);
u32 rx_dma =
geni_read_reg_nolog(uport->membase, SE_DMA_RX_LEN_IN);
#endif

IPC_LOG_MSG(port->ipc_log_misc,
"%s IOS 0x%x geni status 0x%x rx: fifo 0x%x dma 0x%x\n",
Expand Down Expand Up @@ -629,7 +631,9 @@ static int msm_geni_serial_ioctl(struct uart_port *uport, unsigned int cmd,

static void msm_geni_serial_break_ctl(struct uart_port *uport, int ctl)
{
#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_IPC_LOGGING)
struct msm_geni_serial_port *port = GET_DEV_PORT(uport);
#endif

if (!uart_console(uport) && device_pending_suspend(uport)) {
IPC_LOG_MSG(port->ipc_log_misc,
Expand Down Expand Up @@ -794,7 +798,9 @@ static int msm_geni_serial_power_on(struct uart_port *uport)

static void msm_geni_serial_power_off(struct uart_port *uport)
{
#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_IPC_LOGGING)
struct msm_geni_serial_port *port = GET_DEV_PORT(uport);
#endif
int usage_count = atomic_read(&uport->dev->power.usage_count);

if (!usage_count) {
Expand Down Expand Up @@ -1412,7 +1418,9 @@ static void stop_tx_sequencer(struct uart_port *uport)

static void msm_geni_serial_stop_tx(struct uart_port *uport)
{
#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_IPC_LOGGING)
struct msm_geni_serial_port *port = GET_DEV_PORT(uport);
#endif

if (!uart_console(uport) && device_pending_suspend(uport)) {
dev_err(uport->dev, "%s.Device is suspended.\n", __func__);
Expand Down Expand Up @@ -1624,7 +1632,9 @@ static void stop_rx_sequencer(struct uart_port *uport)

static void msm_geni_serial_stop_rx(struct uart_port *uport)
{
#if defined(CONFIG_DEBUG_FS) && defined(CONFIG_IPC_LOGGING)
struct msm_geni_serial_port *port = GET_DEV_PORT(uport);
#endif

if (!uart_console(uport) && device_pending_suspend(uport)) {
IPC_LOG_MSG(port->ipc_log_misc,
Expand Down

0 comments on commit 029410d

Please sign in to comment.