Subject: [PATCH] isdn/sc: remove unused REQUEST_IRQ and unnecessary header file

REQUEST_IRQ is never used, so delete it. In the process get rid of the
macro FREE_IRQ which makes the code unnecessarily difficult to read.

Signed-off-by: Fernando Luis Vazquez Cao <[email protected]>
---

diff -urNp linux-2.6.23-rc3-orig/drivers/isdn/sc/debug.h linux-2.6.23-rc3/drivers/isdn/sc/debug.h
--- linux-2.6.23-rc3-orig/drivers/isdn/sc/debug.h 2007-07-09 08:32:17.000000000 +0900
+++ linux-2.6.23-rc3/drivers/isdn/sc/debug.h 1970-01-01 09:00:00.000000000 +0900
@@ -1,19 +0,0 @@
-/* $Id: debug.h,v 1.2.8.1 2001/09/23 22:24:59 kai Exp $
- *
- * Copyright (C) 1996 SpellCaster Telecommunications Inc.
- *
- * This software may be used and distributed according to the terms
- * of the GNU General Public License, incorporated herein by reference.
- *
- * For more information, please contact [email protected] or write:
- *
- * SpellCaster Telecommunications Inc.
- * 5621 Finch Avenue East, Unit #3
- * Scarborough, Ontario Canada
- * M1B 2T9
- * +1 (416) 297-8565
- * +1 (416) 297-6433 Facsimile
- */
-
-#define REQUEST_IRQ(a,b,c,d,e) request_irq(a,b,c,d,e)
-#define FREE_IRQ(a,b) free_irq(a,b)
diff -urNp linux-2.6.23-rc3-orig/drivers/isdn/sc/init.c linux-2.6.23-rc3/drivers/isdn/sc/init.c
--- linux-2.6.23-rc3-orig/drivers/isdn/sc/init.c 2007-07-09 08:32:17.000000000 +0900
+++ linux-2.6.23-rc3/drivers/isdn/sc/init.c 2007-08-24 18:12:27.000000000 +0900
@@ -404,7 +404,7 @@ static void __exit sc_exit(void)
/*
* Release the IRQ
*/
- FREE_IRQ(sc_adapter[i]->interrupt, NULL);
+ free_irq(sc_adapter[i]->interrupt, NULL);

/*
* Reset for a clean start



2007-08-24 09:35:22

by Adrian Bunk

[permalink] [raw]
Subject: Re: [PATCH] isdn/sc: remove unused REQUEST_IRQ and unnecessary header file

On Fri, Aug 24, 2007 at 06:27:27PM +0900, Fernando Luis Vázquez Cao wrote:

> REQUEST_IRQ is never used, so delete it. In the process get rid of the
> macro FREE_IRQ which makes the code unnecessarily difficult to read.

The header you remove get's #include'd somewhere - and this #include
must be removed or your patch creates a compile error.

> Signed-off-by: Fernando Luis Vazquez Cao <[email protected]>
> ---
>
> diff -urNp linux-2.6.23-rc3-orig/drivers/isdn/sc/debug.h linux-2.6.23-rc3/drivers/isdn/sc/debug.h
> --- linux-2.6.23-rc3-orig/drivers/isdn/sc/debug.h 2007-07-09 08:32:17.000000000 +0900
> +++ linux-2.6.23-rc3/drivers/isdn/sc/debug.h 1970-01-01 09:00:00.000000000 +0900
> @@ -1,19 +0,0 @@
> -/* $Id: debug.h,v 1.2.8.1 2001/09/23 22:24:59 kai Exp $
> - *
> - * Copyright (C) 1996 SpellCaster Telecommunications Inc.
> - *
> - * This software may be used and distributed according to the terms
> - * of the GNU General Public License, incorporated herein by reference.
> - *
> - * For more information, please contact [email protected] or write:
> - *
> - * SpellCaster Telecommunications Inc.
> - * 5621 Finch Avenue East, Unit #3
> - * Scarborough, Ontario Canada
> - * M1B 2T9
> - * +1 (416) 297-8565
> - * +1 (416) 297-6433 Facsimile
> - */
> -
> -#define REQUEST_IRQ(a,b,c,d,e) request_irq(a,b,c,d,e)
> -#define FREE_IRQ(a,b) free_irq(a,b)
> diff -urNp linux-2.6.23-rc3-orig/drivers/isdn/sc/init.c linux-2.6.23-rc3/drivers/isdn/sc/init.c
> --- linux-2.6.23-rc3-orig/drivers/isdn/sc/init.c 2007-07-09 08:32:17.000000000 +0900
> +++ linux-2.6.23-rc3/drivers/isdn/sc/init.c 2007-08-24 18:12:27.000000000 +0900
> @@ -404,7 +404,7 @@ static void __exit sc_exit(void)
> /*
> * Release the IRQ
> */
> - FREE_IRQ(sc_adapter[i]->interrupt, NULL);
> + free_irq(sc_adapter[i]->interrupt, NULL);
>
> /*
> * Reset for a clean start
>
>

cu
Adrian

--

"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

Subject: Re: [PATCH] isdn/sc: remove unused REQUEST_IRQ and unnecessary header file

On Fri, August 24, 2007 6:33 pm, Adrian Bunk wrote:
> On Fri, Aug 24, 2007 at 06:27:27PM +0900, Fernando Luis Vazquez Cao
> wrote:
>
>> REQUEST_IRQ is never used, so delete it. In the process get rid of the
>> macro FREE_IRQ which makes the code unnecessarily difficult to read.
>
> The header you remove get's #include'd somewhere - and this #include
> must be removed or your patch creates a compile error.
Bummer. Thank you for the catch Adrian. Attaching compile-tested patch.

Fernando


Attachments:
remove-REQUEST_IRQ.patch (2.02 kB)

2007-08-25 19:30:28

by Karsten Keil

[permalink] [raw]
Subject: Re: [PATCH] isdn/sc: remove unused REQUEST_IRQ and unnecessary header file


[PATCH] isdn/sc: remove unused REQUEST_IRQ and unnecessary

REQUEST_IRQ is never used, so delete it. In the process get rid of the
macro FREE_IRQ which makes the code unnecessarily difficult to read.

Signed-off-by: Fernando Luis Vazquez Cao <[email protected]>
Acked-by: Karsten Keil <[email protected]>
---

diff -urNp linux-2.6.23-rc3-orig/drivers/isdn/sc/debug.h linux-2.6.23-rc3/drivers/isdn/sc/debug.h
--- linux-2.6.23-rc3-orig/drivers/isdn/sc/debug.h 2007-07-09 08:32:17.000000000 +0900
+++ linux-2.6.23-rc3/drivers/isdn/sc/debug.h 1970-01-01 09:00:00.000000000 +0900
@@ -1,19 +0,0 @@
-/* $Id: debug.h,v 1.2.8.1 2001/09/23 22:24:59 kai Exp $
- *
- * Copyright (C) 1996 SpellCaster Telecommunications Inc.
- *
- * This software may be used and distributed according to the terms
- * of the GNU General Public License, incorporated herein by reference.
- *
- * For more information, please contact [email protected] or write:
- *
- * SpellCaster Telecommunications Inc.
- * 5621 Finch Avenue East, Unit #3
- * Scarborough, Ontario Canada
- * M1B 2T9
- * +1 (416) 297-8565
- * +1 (416) 297-6433 Facsimile
- */
-
-#define REQUEST_IRQ(a,b,c,d,e) request_irq(a,b,c,d,e)
-#define FREE_IRQ(a,b) free_irq(a,b)
diff -urNp linux-2.6.23-rc3-orig/drivers/isdn/sc/includes.h linux-2.6.23-rc3/drivers/isdn/sc/includes.h
--- linux-2.6.23-rc3-orig/drivers/isdn/sc/includes.h 2007-07-09 08:32:17.000000000 +0900
+++ linux-2.6.23-rc3/drivers/isdn/sc/includes.h 2007-08-24 20:55:45.000000000 +0900
@@ -14,4 +14,3 @@
#include <linux/timer.h>
#include <linux/wait.h>
#include <linux/isdnif.h>
-#include "debug.h"
diff -urNp linux-2.6.23-rc3-orig/drivers/isdn/sc/init.c linux-2.6.23-rc3/drivers/isdn/sc/init.c
--- linux-2.6.23-rc3-orig/drivers/isdn/sc/init.c 2007-07-09 08:32:17.000000000 +0900
+++ linux-2.6.23-rc3/drivers/isdn/sc/init.c 2007-08-24 20:31:58.000000000 +0900
@@ -404,7 +404,7 @@ static void __exit sc_exit(void)
/*
* Release the IRQ
*/
- FREE_IRQ(sc_adapter[i]->interrupt, NULL);
+ free_irq(sc_adapter[i]->interrupt, NULL);

/*
* Reset for a clean start

--
Karsten Keil
SuSE Labs
ISDN and VOIP development
SUSE LINUX Products GmbH, Maxfeldstr.5 90409 Nuernberg, GF: Markus Rex, HRB 16746 (AG Nuernberg)

Subject: Re: [PATCH] isdn/sc: remove unused REQUEST_IRQ and unnecessary header file

Hi Karsten,

What happened to this patch? Should I send it to Andrew or will you take
it in your tree before pushing it upstream?

Thank you in advance.

- Fernando

On Sat, 2007-08-25 at 21:30 +0200, Karsten Keil wrote:
> [PATCH] isdn/sc: remove unused REQUEST_IRQ and unnecessary
>
> REQUEST_IRQ is never used, so delete it. In the process get rid of the
> macro FREE_IRQ which makes the code unnecessarily difficult to read.
>
> Signed-off-by: Fernando Luis Vazquez Cao <[email protected]>
> Acked-by: Karsten Keil <[email protected]>
> ---
>
> diff -urNp linux-2.6.23-rc3-orig/drivers/isdn/sc/debug.h linux-2.6.23-rc3/drivers/isdn/sc/debug.h
> --- linux-2.6.23-rc3-orig/drivers/isdn/sc/debug.h 2007-07-09 08:32:17.000000000 +0900
> +++ linux-2.6.23-rc3/drivers/isdn/sc/debug.h 1970-01-01 09:00:00.000000000 +0900
> @@ -1,19 +0,0 @@
> -/* $Id: debug.h,v 1.2.8.1 2001/09/23 22:24:59 kai Exp $
> - *
> - * Copyright (C) 1996 SpellCaster Telecommunications Inc.
> - *
> - * This software may be used and distributed according to the terms
> - * of the GNU General Public License, incorporated herein by reference.
> - *
> - * For more information, please contact [email protected] or write:
> - *
> - * SpellCaster Telecommunications Inc.
> - * 5621 Finch Avenue East, Unit #3
> - * Scarborough, Ontario Canada
> - * M1B 2T9
> - * +1 (416) 297-8565
> - * +1 (416) 297-6433 Facsimile
> - */
> -
> -#define REQUEST_IRQ(a,b,c,d,e) request_irq(a,b,c,d,e)
> -#define FREE_IRQ(a,b) free_irq(a,b)
> diff -urNp linux-2.6.23-rc3-orig/drivers/isdn/sc/includes.h linux-2.6.23-rc3/drivers/isdn/sc/includes.h
> --- linux-2.6.23-rc3-orig/drivers/isdn/sc/includes.h 2007-07-09 08:32:17.000000000 +0900
> +++ linux-2.6.23-rc3/drivers/isdn/sc/includes.h 2007-08-24 20:55:45.000000000 +0900
> @@ -14,4 +14,3 @@
> #include <linux/timer.h>
> #include <linux/wait.h>
> #include <linux/isdnif.h>
> -#include "debug.h"
> diff -urNp linux-2.6.23-rc3-orig/drivers/isdn/sc/init.c linux-2.6.23-rc3/drivers/isdn/sc/init.c
> --- linux-2.6.23-rc3-orig/drivers/isdn/sc/init.c 2007-07-09 08:32:17.000000000 +0900
> +++ linux-2.6.23-rc3/drivers/isdn/sc/init.c 2007-08-24 20:31:58.000000000 +0900
> @@ -404,7 +404,7 @@ static void __exit sc_exit(void)
> /*
> * Release the IRQ
> */
> - FREE_IRQ(sc_adapter[i]->interrupt, NULL);
> + free_irq(sc_adapter[i]->interrupt, NULL);
>
> /*
> * Reset for a clean start
>