Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1siues-0005ro-HM for mharc-qemu-trivial@gnu.org; Tue, 27 Aug 2024 07:46:46 -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 1siueq-0005qr-GU for qemu-trivial@nongnu.org; Tue, 27 Aug 2024 07:46:44 -0400 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1siueo-000358-EC for qemu-trivial@nongnu.org; Tue, 27 Aug 2024 07:46:44 -0400 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-3718eaf4046so3966382f8f.3 for ; Tue, 27 Aug 2024 04:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1724759200; x=1725364000; darn=nongnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=2FpP0CxxnB9Vb4qOSUo+F863TQgwaTjAW0Ma+Hnaaf4=; b=bZap+n/07Mp/iZMhWmFWl2mu4WwQ4twE/lccJouV26f+9aeShEae7Y+OhBylURrKTR fNJnqxOkJUoAhOzwwVn98rdo1pAQ5Q7BbiNjpWnCZSbZQdktv71cL/IgtfV6eobaNzaX c8l0J+qSnZGjdjvk8wXHWafx45LQ8X4gVMvjnrSz3OAl1WgchRt6OefKX56wbMj10wHG kbYaDhMJQnXwT/qLc2zEieIfkdVwna89KGYlMafvwEj4JRP9RzmQb/ItM0WhQI99EdgA XXYTjMThRti5Vo/F+I45o7nG9rcTdxePJmgXxbzqUbVEDCHshUOoDClcqT2FLy6OAmQ3 EA/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724759200; x=1725364000; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2FpP0CxxnB9Vb4qOSUo+F863TQgwaTjAW0Ma+Hnaaf4=; b=REWlOaQR+13hkDpzlvXGkxz3c605/MmeCTY89ySryhfRrzok28YSN1UYu5vTzBwYy8 xTitlEfJLjs+h/VYidbZFbpNfq3iS+uNCCvwxmSAAAFBZiYxnkdI3mNoSpHhYE+wzMaq C1i0drR8/Rj1Okc/COvKaql4OBDj+nYjPqdwC8uXDQP2T3uXhvm3DNNuxEoeA0irsuJt l2bVtM8nehJJ1ik/h3c4Opzebzc1wKmP9lRbvSllHXXRAsC0RbaQJULWUNEpQ6E1fWzT gJZ6odHQ3x7nLgq5UBv+DltI50plHnwnvzCKCIkrIYRNoWny0yjGBIg/Qc4CvTKF6go+ X+qQ== X-Gm-Message-State: AOJu0YzMnXdWMwayORyM58ZEYex1aw88O0OFLsyT5MtRTLIXMQmQpkJq 2h7RzYry3O8pwAh8ieThPl/ybsqw8M3rI0zVJeuc6j0esAZkReBUtSfhNZB3yAg= X-Google-Smtp-Source: AGHT+IHu050Eb+0Njwkw5uH8D5lMHj7y08eTIxnuXTsYaBQtunHinx9kGDv3BJUi942XpFA506RCnA== X-Received: by 2002:a5d:674f:0:b0:368:5042:25f3 with SMTP id ffacd0b85a97d-37311863b04mr10248277f8f.34.1724759199920; Tue, 27 Aug 2024 04:46:39 -0700 (PDT) Received: from [192.168.69.100] ([176.187.206.45]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42abefff552sm216864575e9.46.2024.08.27.04.46.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Aug 2024 04:46:39 -0700 (PDT) Message-ID: Date: Tue, 27 Aug 2024 13:46:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mark with for-crc32 in a consistent manner To: Michael Tokarev , Richard Henderson Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org, WANG Xuerui , Ard Biesheuvel References: <20240827100207.3502764-1-mjt@tls.msk.ru> Content-Language: en-US From: =?UTF-8?Q?Philippe_Mathieu-Daud=C3=A9?= In-Reply-To: <20240827100207.3502764-1-mjt@tls.msk.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2024 11:46:44 -0000 +Richard On 27/8/24 12:02, Michael Tokarev wrote: > in many cases, is only included for crc32 function, > and in some of them, there's a comment saying that, but in > a different way. In one place (hw/net/rtl8139.c), there was > another #include added between the comment and include. > > Make all such comments to be on the same line as #include, make > it consistent, and also add a few missing comments, including > hw/nvram/mac_nvram.c which uses adler32 instead. > > There's no code changes. > > Signed-off-by: Michael Tokarev > --- > hw/net/cadence_gem.c | 2 +- > hw/net/dp8393x.c | 2 +- > hw/net/ftgmac100.c | 3 +-- > hw/net/i82596.c | 2 +- > hw/net/imx_fec.c | 3 +-- > hw/net/lan9118.c | 3 +-- > hw/net/mcf_fec.c | 3 +-- > hw/net/npcm7xx_emc.c | 3 +-- > hw/net/rtl8139.c | 4 +--- > hw/net/smc91c111.c | 3 +-- > hw/net/stellaris_enet.c | 2 +- > hw/nvram/mac_nvram.c | 2 +- > target/arm/helper.c | 2 +- > target/arm/tcg/helper-a64.c | 2 +- > target/loongarch/tcg/op_helper.c | 2 +- > 15 files changed, 15 insertions(+), 23 deletions(-) > diff --git a/target/arm/helper.c b/target/arm/helper.c > index 0a582c1cd3..3f77b40734 100644 > --- a/target/arm/helper.c > +++ b/target/arm/helper.c > @@ -19,7 +19,7 @@ > #include "qemu/crc32c.h" > #include "qemu/qemu-print.h" > #include "exec/exec-all.h" > -#include /* For crc32 */ > +#include /* for crc32 */ > #include "hw/irq.h" > #include "sysemu/cpu-timers.h" > #include "sysemu/kvm.h" > diff --git a/target/arm/tcg/helper-a64.c b/target/arm/tcg/helper-a64.c > index 21a9abd90a..56b431faf5 100644 > --- a/target/arm/tcg/helper-a64.c > +++ b/target/arm/tcg/helper-a64.c > @@ -33,7 +33,7 @@ > #include "qemu/int128.h" > #include "qemu/atomic128.h" > #include "fpu/softfloat.h" > -#include /* For crc32 */ > +#include /* for crc32 */ > > /* C2.4.7 Multiply and divide */ > /* special cases for 0 and LLONG_MIN are mandated by the standard */ > diff --git a/target/loongarch/tcg/op_helper.c b/target/loongarch/tcg/op_helper.c > index fe79c62fa4..b17208e5b9 100644 > --- a/target/loongarch/tcg/op_helper.c > +++ b/target/loongarch/tcg/op_helper.c > @@ -14,7 +14,7 @@ > #include "exec/cpu_ldst.h" > #include "internals.h" > #include "qemu/crc32c.h" > -#include > +#include /* for crc32 */ > #include "cpu-csr.h" > > /* Exceptions helpers */ Maybe next step is to add declarations of crc32[c]/adler32 prototypes in "include/crypto/crc32.h", and implement them falling back to zlib in host/include/generic/host/crypto/crc32.h (or crypto/crc32-zlib.c if we need). Then introduce HAVE_CRC32_ACCEL and implement host-optimized methods in host/include/{arm,aarch64,loongarch64}/host/crypto/crc32.h?