diff mbox

[6/8] mmc: sdio_uart: remove meaningless BUG_ON

Message ID 1478071585-12898-1-git-send-email-shawn.lin@rock-chips.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shawn Lin Nov. 2, 2016, 7:26 a.m. UTC
The code seems quite simple to maintain the sdio_uart_table,
and the insert/remove port from the table are symmetric. If
the BUG_ON occurs, which means serial_core modify the index
or mess up the port sequence anyway.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

 drivers/mmc/card/sdio_uart.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Ulf Hansson Nov. 29, 2016, 12:41 p.m. UTC | #1
On 2 November 2016 at 08:26, Shawn Lin <shawn.lin@rock-chips.com> wrote:
> The code seems quite simple to maintain the sdio_uart_table,
> and the insert/remove port from the table are symmetric. If
> the BUG_ON occurs, which means serial_core modify the index
> or mess up the port sequence anyway.
>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>

Thanks, applied for next!

Kind regards
Uffe


> ---
>
>  drivers/mmc/card/sdio_uart.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c
> index 5af6fb9..491c187 100644
> --- a/drivers/mmc/card/sdio_uart.c
> +++ b/drivers/mmc/card/sdio_uart.c
> @@ -135,8 +135,6 @@ static void sdio_uart_port_remove(struct sdio_uart_port *port)
>  {
>         struct sdio_func *func;
>
> -       BUG_ON(sdio_uart_table[port->index] != port);
> -
>         spin_lock(&sdio_uart_table_lock);
>         sdio_uart_table[port->index] = NULL;
>         spin_unlock(&sdio_uart_table_lock);
> --
> 2.3.7
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c
index 5af6fb9..491c187 100644
--- a/drivers/mmc/card/sdio_uart.c
+++ b/drivers/mmc/card/sdio_uart.c
@@ -135,8 +135,6 @@  static void sdio_uart_port_remove(struct sdio_uart_port *port)
 {
 	struct sdio_func *func;
 
-	BUG_ON(sdio_uart_table[port->index] != port);
-
 	spin_lock(&sdio_uart_table_lock);
 	sdio_uart_table[port->index] = NULL;
 	spin_unlock(&sdio_uart_table_lock);