Skip to contentSkip to conversation

tty: amiserial.c: remove a double irq restore

PATCH In review Dan Carpenter 2 participants 3 messages Aug 4, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tty: amiserial.c: remove a double irq restore

We already called "local_irq_restore(flags);" so this isn't needed.

drivers/tty/amiserial.c +0 -1
index 208f573..2f33cf1 100644
@@ -880,7 +880,6 @@ static int rs_write(struct tty_struct * tty, const unsigned char *buf, int count
 		/* set a pending Tx Interrupt, transmitter should restart now */
 		custom.intreq = IF_SETCLR | IF_TBE;
 		mb();
-		local_irq_restore(flags);
 	}
 	return ret;
 }
#1 lore raw

drivers/tty/amiserial.c static int rs_write(struct tty_struct * tty, const unsigned char *buf, int count

Quoted 9 lines · Dan Carpenter

We already called "local_irq_restore(flags);" so this isn't needed.

drivers/tty/amiserial.c +0 -0
index 208f573..2f33cf1 100644
@@ -880,7 +880,6 @@ static int rs_write(struct tty_struct * tty, const unsigned char *buf, int count

If I add a bit more context:

                local_irq_disable();
                custom.intena = IF_SETCLR | IF_TBE;
                mb();

drivers/tty/amiserial.c static int rs_write(struct tty_struct * tty, const unsigned char *buf, int count · line 883

Quoted 4 lines
drivers/tty/amiserial.c +0 -1
 		/* set a pending Tx Interrupt, transmitter should restart now */
 		custom.intreq = IF_SETCLR | IF_TBE;
 		mb();
-		local_irq_restore(flags);

Really?

thanks,

Signature · 2 lines
js
suse labs
#2 lore raw

Oh... Wow. I'm really sorry about that. Thanks for catching the mistake.

It should as well have been caught by static analysis but it wasn't. I will work on this so it doesn't happen again. And I will try to be more careful as well.

regards,
dan carpenter