[ovs-dev] [PATCH 1/3] netdev: Indentation and style fixes.
Gregory Rose
gvrose8192 at gmail.com
Tue Nov 14 21:24:03 UTC 2017
On 11/13/2017 2:04 PM, Ben Pfaff wrote:
> White space changes only.
>
> Signed-off-by: Ben Pfaff <blp at ovn.org>
> ---
> lib/netdev.c | 30 +++++++++++++++---------------
> 1 file changed, 15 insertions(+), 15 deletions(-)
>
> diff --git a/lib/netdev.c b/lib/netdev.c
> index 0c1545a83e3d..7792b1b75681 100644
> --- a/lib/netdev.c
> +++ b/lib/netdev.c
> @@ -2190,11 +2190,11 @@ netdev_ports_lookup(odp_port_t port_no, const struct dpif_class *dpif_class)
> size_t hash = NETDEV_PORTS_HASH_INT(port_no, dpif_class);
> struct port_to_netdev_data *data;
>
> - HMAP_FOR_EACH_WITH_HASH(data, node, hash, &port_to_netdev) {
> - if (data->dpif_class == dpif_class
> - && data->dpif_port.port_no == port_no) {
> - return data;
> - }
> + HMAP_FOR_EACH_WITH_HASH (data, node, hash, &port_to_netdev) {
> + if (data->dpif_class == dpif_class
> + && data->dpif_port.port_no == port_no) {
> + return data;
> + }
> }
> return NULL;
> }
> @@ -2311,10 +2311,10 @@ netdev_ifindex_to_odp_port(int ifindex)
>
> ovs_mutex_lock(&netdev_hmap_mutex);
> HMAP_FOR_EACH_WITH_HASH(data, node, ifindex, &ifindex_to_port) {
> - if (data->ifindex == ifindex) {
> - ret = data->port;
> - break;
> - }
> + if (data->ifindex == ifindex) {
> + ret = data->port;
> + break;
> + }
> }
> ovs_mutex_unlock(&netdev_hmap_mutex);
>
> @@ -2327,7 +2327,7 @@ netdev_ports_flow_flush(const struct dpif_class *dpif_class)
> struct port_to_netdev_data *data;
>
> ovs_mutex_lock(&netdev_hmap_mutex);
> - HMAP_FOR_EACH(data, node, &port_to_netdev) {
> + HMAP_FOR_EACH (data, node, &port_to_netdev) {
> if (data->dpif_class == dpif_class) {
> netdev_flow_flush(data->netdev);
> }
> @@ -2344,7 +2344,7 @@ netdev_ports_flow_dump_create(const struct dpif_class *dpif_class, int *ports)
> int i = 0;
>
> ovs_mutex_lock(&netdev_hmap_mutex);
> - HMAP_FOR_EACH(data, node, &port_to_netdev) {
> + HMAP_FOR_EACH (data, node, &port_to_netdev) {
> if (data->dpif_class == dpif_class) {
> count++;
> }
> @@ -2352,7 +2352,7 @@ netdev_ports_flow_dump_create(const struct dpif_class *dpif_class, int *ports)
>
> dumps = count ? xzalloc(sizeof *dumps * count) : NULL;
>
> - HMAP_FOR_EACH(data, node, &port_to_netdev) {
> + HMAP_FOR_EACH (data, node, &port_to_netdev) {
> if (data->dpif_class == dpif_class) {
> if (netdev_flow_dump_create(data->netdev, &dumps[i])) {
> continue;
> @@ -2376,7 +2376,7 @@ netdev_ports_flow_del(const struct dpif_class *dpif_class,
> struct port_to_netdev_data *data;
>
> ovs_mutex_lock(&netdev_hmap_mutex);
> - HMAP_FOR_EACH(data, node, &port_to_netdev) {
> + HMAP_FOR_EACH (data, node, &port_to_netdev) {
> if (data->dpif_class == dpif_class
> && !netdev_flow_del(data->netdev, ufid, stats)) {
> ovs_mutex_unlock(&netdev_hmap_mutex);
> @@ -2396,7 +2396,7 @@ netdev_ports_flow_get(const struct dpif_class *dpif_class, struct match *match,
> struct port_to_netdev_data *data;
>
> ovs_mutex_lock(&netdev_hmap_mutex);
> - HMAP_FOR_EACH(data, node, &port_to_netdev) {
> + HMAP_FOR_EACH (data, node, &port_to_netdev) {
> if (data->dpif_class == dpif_class
> && !netdev_flow_get(data->netdev, match, actions,
> ufid, stats, buf)) {
> @@ -2415,7 +2415,7 @@ netdev_ports_flow_init(void)
> struct port_to_netdev_data *data;
>
> ovs_mutex_lock(&netdev_hmap_mutex);
> - HMAP_FOR_EACH(data, node, &port_to_netdev) {
> + HMAP_FOR_EACH (data, node, &port_to_netdev) {
> netdev_init_flow_api(data->netdev);
> }
> ovs_mutex_unlock(&netdev_hmap_mutex);
LGTM
Reviewed-by: Greg Rose <gvrose8192 at gmail.com>
More information about the dev
mailing list