@@ -152,7 +152,7 @@ typedef enum {
#define PHY_SPEED_100 0x3
-int amd8111e_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int amd8111e_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
@@ -12,7 +12,7 @@ static char *hw_versions[] = {
" 505AMX",
};
-int at76c50x_usb_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int at76c50x_usb_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
u8 version = (u8)(regs->version >> 24);
@@ -111,7 +111,7 @@ print_rx_missed(u32 csr8)
}
}
-static void de21040_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+static void de21040_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
u32 tmp, v, *data = (u32 *)regs->data;
@@ -417,7 +417,7 @@ static void de21040_dump_regs(struct ethtool_drvinfo *info maybe_unused,
v & (1<<0) ? " Jabber disable\n" : "");
}
-static void de21041_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+static void de21041_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
u32 tmp, v, *data = (u32 *)regs->data;
@@ -870,7 +870,7 @@ static int dsa_mv88e6xxx_dump_regs(struct ethtool_regs *regs)
#undef FIELD
#undef REG
-int dsa_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int dsa_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
/* DSA per-driver register dump */
@@ -36,7 +36,7 @@
#define CU_CMD 0x00F0
#define RU_CMD 0x0007
-int e100_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int e100_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
u32 *regs_buff = (u32 *)regs->data;
@@ -363,7 +363,7 @@ static enum e1000_mac_type e1000_get_mac_type(u16 device_id)
return mac_type;
}
-int e1000_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int e1000_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
u32 *regs_buff = (u32 *)regs->data;
@@ -2,7 +2,7 @@
#include <string.h>
#include "internal.h"
-int et131x_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int et131x_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
u8 version = (u8)(regs->version >> 24);
@@ -366,7 +366,7 @@ static int rxflow_str_to_type(const char *str)
return flow_type;
}
-static int do_version(struct cmd_context *ctx maybe_unused)
+static int do_version(struct cmd_context *ctx __maybe_unused)
{
fprintf(stdout,
PACKAGE " version " VERSION
@@ -1106,7 +1106,7 @@ nested:
}
static int dump_eeprom(int geeprom_dump_raw,
- struct ethtool_drvinfo *info maybe_unused,
+ struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_eeprom *ee)
{
if (geeprom_dump_raw) {
@@ -5708,7 +5708,7 @@ static const struct option args[] = {
{}
};
-static int show_usage(struct cmd_context *ctx maybe_unused)
+static int show_usage(struct cmd_context *ctx __maybe_unused)
{
int i;
@@ -194,7 +194,7 @@ static void fec_dump_reg_v2(int reg, u32 val)
#undef FIELD
#undef REG
-int fec_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int fec_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
const u32 *data = (u32 *)regs->data;
@@ -47,7 +47,7 @@ struct fec {
(unsigned long)(offsetof(struct fec, x)), \
#x, f->x)
-int fec_8xx_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int fec_8xx_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
struct fec *f = (struct fec *)regs->data;
@@ -2,7 +2,7 @@
#include <stdio.h>
#include "internal.h"
-int fjes_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int fjes_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
u32 *regs_buff = (u32 *)regs->data;
@@ -314,7 +314,7 @@ static void *print_tah_regs(void *buf)
return p + 1;
}
-int ibm_emac_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int ibm_emac_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
struct emac_ethtool_regs_hdr *hdr =
@@ -88,7 +88,7 @@
#define E1000_TCTL_RTLC 0x01000000 /* Re-transmit on late collision */
#define E1000_TCTL_NRTU 0x02000000 /* No Re-transmit on underrun */
-int igb_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int igb_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
u32 *regs_buff = (u32 *)regs->data;
@@ -26,7 +26,7 @@
#include "json_writer.h"
#include "json_print.h"
-#define maybe_unused __attribute__((__unused__))
+#define __maybe_unused __attribute__((__unused__))
/* internal for netlink interface */
#ifdef ETHTOOL_ENABLE_NETLINK
@@ -38,7 +38,7 @@
#define IXGB_RAH_ASEL_SRC 0x00010000
#define IXGB_RAH_AV 0x80000000
-int ixgb_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int ixgb_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
u32 *regs_buff = (u32 *)regs->data;
@@ -168,7 +168,7 @@ ixgbe_get_mac_type(u16 device_id)
}
int
-ixgbe_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+ixgbe_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
u32 *regs_buff = (u32 *)regs->data;
@@ -3,7 +3,7 @@
#include "internal.h"
int
-ixgbevf_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+ixgbevf_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
u32 *regs_buff = (u32 *)regs->data;
@@ -2,7 +2,7 @@
#include <string.h>
#include "internal.h"
-int lan78xx_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int lan78xx_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
unsigned int *lan78xx_reg = (unsigned int *)regs->data;
@@ -259,7 +259,7 @@ static void dump_control(u8 *r)
printf("General Purpose I/O 0x%08X\n", *(u32 *) (r + 0x15c));
}
-int skge_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int skge_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
const u32 *r = (const u32 *) regs->data;
@@ -380,7 +380,7 @@ static void dump_prefetch(const char *name, const void *r)
}
}
-int sky2_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int sky2_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
const u16 *r16 = (const u16 *) regs->data;
@@ -323,7 +323,7 @@ static void __print_intr(int d, int intr, const char *name,
} while (0)
int
-natsemi_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+natsemi_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
u32 *data = (u32 *)regs->data;
@@ -964,7 +964,7 @@ natsemi_dump_regs(struct ethtool_drvinfo *info maybe_unused,
}
int
-natsemi_dump_eeprom(struct ethtool_drvinfo *info maybe_unused,
+natsemi_dump_eeprom(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_eeprom *ee)
{
int i;
@@ -241,7 +241,7 @@ print_intr_bits(u16 mask)
}
int
-realtek_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+realtek_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
u32 *data = (u32 *) regs->data;
@@ -3890,7 +3890,8 @@ print_complex_table(unsigned revision, const struct efx_nic_reg_table *table,
}
int
-sfc_dump_regs(struct ethtool_drvinfo *info maybe_unused, struct ethtool_regs *regs)
+sfc_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
+ struct ethtool_regs *regs)
{
const struct efx_nic_reg *reg;
const struct efx_nic_reg_table *table;
@@ -2,7 +2,7 @@
#include <string.h>
#include "internal.h"
-int smsc911x_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int smsc911x_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
unsigned int *smsc_reg = (unsigned int *)regs->data;
@@ -18,7 +18,7 @@
#define GMAC_REG_NUM 55
#define GMAC_DMA_REG_NUM 23
-int st_mac100_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int st_mac100_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
int i;
@@ -51,7 +51,7 @@ int st_mac100_dump_regs(struct ethtool_drvinfo *info maybe_unused,
return 0;
}
-int st_gmac_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int st_gmac_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
int i;
@@ -4,7 +4,7 @@
#define TG3_MAGIC 0x669955aa
-int tg3_dump_eeprom(struct ethtool_drvinfo *info maybe_unused,
+int tg3_dump_eeprom(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_eeprom *ee)
{
int i;
@@ -23,7 +23,7 @@ int tg3_dump_eeprom(struct ethtool_drvinfo *info maybe_unused,
return 0;
}
-int tg3_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int tg3_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
int i;
@@ -25,7 +25,7 @@ bitset(u32 val, int bit)
return 0;
}
-int altera_tse_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int altera_tse_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
int i;
@@ -11,7 +11,7 @@ struct regs_line {
#define VIOC_REGS_LINE_SIZE sizeof(struct regs_line)
-int vioc_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+int vioc_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
unsigned int i;
@@ -3,7 +3,7 @@
#include "internal.h"
int
-vmxnet3_dump_regs(struct ethtool_drvinfo *info maybe_unused,
+vmxnet3_dump_regs(struct ethtool_drvinfo *info __maybe_unused,
struct ethtool_regs *regs)
{
u32 *regs_buff = (u32 *)regs->data;
This makes the code consistent with kernel and also makes it a bit more apparent that it is an attribute. Signed-off-by: Michal Kubecek <mkubecek@suse.cz> --- amd8111e.c | 2 +- at76c50x-usb.c | 2 +- de2104x.c | 4 ++-- dsa.c | 2 +- e100.c | 2 +- e1000.c | 2 +- et131x.c | 2 +- ethtool.c | 6 +++--- fec.c | 2 +- fec_8xx.c | 2 +- fjes.c | 2 +- ibm_emac.c | 2 +- igb.c | 2 +- internal.h | 2 +- ixgb.c | 2 +- ixgbe.c | 2 +- ixgbevf.c | 2 +- lan78xx.c | 2 +- marvell.c | 4 ++-- natsemi.c | 4 ++-- realtek.c | 2 +- sfc.c | 3 ++- smsc911x.c | 2 +- stmmac.c | 4 ++-- tg3.c | 4 ++-- tse.c | 2 +- vioc.c | 2 +- vmxnet3.c | 2 +- 28 files changed, 36 insertions(+), 35 deletions(-)