Commit e05ddeb9 authored by Ben Collins's avatar Ben Collins

IEEE1394(r1169): Trivial cleanups.

parent 3bbd038f
...@@ -1483,7 +1483,6 @@ static inline struct hpsb_packet *ether1394_alloc_common_packet(struct hpsb_host ...@@ -1483,7 +1483,6 @@ static inline struct hpsb_packet *ether1394_alloc_common_packet(struct hpsb_host
p = hpsb_alloc_packet(0); p = hpsb_alloc_packet(0);
if (p) { if (p) {
p->host = host; p->host = host;
p->data = NULL;
p->generation = get_hpsb_generation(host); p->generation = get_hpsb_generation(host);
p->type = hpsb_async; p->type = hpsb_async;
} }
...@@ -1514,7 +1513,7 @@ static inline int ether1394_prep_write_packet(struct hpsb_packet *p, ...@@ -1514,7 +1513,7 @@ static inline int ether1394_prep_write_packet(struct hpsb_packet *p,
| (1 << 8) | (TCODE_WRITEB << 4); | (1 << 8) | (TCODE_WRITEB << 4);
p->header[3] = tx_len << 16; p->header[3] = tx_len << 16;
p->data_size = tx_len + (tx_len % 4 ? 4 - (tx_len % 4) : 0); p->data_size = (tx_len + 3) & ~3;
p->data = (quadlet_t*)data; p->data = (quadlet_t*)data;
return 0; return 0;
......
...@@ -268,7 +268,7 @@ struct hpsb_packet *hpsb_make_readpacket(struct hpsb_host *host, nodeid_t node, ...@@ -268,7 +268,7 @@ struct hpsb_packet *hpsb_make_readpacket(struct hpsb_host *host, nodeid_t node,
if (length == 0) if (length == 0)
return NULL; return NULL;
packet = hpsb_alloc_packet(length + (length % 4 ? 4 - (length % 4) : 0)); packet = hpsb_alloc_packet((length + 3) & ~3);
if (!packet) if (!packet)
return NULL; return NULL;
...@@ -296,7 +296,7 @@ struct hpsb_packet *hpsb_make_writepacket (struct hpsb_host *host, nodeid_t node ...@@ -296,7 +296,7 @@ struct hpsb_packet *hpsb_make_writepacket (struct hpsb_host *host, nodeid_t node
if (length == 0) if (length == 0)
return NULL; return NULL;
packet = hpsb_alloc_packet(length + (length % 4 ? 4 - (length % 4) : 0)); packet = hpsb_alloc_packet((length + 3) & ~3);
if (!packet) if (!packet)
return NULL; return NULL;
...@@ -330,7 +330,7 @@ struct hpsb_packet *hpsb_make_streampacket(struct hpsb_host *host, u8 *buffer, i ...@@ -330,7 +330,7 @@ struct hpsb_packet *hpsb_make_streampacket(struct hpsb_host *host, u8 *buffer, i
if (length == 0) if (length == 0)
return NULL; return NULL;
packet = hpsb_alloc_packet(length + (length % 4 ? 4 - (length % 4) : 0)); packet = hpsb_alloc_packet((length + 3) & ~3);
if (!packet) if (!packet)
return NULL; return NULL;
......
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