diff options
author | Julia Lawall <julia@diku.dk> | 2008-08-02 11:13:09 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2008-10-15 16:21:07 -0400 |
commit | 68e2aa793ed55b0c1461b4ab92554bb5ad152724 (patch) | |
tree | 608f2bf87082ee6f23d4336fa382792f7d08b117 /drivers | |
parent | 3fa8749e584b55f1180411ab1b51117190bac1e5 (diff) |
ieee1394: Use DIV_ROUND_UP
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ieee1394/csr1212.c | 2 | ||||
-rw-r--r-- | drivers/ieee1394/eth1394.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ieee1394/csr1212.c b/drivers/ieee1394/csr1212.c index 9f95337139e3..5e38a68b8af2 100644 --- a/drivers/ieee1394/csr1212.c +++ b/drivers/ieee1394/csr1212.c | |||
@@ -84,7 +84,7 @@ static const u8 csr1212_key_id_type_map[0x30] = { | |||
84 | 84 | ||
85 | 85 | ||
86 | #define quads_to_bytes(_q) ((_q) * sizeof(u32)) | 86 | #define quads_to_bytes(_q) ((_q) * sizeof(u32)) |
87 | #define bytes_to_quads(_b) (((_b) + sizeof(u32) - 1) / sizeof(u32)) | 87 | #define bytes_to_quads(_b) DIV_ROUND_UP(_b, sizeof(u32)) |
88 | 88 | ||
89 | static void free_keyval(struct csr1212_keyval *kv) | 89 | static void free_keyval(struct csr1212_keyval *kv) |
90 | { | 90 | { |
diff --git a/drivers/ieee1394/eth1394.c b/drivers/ieee1394/eth1394.c index b166b3575fa6..20128692b339 100644 --- a/drivers/ieee1394/eth1394.c +++ b/drivers/ieee1394/eth1394.c | |||
@@ -1361,7 +1361,7 @@ static unsigned int ether1394_encapsulate_prep(unsigned int max_payload, | |||
1361 | hdr->ff.dgl = dgl; | 1361 | hdr->ff.dgl = dgl; |
1362 | adj_max_payload = max_payload - hdr_type_len[ETH1394_HDR_LF_FF]; | 1362 | adj_max_payload = max_payload - hdr_type_len[ETH1394_HDR_LF_FF]; |
1363 | } | 1363 | } |
1364 | return (dg_size + adj_max_payload - 1) / adj_max_payload; | 1364 | return DIV_ROUND_UP(dg_size, adj_max_payload); |
1365 | } | 1365 | } |
1366 | 1366 | ||
1367 | static unsigned int ether1394_encapsulate(struct sk_buff *skb, | 1367 | static unsigned int ether1394_encapsulate(struct sk_buff *skb, |