public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] serial: remove unused variable
@ 2008-10-13 22:58 Simon Holm Thøgersen
  2008-10-14  5:50 ` Jianjun Kong
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Holm Thøgersen @ 2008-10-13 22:58 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Alan Cox, David Miller, linux-kernel

This fixes the following compile warning:

drivers/serial/8250.c: In function 'serial8250_init':
drivers/serial/8250.c:2963: warning: unused variable 'i'

that was introduced by b70ac771 (serial: allow 8250 to be used on sparc)
that removed the last use of the variable.

Signed-off-by: Simon Holm Thøgersen <odie@cs.aau.dk>
---
 drivers/serial/8250.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index d4104a3..625fc20 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2960,7 +2960,7 @@ EXPORT_SYMBOL(serial8250_unregister_port);
 
 static int __init serial8250_init(void)
 {
-	int ret, i;
+	int ret;
 
 	if (nr_uarts > UART_NR)
 		nr_uarts = UART_NR;
-- 
1.5.6.2.255.gbed62


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

* Re: [PATCH] serial: remove unused variable
  2008-10-13 22:58 [PATCH] serial: remove unused variable Simon Holm Thøgersen
@ 2008-10-14  5:50 ` Jianjun Kong
  2008-10-14  7:08   ` Simon Holm Thøgersen
  0 siblings, 1 reply; 3+ messages in thread
From: Jianjun Kong @ 2008-10-14  5:50 UTC (permalink / raw)
  To: Simon Holm Th�gersen
  Cc: Linus Torvalds, Alan Cox, David Miller, linux-kernel

On Tue, Oct 14, 2008 at 12:58:31AM +0200, Simon Holm Th�gersen wrote:
>This fixes the following compile warning:
>
>drivers/serial/8250.c: In function 'serial8250_init':
>drivers/serial/8250.c:2963: warning: unused variable 'i'
>
>that was introduced by b70ac771 (serial: allow 8250 to be used on sparc)
>that removed the last use of the variable.
>
>Signed-off-by: Simon Holm Thøgersen <odie@cs.aau.dk>
>---
> drivers/serial/8250.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
>index d4104a3..625fc20 100644
>--- a/drivers/serial/8250.c
>+++ b/drivers/serial/8250.c
>@@ -2960,7 +2960,7 @@ EXPORT_SYMBOL(serial8250_unregister_port);
> 
> static int __init serial8250_init(void)
> {
>-	int ret, i;
>+	int ret;
> 
> 	if (nr_uarts > UART_NR)
> 		nr_uarts = UART_NR;

I find those code in this function  __init serial8250_init(void)

        for (i = 0; i < NR_IRQS; i++)
                spin_lock_init(&irq_lists[i].lock);

So you do not remove the 'i'.

-- 
Jianjun Kong | Happy Hacking
HomePage: http://kongove.cn
Gtalk: kongjianjun@gmail.com

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

* Re: [PATCH] serial: remove unused variable
  2008-10-14  5:50 ` Jianjun Kong
@ 2008-10-14  7:08   ` Simon Holm Thøgersen
  0 siblings, 0 replies; 3+ messages in thread
From: Simon Holm Thøgersen @ 2008-10-14  7:08 UTC (permalink / raw)
  To: Jianjun Kong; +Cc: Linus Torvalds, Alan Cox, David Miller, linux-kernel

tir, 14 10 2008 kl. 13:50 +0800, skrev Jianjun Kong:
> On Tue, Oct 14, 2008 at 12:58:31AM +0200, Simon Holm Th�gersen wrote:
> >This fixes the following compile warning:
> >
> >drivers/serial/8250.c: In function 'serial8250_init':
> >drivers/serial/8250.c:2963: warning: unused variable 'i'
> >
> >that was introduced by b70ac771 (serial: allow 8250 to be used on sparc)
> >that removed the last use of the variable.
> >
> >Signed-off-by: Simon Holm Thøgersen <odie@cs.aau.dk>
> >---
> > drivers/serial/8250.c |    2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> >diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
> >index d4104a3..625fc20 100644
> >--- a/drivers/serial/8250.c
> >+++ b/drivers/serial/8250.c
> >@@ -2960,7 +2960,7 @@ EXPORT_SYMBOL(serial8250_unregister_port);
> > 
> > static int __init serial8250_init(void)
> > {
> >-	int ret, i;
> >+	int ret;
> > 
> > 	if (nr_uarts > UART_NR)
> > 		nr_uarts = UART_NR;
> 
> I find those code in this function  __init serial8250_init(void)
> 
>         for (i = 0; i < NR_IRQS; i++)
>                 spin_lock_init(&irq_lists[i].lock);
> 
> So you do not remove the 'i'.
> 
Look at the referenced commit b70ac771 (serial: allow 8250 to be used on
sparc). It is quite recent (Mon Oct 13 10:36:31 2008 +0100), but if you
pull Linus' latest tree it is there.


Simon


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

end of thread, other threads:[~2008-10-14  7:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-13 22:58 [PATCH] serial: remove unused variable Simon Holm Thøgersen
2008-10-14  5:50 ` Jianjun Kong
2008-10-14  7:08   ` Simon Holm Thøgersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox