Skip to content

Commit

Permalink
ieee1394: Use DIV_ROUND_UP
Browse files Browse the repository at this point in the history
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
  • Loading branch information
Julia Lawall authored and Stefan Richter committed Oct 15, 2008
1 parent 3fa8749 commit 68e2aa7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/ieee1394/csr1212.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static const u8 csr1212_key_id_type_map[0x30] = {


#define quads_to_bytes(_q) ((_q) * sizeof(u32))
#define bytes_to_quads(_b) (((_b) + sizeof(u32) - 1) / sizeof(u32))
#define bytes_to_quads(_b) DIV_ROUND_UP(_b, sizeof(u32))

static void free_keyval(struct csr1212_keyval *kv)
{
Expand Down
2 changes: 1 addition & 1 deletion drivers/ieee1394/eth1394.c
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ static unsigned int ether1394_encapsulate_prep(unsigned int max_payload,
hdr->ff.dgl = dgl;
adj_max_payload = max_payload - hdr_type_len[ETH1394_HDR_LF_FF];
}
return (dg_size + adj_max_payload - 1) / adj_max_payload;
return DIV_ROUND_UP(dg_size, adj_max_payload);
}

static unsigned int ether1394_encapsulate(struct sk_buff *skb,
Expand Down

0 comments on commit 68e2aa7

Please sign in to comment.