mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: william stinson <wstinson@wanadoo.fr>
To: Robert Love <rml@tech9.net>
Cc: Alexander Kellett <lypanov@kde.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	torvalds@transmeta.com, linux-kernel@vger.kernel.org,
	trivial@rustcorp.com.au
Subject: Re: [PATCH] deprecated function attribute
Date: Sun, 29 Dec 2002 00:32:48 +0100	[thread overview]
Message-ID: <200212290032.48372.wstinson@wanadoo.fr> (raw)

Hi Robert,

here's a patch to mark check_region "deprecated".

I have not done much testing with it yet (and maybe there is a more elegant implementation)

I do get nice warning messages for programs that still use check_region for example
	drivers/parport/parport_pc.c:2215: warning: `__check_region' is deprecated (declared at include/linux/ioport.h:111)

Best regards
William

--- linux-2.5.53/kernel/resource.c	2002-12-28 23:05:37.000000000 +0100
+++ linux-local/kernel/resource.c	2002-12-28 23:05:55.000000000 +0100
@@ -237,7 +237,7 @@
 	return res;
 }
 
-int __check_region(struct resource *parent, unsigned long start, unsigned long n)
+int deprecated __check_region(struct resource *parent, unsigned long start, unsigned long n)
 {
 	struct resource * res;
 
--- linux-2.5.53/include/linux/ioport.h	2002-12-28 23:02:52.000000000 +0100
+++ linux-local/include/linux/ioport.h	2002-12-28 23:14:46.000000000 +0100
@@ -8,6 +8,7 @@
 #ifndef _LINUX_IOPORT_H
 #define _LINUX_IOPORT_H
 
+#include <linux/compiler.h>
 /*
  * Resources are tree-like, allowing
  * nesting etc..
@@ -107,7 +108,7 @@
 #define check_mem_region(start,n)	__check_region(&iomem_resource, (start), (n))
 #define release_mem_region(start,n)	__release_region(&iomem_resource, (start), (n))
 
-extern int __check_region(struct resource *, unsigned long, unsigned long);
+extern int deprecated __check_region(struct resource *, unsigned long, unsigned long);
 extern void __release_region(struct resource *, unsigned long, unsigned long);
 
 #define get_ioport_list(buf)	get_resource_list(&ioport_resource, buf, PAGE_SIZE)





             reply	other threads:[~2002-12-28 23:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-28 23:32 william stinson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-12-28  0:57 [PATCH] Mark deprecated functions so they give a warning on use Rusty Russell
2002-12-28 15:30 ` Alexander Kellett
2002-12-28 17:51   ` [PATCH] deprecated function attribute Robert Love
2002-12-28 18:03     ` Robert Love
2002-12-28 18:53       ` Daniel Jacobowitz
2002-12-28 20:50         ` Robert Love

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200212290032.48372.wstinson@wanadoo.fr \
    --to=wstinson@wanadoo.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lypanov@kde.org \
    --cc=rml@tech9.net \
    --cc=rusty@rustcorp.com.au \
    --cc=torvalds@transmeta.com \
    --cc=trivial@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®