All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: "Radim Krčmář" <rkrcmar@ventanamicro.com>
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	"Paul Walmsley" <paul.walmsley@sifive.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	"Alexandre Ghiti" <alex@ghiti.fr>,
	"Atish Patra" <atishp@rivosinc.com>,
	"Andrew Jones" <ajones@ventanamicro.com>,
	"Clément Léger" <cleger@rivosinc.com>,
	"Anup Patel" <apatel@ventanamicro.com>
Subject: Re: [PATCH 2/2] RISC-V: make use of variadic sbi_ecall
Date: Fri, 13 Jun 2025 16:52:26 +0100	[thread overview]
Message-ID: <20250613165226.751541c6@pumpkin> (raw)
In-Reply-To: <DALGSCDW0GIG.10I22KD2SCSNX@ventanamicro.com>

On Fri, 13 Jun 2025 16:10:52 +0200
Radim Krčmář <rkrcmar@ventanamicro.com> wrote:

...
> The macro will result in the same arguments as before, and it is what
> the sbi_ecall actually should do.

Ugg...
Are you using pre-processor 'magic' to add a pile of zeros and then
select the first 'n' arguments?
That ought to be banned as error prone.

I think the one for strncpy() removes the immediate compile error for:
	strncpy(dest, src, 1, 2);

  David

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

WARNING: multiple messages have this Message-ID (diff)
From: David Laight <david.laight.linux@gmail.com>
To: "Radim Krčmář" <rkrcmar@ventanamicro.com>
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	"Paul Walmsley" <paul.walmsley@sifive.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	"Alexandre Ghiti" <alex@ghiti.fr>,
	"Atish Patra" <atishp@rivosinc.com>,
	"Andrew Jones" <ajones@ventanamicro.com>,
	"Clément Léger" <cleger@rivosinc.com>,
	"Anup Patel" <apatel@ventanamicro.com>
Subject: Re: [PATCH 2/2] RISC-V: make use of variadic sbi_ecall
Date: Fri, 13 Jun 2025 16:52:26 +0100	[thread overview]
Message-ID: <20250613165226.751541c6@pumpkin> (raw)
In-Reply-To: <DALGSCDW0GIG.10I22KD2SCSNX@ventanamicro.com>

On Fri, 13 Jun 2025 16:10:52 +0200
Radim Krčmář <rkrcmar@ventanamicro.com> wrote:

...
> The macro will result in the same arguments as before, and it is what
> the sbi_ecall actually should do.

Ugg...
Are you using pre-processor 'magic' to add a pile of zeros and then
select the first 'n' arguments?
That ought to be banned as error prone.

I think the one for strncpy() removes the immediate compile error for:
	strncpy(dest, src, 1, 2);

  David

  reply	other threads:[~2025-06-13 18:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-12 14:57 [PATCH 0/2] RISC-V: turn sbi_ecall into a variadic macro Radim Krčmář
2025-06-12 14:57 ` Radim Krčmář
2025-06-12 14:57 ` [PATCH 1/2] RISC-V: sbi: turn sbi_ecall into " Radim Krčmář
2025-06-12 14:57   ` Radim Krčmář
2025-06-12 15:14   ` Thomas Weißschuh
2025-06-12 15:14     ` Thomas Weißschuh
2025-06-12 15:35     ` Radim Krčmář
2025-06-12 15:35       ` Radim Krčmář
2025-06-12 14:57 ` [PATCH 2/2] RISC-V: make use of variadic sbi_ecall Radim Krčmář
2025-06-12 14:57   ` Radim Krčmář
2025-06-13 10:54   ` David Laight
2025-06-13 10:54     ` David Laight
2025-06-13 14:10     ` Radim Krčmář
2025-06-13 14:10       ` Radim Krčmář
2025-06-13 15:52       ` David Laight [this message]
2025-06-13 15:52         ` David Laight
2025-06-13 17:08         ` Radim Krčmář
2025-06-13 17:08           ` Radim Krčmář

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=20250613165226.751541c6@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=ajones@ventanamicro.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=apatel@ventanamicro.com \
    --cc=atishp@rivosinc.com \
    --cc=cleger@rivosinc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=rkrcmar@ventanamicro.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.