From patchwork Thu Jun 8 13:31:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 690527 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d8a:0:0:0:0:0 with SMTP id b10csp318901wru; Thu, 8 Jun 2023 06:32:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6X9n2Evwx1AxkbJkzDp/DvNE8cIaJrTQ86SKT+TzbeJGewYa3oP8ZaHYNqG1F6n51u5HXA X-Received: by 2002:a05:6808:c4:b0:398:7db6:7ee3 with SMTP id t4-20020a05680800c400b003987db67ee3mr8141936oic.19.1686231147177; Thu, 08 Jun 2023 06:32:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686231147; cv=none; d=google.com; s=arc-20160816; b=KeDbi/hY0/fn2kjUKgUxruYJNHKT02acDySNQkQgu9gioWeSKD+67QmFrAbRkzhHs8 7wcMrHZRHT4XHuyxjZyv1Gs0JypD5H3fZ1xgoAeAHTNOb1JFkgo15kBZv+a2HBmMGWMu Quf7+IuxB9fPNeAapxxlfrhsPfRGzsa77rcW8V48G7vUVeMeMpDqmno5pLIKnbmohO4t qeq85DL+fQD29gOSDxYF87IGQfPbzc4n/AYnMAbq6UwjWkGvvTCvuhQa8rpVdujFu126 sLRCSF/YJrGBx8ZepcUNarve4vAcjJCykkRG6idI+Ts5YJLVmi3KWqdfhkJiJX5sGvrG MRcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=gyq3hlEra/amA0hTcY4JEVhtuxnoJNcVcBECFOAjJ/4=; b=0w8YcHdOigusxhAGCed1qPvoDAaYklb4jUnhwrrUdYijpg6FiwkJtXnQxGswtSEtyH H1RZPOZdmNHVSaiJ6ZwRPv/S94FlsK1cNkiyZzUdozP93lMZ1JhpQFUPKWs+Yh3JEz1M 1fVJDe84ddAjWB0jMzcCDt7B2j+ENztQGM+lzlTxT3xecQpz40ddPEa+F/UMiW1sKoaC A2J+rm5bVWn3LvEEelTgceozFk5VcqPv44XCn/CwZjLu99B7w5Dq5xrOZTbUqJ/4xKy7 MovNn4MAfVWV27kE4PxY6TNK5Iyar0qVpCF5otsjDGFZ6DZlU3jJxf6XP0lcL3xMaqXy tCxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P87+ySX7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r11-20020a056214124b00b0062387bfd1d1si696366qvv.392.2023.06.08.06.32.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Jun 2023 06:32:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P87+ySX7; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q7FjU-00016o-3N; Thu, 08 Jun 2023 09:31:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q7FjR-00014U-KY for qemu-devel@nongnu.org; Thu, 08 Jun 2023 09:31:17 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q7FjO-0005hM-8R for qemu-devel@nongnu.org; Thu, 08 Jun 2023 09:31:17 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-3f6dfc4dffaso4088595e9.0 for ; Thu, 08 Jun 2023 06:31:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686231072; x=1688823072; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=gyq3hlEra/amA0hTcY4JEVhtuxnoJNcVcBECFOAjJ/4=; b=P87+ySX74gB551K/7t6Rm+hrf6z60xDISkl+Zq8bzG6Re/yyCjtKAlkIE7ftQRgAHB 82Fmt0s2zJW5TJRS5Ve4zrgXaKPg3TAr9hD1icFtqxt+sIqG79goUyQts+PVbojMdwMm iWSkE09O2KrcGekgPtgUPFz5EHITq0G+9NhZIq4sL5sBf77nyfdK5cUbV7sUke+Yk31z NcaWWoJg3ZCEWZeR17vN/51RsZylS7SzxDWS8CFN2ZSwXZC27Es3Yv6Dh1xEom/JzCcl CvD6dvlNDqyGlsc0ngcm8hgt10B2GMpbA7pbJUhAdqQz0wqH/gpno2eVZAZBbs91onJ2 Bb7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686231072; x=1688823072; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gyq3hlEra/amA0hTcY4JEVhtuxnoJNcVcBECFOAjJ/4=; b=k6a8W4YxG+lrxzwlq9z6kWAMHZraXwai37VvyqFaS9i7b2UIax9JdO4evrNxgcsbzq f5AOdgM1Z1IVsO5hE1XkM9FJwxT2kxBVW2zX58EctIvkxXtzWcCkQhtM/zq7euzxgvjd VdVHcyTkd/gAOJa5nkkvxdw0H1/WTY+KSkJ1bNyLwskCQ3rjNEivQN2NdQxeGxxpSalJ vE+UFQ1LgAgPVc8fAfebPlkRsZsXdCVlX0+QXF6YBWfTtNpo2fqqMXcVR0spBQ35JFFy e/mTzcIQSndHEqYkTEEJfvmv5LerG7j250iOP4yB2K3hLBXnyLhghqk9LiuomWqs/In1 9GeQ== X-Gm-Message-State: AC+VfDzfXgyj4Y48Wo2P9/y7rMeUi8rT7a7qZVFMTcLytclMt2P2MjJD jHW3b056K0k8bkWOl1MtwmyW2mKlHIv1uae/uZ8= X-Received: by 2002:a1c:f20e:0:b0:3f6:784:9617 with SMTP id s14-20020a1cf20e000000b003f607849617mr1379728wmc.11.1686231072209; Thu, 08 Jun 2023 06:31:12 -0700 (PDT) Received: from localhost.localdomain ([176.176.169.168]) by smtp.gmail.com with ESMTPSA id x4-20020a05600c21c400b003f72d7dc66esm1997234wmj.13.2023.06.08.06.31.10 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 08 Jun 2023 06:31:11 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , qemu-arm@nongnu.org, qemu-ppc@nongnu.org, qemu-s390x@nongnu.org, qemu-riscv@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v2 0/5] misc: Enforce .[ch].inc extension for re-included .c/.h files Date: Thu, 8 Jun 2023 15:31:03 +0200 Message-Id: <20230608133108.72655-1-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Since v1: - addressed Richard's easy review comments Richard, this is what I had before looking at removing exec/helper*. Posting in case it is useful enough before getting there. --- Follow the convention to use the .inc extension for .c/.h files re-included, as docummented in Coding Style since commit 6a0057aa22: If you do use template header files they should be named with the ``.c.inc`` or ``.h.inc`` suffix to make it clear they are being included for expansion. Most of the codebase already uses this extension: $ git ls-files | fgrep .inc | wc -l 155 Rename some files left over. Philippe Mathieu-Daudé (5): hw/remote/proxy: Remove dubious 'event_notifier-posix.c' include tests/tcg/aarch64: Rename bti-crt.inc.c -> bti-crt.c.inc target/arm: Rename helper template headers as '.h.inc' target/i386: Rename helper template headers as '.h.inc' target: Bulk rename 'helper.h' -> 'helper.h.inc' for all targets include/exec/helper-gen.h | 2 +- include/exec/helper-proto.h | 2 +- target/alpha/{helper.h => tcg/helper.h.inc} | 0 target/arm/tcg/{helper-a64.h => helper-a64.h.inc} | 0 target/arm/tcg/{helper-mve.h => helper-mve.h.inc} | 0 target/arm/tcg/{helper-sme.h => helper-sme.h.inc} | 0 target/arm/tcg/{helper-sve.h => helper-sve.h.inc} | 0 target/arm/{helper.h => tcg/helper.h.inc} | 8 ++++---- target/avr/{helper.h => tcg/helper.h.inc} | 0 target/cris/{helper.h => tcg/helper.h.inc} | 0 target/hexagon/{helper.h => tcg/helper.h.inc} | 0 target/hppa/{helper.h => tcg/helper.h.inc} | 0 .../{cc_helper_template.h => cc_helper_template.h.inc} | 0 target/i386/{helper.h => tcg/helper.h.inc} | 6 +++--- .../i386/{ops_sse_header.h => tcg/ops_sse_header.h.inc} | 0 .../shift_helper_template.h.inc} | 0 target/loongarch/{helper.h => tcg/helper.h.inc} | 0 target/m68k/{helper.h => tcg/helper.h.inc} | 0 target/microblaze/{helper.h => tcg/helper.h.inc} | 0 target/mips/{helper.h => tcg/helper.h.inc} | 0 target/nios2/{helper.h => tcg/helper.h.inc} | 0 target/openrisc/{helper.h => tcg/helper.h.inc} | 0 target/ppc/{helper.h => tcg/helper.h.inc} | 0 target/riscv/{helper.h => tcg/helper.h.inc} | 0 target/rx/{helper.h => tcg/helper.h.inc} | 0 target/s390x/{helper.h => tcg/helper.h.inc} | 0 target/sh4/{helper.h => tcg/helper.h.inc} | 0 target/sparc/{helper.h => tcg/helper.h.inc} | 0 target/tricore/{helper.h => tcg/helper.h.inc} | 0 target/xtensa/{helper.h => tcg/helper.h.inc} | 0 hw/remote/proxy.c | 1 - target/alpha/translate.c | 2 +- target/arm/tcg/translate.c | 2 +- target/avr/translate.c | 2 +- target/cris/translate.c | 2 +- target/hexagon/translate.c | 2 +- target/hppa/translate.c | 2 +- target/i386/tcg/cc_helper.c | 8 ++++---- target/i386/tcg/int_helper.c | 8 ++++---- target/i386/tcg/translate.c | 2 +- target/loongarch/translate.c | 2 +- target/m68k/translate.c | 2 +- target/microblaze/translate.c | 2 +- target/mips/tcg/translate.c | 2 +- target/nios2/translate.c | 2 +- target/openrisc/translate.c | 2 +- target/ppc/translate.c | 2 +- target/riscv/translate.c | 2 +- target/rx/translate.c | 2 +- target/s390x/tcg/translate.c | 2 +- target/sh4/translate.c | 2 +- target/sparc/translate.c | 2 +- target/tricore/translate.c | 2 +- target/xtensa/translate.c | 2 +- tests/tcg/aarch64/bti-1.c | 2 +- tests/tcg/aarch64/bti-3.c | 2 +- tests/tcg/aarch64/{bti-crt.inc.c => bti-crt.c.inc} | 0 57 files changed, 40 insertions(+), 41 deletions(-) rename target/alpha/{helper.h => tcg/helper.h.inc} (100%) rename target/arm/tcg/{helper-a64.h => helper-a64.h.inc} (100%) rename target/arm/tcg/{helper-mve.h => helper-mve.h.inc} (100%) rename target/arm/tcg/{helper-sme.h => helper-sme.h.inc} (100%) rename target/arm/tcg/{helper-sve.h => helper-sve.h.inc} (100%) rename target/arm/{helper.h => tcg/helper.h.inc} (99%) rename target/avr/{helper.h => tcg/helper.h.inc} (100%) rename target/cris/{helper.h => tcg/helper.h.inc} (100%) rename target/hexagon/{helper.h => tcg/helper.h.inc} (100%) rename target/hppa/{helper.h => tcg/helper.h.inc} (100%) rename target/i386/tcg/{cc_helper_template.h => cc_helper_template.h.inc} (100%) rename target/i386/{helper.h => tcg/helper.h.inc} (98%) rename target/i386/{ops_sse_header.h => tcg/ops_sse_header.h.inc} (100%) rename target/i386/{shift_helper_template.h => tcg/shift_helper_template.h.inc} (100%) rename target/loongarch/{helper.h => tcg/helper.h.inc} (100%) rename target/m68k/{helper.h => tcg/helper.h.inc} (100%) rename target/microblaze/{helper.h => tcg/helper.h.inc} (100%) rename target/mips/{helper.h => tcg/helper.h.inc} (100%) rename target/nios2/{helper.h => tcg/helper.h.inc} (100%) rename target/openrisc/{helper.h => tcg/helper.h.inc} (100%) rename target/ppc/{helper.h => tcg/helper.h.inc} (100%) rename target/riscv/{helper.h => tcg/helper.h.inc} (100%) rename target/rx/{helper.h => tcg/helper.h.inc} (100%) rename target/s390x/{helper.h => tcg/helper.h.inc} (100%) rename target/sh4/{helper.h => tcg/helper.h.inc} (100%) rename target/sparc/{helper.h => tcg/helper.h.inc} (100%) rename target/tricore/{helper.h => tcg/helper.h.inc} (100%) rename target/xtensa/{helper.h => tcg/helper.h.inc} (100%) rename tests/tcg/aarch64/{bti-crt.inc.c => bti-crt.c.inc} (100%)