Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp811456iog; Wed, 29 Jun 2022 10:39:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sOv91lr3QhXyJL2Qap1zAsrSule53vyGjM6SMwJsuPDC1QphiMvhVsZmaDPTl8/v00f5El X-Received: by 2002:aa7:cdd1:0:b0:435:750f:7c75 with SMTP id h17-20020aa7cdd1000000b00435750f7c75mr5710774edw.91.1656524370339; Wed, 29 Jun 2022 10:39:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656524370; cv=none; d=google.com; s=arc-20160816; b=gX/7gx4wsBg6IWJtgZP7P2AWfiVuJN2nqO1v7iRxnMYvrVEzW9g0DeIMf3VTz4vcVH vLsfggVovaT/rb4Q9v6mwNguNCPF12f/WhsY4g7QDuQdCyIPxmF7ZJ58yNoinn1chCRq GFHg82/IkEbZe9davnjvlt9dbh+FMlV5DDuPt18uUHhzOZtEu41m64QaHbm2KKJO41PI vLp8G7G2UMLRp8OMfBdDcRG+BH+E2EW4DKM3sOUT3mqGX8VAkMW7osv5YVCn1P2YEWqJ hpNLf7w+jf556/qL0WSI7jq77rDkitCr2jg7VmEEagATgVS8+T5PL7EXpF7DyheQheex th7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=4nADTKeLD2xTEnrpqrxwkxFoYTSDirzPyX0vZg0rTsM=; b=GnaRcQ0s2b/qGcFlzwCxMTABDaVOv9asmurXT/ZbIK7OCa7e4IGfQQwfyDkgGFlh5d +zMYlZIBdsKd7Evzo3LEK21zTxbGxtuCAXsNQG2ZAyn8O4onk/dZgZfe26Mqo87zeR5L c4dRurW0j/mubWkWATbck+nsNCwOL8USi/Kn5Rg6G5QYtY7DwAUyLDIlh6Bilu9AETdi uyB8qlqCpepiUuh4t09Mku3JM1j3OieIu5hr2DipqeXlcF6gc4nCKv3U8Y/zJDezIQgs QlYmWzHkPQIeP2e4lHh+YT3H0SC4MQsHtCt7b2BIG3d29YBVEdFbPnDnAN33jtlMzj5x 1FyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=N1AyvilM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nc42-20020a1709071c2a00b00706b9787b43si1300585ejc.319.2022.06.29.10.39.04; Wed, 29 Jun 2022 10:39:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=N1AyvilM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230073AbiF2RTi (ORCPT + 99 others); Wed, 29 Jun 2022 13:19:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229862AbiF2RTh (ORCPT ); Wed, 29 Jun 2022 13:19:37 -0400 Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32B4E1CFFD; Wed, 29 Jun 2022 10:19:36 -0700 (PDT) Received: by mail-wm1-x330.google.com with SMTP id o19-20020a05600c4fd300b003a0489f414cso38963wmq.4; Wed, 29 Jun 2022 10:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=4nADTKeLD2xTEnrpqrxwkxFoYTSDirzPyX0vZg0rTsM=; b=N1AyvilMJRoh5IetQt38Sjs59abbCcMZBDXO3lHpiwBivsIbw8Smy7eeK0+yz5zDGX ZkYNvRUQkdf/tiMgO4tFDWnw3kVN4MQfUQym08ZXwX/LSbNnAe9LH2vJVUKLZAj2JKKc dhrsKDrfgv5HosHCZmIhe+Q/vc0MXUgi+03EGmIdeqhBvIpvCbkpHZlRljqNeD1EbR4/ KUBIsrMwYSpNQnSN4uSt05W9QDWNNMGjNrZn/mE+hlzzZVrzN+FtjfWVcO7X3lYCPTek 6wFasx7AjYU0TYG3dG9MgXYvfsT2nHzmb/2mQms/tAB5rC+pftvCsh8GbPqkZUAl4yhR EmvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=4nADTKeLD2xTEnrpqrxwkxFoYTSDirzPyX0vZg0rTsM=; b=0gP/Qb2mBnE952iDjcVppBb7NzFq/rpF9M7/7TFaB93IqoMG03wwQ3xCxR5mk5kWvv ty/VdevmwzQnh667OpOMhjtAEAFtWY/JSeQCcS2SHp42IWE33EjhN7YsE6vW4wcVqAaA buE+1tElDQzc0RikGg2F6sFW9Ab25At4re0+Yl9t0JGUmXadUBZ+HJJP6qwwydceExr+ sqDW1yPbe+KXSAm9kkQ8N+iWEQJikQgLvz8iEL1Y4C37i2mFrdL9dc7QpWJ0dALFSupS 8jgiO2iP/o0zsdjcMOcr2OvCpmUuCJ2tlywyGr8FKCs+Mz578whz2YpTFyTrIci3ybz/ mhdA== X-Gm-Message-State: AJIora96BDtIgUz+OWap+SB/kLDhI/9dkNdefzWmDF0UsH/VNcm9A9bw C9tnULz5sr+rAIJiJDdYgg== X-Received: by 2002:a05:600c:198e:b0:3a1:6db7:fdd0 with SMTP id t14-20020a05600c198e00b003a16db7fdd0mr3593678wmq.14.1656523174670; Wed, 29 Jun 2022 10:19:34 -0700 (PDT) Received: from playground (host-78-146-72-11.as13285.net. [78.146.72.11]) by smtp.gmail.com with ESMTPSA id 23-20020a05600c22d700b003a018e43df2sm3729572wmg.34.2022.06.29.10.19.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jun 2022 10:19:34 -0700 (PDT) Date: Wed, 29 Jun 2022 18:19:30 +0100 From: Jules Irenge To: Martin KaFai Lau Cc: Elana.Copperman@mobileye.com, Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Song Liu , Yonghong Song , John Fastabend , KP Singh , netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] btf: Fix error of Macros with multiple statements Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch fixes an error reported by checkpatch.pl ERROR: Macros with multiple statements should be enclosed in a do while loop To fix this a do while(0) loop is used to encloses the multiple statements. Signed-off-by: Jules Irenge --- kernel/bpf/btf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index 1bc496162572..95c1ee525e28 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -5057,8 +5057,10 @@ extern struct btf *btf_vmlinux; static union { struct bpf_ctx_convert { #define BPF_PROG_TYPE(_id, _name, prog_ctx_type, kern_ctx_type) \ - prog_ctx_type _id##_prog; \ - kern_ctx_type _id##_kern; + do { \ + prog_ctx_type _id##_prog; \ + kern_ctx_type _id##_kern; \ + } while (0) #include #undef BPF_PROG_TYPE } *__t; -- 2.36.1