Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1790684rdb; Wed, 20 Sep 2023 22:20:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGREWo8ZvRXyoQKaMHBSCxTVInSPMRDtkPgOIZ2oP459dVsqfUAPJA7L9mx0Q5askSA3WHy X-Received: by 2002:a17:903:124b:b0:1b3:d4ed:8306 with SMTP id u11-20020a170903124b00b001b3d4ed8306mr4498111plh.19.1695273602978; Wed, 20 Sep 2023 22:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695273602; cv=none; d=google.com; s=arc-20160816; b=C3tmRdq1vwkxZPcPRow9LK1JNEK2Gr1gst6e12z/v8VMbIkIzgii9JHTLTq3KtJJpi +HRwF+1ak5pWec9Mp90Wv7JBOUfYIfcmw6PVAGe3dRf3m1jDDmD7To14HGi2Si1Q5NhK dTCw9cqrlwPysK6yvT2ZPrW2G3XKZGASXZ3KZt2LmIjd3uzQuKwNtEyzM1BnLon2pdgC rhMFS1qYhw/8/8MoLUedtliD1KFmpHopmrj9uP4NbCCUwAOuv+A0LsfBs1ZpSEj4mSV+ qajWfbfPQGrjnIdYTd0LHR4/woeeihx0pzKwGP5NTqsXtAIVxpFprvCyy9+UNvpStg7P 8w2g== 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 :content-transfer-encoding:mime-version:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=rZpfn7HBf1ns47vxI/aFGjH+FW1yFBazuIf8zLmEj0w=; fh=/YU/EUkFzlVVw3Ho2XKNtKEBhxUEEN6ZW/gi/HZzyAY=; b=q5rFM2EcQ4miGF0+R2li43vGyMtPQFXUrUOd580UBikbWFZqID/TaVg9KAUD/UenQp P0LRG19MN2ElxclDIYR3bmOB+nDGhPdmzBC1KSeeQjnd8GDc+L08FdaXKTgu4nbLL5Yo mzY4oKCGJmf/RYgoBmseOuiMi37lbCv7APgUWOZgAfNYlR+UnMm+AkKfAM/0gKpaxlhD Xek0VY3b3yPJl9wDjcFgDpP1e+j5lHwxQZkn0NspemxVE8BKMcun+iTuqYYalLrZZw85 7kobTKocchbKro3jDU88GTra8s/e87AH4fib7Jqffe7bb7J3Acwi0PLN5hMNkYEiJV3w fOUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=f4xdTLLt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id c5-20020a170902f30500b001b8a8f7af21si588126ple.557.2023.09.20.22.20.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 22:20:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=f4xdTLLt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 41C20832C9D7; Wed, 20 Sep 2023 19:48:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229659AbjIUCsu (ORCPT + 99 others); Wed, 20 Sep 2023 22:48:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229550AbjIUCsr (ORCPT ); Wed, 20 Sep 2023 22:48:47 -0400 Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CC6AEC for ; Wed, 20 Sep 2023 19:48:36 -0700 (PDT) Received: from epcas2p2.samsung.com (unknown [182.195.41.54]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20230921024834epoutp017cdd8cf9bacdf1814182fa1b5f0e4bf3~Gyhf4Kid71676416764epoutp01f for ; Thu, 21 Sep 2023 02:48:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20230921024834epoutp017cdd8cf9bacdf1814182fa1b5f0e4bf3~Gyhf4Kid71676416764epoutp01f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1695264514; bh=rZpfn7HBf1ns47vxI/aFGjH+FW1yFBazuIf8zLmEj0w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f4xdTLLtsCF+JKsRyT8PHgFqprzTlLBMFfMv6RNi6NmfvKLeqP9sPNtcwjQkmWMW4 xKl5uVJlNUQ0fiLb79pAPZVBumbta+6ZcE6s6xYk1ji61D+F8Dx3Q9Z2I3a5h5eXJB rFTbvncaF32yNJUwkaIkntt5kW5Jeg6pkJzS+Wlg= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20230921024833epcas2p2d22b84e0e67c87a97080cf8c73c3d44f~GyhfZz1X-0036500365epcas2p2E; Thu, 21 Sep 2023 02:48:33 +0000 (GMT) Received: from epsmges2p2.samsung.com (unknown [182.195.36.102]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4Rrfwd0tsfz4x9Pv; Thu, 21 Sep 2023 02:48:33 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id AE.AE.09649.00FAB056; Thu, 21 Sep 2023 11:48:33 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas2p3.samsung.com (KnoxPortal) with ESMTPA id 20230921024832epcas2p35c4d3c20f7a70b023db64cd0db823eb8~Gyhec_7AZ2864028640epcas2p3u; Thu, 21 Sep 2023 02:48:32 +0000 (GMT) Received: from epsmgmcp1.samsung.com (unknown [182.195.42.82]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20230921024832epsmtrp2b7b1c2347d9a0d7191a0f82beff318b2~GyheXZkKu1783917839epsmtrp2U; Thu, 21 Sep 2023 02:48:32 +0000 (GMT) X-AuditID: b6c32a46-b9ffa700000025b1-ce-650baf0023ca Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgmcp1.samsung.com (Symantec Messaging Gateway) with SMTP id D5.D7.18916.00FAB056; Thu, 21 Sep 2023 11:48:32 +0900 (KST) Received: from jtpark-7920.dsn.sec.samsung.com (unknown [10.229.83.56]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230921024832epsmtip2b49ec7b005c2ca7b5463466a48a341de~GyheLgwbC1639116391epsmtip2O; Thu, 21 Sep 2023 02:48:32 +0000 (GMT) From: Jeongtae Park To: Dan Williams , Alison Schofield , Vishal Verma , Ben Widawsky , Jonathan Cameron , Dave Jiang , Davidlohr Bueso , Fan Ni , linux-cxl@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Kyungsan Kim , Wonjae Lee , Hojin Nam , Junhyeok Im , Jehoon Park , Jeongtae Park , Jeongtae Park Subject: [PATCH 7/7] cxl/trace: Enclose a multiple statements macro in a do while loop Date: Thu, 21 Sep 2023 11:51:10 +0900 Message-Id: <20230921025110.3717583-8-jtp.park@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230921025110.3717583-1-jtp.park@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: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r67uN/Oh6GKzp/UfTcteDtVRPvS5pqJ6+14BKOFCnqK Wv32ej3oae3ICJN8WLbsZ4Ky9YbL3FOt537kWXx/+h/Lh/Eip6TnnQ18eIZ78vmTM4yP33PX TOMT3mR6nNnNcDPLF579PSv/MXj7PZQxZpQ1qa7JTFfV/cqWsOMT933d6xHH+F83ulpf641c YJW+IvS97f4ZsxXzfmba/EuyVd4quE+myM7t7M0iKy21SkH1zarn31XWiPmWiH94aLpWiaU4 I9FQi7moOBEA/QCcvBwDAAA= X-CMS-MailID: 20230921024832epcas2p35c4d3c20f7a70b023db64cd0db823eb8 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" 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> 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 groat.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 (groat.vger.email [0.0.0.0]); Wed, 20 Sep 2023 19:48:51 -0700 (PDT) ERROR: Macros with complex values should be enclosed in parentheses Signed-off-by: Jeongtae Park --- 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 " \ -- 2.34.1