From: Dave Jiang <dave.jiang@intel.com>
To: Jeongtae Park <jtp.park@samsung.com>,
Dan Williams <dan.j.williams@intel.com>,
Alison Schofield <alison.schofield@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Ben Widawsky <bwidawsk@kernel.org>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
Davidlohr Bueso <dave@stgolabs.net>, Fan Ni <fan.ni@samsung.com>,
<linux-cxl@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kyungsan Kim <ks0204.kim@samsung.com>,
"Wonjae Lee" <wj28.lee@samsung.com>,
Hojin Nam <hj96.nam@samsung.com>,
Junhyeok Im <junhyeok.im@samsung.com>,
Jehoon Park <jehoon.park@samsung.com>,
"Jeongtae Park" <jeongtae.park@gmail.com>
Subject: Re: [PATCH 7/7] cxl/trace: Enclose a multiple statements macro in a do while loop
Date: Thu, 21 Sep 2023 15:58:26 -0700 [thread overview]
Message-ID: <de20c603-6521-1ab7-3bab-67e6a278bd1e@intel.com> (raw)
In-Reply-To: <20230921025110.3717583-8-jtp.park@samsung.com>
On 9/20/23 19:51, Jeongtae Park wrote:
> ERROR: Macros with complex values should be enclosed in parentheses
>
> Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
I think that goes against typical traceevent macros layout. I would ignore checkpatch warnings on traceevent stuff.
> ---
> drivers/cxl/core/trace.h | 24 +++++++++++++-----------
> 1 file changed, 13 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/cxl/core/trace.h b/drivers/cxl/core/trace.h
> index 7aee7fb008a5..e2338773dcd6 100644
> --- a/drivers/cxl/core/trace.h
> +++ b/drivers/cxl/core/trace.h
> @@ -199,17 +199,19 @@ TRACE_EVENT(cxl_overflow,
> __field(u8, hdr_maint_op_class)
>
> #define CXL_EVT_TP_fast_assign(cxlmd, l, hdr) \
> - __assign_str(memdev, dev_name(&(cxlmd)->dev)); \
> - __assign_str(host, dev_name((cxlmd)->dev.parent)); \
> - __entry->log = (l); \
> - __entry->serial = (cxlmd)->cxlds->serial; \
> - memcpy(&__entry->hdr_uuid, &(hdr).id, sizeof(uuid_t)); \
> - __entry->hdr_length = (hdr).length; \
> - __entry->hdr_flags = get_unaligned_le24((hdr).flags); \
> - __entry->hdr_handle = le16_to_cpu((hdr).handle); \
> - __entry->hdr_related_handle = le16_to_cpu((hdr).related_handle); \
> - __entry->hdr_timestamp = le64_to_cpu((hdr).timestamp); \
> - __entry->hdr_maint_op_class = (hdr).maint_op_class
> + do { \
> + __assign_str(memdev, dev_name(&(cxlmd)->dev)); \
> + __assign_str(host, dev_name((cxlmd)->dev.parent)); \
> + __entry->log = (l); \
> + __entry->serial = (cxlmd)->cxlds->serial; \
> + memcpy(&__entry->hdr_uuid, &(hdr).id, sizeof(uuid_t)); \
> + __entry->hdr_length = (hdr).length; \
> + __entry->hdr_flags = get_unaligned_le24((hdr).flags); \
> + __entry->hdr_handle = le16_to_cpu((hdr).handle); \
> + __entry->hdr_related_handle = le16_to_cpu((hdr).related_handle); \
> + __entry->hdr_timestamp = le64_to_cpu((hdr).timestamp); \
> + __entry->hdr_maint_op_class = (hdr).maint_op_class; \
> + } while (0)
>
> #define CXL_EVT_TP_printk(fmt, ...) \
> TP_printk("memdev=%s host=%s serial=%lld log=%s : time=%llu uuid=%pUb " \
next prev parent reply other threads:[~2023-09-21 22:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20230921024831epcas2p337d3d41f95bee75d2e2f3350bc48e70d@epcas2p3.samsung.com>
2023-09-21 2:51 ` [PATCH 0/7] cxl: Fix checkpatch issues Jeongtae Park
2023-09-21 2:51 ` [PATCH 1/7] cxl/trace: Fix improper SPDX comment style for header file Jeongtae Park
2023-09-21 22:54 ` Dave Jiang
2023-09-21 2:51 ` [PATCH 2/7] cxl/region: Fix a checkpatch warning Jeongtae Park
2023-09-21 22:55 ` Dave Jiang
2023-09-21 2:51 ` [PATCH 3/7] cxl/mem: Fix a checkpatch error Jeongtae Park
2023-09-21 22:55 ` Dave Jiang
2023-09-21 2:51 ` [PATCH 4/7] cxl: " Jeongtae Park
2023-09-21 22:56 ` Dave Jiang
2023-09-21 2:51 ` [PATCH 5/7] cxl: Fix block comment style Jeongtae Park
2023-09-21 22:56 ` Dave Jiang
2023-09-21 2:51 ` [PATCH 6/7] cxl/memdev: Fix whitespace error/warnings Jeongtae Park
2023-09-21 22:57 ` Dave Jiang
2023-09-22 9:23 ` Jeongtae Park
2023-09-21 2:51 ` [PATCH 7/7] cxl/trace: Enclose a multiple statements macro in a do while loop Jeongtae Park
2023-09-21 22:58 ` Dave Jiang [this message]
2023-09-22 9:26 ` Jeongtae Park
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=de20c603-6521-1ab7-3bab-67e6a278bd1e@intel.com \
--to=dave.jiang@intel.com \
--cc=alison.schofield@intel.com \
--cc=bwidawsk@kernel.org \
--cc=dan.j.williams@intel.com \
--cc=dave@stgolabs.net \
--cc=fan.ni@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=hj96.nam@samsung.com \
--cc=jehoon.park@samsung.com \
--cc=jeongtae.park@gmail.com \
--cc=jonathan.cameron@huawei.com \
--cc=jtp.park@samsung.com \
--cc=junhyeok.im@samsung.com \
--cc=ks0204.kim@samsung.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vishal.l.verma@intel.com \
--cc=wj28.lee@samsung.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