* [PATCH] Re-xmit: clean up overzealous deprecated warning
@ 2003-06-16 9:05 Rusty Russell
0 siblings, 0 replies; only message in thread
From: Rusty Russell @ 2003-06-16 9:05 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel
Linus, please apply.
Name: Fix overzealous check_region deprecation
Author: Rusty Russell
Status: Trivial
D: 1) We export __check_region, so making it __deprecated gives a spurious
D: warning in kernel/ksyms.c.
D: 2) Other warnings refer to __check_region rather than check_region,
D: which has confused some people.
D:
D: Make check_region an inline, not a macro, and deprecate *that*.
diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.70-bk16/include/linux/ioport.h working-2.5.70-bk16-check_region/include/linux/ioport.h
--- linux-2.5.70-bk16/include/linux/ioport.h 2003-03-25 12:17:30.000000000 +1100
+++ working-2.5.70-bk16-check_region/include/linux/ioport.h 2003-06-12 20:02:55.000000000 +1000
@@ -105,12 +105,15 @@ extern int allocate_resource(struct reso
extern struct resource * __request_region(struct resource *, unsigned long start, unsigned long n, const char *name);
/* Compatibility cruft */
-#define check_region(start,n) __check_region(&ioport_resource, (start), (n))
#define release_region(start,n) __release_region(&ioport_resource, (start), (n))
#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 __deprecated __check_region(struct resource *, unsigned long, unsigned long);
+extern int __check_region(struct resource *, unsigned long, unsigned long);
extern void __release_region(struct resource *, unsigned long, unsigned long);
+static inline int __deprecated check_region(unsigned long s, unsigned long n)
+{
+ return __check_region(&ioport_resource, s, n);
+}
#endif /* _LINUX_IOPORT_H */
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-06-16 8:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-16 9:05 [PATCH] Re-xmit: clean up overzealous deprecated warning Rusty Russell
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®