linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Remove unused variables
@ 2020-09-04  0:34 Anant Thazhemadam
  2020-09-04  0:59 ` Anant Thazhemadam
  0 siblings, 1 reply; 6+ messages in thread
From: Anant Thazhemadam @ 2020-09-04  0:34 UTC (permalink / raw)
  Cc: Anant Thazhemadam, Ian Abbott, H Hartley Sweeten,
	Greg Kroah-Hartman, Alexander A. Klimov, devel, linux-kernel

A few unused variables that were defined were found and removed.

Signed-off-by: Anant Thazhemadam <anant.thazhemadam@gmail.com>
---
 drivers/staging/comedi/drivers/dt2814.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/dt2814.c b/drivers/staging/comedi/drivers/dt2814.c
index bcf4d5444faf..1a36d8612d9f 100644
--- a/drivers/staging/comedi/drivers/dt2814.c
+++ b/drivers/staging/comedi/drivers/dt2814.c
@@ -190,7 +190,6 @@ static irqreturn_t dt2814_interrupt(int irq, void *d)
 	struct comedi_device *dev = d;
 	struct dt2814_private *devpriv = dev->private;
 	struct comedi_subdevice *s = dev->read_subdev;
-	int data;
 
 	if (!dev->attached) {
 		dev_err(dev->class_dev, "spurious interrupt\n");
@@ -229,7 +228,6 @@ static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 	struct dt2814_private *devpriv;
 	struct comedi_subdevice *s;
 	int ret;
-	int i;
 
 	ret = comedi_request_region(dev, it->options[0], 0x2);
 	if (ret)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Remove unused variables
  2020-09-04  0:34 [PATCH] Remove unused variables Anant Thazhemadam
@ 2020-09-04  0:59 ` Anant Thazhemadam
  0 siblings, 0 replies; 6+ messages in thread
From: Anant Thazhemadam @ 2020-09-04  0:59 UTC (permalink / raw)
  Cc: Ian Abbott, H Hartley Sweeten, Greg Kroah-Hartman,
	Alexander A. Klimov, devel, linux-kernel

This patch was generated, and sent by a script I was working on (and
apparently, still am), that would run sparse,
detect unused variables and eliminate them. However, upon manual
inspection, it became clear
to me that these functions are in fact necessary. I'm sorry this
mistake happened. Kindly ignore and discard this patch.
My sincere apologies.

Thanks,
Anant

On Fri, Sep 4, 2020 at 6:04 AM Anant Thazhemadam
<anant.thazhemadam@gmail.com> wrote:
>
> A few unused variables that were defined were found and removed.
>
> Signed-off-by: Anant Thazhemadam <anant.thazhemadam@gmail.com>
> ---
>  drivers/staging/comedi/drivers/dt2814.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/dt2814.c b/drivers/staging/comedi/drivers/dt2814.c
> index bcf4d5444faf..1a36d8612d9f 100644
> --- a/drivers/staging/comedi/drivers/dt2814.c
> +++ b/drivers/staging/comedi/drivers/dt2814.c
> @@ -190,7 +190,6 @@ static irqreturn_t dt2814_interrupt(int irq, void *d)
>         struct comedi_device *dev = d;
>         struct dt2814_private *devpriv = dev->private;
>         struct comedi_subdevice *s = dev->read_subdev;
> -       int data;
>
>         if (!dev->attached) {
>                 dev_err(dev->class_dev, "spurious interrupt\n");
> @@ -229,7 +228,6 @@ static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it)
>         struct dt2814_private *devpriv;
>         struct comedi_subdevice *s;
>         int ret;
> -       int i;
>
>         ret = comedi_request_region(dev, it->options[0], 0x2);
>         if (ret)
> --
> 2.25.1
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Remove unused variables
  2010-01-27  8:49   ` Shahar Havivi
@ 2010-01-27  9:15     ` Jiri Kosina
  0 siblings, 0 replies; 6+ messages in thread
From: Jiri Kosina @ 2010-01-27  9:15 UTC (permalink / raw)
  To: Shahar Havivi; +Cc: linux-kernel

On Wed, 27 Jan 2010, Shahar Havivi wrote:

> Remove unused fields in drivers/char/vt.c
> variables orig_buf and orig_count are assigned but never used.
> 
> Signed-off-by: Shahar Havivi <shaharh@gmail.com>
> ---
>  drivers/char/vt.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
> diff --git a/drivers/char/vt.c b/drivers/char/vt.c
> index 50faa1f..94f530a 100644
> --- a/drivers/char/vt.c
> +++ b/drivers/char/vt.c
> @@ -2119,8 +2119,6 @@ static int do_con_write(struct tty_struct *tty,
> const unsigned char *buf, int co
>     uint8_t inverse;
>     uint8_t width;
>     u16 himask, charmask;
> -   const unsigned char *orig_buf = NULL;
> -   int orig_count;
> 
>     if (in_interrupt())
>         return count;
> @@ -2142,8 +2140,6 @@ static int do_con_write(struct tty_struct *tty,
> const unsigned char *buf, int co
>         release_console_sem();
>         return 0;
>     }
> -   orig_buf = buf;
> -   orig_count = count;
> 
>     himask = vc->vc_hi_font_mask;
>     charmask = himask ? 0x1ff : 0xff;

Your patch is whitespace damaged and line wrapped.

I have fixed it by hand and applied it, but please fix your mail client 
for any patch submissions in the future.

Thanks,

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Remove unused variables
  2010-01-26 22:43 ` Jiri Kosina
@ 2010-01-27  8:49   ` Shahar Havivi
  2010-01-27  9:15     ` Jiri Kosina
  0 siblings, 1 reply; 6+ messages in thread
From: Shahar Havivi @ 2010-01-27  8:49 UTC (permalink / raw)
  To: Jiri Kosina; +Cc: linux-kernel

Remove unused fields in drivers/char/vt.c
variables orig_buf and orig_count are assigned but never used.

Signed-off-by: Shahar Havivi <shaharh@gmail.com>
---
 drivers/char/vt.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 50faa1f..94f530a 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -2119,8 +2119,6 @@ static int do_con_write(struct tty_struct *tty,
const unsigned char *buf, int co
    uint8_t inverse;
    uint8_t width;
    u16 himask, charmask;
-   const unsigned char *orig_buf = NULL;
-   int orig_count;

    if (in_interrupt())
        return count;
@@ -2142,8 +2140,6 @@ static int do_con_write(struct tty_struct *tty,
const unsigned char *buf, int co
        release_console_sem();
        return 0;
    }
-   orig_buf = buf;
-   orig_count = count;

    himask = vc->vc_hi_font_mask;
    charmask = himask ? 0x1ff : 0xff;
-- 
1.6.3.3

On Wed, Jan 27, 2010 at 12:43 AM, Jiri Kosina <jkosina@suse.cz> wrote:
> On Wed, 20 Jan 2010, Shahar Havivi wrote:
>
>> Remove unused fields in drivers/char/vt.c
>> variables orig_buf and orig_count are assigned but never used.
>> Shahar Havivi
>
> Could you please resend with your Signed-off-by line, as described in
> Documentation/SubmittingPatches, so that I could apply the patch?
>
>> ---
>>  drivers/char/vt.c |    4 ----
>>  1 files changed, 0 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/char/vt.c b/drivers/char/vt.c
>> index 50faa1f..94f530a 100644
>> --- a/drivers/char/vt.c
>> +++ b/drivers/char/vt.c
>> @@ -2119,8 +2119,6 @@ static int do_con_write(struct tty_struct *tty,
>> const unsigned char *buf, int co
>>     uint8_t inverse;
>>     uint8_t width;
>>     u16 himask, charmask;
>> -   const unsigned char *orig_buf = NULL;
>> -   int orig_count;
>>
>>     if (in_interrupt())
>>         return count;
>> @@ -2142,8 +2140,6 @@ static int do_con_write(struct tty_struct *tty,
>> const unsigned char *buf, int co
>>         release_console_sem();
>>         return 0;
>>     }
>> -   orig_buf = buf;
>> -   orig_count = count;
>>
>>     himask = vc->vc_hi_font_mask;
>>     charmask = himask ? 0x1ff : 0xff;
>
> Thanks,
>
> --
> Jiri Kosina
> SUSE Labs, Novell Inc.
>

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Remove unused variables
  2010-01-20 11:59 Shahar Havivi
@ 2010-01-26 22:43 ` Jiri Kosina
  2010-01-27  8:49   ` Shahar Havivi
  0 siblings, 1 reply; 6+ messages in thread
From: Jiri Kosina @ 2010-01-26 22:43 UTC (permalink / raw)
  To: Shahar Havivi; +Cc: linux-kernel

On Wed, 20 Jan 2010, Shahar Havivi wrote:

> Remove unused fields in drivers/char/vt.c
> variables orig_buf and orig_count are assigned but never used.
> Shahar Havivi

Could you please resend with your Signed-off-by line, as described in 
Documentation/SubmittingPatches, so that I could apply the patch?

> ---
>  drivers/char/vt.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/char/vt.c b/drivers/char/vt.c
> index 50faa1f..94f530a 100644
> --- a/drivers/char/vt.c
> +++ b/drivers/char/vt.c
> @@ -2119,8 +2119,6 @@ static int do_con_write(struct tty_struct *tty,
> const unsigned char *buf, int co
>     uint8_t inverse;
>     uint8_t width;
>     u16 himask, charmask;
> -   const unsigned char *orig_buf = NULL;
> -   int orig_count;
> 
>     if (in_interrupt())
>         return count;
> @@ -2142,8 +2140,6 @@ static int do_con_write(struct tty_struct *tty,
> const unsigned char *buf, int co
>         release_console_sem();
>         return 0;
>     }
> -   orig_buf = buf;
> -   orig_count = count;
> 
>     himask = vc->vc_hi_font_mask;
>     charmask = himask ? 0x1ff : 0xff;

Thanks,

-- 
Jiri Kosina
SUSE Labs, Novell Inc.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] Remove unused variables
@ 2010-01-20 11:59 Shahar Havivi
  2010-01-26 22:43 ` Jiri Kosina
  0 siblings, 1 reply; 6+ messages in thread
From: Shahar Havivi @ 2010-01-20 11:59 UTC (permalink / raw)
  To: linux-kernel

Remove unused fields in drivers/char/vt.c
variables orig_buf and orig_count are assigned but never used.

Shahar Havivi

---
 drivers/char/vt.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 50faa1f..94f530a 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -2119,8 +2119,6 @@ static int do_con_write(struct tty_struct *tty,
const unsigned char *buf, int co
    uint8_t inverse;
    uint8_t width;
    u16 himask, charmask;
-   const unsigned char *orig_buf = NULL;
-   int orig_count;

    if (in_interrupt())
        return count;
@@ -2142,8 +2140,6 @@ static int do_con_write(struct tty_struct *tty,
const unsigned char *buf, int co
        release_console_sem();
        return 0;
    }
-   orig_buf = buf;
-   orig_count = count;

    himask = vc->vc_hi_font_mask;
    charmask = himask ? 0x1ff : 0xff;
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-04  0:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-04  0:34 [PATCH] Remove unused variables Anant Thazhemadam
2020-09-04  0:59 ` Anant Thazhemadam
  -- strict thread matches above, loose matches on Subject: below --
2010-01-20 11:59 Shahar Havivi
2010-01-26 22:43 ` Jiri Kosina
2010-01-27  8:49   ` Shahar Havivi
2010-01-27  9:15     ` Jiri Kosina

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).