Commit efbeccf1 authored by Stefan Richter's avatar Stefan Richter

ieee1394: eth1394: coding style

Adjust white space and line wraps.  Remove unnecessary parentheses and
braces, unused macros, and some of the more redundant comments.
Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
parent 09d7a96f
This diff is collapsed.
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#define __ETH1394_H #define __ETH1394_H
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/skbuff.h>
#include <asm/byteorder.h>
#include "ieee1394.h" #include "ieee1394.h"
#include "ieee1394_types.h" #include "ieee1394_types.h"
...@@ -35,22 +37,15 @@ ...@@ -35,22 +37,15 @@
/* GASP identifier numbers for IPv4 over IEEE 1394 */ /* GASP identifier numbers for IPv4 over IEEE 1394 */
#define ETHER1394_GASP_SPECIFIER_ID 0x00005E #define ETHER1394_GASP_SPECIFIER_ID 0x00005E
#define ETHER1394_GASP_SPECIFIER_ID_HI ((ETHER1394_GASP_SPECIFIER_ID >> 8) & 0xffff) #define ETHER1394_GASP_SPECIFIER_ID_HI ((0x00005E >> 8) & 0xffff)
#define ETHER1394_GASP_SPECIFIER_ID_LO (ETHER1394_GASP_SPECIFIER_ID & 0xff) #define ETHER1394_GASP_SPECIFIER_ID_LO (0x00005E & 0xff)
#define ETHER1394_GASP_VERSION 1 #define ETHER1394_GASP_VERSION 1
#define ETHER1394_GASP_OVERHEAD (2 * sizeof(quadlet_t)) /* GASP header overhead */ #define ETHER1394_GASP_OVERHEAD (2 * sizeof(quadlet_t)) /* for GASP header */
#define ETHER1394_GASP_BUFFERS 16 #define ETHER1394_GASP_BUFFERS 16
/* rawiso buffer size - due to a limitation in rawiso, we must limit each #define NODE_SET (ALL_NODES + 1) /* Node set == 64 */
* GASP buffer to be less than PAGE_SIZE. */
#define ETHER1394_ISO_BUF_SIZE ETHER1394_GASP_BUFFERS * \
min((unsigned int)PAGE_SIZE, \
2 * (1U << (priv->host->csr.max_rec + 1)))
/* Node set == 64 */
#define NODE_SET (ALL_NODES + 1)
enum eth1394_bc_states { ETHER1394_BC_ERROR, enum eth1394_bc_states { ETHER1394_BC_ERROR,
ETHER1394_BC_RUNNING, ETHER1394_BC_RUNNING,
...@@ -86,19 +81,14 @@ struct eth1394hdr { ...@@ -86,19 +81,14 @@ struct eth1394hdr {
unsigned short h_proto; /* packet type ID field */ unsigned short h_proto; /* packet type ID field */
} __attribute__((packed)); } __attribute__((packed));
#ifdef __KERNEL__
#include <linux/skbuff.h>
static inline struct eth1394hdr *eth1394_hdr(const struct sk_buff *skb) static inline struct eth1394hdr *eth1394_hdr(const struct sk_buff *skb)
{ {
return (struct eth1394hdr *)skb_mac_header(skb); return (struct eth1394hdr *)skb_mac_header(skb);
} }
#endif
typedef enum {ETH1394_GASP, ETH1394_WRREQ} eth1394_tx_type; typedef enum {ETH1394_GASP, ETH1394_WRREQ} eth1394_tx_type;
/* IP1394 headers */ /* IP1394 headers */
#include <asm/byteorder.h>
/* Unfragmented */ /* Unfragmented */
#if defined __BIG_ENDIAN_BITFIELD #if defined __BIG_ENDIAN_BITFIELD
......
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