linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH 2/2] predefine: avoid add_pre_buffer() for targets
Date: Sun,  5 Jul 2020 15:16:04 +0200	[thread overview]
Message-ID: <20200705131605.26551-3-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20200705131605.26551-1-luc.vanoostenryck@gmail.com>

Avoid add_pre_buffer() and use one of the predefine...()
variant instead.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 target-arm64.c | 2 +-
 target-riscv.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/target-arm64.c b/target-arm64.c
index d491b65e5154..8619bd842f9b 100644
--- a/target-arm64.c
+++ b/target-arm64.c
@@ -21,7 +21,7 @@ static void predefine_arm64(const struct target *self)
 	predefine("__aarch64__", 1, "1");
 
 	if (cmodel)
-		add_pre_buffer("#define __AARCH64_CMODEL_%s__ 1\n", cmodel);
+		predefine_strong("__AARCH64_CMODEL_%s__", cmodel);
 }
 
 const struct target target_arm64 = {
diff --git a/target-riscv.c b/target-riscv.c
index 08d036ca04b7..d68fb585c254 100644
--- a/target-riscv.c
+++ b/target-riscv.c
@@ -24,7 +24,7 @@ static void predefine_riscv(const struct target *self)
 	predefine("__riscv_xlen", 1, "%d", ptr_ctype.bit_size);
 
 	if (cmodel)
-		add_pre_buffer("#define __riscv_cmodel_%s 1\n", cmodel);
+		predefine_strong("__riscv_cmodel_%s", cmodel);
 }
 
 const struct target target_riscv32 = {
-- 
2.27.0

      parent reply	other threads:[~2020-07-05 13:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-05 13:16 [PATCH 0/2] add helper predefine_{strong,weak}() Luc Van Oostenryck
2020-07-05 13:16 ` [PATCH 1/2] predefine: " Luc Van Oostenryck
2020-07-05 13:16 ` Luc Van Oostenryck [this message]

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=20200705131605.26551-3-luc.vanoostenryck@gmail.com \
    --to=luc.vanoostenryck@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).