Skip to contentSkip to conversation

Marking obsolete-deprecated stuff

PATCH In review Yaman 3 participants 5 messages Feb 14, 2007

Subsystems (2)
lore
Share & tools
lore

Yaman

author
#0 lore raw

PATCH 1/1 Marking obsolete-deprecated stuff

For marking obsolote-deprecated stuff, compiles fine for arm architecture. If that's the way to go i can complete the rest.

arch/arm/kernel/compat.c +2 -1
diff -uprN -X linux-2.6.20-vanilla/Documentation/dontdiff linux-2.6.20-vanilla/arch/arm/kernel/compat.c linux-2.6.20/arch/arm/kernel/compat.c
@@ -38,8 +38,9 @@
  *    guaranteed to contain useful data in setup_arch()
  *
  * This is the old deprecated way to pass parameters to the kernel
+ * Should've been obsoleted by now, as it's 2007 now
  */
-struct param_struct {
+struct __deprecated param_struct {
     union {
 	struct {
 	    unsigned long page_size;		/*  0 */
arch/arm/mm/mmu.c +2 -4
diff -uprN -X linux-2.6.20-vanilla/Documentation/dontdiff linux-2.6.20-vanilla/arch/arm/mm/mmu.c linux-2.6.20/arch/arm/mm/mmu.c
@@ -117,18 +117,16 @@ static void __init early_cachepolicy(cha
 }
 __early_param("cachepolicy=", early_cachepolicy);
 
-static void __init early_nocache(char **__unused)
+__deprecated static void __init early_nocache(char **__unused) 
 {
 	char *p = "buffered";
-	printk(KERN_WARNING "nocache is deprecated; use cachepolicy=%s\n", p);
 	early_cachepolicy(&p);
 }
 __early_param("nocache", early_nocache);
 
-static void __init early_nowrite(char **__unused)
+__deprecated static void __init early_nowrite(char **__unused) 
 {
 	char *p = "uncached";
-	printk(KERN_WARNING "nowb is deprecated; use cachepolicy=%s\n", p);
 	early_cachepolicy(&p);
 }
 __early_param("nowb", early_nowrite);
arch/arm26/kernel/compat.c +2 -1
diff -uprN -X linux-2.6.20-vanilla/Documentation/dontdiff linux-2.6.20-vanilla/arch/arm26/kernel/compat.c linux-2.6.20/arch/arm26/kernel/compat.c
@@ -38,8 +38,9 @@
  *    guaranteed to contain useful data in setup_arch()
  *
  * This is the old deprecated way to pass parameters to the kernel
+ * Should've been obsoleted by now, as it's 2007 now
  */
-struct param_struct {
+struct __deprecated param_struct {
     union {
 	struct {
 	    unsigned long page_size;		/*  0 */
arch/arm26/kernel/setup.c +2 -4
diff -uprN -X linux-2.6.20-vanilla/Documentation/dontdiff linux-2.6.20-vanilla/arch/arm26/kernel/setup.c linux-2.6.20/arch/arm26/kernel/setup.c
@@ -354,9 +354,8 @@ static int __init parse_tag_ramdisk(cons
 
 __tagtable(ATAG_RAMDISK, parse_tag_ramdisk);
 
-static int __init parse_tag_initrd(const struct tag *tag)
+__deprecated static int __init parse_tag_initrd(const struct tag *tag)
 {
-	printk(KERN_WARNING "ATAG_INITRD is deprecated; please update your bootloader. \n");
         phys_initrd_start = (unsigned long)tag->u.initrd.start;
         phys_initrd_size = (unsigned long)tag->u.initrd.size;
 	return 0;
@@ -364,9 +363,8 @@ static int __init parse_tag_initrd(const
 
 __tagtable(ATAG_INITRD, parse_tag_initrd);
 
-static int __init parse_tag_initrd2(const struct tag *tag)
+__deprecated static int __init parse_tag_initrd2(const struct tag *tag)
 {
-	printk(KERN_WARNING "ATAG_INITRD is deprecated; please update your bootloader. \n");
 	phys_initrd_start = (unsigned long)tag->u.initrd.start;
 	phys_initrd_size = (unsigned long)tag->u.initrd.size;
 	return 0;

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

author
#1 lore raw

PATCH 1/1 Marking obsolete-deprecated stuff

Sorry about the re-send, non-attached version :)
For marking obsolete-deprecated stuff, compiles fine for arm. If that's the way to go i can complete the rest.

Signed-off-by Yaman Cakmakci <[email protected] <mailto:[email protected]>>

--------------------------------------------------------------------------------------------

diff -uprN -X linux-2.6.20-vanilla/Documentation/dontdiff linux-2.6.20-vanilla/arch/arm/kernel/compat.c linux-2.6.20/arch/arm/kernel/compat.c
--- linux-2.6.20-vanilla/arch/arm/kernel/compat.c 2006-09-20
06:42:06.000000000 +0300
+++ linux-2.6.20/arch/arm/kernel/compat.c 2007-02-14
15:43:03.000000000 +0200
@@ -38,8 +38,9 @@
* guaranteed to contain useful data in setup_arch()
*
* This is the old deprecated way to pass parameters to the kernel
+ * Should've been obsoleted by now, as it's 2007 now
*/
-struct param_struct {

+struct __deprecated param_struct {
     union {
     struct {
         unsigned long page_size;        /*  0 */

diff -uprN -X linux-2.6.20-vanilla/Documentation/dontdiff linux-2.6.20-vanilla/arch/arm/mm/mmu.c linux-2.6.20/arch/arm/mm/mmu.c
--- linux-2.6.20-vanilla/arch/arm/mm/mmu.c 2007-02-14
15:12:18.000000000 +0200
+++ linux-2.6.20/arch/arm/mm/mmu.c 2007-02-14 15:49:33.000000000 +0200
@@ -117,18 +117,16 @@ static void __init early_cachepolicy(cha
}
__early_param("cachepolicy=", early_cachepolicy);

-static void __init early_nocache(char **__unused) +__deprecated static void __init early_nocache(char **__unused)

 {
     char *p = "buffered";
-    printk(KERN_WARNING "nocache is deprecated; use cachepolicy=%s\n", p);
     early_cachepolicy(&p);

}
__early_param("nocache", early_nocache);

-static void __init early_nowrite(char **__unused) +__deprecated static void __init early_nowrite(char **__unused)

 {
     char *p = "uncached";
-    printk(KERN_WARNING "nowb is deprecated; use cachepolicy=%s\n", p);
     early_cachepolicy(&p);

}
__early_param("nowb", early_nowrite);
diff -uprN -X linux-2.6.20-vanilla/Documentation/dontdiff linux-2.6.20-vanilla/arch/arm26/kernel/compat.c linux-2.6.20/arch/arm26/kernel/compat.c
--- linux-2.6.20-vanilla/arch/arm26/kernel/compat.c 2006-09-20
06:42:06.000000000 +0300
+++ linux-2.6.20/arch/arm26/kernel/compat.c 2007-02-14
15:52:30.000000000 +0200
@@ -38,8 +38,9 @@
* guaranteed to contain useful data in setup_arch()
*
* This is the old deprecated way to pass parameters to the kernel
+ * Should've been obsoleted by now, as it's 2007 now
*/
-struct param_struct {

+struct __deprecated param_struct {
     union {
     struct {
         unsigned long page_size;        /*  0 */

diff -uprN -X linux-2.6.20-vanilla/Documentation/dontdiff linux-2.6.20-vanilla/arch/arm26/kernel/setup.c linux-2.6.20/arch/arm26/kernel/setup.c
--- linux-2.6.20-vanilla/arch/arm26/kernel/setup.c 2007-02-14
15:04:16.000000000 +0200
+++ linux-2.6.20/arch/arm26/kernel/setup.c 2007-02-14
15:56:57.000000000 +0200
@@ -354,9 +354,8 @@ static int __init parse_tag_ramdisk(cons

__tagtable(ATAG_RAMDISK, parse_tag_ramdisk);

-static int __init parse_tag_initrd(const struct tag *tag) +__deprecated static int __init parse_tag_initrd(const struct tag *tag)
{
- printk(KERN_WARNING "ATAG_INITRD is deprecated; please update your

bootloader. \n");
         phys_initrd_start = (unsigned long)tag->u.initrd.start;
         phys_initrd_size = (unsigned long)tag->u.initrd.size;
     return 0;

@@ -364,9 +363,8 @@ static int __init parse_tag_initrd(const

__tagtable(ATAG_INITRD, parse_tag_initrd);

-static int __init parse_tag_initrd2(const struct tag *tag) +__deprecated static int __init parse_tag_initrd2(const struct tag *tag)
{
- printk(KERN_WARNING "ATAG_INITRD is deprecated; please update your

bootloader. \n");
     phys_initrd_start = (unsigned long)tag->u.initrd.start;
     phys_initrd_size = (unsigned long)tag->u.initrd.size;
     return 0;

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

#2 lore raw
In reply to Yaman
Quoted 3 lines · yaman

Sorry about the re-send, non-attached version :)
For marking obsolete-deprecated stuff, compiles fine for arm. If that's the way to go i can complete the rest.

Unfortunately your patch got line-wrapped

Quoted 1 line
Signed-off-by Yaman Cakmakci <[email protected] <mailto:[email protected]>>

Just the email without mailto: will do here.

arch/arm/kernel/compat.c line 41

Quoted 12 lines

diff -uprN -X linux-2.6.20-vanilla/Documentation/dontdiff linux-2.6.20-vanilla/arch/arm/kernel/compat.c linux-2.6.20/arch/arm/kernel/compat.c
--- linux-2.6.20-vanilla/arch/arm/kernel/compat.c 2006-09-20
06:42:06.000000000 +0300
+++ linux-2.6.20/arch/arm/kernel/compat.c 2007-02-14
15:43:03.000000000 +0200

arch/arm/kernel/compat.c +1 -0
@@ -38,8 +38,9 @@
  *    guaranteed to contain useful data in setup_arch()
  *
  * This is the old deprecated way to pass parameters to the kernel
+ * Should've been obsoleted by now, as it's 2007 now

Nitpicking: Two times 'now' in the same sentence. Might need some readjustment ;)

Quoted 12 lines
arch/arm/kernel/compat.c +1 -1
  */
-struct param_struct {
+struct __deprecated param_struct {
     union {
     struct {
         unsigned long page_size;        /*  0 */

diff -uprN -X linux-2.6.20-vanilla/Documentation/dontdiff linux-2.6.20-vanilla/arch/arm/mm/mmu.c linux-2.6.20/arch/arm/mm/mmu.c
--- linux-2.6.20-vanilla/arch/arm/mm/mmu.c 2007-02-14
15:12:18.000000000 +0200
+++ linux-2.6.20/arch/arm/mm/mmu.c 2007-02-14 15:49:33.000000000 +0200

arch/arm/mm/mmu.c static void __init early_cachepolicy(cha · line 120

Quoted 5 lines
arch/arm/mm/mmu.c +1 -1
@@ -117,18 +117,16 @@ static void __init early_cachepolicy(cha
 }
 __early_param("cachepolicy=", early_cachepolicy);
 
-static void __init early_nocache(char **__unused)
+__deprecated static void __init early_nocache(char **__unused)

Storage class should always be first.

arch/arm/mm/mmu.c static void __init early_cachepolicy(cha · line 127

Quoted 9 lines
arch/arm/mm/mmu.c +1 -2
 {
     char *p = "buffered";
-    printk(KERN_WARNING "nocache is deprecated; use cachepolicy=%s\n", p);
     early_cachepolicy(&p);
 }
 __early_param("nocache", early_nocache);
 
-static void __init early_nowrite(char **__unused)
+__deprecated static void __init early_nowrite(char **__unused)

Ditto.

Quoted 14 lines
arch/arm/mm/mmu.c +0 -1
 {
     char *p = "uncached";
-    printk(KERN_WARNING "nowb is deprecated; use cachepolicy=%s\n", p);
     early_cachepolicy(&p);
 }
 __early_param("nowb", early_nowrite);

diff -uprN -X linux-2.6.20-vanilla/Documentation/dontdiff linux-2.6.20-vanilla/arch/arm26/kernel/compat.c linux-2.6.20/arch/arm26/kernel/compat.c
--- linux-2.6.20-vanilla/arch/arm26/kernel/compat.c 2006-09-20
06:42:06.000000000 +0300
+++ linux-2.6.20/arch/arm26/kernel/compat.c 2007-02-14
15:52:30.000000000 +0200

arch/arm/kernel/compat.c line 41

Quoted 4 lines
arch/arm/kernel/compat.c +1 -0
@@ -38,8 +38,9 @@
  *    guaranteed to contain useful data in setup_arch()
  *
  * This is the old deprecated way to pass parameters to the kernel
+ * Should've been obsoleted by now, as it's 2007 now

Same as above.

Quoted 14 lines
arch/arm/kernel/compat.c +1 -1
  */
-struct param_struct {
+struct __deprecated param_struct {
     union {
     struct {
         unsigned long page_size;        /*  0 */

diff -uprN -X linux-2.6.20-vanilla/Documentation/dontdiff linux-2.6.20-vanilla/arch/arm26/kernel/setup.c linux-2.6.20/arch/arm26/kernel/setup.c
--- linux-2.6.20-vanilla/arch/arm26/kernel/setup.c 2007-02-14
15:04:16.000000000 +0200
+++ linux-2.6.20/arch/arm26/kernel/setup.c 2007-02-14
15:56:57.000000000 +0200

arch/arm26/kernel/setup.c static int __init parse_tag_ramdisk(cons · line 357

Quoted 5 lines
arch/arm26/kernel/setup.c +1 -1
@@ -354,9 +354,8 @@ static int __init parse_tag_ramdisk(cons
 
 __tagtable(ATAG_RAMDISK, parse_tag_ramdisk);
 
-static int __init parse_tag_initrd(const struct tag *tag)
+__deprecated static int __init parse_tag_initrd(const struct tag *tag)

Storage class again.

arch/arm26/kernel/setup.c static int __init parse_tag_initrd(const · line 366

Quoted 12 lines
arch/arm26/kernel/setup.c +0 -1
 {
-    printk(KERN_WARNING "ATAG_INITRD is deprecated; please update your 
 bootloader. \n");
         phys_initrd_start = (unsigned long)tag->u.initrd.start;
         phys_initrd_size = (unsigned long)tag->u.initrd.size;
     return 0;
arch/arm26/kernel/setup.c +1 -1
@@ -364,9 +363,8 @@ static int __init parse_tag_initrd(const
 
 __tagtable(ATAG_INITRD, parse_tag_initrd);
 
-static int __init parse_tag_initrd2(const struct tag *tag)
+__deprecated static int __init parse_tag_initrd2(const struct tag *tag)

And yet again.

Cheers, Tobias
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

#3 lore raw
In reply to Yaman
Quoted 4 lines · Yaman

For marking obsolote-deprecated stuff, compiles fine for arm architecture. If that's the way to go i can complete the rest.

are you talking about the patch i proposed that adds code maturity level options of OBSOLETE and DEPRECATED? that's still working its way through the system -- if/when it finally gets applied, it will go into init/Kconfig, but i'm still waiting.

what exactly did you do that you're talking about here?

rday

Signature · 11 lines
====================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
====================================
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors
#4 lore raw
In reply to Yaman

On Wed, 14 Feb 2007, yaman wrote:

...

arch/arm/mm/mmu.c static void __init early_cachepolicy(cha · line 120

Quoted 11 lines

diff -uprN -X linux-2.6.20-vanilla/Documentation/dontdiff linux-2.6.20-vanilla/arch/arm/mm/mmu.c linux-2.6.20/arch/arm/mm/mmu.c
--- linux-2.6.20-vanilla/arch/arm/mm/mmu.c 2007-02-14
15:12:18.000000000 +0200
+++ linux-2.6.20/arch/arm/mm/mmu.c 2007-02-14 15:49:33.000000000 +0200

arch/arm/mm/mmu.c +1 -1
@@ -117,18 +117,16 @@ static void __init early_cachepolicy(cha
 }
 __early_param("cachepolicy=", early_cachepolicy);
 
-static void __init early_nocache(char **__unused)
+__deprecated static void __init early_nocache(char **__unused)

it's unusual to put the "__deprecated" attribute at the beginning of the line, even though it's technically correct. take a look at some eof the examples in the tree to see the general usage -- it's more commonly seen at the end.

rday

Signature · 11 lines
====================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://fsdev.net/wiki/index.php?title=Main_Page
====================================
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors