diff mbox series

[ovs-dev] fix coding style in bridge_configure_rstp() function.

Message ID ME3PR01MB578142DE8D8375516E1594ECCD3F9@ME3PR01MB5781.ausprd01.prod.outlook.com
State Changes Requested
Headers show
Series [ovs-dev] fix coding style in bridge_configure_rstp() function. | expand

Commit Message

miterv@outlook.com May 31, 2021, 12:20 p.m. UTC
This patch fix the style of bridge_configure_rstp() function.

Signed-off-by: linhuang <linhuang@ruijie.com.cn>
---
  vswitchd/bridge.c | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Kevin Traynor May 31, 2021, 1:14 p.m. UTC | #1
On 31/05/2021 13:20, miter wrote:
> This patch fix the style of bridge_configure_rstp() function.
> 
> Signed-off-by: linhuang <linhuang@ruijie.com.cn>
> ---
>   vswitchd/bridge.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
> index 5ed7e8234..4ada54475 100644
> --- a/vswitchd/bridge.c
> +++ b/vswitchd/bridge.c
> @@ -1883,14 +1883,12 @@ bridge_configure_rstp(struct bridge *br, bool enable_rstp)
> 
>               if (eth_addr_from_string(config_str, &ea)) {
>                   br_s.address = eth_addr_to_uint64(ea);
> -            }
> -            else {
> +            } else {
>                   br_s.address = eth_addr_to_uint64(br->ea);
>                   VLOG_ERR("bridge %s: invalid rstp-address, defaulting "
>                           "to "ETH_ADDR_FMT, br->name, ETH_ADDR_ARGS(br->ea));
>               }
> -        }
> -        else {
> +        } else {
>               br_s.address = eth_addr_to_uint64(br->ea);
>           }
> 

Hello. This v2 patch is still corrupt. Please check Ben's previous mail
to other patches with similar whitespace issues.

On the change itself, while you are correct about the coding standards,
i'm not sure that it's worth individual fixes for these. The current
code is not so bad that it's confusing and it might be better fixing
things like this when there are some other related changes in the
function etc. or else all of them together.

Other more general arguments for not having small coding standards
changes like this in isolation are that it can create more work for
backporting future bugfixes, it's an additional step when using 'git
blame' and most importantly it's another patch for the overworked
maintainers to process.
diff mbox series

Patch

diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 5ed7e8234..4ada54475 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -1883,14 +1883,12 @@  bridge_configure_rstp(struct bridge *br, bool enable_rstp)

              if (eth_addr_from_string(config_str, &ea)) {
                  br_s.address = eth_addr_to_uint64(ea);
-            }
-            else {
+            } else {
                  br_s.address = eth_addr_to_uint64(br->ea);
                  VLOG_ERR("bridge %s: invalid rstp-address, defaulting "
                          "to "ETH_ADDR_FMT, br->name, ETH_ADDR_ARGS(br->ea));
              }
-        }
-        else {
+        } else {
              br_s.address = eth_addr_to_uint64(br->ea);
          }