deprecated function attribute
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
kernel/resource.c +1 -1
@@ -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;
include/linux/ioport.h +2 -1
@@ -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)