Discussion:
[patch] staging: speakup: remove unused code
Okash Khawaja
2017-06-01 12:17:19 UTC
Permalink
In spk_ttyio_release we read tty's index but never do anything with it.
The patch removes this dead code.

Signed-off-by: Okash Khawaja <***@gmail.com>

---
drivers/staging/speakup/spk_ttyio.c | 3 ---
1 file changed, 3 deletions(-)

--- a/drivers/staging/speakup/spk_ttyio.c
+++ b/drivers/staging/speakup/spk_ttyio.c
@@ -247,13 +247,10 @@ EXPORT_SYMBOL_GPL(spk_ttyio_synth_probe)

void spk_ttyio_release(void)
{
- int idx;
-
if (!speakup_tty)
return;

tty_lock(speakup_tty);
- idx = speakup_tty->index;

if (speakup_tty->ops->close)
speakup_tty->ops->close(speakup_tty, NULL);
Samuel Thibault
2017-06-01 12:25:26 UTC
Permalink
Post by Okash Khawaja
In spk_ttyio_release we read tty's index but never do anything with it.
The patch removes this dead code.
---
drivers/staging/speakup/spk_ttyio.c | 3 ---
1 file changed, 3 deletions(-)
--- a/drivers/staging/speakup/spk_ttyio.c
+++ b/drivers/staging/speakup/spk_ttyio.c
@@ -247,13 +247,10 @@ EXPORT_SYMBOL_GPL(spk_ttyio_synth_probe)
void spk_ttyio_release(void)
{
- int idx;
-
if (!speakup_tty)
return;
tty_lock(speakup_tty);
- idx = speakup_tty->index;
if (speakup_tty->ops->close)
speakup_tty->ops->close(speakup_tty, NULL);
--
Samuel
Post by Okash Khawaja
Quelqu'un aurait-il une solution pour réinitialiser un MBR
Si tu veux qu'il soit complètement blanc (pas souhaitable, à mon avis) :
dd if=/dev/zero of=/dev/hda bs=512 count=1 (sous Linux)
-+- OT in Guide du linuxien (très) pervers - "Pour les K difficiles" -+-
Okash Khawaja
2017-06-01 13:15:29 UTC
Permalink
In spk_ttyio_release we read tty's index but never do anything with it.
The patch removes this dead code.

Signed-off-by: Okash Khawaja <***@gmail.com>
Reviewed-by: Samuel Thibault <***@ens-lyon.org>

---
drivers/staging/speakup/spk_ttyio.c | 3 ---
1 file changed, 3 deletions(-)

--- a/drivers/staging/speakup/spk_ttyio.c
+++ b/drivers/staging/speakup/spk_ttyio.c
@@ -247,13 +247,10 @@ EXPORT_SYMBOL_GPL(spk_ttyio_synth_probe)

void spk_ttyio_release(void)
{
- int idx;
-
if (!speakup_tty)
return;

tty_lock(speakup_tty);
- idx = speakup_tty->index;

if (speakup_tty->ops->close)
speakup_tty->ops->close(speakup_tty, NULL);

Loading...