diff options
author | Ben Pfaff <blp@nicira.com> | 2013-12-18 09:20:49 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2013-12-18 15:43:43 -0800 |
commit | 4b6ab2b0ae49194e4ff78cc005921286aa9be140 (patch) | |
tree | 9c0403b8c3dbc8d9f1175a6117f30ab0ab52561d /ofproto/ofproto-dpif-mirror.c | |
parent | d893c3e0afe2e337d4399bbea20970de1a06cf6b (diff) | |
download | openvswitch-4b6ab2b0ae49194e4ff78cc005921286aa9be140.tar.gz |
ofproto-dpif: Get rid of mirror_mask_ffs() function.
There's no need for it because we have the equivalent (actually more
convenient) function raw_ctz(), which works with any integer type.
Signed-off-by: Ben Pfaff <blp@nicira.com>
CC: Alin Serdean <aserdean@cloudbasesolutions.com>
CC: Gurucharan Shetty <shettyg@nicira.com>
Diffstat (limited to 'ofproto/ofproto-dpif-mirror.c')
-rw-r--r-- | ofproto/ofproto-dpif-mirror.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ofproto/ofproto-dpif-mirror.c b/ofproto/ofproto-dpif-mirror.c index 0819b726e..99172dd55 100644 --- a/ofproto/ofproto-dpif-mirror.c +++ b/ofproto/ofproto-dpif-mirror.c @@ -75,7 +75,6 @@ static void mbundle_lookup_multiple(const struct mbridge *, struct ofbundle **, size_t n_bundles, struct hmapx *mbundles); static int mirror_scan(struct mbridge *); static void mirror_update_dups(struct mbridge *); -static int mirror_mask_ffs(mirror_mask_t); struct mbridge * mbridge_create(void) @@ -363,7 +362,7 @@ mirror_update_stats(struct mbridge *mbridge, mirror_mask_t mirrors, for (; mirrors; mirrors = zero_rightmost_1bit(mirrors)) { struct mirror *m; - m = mbridge->mirrors[mirror_mask_ffs(mirrors) - 1]; + m = mbridge->mirrors[raw_ctz(mirrors)]; if (!m) { /* In normal circumstances 'm' will not be NULL. However, |