[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ade665cbfa138d1851343576caad84a61e904c46.camel@perches.com>
Date: Mon, 14 Dec 2020 08:46:30 -0800
From: Joe Perches <joe@...ches.com>
To: Bean Huo <huobean@...il.com>, alim.akhtar@...sung.com,
avri.altman@....com, asutoshd@...eaurora.org, jejb@...ux.ibm.com,
martin.petersen@...cle.com, stanley.chu@...iatek.com,
beanhuo@...ron.com, bvanassche@....org, tomas.winkler@...el.com,
cang@...eaurora.org, rostedt@...dmis.org
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/6] scsi: ufs: Remove stringize operator '#'
restriction
On Mon, 2020-12-14 at 17:14 +0100, Bean Huo wrote:
> From: Bean Huo <beanhuo@...ron.com>
>
> Current EM macro definition, we use stringize operator '#', which turns
> the argument it precedes into a quoted string. Thus requires the symbol
> of __print_symbolic() should be the string corresponding to the name of
> the enum.
>
> However, we have other cases, the symbol and enum name are not the same,
> we can redefine EM/EMe, but there will introduce some redundant codes.
> This patch is to remove this restriction, let others reuse the current
> EM/EMe definition.
I think the other way (adding new definitions for the cases when the
name and string are different) is less error prone.
> diff --git a/include/trace/events/ufs.h b/include/trace/events/ufs.h
[]
> +#define UFS_LINK_STATES \
> + EM(UIC_LINK_OFF_STATE, "UIC_LINK_OFF_STATE") \
> + EM(UIC_LINK_ACTIVE_STATE, "UIC_LINK_ACTIVE_STATE,") \
For instance:
Like here where you added an unnecessary and unwanted comma
Powered by blists - more mailing lists