lkml.org 
[lkml]   [2018]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] soc: qcom: geni: Make version macros simpler
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>

\
 
 \ /
  Last update: 2018-05-21 21:31    [W:0.054 / U:4.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site