Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01a1d5ac authored by Joe Perches's avatar Joe Perches Committed by Michael Grzeschik
Browse files

arcnet: Add and remove blank lines



Use a more current kernel line style.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarMichael Grzeschik <m.grzeschik@pengutronix.de>
parent cb334648
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -35,7 +35,6 @@

#define VERSION "arcnet: raw mode (`r') encapsulation support loaded.\n"


static void rx(struct net_device *dev, int bufnum,
	       struct archdr *pkthdr, int length);
static int build_header(struct sk_buff *skb, struct net_device *dev,
@@ -54,7 +53,6 @@ static struct ArcProto rawmode_proto =
	.ack_tx         = NULL
};


static int __init arcnet_raw_init(void)
{
	int count;
@@ -83,7 +81,6 @@ module_exit(arcnet_raw_exit);

MODULE_LICENSE("GPL");


/* packet receiver */
static void rx(struct net_device *dev, int bufnum,
	       struct archdr *pkthdr, int length)
@@ -127,7 +124,6 @@ static void rx(struct net_device *dev, int bufnum,
	netif_rx(skb);
}


/*
 * Create the ARCnet hard/soft headers for raw mode.
 * There aren't any soft headers in raw mode - not even the protocol id.
@@ -163,7 +159,6 @@ static int build_header(struct sk_buff *skb, struct net_device *dev,
	return hdr_size;	/* success */
}


static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
		      int bufnum)
{
+3 −5
Original line number Diff line number Diff line
@@ -36,10 +36,8 @@
#include <asm/io.h>
#include <linux/arcdevice.h>


#define VERSION "arcnet: RIM I (entirely mem-mapped) support\n"


/* Internal function declarations */

static int arcrimi_probe(struct net_device *dev);
@@ -78,7 +76,6 @@ static void arcrimi_copy_from_card(struct net_device *dev, int bufnum, int offse
#define AINTMASK(msk)	writeb((msk), _INTMASK)
#define SETCONF()	writeb(lp->config, _CONFIG)


/*
 * We cannot probe for a RIM I card; one reason is I don't know how to reset
 * them.  In fact, we can't even get their node ID automatically.  So, we
@@ -249,7 +246,6 @@ static int __init arcrimi_found(struct net_device *dev)
	return -EIO;
}


/*
 * Do a hardware reset on the card, and set up necessary registers.
 *
@@ -308,15 +304,16 @@ static void arcrimi_copy_to_card(struct net_device *dev, int bufnum, int offset,
{
	struct arcnet_local *lp = netdev_priv(dev);
	void __iomem *memaddr = lp->mem_start + 0x800 + bufnum * 512 + offset;

	TIME("memcpy_toio", count, memcpy_toio(memaddr, buf, count));
}


static void arcrimi_copy_from_card(struct net_device *dev, int bufnum, int offset,
				   void *buf, int count)
{
	struct arcnet_local *lp = netdev_priv(dev);
	void __iomem *memaddr = lp->mem_start + 0x800 + bufnum * 512 + offset;

	TIME("memcpy_fromio", count, memcpy_fromio(buf, memaddr, count));
}

@@ -374,6 +371,7 @@ static void __exit arc_rimi_exit(void)
static int __init arcrimi_setup(char *s)
{
	int ints[8];

	s = get_options(s, 8, ints);
	if (!ints[0])
		return 1;
+3 −20
Original line number Diff line number Diff line
@@ -168,7 +168,6 @@ void arcnet_dump_skb(struct net_device *dev,
EXPORT_SYMBOL(arcnet_dump_skb);
#endif


/*
 * Dump the contents of an ARCnet buffer
 */
@@ -206,7 +205,6 @@ static void arcnet_dump_packet(struct net_device *dev, int bufnum,

#endif


/*
 * Unregister a protocol driver from the arc_proto_map.  Protocol drivers
 * are responsible for registering themselves, but the unregister routine
@@ -229,7 +227,6 @@ void arcnet_unregister_proto(struct ArcProto *proto)
	}
}


/*
 * Add a buffer to the queue.  Only the interrupt handler is allowed to do
 * this, unless interrupts are disabled.
@@ -254,7 +251,6 @@ static void release_arcbuf(struct net_device *dev, int bufnum)
	}
}


/*
 * Get a buffer from the queue.  If this returns -1, there are no buffers
 * available.
@@ -281,7 +277,6 @@ static int get_arcbuf(struct net_device *dev)
		}
	}


	BUGLVL(D_DURING) {
		BUGMSG(D_DURING, "get_arcbuf: got #%d; buffer queue is now: ", buf);
		for (i = lp->next_buf; i != lp->first_free_buf; i = (i + 1) % 5)
@@ -293,7 +288,6 @@ static int get_arcbuf(struct net_device *dev)
	return buf;
}


static int choose_mtu(void)
{
	int count, mtu = 65535;
@@ -348,6 +342,7 @@ struct net_device *alloc_arcdev(const char *name)
			   arcdev_setup);
	if (dev) {
		struct arcnet_local *lp = netdev_priv(dev);

		spin_lock_init(&lp->lock);
	}

@@ -380,7 +375,6 @@ int arcnet_open(struct net_device *dev)
		BUGMSG2(D_PROTO, "\n");
	}


	BUGMSG(D_INIT, "arcnet_open: resetting card.\n");

	/* try to put the card in a defined state - if it fails the first
@@ -437,7 +431,6 @@ int arcnet_open(struct net_device *dev)
		ACOMMAND(CFLAGScmd | RESETclear);
	}


	BUGMSG(D_DEBUG, "%s: %d: %s\n", __FILE__, __LINE__, __func__);
	/* make sure we're ready to receive IRQ's. */
	AINTMASK(0);
@@ -459,7 +452,6 @@ int arcnet_open(struct net_device *dev)
	return error;
}


/* The inverse routine to arcnet_open - shuts down the card. */
int arcnet_close(struct net_device *dev)
{
@@ -479,7 +471,6 @@ int arcnet_close(struct net_device *dev)
	return 0;
}


static int arcnet_header(struct sk_buff *skb, struct net_device *dev,
			 unsigned short type, const void *daddr,
			 const void *saddr, unsigned len)
@@ -498,7 +489,6 @@ static int arcnet_header(struct sk_buff *skb, struct net_device *dev,
		BUGMSG(D_NORMAL, "arcnet_header: Yikes!  skb->len(%d) != len(%d)!\n",
		       skb->len, len);


	/* Type is host order - ? */
	if (type == ETH_P_ARCNET) {
		proto = arc_raw_proto;
@@ -622,7 +612,6 @@ netdev_tx_t arcnet_send_packet(struct sk_buff *skb,
	return retval;		/* no need to try again */
}


/*
 * Actually start transmitting a packet that was loaded into a buffer
 * by prepare_tx.  This should _only_ be called by the interrupt handler.
@@ -654,7 +643,6 @@ static int go_tx(struct net_device *dev)
	return 1;
}


/* Called by the kernel when transmit times out */
void arcnet_timeout(struct net_device *dev)
{
@@ -691,7 +679,6 @@ void arcnet_timeout(struct net_device *dev)
		netif_wake_queue(dev);
}


/*
 * The typical workload of the driver: Handle the network interface
 * interrupts. Establish which device needs attention, and call the correct
@@ -787,7 +774,6 @@ irqreturn_t arcnet_interrupt(int irq, void *dev_id)
			didsomething++;
		}


		/* a transmit finished, and we're interested in it. */
		if ((status & lp->intmask & TXFREEflag) || lp->timed_out) {
			lp->intmask &= ~(TXFREEflag | EXCNAKflag);
@@ -814,6 +800,7 @@ irqreturn_t arcnet_interrupt(int irq, void *dev_id)
				if (lp->outgoing.proto &&
				    lp->outgoing.proto->ack_tx) {
					int ackstatus;

					if (status & TXACKflag)
						ackstatus = 2;
					else if (lp->excnak_pending)
@@ -838,6 +825,7 @@ irqreturn_t arcnet_interrupt(int irq, void *dev_id)
			/* continue a split packet, if any */
			if (lp->outgoing.proto && lp->outgoing.proto->continue_tx) {
				int txbuf = get_arcbuf(dev);

				if (txbuf != -1) {
					if (lp->outgoing.proto->continue_tx(dev, txbuf)) {
						/* that was the last segment */
@@ -930,7 +918,6 @@ irqreturn_t arcnet_interrupt(int irq, void *dev_id)
	       ASTATUS(), boguscount);
	BUGMSG(D_DURING, "\n");


	AINTMASK(0);
	udelay(1);
	AINTMASK(lp->intmask);
@@ -939,7 +926,6 @@ irqreturn_t arcnet_interrupt(int irq, void *dev_id)
	return retval;
}


/*
 * This is a generic packet receiver that calls arcnet??_rx depending on the
 * protocol ID found.
@@ -1002,7 +988,6 @@ static void arcnet_rx(struct net_device *dev, int bufnum)
	arc_proto_map[soft->proto]->rx(dev, bufnum, &pkt, length);
}


static void null_rx(struct net_device *dev, int bufnum,
		    struct archdr *pkthdr, int length)
{
@@ -1011,7 +996,6 @@ static void null_rx(struct net_device *dev, int bufnum,
	       pkthdr->soft.rfc1201.proto, pkthdr->hard.source);
}


static int null_build_header(struct sk_buff *skb, struct net_device *dev,
			     unsigned short type, uint8_t daddr)
{
@@ -1025,7 +1009,6 @@ static int null_build_header(struct sk_buff *skb, struct net_device *dev,
	return 0;
}


/* the "do nothing" prepare_tx function warns that there's nothing to do. */
static int null_prepare_tx(struct net_device *dev, struct archdr *pkt,
			   int length, int bufnum)
+0 −3
Original line number Diff line number Diff line
@@ -90,7 +90,6 @@ static void rx(struct net_device *dev, int bufnum,
	netif_rx(skb);
}


/*
 * Create the ARCnet hard/soft headers for cap mode.
 * There aren't any soft headers in cap mode - not even the protocol id.
@@ -130,7 +129,6 @@ static int build_header(struct sk_buff *skb,
	return hdr_size;	/* success */
}


static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
		      int bufnum)
{
@@ -138,7 +136,6 @@ static int prepare_tx(struct net_device *dev, struct archdr *pkt, int length,
	struct arc_hardware *hard = &pkt->hard;
	int ofs;


	/* hard header is not included in packet length */
	length -= ARC_HDR_SIZE;
	/* And neither is the cookie field */
+0 −1
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@

#define VERSION "arcnet: COM20020 ISA support (by David Woodhouse et al.)\n"


/*
 * We cannot (yet) probe for an IO mapped card, although we can check that
 * it's where we were told it was, and even do autoirq.
Loading