* [PATCH] New include file for marking old style api files
@ 2005-07-28 13:42 Jiri Slaby
2005-07-28 13:50 ` Jiri Slaby
2005-07-28 14:02 ` Adrian Bunk
0 siblings, 2 replies; 7+ messages in thread
From: Jiri Slaby @ 2005-07-28 13:42 UTC (permalink / raw)
To: Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 308 bytes --]
Hi.
Do you think, that this would be useful in the kernel tree?
I have an idea to mark old drivers, which should I or somebody rewrite.
For example drivers/isdn/hisax/gazel.c.
--
Jiri Slaby www.fi.muni.cz/~xslaby
~\-/~ jirislaby@gmail.com ~\-/~
241B347EC88228DE51EE A49C4A73A25004CB2A10
[-- Attachment #2: lnx-oldapi-6.13r3m3.txt --]
[-- Type: text/plain, Size: 235 bytes --]
diff --git a/include/linux/oldapi.h b/include/linux/oldapi.h
new file mode 100644
--- /dev/null
+++ b/include/linux/oldapi.h
@@ -0,0 +1,2 @@
+#warning This driver uses old style API and needs to be rewritten or removed \
+ from kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] New include file for marking old style api files
2005-07-28 13:42 [PATCH] New include file for marking old style api files Jiri Slaby
@ 2005-07-28 13:50 ` Jiri Slaby
2005-07-28 13:56 ` John W. Linville
2005-07-28 14:02 ` Adrian Bunk
1 sibling, 1 reply; 7+ messages in thread
From: Jiri Slaby @ 2005-07-28 13:50 UTC (permalink / raw)
To: Jiri Slaby; +Cc: Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 722 bytes --]
Jiri Slaby napsal(a):
> Hi.
> Do you think, that this would be useful in the kernel tree?
> I have an idea to mark old drivers, which should I or somebody rewrite.
> For example drivers/isdn/hisax/gazel.c.
>
>------------------------------------------------------------------------
>
>diff --git a/include/linux/oldapi.h b/include/linux/oldapi.h
>new file mode 100644
>--- /dev/null
>+++ b/include/linux/oldapi.h
>@@ -0,0 +1,2 @@
>+#warning This driver uses old style API and needs to be rewritten or removed \
>+ from kernel
>
>
Maybe this would be better (license and comments added).
--
Jiri Slaby www.fi.muni.cz/~xslaby
~\-/~ jirislaby@gmail.com ~\-/~
241B347EC88228DE51EE A49C4A73A25004CB2A10
[-- Attachment #2: lnx-oldapi-6.13r3m3_1.txt --]
[-- Type: text/plain, Size: 570 bytes --]
diff --git a/include/linux/oldapi.h b/include/linux/oldapi.h
new file mode 100644
--- /dev/null
+++ b/include/linux/oldapi.h
@@ -0,0 +1,13 @@
+/**
+ * Include this file, if you think that the driver is old API styled
+ *
+ * Version: 1.0 28 Jul 2005 Initial version
+ *
+ * Author Jiri Slaby <xslaby@fi.muni.cz>
+ *
+ * This software may be used and distributed according to the terms
+ * of the GNU General Public License, incorporated herein by reference.
+ */
+
+#warning This driver uses old style API and needs to be rewritten or removed \
+ from kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] New include file for marking old style api files
2005-07-28 13:50 ` Jiri Slaby
@ 2005-07-28 13:56 ` John W. Linville
0 siblings, 0 replies; 7+ messages in thread
From: John W. Linville @ 2005-07-28 13:56 UTC (permalink / raw)
To: Jiri Slaby; +Cc: Linux Kernel Mailing List
On Thu, Jul 28, 2005 at 03:50:22PM +0200, Jiri Slaby wrote:
> Jiri Slaby napsal(a):
>
> >Hi.
> >Do you think, that this would be useful in the kernel tree?
> >I have an idea to mark old drivers, which should I or somebody rewrite.
> >For example drivers/isdn/hisax/gazel.c.
Anyway you could modify this so that people could indicate which
"old" APIs are in use?
Just a thought...
John
--
John W. Linville
linville@tuxdriver.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] New include file for marking old style api files
2005-07-28 13:42 [PATCH] New include file for marking old style api files Jiri Slaby
2005-07-28 13:50 ` Jiri Slaby
@ 2005-07-28 14:02 ` Adrian Bunk
2005-07-28 14:07 ` Jiri Slaby
1 sibling, 1 reply; 7+ messages in thread
From: Adrian Bunk @ 2005-07-28 14:02 UTC (permalink / raw)
To: Jiri Slaby; +Cc: Linux Kernel Mailing List
On Thu, Jul 28, 2005 at 03:42:26PM +0200, Jiri Slaby wrote:
> Hi.
> Do you think, that this would be useful in the kernel tree?
> I have an idea to mark old drivers, which should I or somebody rewrite.
> For example drivers/isdn/hisax/gazel.c.
>...
> --- /dev/null
> +++ b/include/linux/oldapi.h
> @@ -0,0 +1,2 @@
> +#warning This driver uses old style API and needs to be rewritten or removed \
> + from kernel
What's wrong with __deprecated ?
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
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] New include file for marking old style api files
2005-07-28 14:02 ` Adrian Bunk
@ 2005-07-28 14:07 ` Jiri Slaby
2005-07-28 14:25 ` Jan-Benedict Glaw
2005-07-28 14:32 ` Adrian Bunk
0 siblings, 2 replies; 7+ messages in thread
From: Jiri Slaby @ 2005-07-28 14:07 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Linux Kernel Mailing List
Adrian Bunk napsal(a):
>On Thu, Jul 28, 2005 at 03:42:26PM +0200, Jiri Slaby wrote:
>
>
>>Hi.
>>Do you think, that this would be useful in the kernel tree?
>>I have an idea to mark old drivers, which should I or somebody rewrite.
>>For example drivers/isdn/hisax/gazel.c.
>>...
>>--- /dev/null
>>+++ b/include/linux/oldapi.h
>>@@ -0,0 +1,2 @@
>>+#warning This driver uses old style API and needs to be rewritten or removed \
>>+ from kernel
>>
>>
>
>What's wrong with __deprecated ?
>
>
Nothing, but this marks entire driver, not a function, that it uses.
I.e. gazel doesn't emit any warning or so, I think; so for these cases.
--
Jiri Slaby www.fi.muni.cz/~xslaby
~\-/~ jirislaby@gmail.com ~\-/~
241B347EC88228DE51EE A49C4A73A25004CB2A10
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] New include file for marking old style api files
2005-07-28 14:07 ` Jiri Slaby
@ 2005-07-28 14:25 ` Jan-Benedict Glaw
2005-07-28 14:32 ` Adrian Bunk
1 sibling, 0 replies; 7+ messages in thread
From: Jan-Benedict Glaw @ 2005-07-28 14:25 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: Jiri Slaby, Adrian Bunk
[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]
On Thu, 2005-07-28 16:07:57 +0200, Jiri Slaby <jirislaby@gmail.com> wrote:
> Adrian Bunk napsal(a):
> >What's wrong with __deprecated ?
> >
> >
> Nothing, but this marks entire driver, not a function, that it uses.
> I.e. gazel doesn't emit any warning or so, I think; so for these cases.
So what's actually wrong with the gazel driver? I'm not an user or
author of it.
When it's the use of old APIs, I indeed think that __deprecated is
exactly what we want. If a driver is superseded by a different one (OSS
vs. ALSA, eepro100 vs e100, ...), sticking a #warning or #error right
into the driver (and not into an included header file) looks quite right
to me.
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
fuer einen Freien Staat voll Freier Buerger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] New include file for marking old style api files
2005-07-28 14:07 ` Jiri Slaby
2005-07-28 14:25 ` Jan-Benedict Glaw
@ 2005-07-28 14:32 ` Adrian Bunk
1 sibling, 0 replies; 7+ messages in thread
From: Adrian Bunk @ 2005-07-28 14:32 UTC (permalink / raw)
To: Jiri Slaby; +Cc: Linux Kernel Mailing List
On Thu, Jul 28, 2005 at 04:07:57PM +0200, Jiri Slaby wrote:
> Adrian Bunk napsal(a):
>
> >On Thu, Jul 28, 2005 at 03:42:26PM +0200, Jiri Slaby wrote:
> >
> >
> >>Hi.
> >>Do you think, that this would be useful in the kernel tree?
> >>I have an idea to mark old drivers, which should I or somebody rewrite.
> >>For example drivers/isdn/hisax/gazel.c.
> >>...
> >>--- /dev/null
> >>+++ b/include/linux/oldapi.h
> >>@@ -0,0 +1,2 @@
> >>+#warning This driver uses old style API and needs to be rewritten or
> >>removed \
> >>+ from kernel
> >>
> >>
> >
> >What's wrong with __deprecated ?
> >
> >
> Nothing, but this marks entire driver, not a function, that it uses.
> I.e. gazel doesn't emit any warning or so, I think; so for these cases.
Why do you require a header file for this?
Simply put the #warning in gazel.c .
If the API is scheduled for removal, you should put the #warning in the
header file for the API.
If the API is old but is expected to stay for a longer time, simply do
nothing. Artificially increasing the warnings during kernel compilation
only makes it harder to find important warnings.
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-07-28 14:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-28 13:42 [PATCH] New include file for marking old style api files Jiri Slaby
2005-07-28 13:50 ` Jiri Slaby
2005-07-28 13:56 ` John W. Linville
2005-07-28 14:02 ` Adrian Bunk
2005-07-28 14:07 ` Jiri Slaby
2005-07-28 14:25 ` Jan-Benedict Glaw
2005-07-28 14:32 ` Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox