From: "Winkler, Tomas" <tomas.winkler@intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Usyskin, Alexander" <alexander.usyskin@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
"Vivi, Rodrigo" <rodrigo.vivi@intel.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
"Tvrtko Ursulin" <tvrtko.ursulin@linux.intel.com>,
"Lubart, Vitaly" <vitaly.lubart@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v3 13/14] mei: debugfs: add pxp mode to devstate in debugfs
Date: Wed, 29 Jun 2022 08:37:13 +0000 [thread overview]
Message-ID: <c23228be48c0416fbec7937c6008a204@intel.com> (raw)
In-Reply-To: <Yrm4aZa4y6nwJBva@kroah.com>
>
> On Sun, Jun 19, 2022 at 04:37:20PM +0300, Alexander Usyskin wrote:
> > From: Tomas Winkler <tomas.winkler@intel.com>
> >
> > CC: Vitaly Lubart <vitaly.lubart@intel.com>
> > Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
>
> We can not take patches without any changelog text, you know this :(
Okay, will add some more info.
>
> > ---
> > drivers/misc/mei/debugfs.c | 17 +++++++++++++++++
> > 1 file changed, 17 insertions(+)
> >
> > diff --git a/drivers/misc/mei/debugfs.c b/drivers/misc/mei/debugfs.c
> > index 1ce61e9e24fc..4074fec866a6 100644
> > --- a/drivers/misc/mei/debugfs.c
> > +++ b/drivers/misc/mei/debugfs.c
> > @@ -86,6 +86,20 @@ static int mei_dbgfs_active_show(struct seq_file
> > *m, void *unused) } DEFINE_SHOW_ATTRIBUTE(mei_dbgfs_active);
> >
> > +static const char *mei_dev_pxp_mode_str(enum mei_dev_pxp_mode
> state)
> > +{ #define MEI_PXP_MODE(state) case MEI_DEV_PXP_##state: return
> #state
> > + switch (state) {
> > + MEI_PXP_MODE(DEFAULT);
> > + MEI_PXP_MODE(INIT);
> > + MEI_PXP_MODE(SETUP);
> > + MEI_PXP_MODE(READY);
>
> Just spell out the case and return lines, don't create macros for no good
> reason please.
We use those print macros paradigm consistently int the code, the macro has a very limited scope.
We are aware of wrong sides of macros but this just little of synthetic sugar no some wild usage.
We believe it helps readability, and it keeps the code consistent.
Other usages:
hbm.c:#define MEI_HBM_STATUS(status) case MEI_HBMS_##status: return #status
hbm.c:#define MEI_CL_CS(status) case MEI_CL_CONN_##status: return #status
hbm.c:#define MEI_HBM_STATE(state) case MEI_HBM_##state: return #state
init.c:#define MEI_DEV_STATE(state) case MEI_DEV_##state: return #state
init.c:#define MEI_PG_STATE(state) case MEI_PG_##state: return #state
Thanks
Tomas
next prev parent reply other threads:[~2022-06-29 8:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-19 13:37 [PATCH v3 00/14] GSC support for XeHP SDV and DG2 platforms Alexander Usyskin
2022-06-19 13:37 ` [PATCH v3 01/14] HAX: drm/i915: force INTEL_MEI_GSC on for CI Alexander Usyskin
2022-06-19 13:37 ` [PATCH v3 02/14] drm/i915/gsc: skip irq initialization if using polling Alexander Usyskin
2022-06-19 13:37 ` [PATCH v3 03/14] drm/i915/gsc: add slow_fw flag to the mei auxiliary device Alexander Usyskin
2022-06-19 13:37 ` [PATCH v3 04/14] drm/i915/gsc: add slow_fw flag to the gsc device definition Alexander Usyskin
2022-06-19 13:37 ` [PATCH v3 05/14] drm/i915/gsc: add GSC XeHP SDV platform definition Alexander Usyskin
2022-06-19 13:37 ` [PATCH v3 06/14] mei: gsc: use polling instead of interrupts Alexander Usyskin
2022-06-19 13:37 ` [PATCH v3 07/14] mei: gsc: wait for reset thread on stop Alexander Usyskin
2022-06-19 13:37 ` [PATCH v3 08/14] mei: extend timeouts on slow devices Alexander Usyskin
2022-06-19 13:37 ` [PATCH v3 09/14] mei: bus: export common mkhi definitions into a separate header Alexander Usyskin
2022-06-19 13:37 ` [PATCH v3 10/14] mei: mkhi: add memory ready command Alexander Usyskin
2022-06-19 13:37 ` [PATCH v3 11/14] mei: gsc: setup gsc extended operational memory Alexander Usyskin
2022-06-19 13:37 ` [PATCH v3 12/14] mei: gsc: add transition to PXP mode in resume flow Alexander Usyskin
2022-06-19 13:37 ` [PATCH v3 13/14] mei: debugfs: add pxp mode to devstate in debugfs Alexander Usyskin
2022-06-27 14:02 ` Greg Kroah-Hartman
2022-06-29 8:37 ` Winkler, Tomas [this message]
2022-06-19 13:37 ` [PATCH v3 14/14] drm/i915/gsc: allocate extended operational memory in LMEM Alexander Usyskin
2022-06-27 14:02 ` [PATCH v3 00/14] GSC support for XeHP SDV and DG2 platforms Greg Kroah-Hartman
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=c23228be48c0416fbec7937c6008a204@intel.com \
--to=tomas.winkler@intel.com \
--cc=airlied@linux.ie \
--cc=alexander.usyskin@intel.com \
--cc=daniel@ffwll.ch \
--cc=gregkh@linuxfoundation.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=tvrtko.ursulin@linux.intel.com \
--cc=vitaly.lubart@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox