All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 2/3] ARM: cache-uniphier: refactor jump label to follow coding style guideline
Date: Fri, 4 Nov 2016 21:50:56 +0900	[thread overview]
Message-ID: <CAK7LNAQKCW2tDXEia7qZ+d9Xy1_ccHSGCat4=w+nfyHiuTHy6w@mail.gmail.com> (raw)
In-Reply-To: <20161104122322.GB1041@n2100.armlinux.org.uk>

Hi Russell,

2016-11-04 21:23 GMT+09:00 Russell King - ARM Linux <linux@armlinux.org.uk>:
> On Fri, Nov 04, 2016 at 08:43:35PM +0900, Masahiro Yamada wrote:
>> Documentation/CodingStyle recommends to use label names which say
>> what the goto does or why the goto exists.
>>
>> Just in case, split it up into three labels because the CodingStyle
>> says "one err bugs" is a common type of bug (although, I do not
>> believe the current code includes such a bug).
>
> However, this has the effect of making the code unnecessarily more
> complicated, which is a bad thing.  Avoiding unnecessary code
> complexity wins over style rules.


I thought this patch is stupid, but makes the code more straight-forward;
the failure path only calls really needed iounmap/kfree()
without exploiting that NULL input makes them no-op.



-- 
Best Regards
Masahiro Yamada

WARNING: multiple messages have this Message-ID (diff)
From: yamada.masahiro@socionext.com (Masahiro Yamada)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] ARM: cache-uniphier: refactor jump label to follow coding style guideline
Date: Fri, 4 Nov 2016 21:50:56 +0900	[thread overview]
Message-ID: <CAK7LNAQKCW2tDXEia7qZ+d9Xy1_ccHSGCat4=w+nfyHiuTHy6w@mail.gmail.com> (raw)
In-Reply-To: <20161104122322.GB1041@n2100.armlinux.org.uk>

Hi Russell,

2016-11-04 21:23 GMT+09:00 Russell King - ARM Linux <linux@armlinux.org.uk>:
> On Fri, Nov 04, 2016 at 08:43:35PM +0900, Masahiro Yamada wrote:
>> Documentation/CodingStyle recommends to use label names which say
>> what the goto does or why the goto exists.
>>
>> Just in case, split it up into three labels because the CodingStyle
>> says "one err bugs" is a common type of bug (although, I do not
>> believe the current code includes such a bug).
>
> However, this has the effect of making the code unnecessarily more
> complicated, which is a bad thing.  Avoiding unnecessary code
> complexity wins over style rules.


I thought this patch is stupid, but makes the code more straight-forward;
the failure path only calls really needed iounmap/kfree()
without exploiting that NULL input makes them no-op.



-- 
Best Regards
Masahiro Yamada

  reply	other threads:[~2016-11-04 12:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-04 11:43 [PATCH 0/3] ARM: cache-uniphier: slight cleanups and trivial coding style fix Masahiro Yamada
2016-11-04 11:43 ` Masahiro Yamada
2016-11-04 11:43 ` [PATCH 1/3] ARM: cache-uniphier: call kzalloc() after DT property parsing Masahiro Yamada
2016-11-04 11:43   ` Masahiro Yamada
2016-11-04 11:43 ` [PATCH 2/3] ARM: cache-uniphier: refactor jump label to follow coding style guideline Masahiro Yamada
2016-11-04 11:43   ` Masahiro Yamada
2016-11-04 12:23   ` Russell King - ARM Linux
2016-11-04 12:23     ` Russell King - ARM Linux
2016-11-04 12:50     ` Masahiro Yamada [this message]
2016-11-04 12:50       ` Masahiro Yamada
2016-11-04 13:32       ` Russell King - ARM Linux
2016-11-04 13:32         ` Russell King - ARM Linux
2016-11-05  3:17         ` Masahiro Yamada
2016-11-05  3:17           ` Masahiro Yamada
2016-11-04 11:43 ` [PATCH 3/3] ARM: cache-uniphier: clean up active way setup code Masahiro Yamada
2016-11-04 11:43   ` Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAK7LNAQKCW2tDXEia7qZ+d9Xy1_ccHSGCat4=w+nfyHiuTHy6w@mail.gmail.com' \
    --to=yamada.masahiro@socionext.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.