mirror of https://github.com/xemu-project/xemu.git
rocker: Use DIV_ROUND_UP
Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d). This patch is the result of coccinelle script scripts/coccinelle/round.cocci CC: Scott Feldman <sfeldma@gmail.com> Signed-off-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
5d61cafd0b
commit
df5d1c17b6
|
@ -103,9 +103,8 @@ typedef struct of_dpa_flow_key {
|
||||||
|
|
||||||
/* Width of key which includes field 'f' in u64s, rounded up */
|
/* Width of key which includes field 'f' in u64s, rounded up */
|
||||||
#define FLOW_KEY_WIDTH(f) \
|
#define FLOW_KEY_WIDTH(f) \
|
||||||
((offsetof(OfDpaFlowKey, f) + \
|
DIV_ROUND_UP(offsetof(OfDpaFlowKey, f) + sizeof(((OfDpaFlowKey *)0)->f), \
|
||||||
sizeof(((OfDpaFlowKey *)0)->f) + \
|
sizeof(uint64_t))
|
||||||
sizeof(uint64_t) - 1) / sizeof(uint64_t))
|
|
||||||
|
|
||||||
typedef struct of_dpa_flow_action {
|
typedef struct of_dpa_flow_action {
|
||||||
uint32_t goto_tbl;
|
uint32_t goto_tbl;
|
||||||
|
|
Loading…
Reference in New Issue