summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristina Martšenko <kristina.martsenko@gmail.com>2014-03-03 23:05:45 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-07 13:32:48 -0800
commitc6a297bcb169caeaf459be57cff31e9b41a6b5a4 (patch)
tree34a73a84e072576012a1b2c002e1ac59e76a80e4
parent154d2b8cb6c3dcf72b42eb3e335ae8f501f3472e (diff)
downloadlinux-c6a297bcb169caeaf459be57cff31e9b41a6b5a4.tar.bz2
staging: sbe-2t3e3: remove t3e3_stats_t typedef
Kernel coding style does not recommend using typedefs for structures, so remove the t3e3_stats_t typedef. Fix the following checkpatch warning: drivers/staging/sbe-2t3e3/ctrl.h:107: WARNING: do not add new typedefs Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/sbe-2t3e3/2t3e3.h2
-rw-r--r--drivers/staging/sbe-2t3e3/ctrl.c7
-rw-r--r--drivers/staging/sbe-2t3e3/ctrl.h6
-rw-r--r--drivers/staging/sbe-2t3e3/netdev.c2
4 files changed, 8 insertions, 9 deletions
diff --git a/drivers/staging/sbe-2t3e3/2t3e3.h b/drivers/staging/sbe-2t3e3/2t3e3.h
index bc71db4c1274..0f078e212f73 100644
--- a/drivers/staging/sbe-2t3e3/2t3e3.h
+++ b/drivers/staging/sbe-2t3e3/2t3e3.h
@@ -701,7 +701,7 @@ struct channel {
} h;
/* statistics */
- t3e3_stats_t s;
+ struct t3e3_stats s;
/* running */
struct {
diff --git a/drivers/staging/sbe-2t3e3/ctrl.c b/drivers/staging/sbe-2t3e3/ctrl.c
index a7335ae6cbd4..ef646c2d76ca 100644
--- a/drivers/staging/sbe-2t3e3/ctrl.c
+++ b/drivers/staging/sbe-2t3e3/ctrl.c
@@ -216,8 +216,7 @@ static void t3e3_port_set(struct channel *sc, struct t3e3_param *param)
cpld_set_scrambler(sc, param->scrambler);
}
-static void t3e3_port_get_stats(struct channel *sc,
- t3e3_stats_t *stats)
+static void t3e3_port_get_stats(struct channel *sc, struct t3e3_stats *stats)
{
u32 result;
@@ -279,12 +278,12 @@ static void t3e3_port_get_stats(struct channel *sc,
result += exar7250_read(sc, SBE_2T3E3_FRAMER_REG_PMON_HOLDING_REGISTER);
sc->s.CP_BIT += result;
- memcpy(stats, &(sc->s), sizeof(t3e3_stats_t));
+ memcpy(stats, &(sc->s), sizeof(struct t3e3_stats));
}
static void t3e3_port_del_stats(struct channel *sc)
{
- memset(&(sc->s), 0, sizeof(t3e3_stats_t));
+ memset(&(sc->s), 0, sizeof(struct t3e3_stats));
}
void t3e3_if_config(struct channel *sc, u32 cmd, char *set,
diff --git a/drivers/staging/sbe-2t3e3/ctrl.h b/drivers/staging/sbe-2t3e3/ctrl.h
index 4b480f3a8555..5845aab71ab5 100644
--- a/drivers/staging/sbe-2t3e3/ctrl.h
+++ b/drivers/staging/sbe-2t3e3/ctrl.h
@@ -104,7 +104,7 @@ struct t3e3_param {
u_int8_t bandwidth_stop; /* 0-255 */
};
-typedef struct t3e3_stats {
+struct t3e3_stats {
u_int64_t in_bytes;
u32 in_packets, in_dropped;
u32 in_errors, in_error_desc, in_error_coll, in_error_drib,
@@ -117,13 +117,13 @@ typedef struct t3e3_stats {
u_int8_t LOC, LOF, OOF, LOS, AIS, FERF, IDLE, AIC, FEAC;
u_int16_t FEBE_code;
u32 LCV, FRAMING_BIT, PARITY_ERROR, FEBE_count, CP_BIT;
-} t3e3_stats_t;
+};
typedef struct t3e3_resp {
union {
struct t3e3_param param;
- t3e3_stats_t stats;
+ struct t3e3_stats stats;
u32 data;
} u;
} t3e3_resp_t;
diff --git a/drivers/staging/sbe-2t3e3/netdev.c b/drivers/staging/sbe-2t3e3/netdev.c
index fb13e73d5233..b1e257bd097e 100644
--- a/drivers/staging/sbe-2t3e3/netdev.c
+++ b/drivers/staging/sbe-2t3e3/netdev.c
@@ -61,7 +61,7 @@ static struct net_device_stats *t3e3_get_stats(struct net_device *dev)
{
struct net_device_stats *nstats = &dev->stats;
struct channel *sc = dev_to_priv(dev);
- t3e3_stats_t *stats = &sc->s;
+ struct t3e3_stats *stats = &sc->s;
memset(nstats, 0, sizeof(struct net_device_stats));
nstats->rx_packets = stats->in_packets;