Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2752767rdb; Fri, 22 Sep 2023 07:32:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGjK7FwMQWyY7CvoqtQuJuRis2TTxXrgAzYRhjnJBwywhQOpPrEEonjqV6yFG11o0V6X2C8 X-Received: by 2002:a05:6808:2196:b0:3a7:44da:d5e6 with SMTP id be22-20020a056808219600b003a744dad5e6mr10164520oib.38.1695393170281; Fri, 22 Sep 2023 07:32:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695393170; cv=none; d=google.com; s=arc-20160816; b=mRyC0csiibWT/TPYqdYKqLqK2HWe7XiofidkpeSOe6+MW5ECIykvsONCFIq2Ch1Og0 Y1DTjypkr9HmfFKAkEU+iF7ZwrLwjD3xr705/4FyYW+n2XS9yu/i5U2P9/R+rewQFJhK J3VG68Z5lbSy1Ev/0nDi8I6vOShqI+Kt5kkxPzhjnWfT/jYNfYDfw9pDjcsJq/BO2rdu nN/AtGZYPXOKYeXjXXmpOIaeLGI3brQhVzTI4fg+5V4pP2NKqyR/YSL1TOBSMIFyP7j2 wjYgAcBV8Onhr3i28CfkABqZx4o8JT5Aix8nhGsWcZ0LZGyXIDpx0z471SciMEDFdvS7 hS7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:in-reply-to :mime-version:message-id:subject:cc:to:from:date:dkim-signature :dkim-filter; bh=2IW3rb56zGCm9qAsFG7v2B5AHJ/3o8wCuaDSV4ASVdE=; fh=GIYi4Pq1pGwaNWUFKB3qq6Y6U4s/a6WB7FVtQFL0j60=; b=b1XO8RANQixc7WPT7x/62FdL8fD6H5mahb2PSpDjRRVAAMJ22wnkewAdQv2hquUocs q2err/3GH6sFJ7YmJC9azhoECWnYit+ww9OpuuUB/P//7yGPLOSzPoXAk/3XHddgx2zy Kf9NgTcG/RJqdoxQH984/1wjFwHMFfmzzUDzaVhs3B/6MO52ILbBdtT9b524DIGkq2EX nkpWDgMF2Ckgb4pH1DF4pRXvAK5hFZY/mkDEQaUxNcDHcJOK+8zuVRbsvdUMkz4NOFTX 4Y4zIfdekeYHGp3TJs+8eCj5WWKPfQasiNSLQgQfppXDUeGsyQtGNBpH3bxe+wNXCPsd FjhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=OkeXowYE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id bd8-20020a056a00278800b0068fcb9a7349si3956699pfb.349.2023.09.22.07.32.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 07:32:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=OkeXowYE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 5089A8111385; Fri, 22 Sep 2023 02:23:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231980AbjIVJXg (ORCPT + 99 others); Fri, 22 Sep 2023 05:23:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231180AbjIVJXa (ORCPT ); Fri, 22 Sep 2023 05:23:30 -0400 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CECB1A3 for ; Fri, 22 Sep 2023 02:23:22 -0700 (PDT) Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20230922092320epoutp0288d449f3a24bb7637723f65eac780557~HLjeAeNTa1199811998epoutp02s for ; Fri, 22 Sep 2023 09:23:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20230922092320epoutp0288d449f3a24bb7637723f65eac780557~HLjeAeNTa1199811998epoutp02s DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1695374600; bh=2IW3rb56zGCm9qAsFG7v2B5AHJ/3o8wCuaDSV4ASVdE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OkeXowYESVyQi3nOVODV//x4gj1Kgq1zV1J62YrAFlXUkF+/RPRVVn76BcMkw98eR 8G7+FPzCcKCkMb4psRWet3CepM8/MR6xd7hfe5ZwxYLYtWENxCn5uVX+GcquuZVz9t pcZMziDK31Ceq42qNLVorNea6Uai184BIe8oQD80= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p3.samsung.com (KnoxPortal) with ESMTP id 20230922092320epcas2p38ce2047acb11c56e5f3f5858a5c6f6ba~HLjddzXMV2322323223epcas2p3Q; Fri, 22 Sep 2023 09:23:20 +0000 (GMT) Received: from epsmgec2p1-new.samsung.com (unknown [182.195.36.69]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4RsRdg58h9z4x9Ps; Fri, 22 Sep 2023 09:23:19 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmgec2p1-new.samsung.com (Symantec Messaging Gateway) with SMTP id C2.78.19471.70D5D056; Fri, 22 Sep 2023 18:23:19 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p4.samsung.com (KnoxPortal) with ESMTPA id 20230922092319epcas2p4ac5bd93520bf6e893f431764e0454079~HLjciHmAn0401904019epcas2p4j; Fri, 22 Sep 2023 09:23:19 +0000 (GMT) Received: from epsmgms1p2new.samsung.com (unknown [182.195.42.42]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230922092319epsmtrp238efc3506efaac00b4113b362a5fda86~HLjchJJg32075720757epsmtrp2L; Fri, 22 Sep 2023 09:23:19 +0000 (GMT) X-AuditID: b6c32a4d-b07ff70000004c0f-a9-650d5d079649 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 03.81.08788.60D5D056; Fri, 22 Sep 2023 18:23:18 +0900 (KST) Received: from jtpark-7920 (unknown [10.229.83.56]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230922092318epsmtip2444d74bfaddc3e10ef460be297112e78~HLjcUk2R82041020410epsmtip2a; Fri, 22 Sep 2023 09:23:18 +0000 (GMT) Date: Fri, 22 Sep 2023 18:26:08 +0900 From: Jeongtae Park To: Dave Jiang Cc: Dan Williams , Alison Schofield , Vishal Verma , Ben Widawsky , Jonathan Cameron , Davidlohr Bueso , Fan Ni , linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kyungsan Kim , Wonjae Lee , Hojin Nam , Junhyeok Im , Jehoon Park , Jeongtae Park Subject: Re: [PATCH 7/7] cxl/trace: Enclose a multiple statements macro in a do while loop Message-ID: MIME-Version: 1.0 In-Reply-To: X-Brightmail-Tracker: H4sIAAAAAAAAA02TfUwbZRzH87TX60HsdrxsPFY38BQyiECLvBwbTJeBO4djEBc1BoO39kKb lmvTF3VL5hiUwWAyBkzWMnAGEGUorCMLMlAoMFGYYwwwMAtRVDaY6ICNhqTol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TXYw9rdt2rUYzlmxLf bbK7W6vjbd8tDrXNZV2Wotp+Omdf71aIjecpns77gS2Kuz06+XxSzLZ2m7PLy/TmBXw4vFyJ pTgj0VCLuag4EQAENXXIJAMAAA== X-CMS-MailID: 20230922092319epcas2p4ac5bd93520bf6e893f431764e0454079 X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----P5duZL37EoFqXMqfBraval5XGtOxqTbc-oIX9L1P8Ie5rEk1=_234a6_" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20230921024832epcas2p35c4d3c20f7a70b023db64cd0db823eb8 References: <20230921025110.3717583-1-jtp.park@samsung.com> <20230921025110.3717583-8-jtp.park@samsung.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 22 Sep 2023 02:23:36 -0700 (PDT) ------P5duZL37EoFqXMqfBraval5XGtOxqTbc-oIX9L1P8Ie5rEk1=_234a6_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline On Thu, Sep 21, 2023 at 03:58:26PM -0700, Dave Jiang wrote: > > > On 9/20/23 19:51, Jeongtae Park wrote: > > ERROR: Macros with complex values should be enclosed in parentheses > > > > Signed-off-by: Jeongtae Park > > I think that goes against typical traceevent macros layout. I would ignore checkpatch warnings on traceevent stuff. > > Ok, I see, I will drop this change. > > --- > > 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 " \ ------P5duZL37EoFqXMqfBraval5XGtOxqTbc-oIX9L1P8Ie5rEk1=_234a6_ Content-Type: text/plain; charset="utf-8" ------P5duZL37EoFqXMqfBraval5XGtOxqTbc-oIX9L1P8Ie5rEk1=_234a6_--