Kills that stupid deprecated warning in kernel/ksyms.c, and makes
others simpler.
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. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/