All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: Stephen Boyd <swboyd@chromium.org>
Cc: Andy Gross <andy.gross@linaro.org>,
	linux-arm-msm@vger.kernel.org,
	LKML <linux-kernel@vger.kernel.org>,
	Karthikeyan Ramasubramanian <kramasub@codeaurora.org>,
	Sagar Dharia <sdharia@codeaurora.org>,
	Girish Mahadevan <girishm@codeaurora.org>
Subject: Re: [PATCH] soc: qcom: geni: Make version macros simpler
Date: Mon, 21 May 2018 12:31:17 -0700	[thread overview]
Message-ID: <CAD=FV=VkNqrosH+ktqe_TT2MEeYcV36J6+yVpuc=hp0oKJcX=Q@mail.gmail.com> (raw)
In-Reply-To: <20180518224750.232742-1-swboyd@chromium.org>

Hi,

On Fri, May 18, 2018 at 3:47 PM, Stephen Boyd <swboyd@chromium.org> wrote:
> This macro doesn't work, because it hides a local variable inside of the
> macro to hold the version and that variable name is called 'ver' and
> 'version' sometimes.
>
> Let's change this to be more explicit. Introduce three macros for the
> major, minor, and step of the version, and require callers to pass the
> version in to get the part of the version out. This way we don't hide
> local variables inside macros and things are less evil overall.
>
> Cc: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
> Cc: Sagar Dharia <sdharia@codeaurora.org>
> Cc: Girish Mahadevan <girishm@codeaurora.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> ---
>  include/linux/qcom-geni-se.h | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)

FWIW I agree that Stephen's patch makes things more readable.

Reviewed-by: Douglas Anderson <dianders@chromium.org>

  reply	other threads:[~2018-05-21 19:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-18 22:47 [PATCH] soc: qcom: geni: Make version macros simpler Stephen Boyd
2018-05-21 19:31 ` Doug Anderson [this message]
2018-06-22 16:54 ` Bjorn Andersson
2018-06-22 17:39   ` Stephen Boyd

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='CAD=FV=VkNqrosH+ktqe_TT2MEeYcV36J6+yVpuc=hp0oKJcX=Q@mail.gmail.com' \
    --to=dianders@chromium.org \
    --cc=andy.gross@linaro.org \
    --cc=girishm@codeaurora.org \
    --cc=kramasub@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sdharia@codeaurora.org \
    --cc=swboyd@chromium.org \
    /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.