Commit 6103d1db authored by Stephen Hemminger's avatar Stephen Hemminger

[PATCH] get rid of __OPTIMIZE__ requirement in net drivers

Several network drivers have checks that they are only built with -O.
This breaks checking with sparse and other tools, and seems like a holdover from
when drivers were built out of tree and the kernel build system was less stable.
This patch gets rid of these.
Signed-off-by: default avatarStephen Hemminger <shemminger@osdl.org>
parent 382ec2b0
......@@ -238,12 +238,6 @@ static int vortex_debug = VORTEX_DEBUG;
static int vortex_debug = 1;
#endif
#ifndef __OPTIMIZE__
#error You must compile this file with the correct options!
#error See the last lines of the source file.
#error You must compile this driver with "-O".
#endif
#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
......
......@@ -87,12 +87,6 @@ static int options[] = {-1, -1, -1, -1, -1, -1, -1, -1};
/* Size of an pre-allocated Rx buffer: <Ethernet MTU> + slack.*/
#define PKT_BUF_SZ 1536
#if !defined(__OPTIMIZE__) || !defined(__KERNEL__)
#warning You must compile this file with the correct options!
#warning See the last lines of the source file.
#error You must compile this driver with "-O".
#endif
#include <linux/config.h>
#include <linux/version.h>
#include <linux/module.h>
......
......@@ -116,12 +116,6 @@ static int rx_copybreak;
#define TX_FIFO_THRESH 256
#define RX_FIFO_THRESH 1 /* 0-3, 0==32, 64,96, or 3==128 bytes */
#if !defined(__OPTIMIZE__)
#warning You must compile this file with the correct options!
#warning See the last lines of the source file.
#error You must compile this driver with "-O".
#endif
#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
......
......@@ -139,12 +139,6 @@
* NAPI
*/
#if !defined(__OPTIMIZE__)
#warning You must compile this file with the correct options!
#warning See the last lines of the source file.
#error You must compile this driver with "-O".
#endif
#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
......
......@@ -55,12 +55,6 @@ static int int_timeout = 0;
/* Time in jiffies before concluding the transmitter is hung. */
#define TX_TIMEOUT (2*HZ)
#if !defined(__OPTIMIZE__) || !defined(__KERNEL__)
#warning You must compile this file with the correct options!
#warning See the last lines of the source file.
#error You must compile this driver with "-O".
#endif
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
......
......@@ -58,12 +58,6 @@ typedef struct s_AC SK_AC;
#define SK_ADDR_EQUAL(a1,a2) (!memcmp(a1,a2,6))
#if !defined(__OPTIMIZE__) || !defined(__KERNEL__)
#warning You must compile this file with the correct options!
#warning See the last lines of the source file.
#error You must compile this driver with "-O".
#endif
#include <linux/version.h>
#include <linux/types.h>
#include <linux/kernel.h>
......
......@@ -148,15 +148,6 @@ static char *media[MAX_UNITS];
#define TX_TIMEOUT (4*HZ)
#define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer.*/
#ifndef __KERNEL__
#define __KERNEL__
#endif
#if !defined(__OPTIMIZE__)
#warning You must compile this file with the correct options!
#warning See the last lines of the source file.
#error You must compile this driver with "-O".
#endif
/* Include files, designed to support most kernel versions 2.0.0 and later. */
#include <linux/module.h>
#include <linux/kernel.h>
......
......@@ -111,15 +111,6 @@ static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};
#define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer.*/
#ifndef __KERNEL__
#define __KERNEL__
#endif
#if !defined(__OPTIMIZE__)
#warning You must compile this file with the correct options!
#warning See the last lines of the source file.
#error You must compile this driver with "-O".
#endif
/* Include files, designed to support most kernel versions 2.0.0 and later. */
#include <linux/module.h>
#include <linux/kernel.h>
......
......@@ -90,12 +90,6 @@ static const int multicast_filter_limit = 32;
#define PFX DRV_MODULE_NAME ": "
#define ERR_PFX KERN_ERR PFX
#if !defined(__OPTIMIZE__) || !defined(__KERNEL__)
#warning You must compile this file with the correct options!
#warning See the last lines of the source file.
#error You must compile this driver with "-O".
#endif
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
......
......@@ -183,12 +183,6 @@ static const int multicast_filter_limit = 32;
#define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer.*/
#if !defined(__OPTIMIZE__) || !defined(__KERNEL__)
#warning You must compile this file with the correct options!
#warning See the last lines of the source file.
#error You must compile this driver with "-O".
#endif
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
......
......@@ -108,12 +108,6 @@ static int gx_fix;
#define yellowfin_debug debug
#if !defined(__OPTIMIZE__)
#warning You must compile this file with the correct options!
#warning See the last lines of the source file.
#error You must compile this driver with "-O".
#endif
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/string.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment