qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Djordje Todorovic <Djordje.Todorovic@htecgroup.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "qemu-riscv@nongnu.org" <qemu-riscv@nongnu.org>,
	"cfu@mips.com" <cfu@mips.com>, "mst@redhat.com" <mst@redhat.com>,
	"marcel.apfelbaum@gmail.com" <marcel.apfelbaum@gmail.com>,
	"dbarboza@ventanamicro.com" <dbarboza@ventanamicro.com>,
	"alistair23@gmail.com" <alistair23@gmail.com>,
	"thuth@redhat.com" <thuth@redhat.com>
Subject: Re: [PATCH v14 14/14] scripts/checkpatch: Check DEVICE_NATIVE_ENDIAN
Date: Tue, 18 Nov 2025 12:19:11 +0100	[thread overview]
Message-ID: <16cd29b1-c0fe-4dfc-81a7-654be0ea09ab@linaro.org> (raw)
In-Reply-To: <20251118085758.3996513-15-djordje.todorovic@htecgroup.com>

On 18/11/25 09:58, Djordje Todorovic wrote:
> Developers should specify endianess explicitly.
> 
> Signed-off-by: Djordje Todorovic <djordje.todorovic@htecgroup.com>
> ---
>   scripts/checkpatch.pl | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 40b6955c69..dc88fa4da4 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3206,6 +3206,10 @@ sub process {
>           if ($realfile =~ /.*\/hw\/.*/ && $line =~ /\baio_bh_new\s*\(/) {
>   			ERROR("use aio_bh_new_guarded() instead of aio_bh_new() to avoid reentrancy problems\n" . $herecurr);
>   		}
> +# check for DEVICE_NATIVE_ENDIAN, use explicit endianness instead
> +		if ($line =~ /\bDEVICE_NATIVE_ENDIAN\b/) {
> +			ERROR("DEVICE_NATIVE_ENDIAN is not allowed, use DEVICE_LITTLE_ENDIAN or DEVICE_BIG_ENDIAN instead\n" . $herecurr);
> +		}
>   # check for module_init(), use category-specific init macros explicitly please
>   		if ($line =~ /^module_init\s*\(/) {
>   			ERROR("please use block_init(), type_init() etc. instead of module_init()\n" . $herecurr);

Thank you for this patch :)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>



      reply	other threads:[~2025-11-18 11:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-18  8:58 [PATCH v14 00/14] riscv: Add support for MIPS P8700 CPU Djordje Todorovic
2025-11-18  8:58 ` [PATCH v14 01/14] hw/intc: Allow gaps in hartids for aclint and aplic Djordje Todorovic
2025-11-18  8:58 ` [PATCH v14 02/14] target/riscv: Add cpu_set_exception_base Djordje Todorovic
2025-11-18  8:58 ` [PATCH v14 03/14] target/riscv: Add MIPS P8700 CPU Djordje Todorovic
2025-11-18  8:58 ` [PATCH v14 04/14] target/riscv: Add MIPS P8700 CSRs Djordje Todorovic
2025-11-18  8:58 ` [PATCH v14 06/14] target/riscv: Add mips.pref instruction Djordje Todorovic
2025-11-18  8:58 ` [PATCH v14 05/14] target/riscv: Add mips.ccmov instruction Djordje Todorovic
2025-11-18  8:58 ` [PATCH v14 09/14] hw/misc: Add RISC-V CPC device implementation Djordje Todorovic
2025-11-18  8:58 ` [PATCH v14 08/14] hw/misc: Add RISC-V CMGCR " Djordje Todorovic
2025-11-18  8:58 ` [PATCH v14 07/14] target/riscv: Add Xmipslsp instructions Djordje Todorovic
2025-11-18  8:58 ` [PATCH v14 10/14] hw/riscv: Add support for RISCV CPS Djordje Todorovic
2025-11-18  8:58 ` [PATCH v14 11/14] hw/riscv: Add support for MIPS Boston-aia board mode Djordje Todorovic
2025-11-18  8:58 ` [PATCH v14 13/14] test/functional: Add test for boston-aia board Djordje Todorovic
2025-11-18  8:58 ` [PATCH v14 12/14] riscv/boston-aia: Add an e1000e NIC in slot 0 func 1 Djordje Todorovic
2025-11-18  8:58 ` [PATCH v14 14/14] scripts/checkpatch: Check DEVICE_NATIVE_ENDIAN Djordje Todorovic
2025-11-18 11:19   ` Philippe Mathieu-Daudé [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=16cd29b1-c0fe-4dfc-81a7-654be0ea09ab@linaro.org \
    --to=philmd@linaro.org \
    --cc=Djordje.Todorovic@htecgroup.com \
    --cc=alistair23@gmail.com \
    --cc=cfu@mips.com \
    --cc=dbarboza@ventanamicro.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=thuth@redhat.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 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).