From nobody Fri Nov 22 13:01:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1716311781; cv=none; d=zohomail.com; s=zohoarc; b=l8vCpWf+4TE4gjiknyLkMfrV52nVLMSTkpfZ368RhONHLoXd/UxiDf5K9JAQ/FdU46k5YfNL4fKLVPH6el1HUVmWPp48HE4WOwBiI4nhjXCXN8bRGFnJ00zQeeyySskshzKPCsH7DFi5U8E2BK24og5Ot5SX6HjYYbtQKzEFB5c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716311781; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=n8KPCauD1h/QxTPyhyMp5VxJ7O+vNU2tVT5i7N7FwDg=; b=jrr6n85hb8VmjlCrq5Q7gLKtnkhGm8hwK2v1ipU9P4rF36Aan7Yo5jj6NMwbe0zijOj/8pad7ACelgg+JG9Znvo2nSavNPoTn9g8Qf1NvQUDYS+6ziPojFfAKCRJqZADBoJf2pKosOcXsJPn+3nOdecI/nrpUx0B4oC1S7MxMCs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1716311781004927.2175150266289; Tue, 21 May 2024 10:16:21 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.727006.1131394 (Exim 4.92) (envelope-from ) id 1s9T5e-0004lC-Uo; Tue, 21 May 2024 17:15:54 +0000 Received: by outflank-mailman (output) from mailman id 727006.1131394; Tue, 21 May 2024 17:15:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s9T5e-0004l3-Ru; Tue, 21 May 2024 17:15:54 +0000 Received: by outflank-mailman (input) for mailman id 727006; Tue, 21 May 2024 17:15:54 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s9T5e-0004kx-8t for xen-devel@lists.xenproject.org; Tue, 21 May 2024 17:15:54 +0000 Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [2a00:1450:4864:20::232]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c6a1317b-1795-11ef-b4bb-af5377834399; Tue, 21 May 2024 19:15:52 +0200 (CEST) Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2e576057c2bso83555081fa.1 for ; Tue, 21 May 2024 10:15:52 -0700 (PDT) Received: from andrewcoop.citrite.net ([160.101.139.1]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a17b01a2esm1633701766b.185.2024.05.21.10.15.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 10:15:50 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c6a1317b-1795-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1716311751; x=1716916551; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=n8KPCauD1h/QxTPyhyMp5VxJ7O+vNU2tVT5i7N7FwDg=; b=bqNs0vlyGD9nO3m7MdjXfQa48aWEQOmCBp8QG77zT3D31uipM3VqdgCVZkiFDijQBj /KaXaOa24wMEgd+OVZEa2xRhv+bNqPgc3lntih6LQPMq6VWW98GnuSlAmXEP3vPQYOn9 Pk7RkQf8ZYSAhSktIJJB1th4ROICnIOkmQd4g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716311751; x=1716916551; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n8KPCauD1h/QxTPyhyMp5VxJ7O+vNU2tVT5i7N7FwDg=; b=MkbsFLWSUV8O5hWQed1FsBo+NuOvJM6YOVlDKazJbfjjbV9ogAFv0D/Zh/djCScxEH Cd05l9QM0u084uNqQlespRzaYXDOrNCSq10YzaahMkIdWTCFT4SKxPCX6PnOE5UXXTzg IR9noBksa1RC+WAaigyIN7lSkXogdkTL3ZF8q6QpXXizjMu2Gq6/GPkPxaY3512LYPIy wiqyfZYOL6PRLRJ1y7LcxEGvPBSVS680egVcrmkXMuWMuGav3lbXwGDaDSQwD1v6107A ip988Oi/1eJGf67m8ndPdXR+YKFanfy7JsnzG2CRtgg5Ogg355hOluMgQ7v0SLccDfWY ck0w== X-Gm-Message-State: AOJu0YzWqg7zOcB9XbdsaUe2DgMk6hF6l0FnOiPfFkKL3pJbilEMVstK 0mx3lctyo0MngxiMUkQmuDu/xW1p9cEedMvsKDVHxZNbDfi/b8+Jsv/XDtuseEoJ9J16/KASWMD x1jo= X-Google-Smtp-Source: AGHT+IGwSfiFmsPP2j0uUZoXchMnqqeT1sZn4y+yf1F1qYyLp3rJi6sjSSAbgO/rbThPohw3cpuxeQ== X-Received: by 2002:a2e:7a0e:0:b0:2e2:466b:1a56 with SMTP id 38308e7fff4ca-2e52039e2c3mr254345661fa.53.1716311751043; Tue, 21 May 2024 10:15:51 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , George Dunlap , Jan Beulich , Stefano Stabellini , Julien Grall , Roberto Bagnara , "consulting @ bugseng . com" , Oleksii Kurochko Subject: [PATCH 1/3] xen/lzo: Implement COPY{4,8} using memcpy() Date: Tue, 21 May 2024 18:15:44 +0100 Message-Id: <20240521171546.3650664-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240521171546.3650664-1-andrew.cooper3@citrix.com> References: <20240521171546.3650664-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1716311782571100005 Content-Type: text/plain; charset="utf-8" This is simpler and easier for both humans and compilers to read. It also addresses 6 instances of MISRA R5.3 violation (shadowing of the ptr_ local variable inside both {put,get}_unaligned()). No change, not even in the compiled binary. Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini --- CC: George Dunlap CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall CC: Roberto Bagnara CC: consulting@bugseng.com CC: Oleksii Kurochko --- xen/common/lzo.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/xen/common/lzo.c b/xen/common/lzo.c index cc03f0f5547f..3454ce4a7e24 100644 --- a/xen/common/lzo.c +++ b/xen/common/lzo.c @@ -25,15 +25,8 @@ */ =20 =20 -#define COPY4(dst, src) \ - put_unaligned(get_unaligned((const u32 *)(src)), (u32 *)(dst)) -#if defined(__x86_64__) -#define COPY8(dst, src) \ - put_unaligned(get_unaligned((const u64 *)(src)), (u64 *)(dst)) -#else -#define COPY8(dst, src) \ - COPY4(dst, src); COPY4((dst) + 4, (src) + 4) -#endif +#define COPY4(dst, src) memcpy(dst, src, 4) +#define COPY8(dst, src) memcpy(dst, src, 8) =20 #ifdef __MINIOS__ # include --=20 2.30.2 From nobody Fri Nov 22 13:01:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1716311780; cv=none; d=zohomail.com; s=zohoarc; b=hIeAbfPueKM2SMLI/RbdaK6+6JUxy4/KE9vdoaBe3/pNsbSD5/Y/21+X0wgXBe+Wz6lvIQf8MBhR0vht7jnOYPrD8O0QQcC8VIs85bmQt1SMTOHq2TzVqMO3A7+7Gcwx1oGNA/7NxOzIHAYjaI0sZvMxkEvCojpzdDAIxLQrSEg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716311780; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=5B2c9g1y7aKzjwGqZJNQwIvT3KveJvpY8WkxZZKikdI=; b=j3OTv0/jy/u1c8bIENSiLcZTTolPw7KchxqM9Itm8R9dKVK6yaaSOsWXeeBh3hESHdChll5cinoFPcf5OL+G3KoB9GZavQSZWxP/pmKb6NJa4fsDO9E4/1DGmv9s7QKOxkfczXHlxx4isOJ/KQdCzsF//DcRCTxxeEkTmNrUoNM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1716311780110981.3547884584318; Tue, 21 May 2024 10:16:20 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.727007.1131404 (Exim 4.92) (envelope-from ) id 1s9T5g-000505-5N; Tue, 21 May 2024 17:15:56 +0000 Received: by outflank-mailman (output) from mailman id 727007.1131404; Tue, 21 May 2024 17:15:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s9T5g-0004zw-1K; Tue, 21 May 2024 17:15:56 +0000 Received: by outflank-mailman (input) for mailman id 727007; Tue, 21 May 2024 17:15:55 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s9T5e-0004kx-Uh for xen-devel@lists.xenproject.org; Tue, 21 May 2024 17:15:54 +0000 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [2a00:1450:4864:20::629]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c6cc0968-1795-11ef-b4bb-af5377834399; Tue, 21 May 2024 19:15:52 +0200 (CEST) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a5a5cb0e6b7so914803766b.1 for ; Tue, 21 May 2024 10:15:52 -0700 (PDT) Received: from andrewcoop.citrite.net ([160.101.139.1]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a17b01a2esm1633701766b.185.2024.05.21.10.15.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 10:15:51 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c6cc0968-1795-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1716311752; x=1716916552; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5B2c9g1y7aKzjwGqZJNQwIvT3KveJvpY8WkxZZKikdI=; b=ntoYAngRptf6uQPSoPC5WUrVq1bnhlzt4WZpb5J9f2CykjF17levd1gENElY1PD6va ZWOCHkUhtJhJSo3y4sG2+JCqx7L9iPOR1Y8FRqeKp8qeAK4NozQJ/qZfUE+PDlZE9y4i +qQ/evlIngJtjucblxthV0IgI9SLQkYXHWTDo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716311752; x=1716916552; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5B2c9g1y7aKzjwGqZJNQwIvT3KveJvpY8WkxZZKikdI=; b=d9ufg7LN2KrHB/Ia1flrUr7ZFaEe1QLksA3ppi2k+wzOHeJ+LkRrK+aRpZy0KcaiNX Y58i/0PkuZPbAsgslWrQVAZD35IzWDvPIlBB+9zycfnU7TsxOgDK8dCp1luLWs/3466D uyOzyMEQfC679X+64J4ylOAL2rRCRkPUcFdGQVx+MToFT4tLFRUC5Y4ya6be23chNHOP zpDFbIqqlP5hajoGTC/SDTklZDnkC9Qm2DwiBu+5SLYB8uQsJb/FjMd224EFFi/62tzG JjytInpabPFbayKGFhfAMrukAWmuCA7zwsBG7yTDnR6evXMnytHiWM63ZuZFOFeyBc9g YEHQ== X-Gm-Message-State: AOJu0Yz2Wr5ajnkii1cCTpUEZqr6JSWLQ5OUQSEeHfPLwPHgswkXBW1d qa2xnEr8fxEBHWuTMFM4qKPrIMr82ytxSDbOjucnKpQ3v0fytyt0/AAOBxQ9wSiKkbC286U8a8H NjQc= X-Google-Smtp-Source: AGHT+IGKBlnC4aUlAtSStcXUBX/m7c79FkGO43xaEXt+WhXGcyap3nd6jcMgUWmIeKjp87TzozmoFw== X-Received: by 2002:a17:906:8315:b0:a59:a977:a154 with SMTP id a640c23a62f3a-a5a2d6786b5mr2132997566b.64.1716311751813; Tue, 21 May 2024 10:15:51 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , George Dunlap , Jan Beulich , Stefano Stabellini , Julien Grall , Roberto Bagnara , "consulting @ bugseng . com" , Oleksii Kurochko Subject: [PATCH 2/3] xen/x86: Drop useless non-Kconfig CONFIG_* variables Date: Tue, 21 May 2024 18:15:45 +0100 Message-Id: <20240521171546.3650664-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240521171546.3650664-1-andrew.cooper3@citrix.com> References: <20240521171546.3650664-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1716311780612100001 Content-Type: text/plain; charset="utf-8" These are all either completely unused, or do nothing useful. Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini --- CC: George Dunlap CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall CC: Roberto Bagnara CC: consulting@bugseng.com CC: Oleksii Kurochko --- xen/arch/x86/include/asm/config.h | 4 ---- xen/include/xen/acpi.h | 9 --------- xen/include/xen/watchdog.h | 11 ----------- 3 files changed, 24 deletions(-) diff --git a/xen/arch/x86/include/asm/config.h b/xen/arch/x86/include/asm/c= onfig.h index ab7288cb3682..24b005ba1ff7 100644 --- a/xen/arch/x86/include/asm/config.h +++ b/xen/arch/x86/include/asm/config.h @@ -20,7 +20,6 @@ #define BITS_PER_XEN_ULONG BITS_PER_LONG =20 #define CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS 1 -#define CONFIG_DISCONTIGMEM 1 #define CONFIG_NUMA_EMU 1 =20 #define CONFIG_PAGEALLOC_MAX_ORDER (2 * PAGETABLE_ORDER) @@ -30,11 +29,8 @@ /* Intel P4 currently has largest cache line (L2 line size is 128 bytes). = */ #define CONFIG_X86_L1_CACHE_SHIFT 7 =20 -#define CONFIG_ACPI_SRAT 1 #define CONFIG_ACPI_CSTATE 1 =20 -#define CONFIG_WATCHDOG 1 - #define CONFIG_MULTIBOOT 1 =20 #define HZ 100 diff --git a/xen/include/xen/acpi.h b/xen/include/xen/acpi.h index e78e7e785252..bc4818c9430a 100644 --- a/xen/include/xen/acpi.h +++ b/xen/include/xen/acpi.h @@ -140,15 +140,6 @@ int get_cpu_id(u32 acpi_id); unsigned int acpi_register_gsi (u32 gsi, int edge_level, int active_high_l= ow); int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); =20 -/* - * This function undoes the effect of one call to acpi_register_gsi(). - * If this matches the last registration, any IRQ resources for gsi - * are freed. - */ -#ifdef CONFIG_ACPI_DEALLOCATE_IRQ -void acpi_unregister_gsi (u32 gsi); -#endif - #ifdef CONFIG_ACPI_CSTATE /* * max_cstate sets the highest legal C-state. diff --git a/xen/include/xen/watchdog.h b/xen/include/xen/watchdog.h index 86fde0884ae7..434fcbdd2b11 100644 --- a/xen/include/xen/watchdog.h +++ b/xen/include/xen/watchdog.h @@ -9,8 +9,6 @@ =20 #include =20 -#ifdef CONFIG_WATCHDOG - /* Try to set up a watchdog. */ int watchdog_setup(void); =20 @@ -23,13 +21,4 @@ void watchdog_disable(void); /* Is the watchdog currently enabled. */ bool watchdog_enabled(void); =20 -#else - -#define watchdog_setup() ((void)0) -#define watchdog_enable() ((void)0) -#define watchdog_disable() ((void)0) -#define watchdog_enabled() ((void)0) - -#endif - #endif /* __XEN_WATCHDOG_H__ */ --=20 2.30.2 From nobody Fri Nov 22 13:01:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1716311784; cv=none; d=zohomail.com; s=zohoarc; b=dKuURaTft/8SOmCCOJRyOo/pDi1PBtPb/FVN8dobdVZuuP8qBJOjJ8Cw6IodQCqPduTrlLKVkP+42C7tyLj1JRp98jTtvNKPaet6j7oPPnRz32DtlwTnJeYQkzteujtsmqkxuo5EmQ40qIhgDrkdmgs0nH0pTLkSd6HPKh+ZiAE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716311784; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8g3u7OwfcnXYNWIVYdAYd5uW4iG/kfNNCLqG31h0UaY=; b=l+HDJVHCwj13eroqf0hyJMehLRv7xhlToaAEdxWtakSaVeCSU+DwRQOOP5UjhytgDauvYYWOCUIqiMgGoVFtQ89ilSRd/wCexaTzAKI0JYe7OVWQSRIibtkm8zVRRK54fte30UQSP2RktRD8/D99fpgzSO3Uw+IUfvJxGk1Tvpw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1716311784115391.9058767117863; Tue, 21 May 2024 10:16:24 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.727008.1131413 (Exim 4.92) (envelope-from ) id 1s9T5h-0005FO-EJ; Tue, 21 May 2024 17:15:57 +0000 Received: by outflank-mailman (output) from mailman id 727008.1131413; Tue, 21 May 2024 17:15:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s9T5h-0005FF-Bd; Tue, 21 May 2024 17:15:57 +0000 Received: by outflank-mailman (input) for mailman id 727008; Tue, 21 May 2024 17:15:56 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1s9T5f-0004kx-Uk for xen-devel@lists.xenproject.org; Tue, 21 May 2024 17:15:55 +0000 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [2a00:1450:4864:20::631]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c750c4e0-1795-11ef-b4bb-af5377834399; Tue, 21 May 2024 19:15:53 +0200 (CEST) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a59c448b44aso881811266b.2 for ; Tue, 21 May 2024 10:15:53 -0700 (PDT) Received: from andrewcoop.citrite.net ([160.101.139.1]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a5a17b01a2esm1633701766b.185.2024.05.21.10.15.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 10:15:52 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c750c4e0-1795-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1716311753; x=1716916553; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8g3u7OwfcnXYNWIVYdAYd5uW4iG/kfNNCLqG31h0UaY=; b=PCzXBupEebowze8u8FKDQAZ+qFh8tZu/VBT/gzTXbYgV2o6CFoGH9VHtcSYFKa20xR 69FGQ5GaXyGGIrvwnVOsBV6UsW6+jgtXeJzR0YL7VzL9Y6tGRFpiz8hYhmmJuekGhkxo YPBUmiqYZW78QruSlsVg8rFxYEX5ve1+nKmyo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716311753; x=1716916553; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8g3u7OwfcnXYNWIVYdAYd5uW4iG/kfNNCLqG31h0UaY=; b=HkLcpULQo9Vyl+6PQsIHCKZ6I2Inv5MdP93nUIOCbGPL4vcAc2hvwf83Dp3LiqS3Sg PC1i3ei/HGglgI3HGekWJtYIVJU6hkSv5jSNHWI+t35qPUE2Hm/Xo+m4njrd/6P26bjQ 1FYh6oNeLpWY5AgFLnc09bd3OKjgKxHa/C7MJqBVEAgZC5GmlRu6q79MPdrUz/3PrUcI sKX2K+7uVJR4zyNzRqycwH4rl+zJDivmWdg+nrnXcC3n2AlbUZbvJT84lEYO8oMlQP5A bECjc93Ath2lUK1xcTfYxH1EfK+eSQ06dDtKwsdN/CeRJ+Rp8Nlw07N4mpgj5pw8Kcck o4hg== X-Gm-Message-State: AOJu0YzYCTABFnkVevP3YUEEGnrQxQdYe0w7BF5v38XHKNM2Opyg03/C mI2QDxFRB7tU1mPs1zOWzi1D5jbd+5nZ33EBBItGTAOHu8akwYK/Hrv1Gbu2+xh7vw0/6YNieZr DbUw= X-Google-Smtp-Source: AGHT+IHi8WUDniYaK0qJBVO/ZXZhtE6ocfJ6wJ8+lH9JrASZvQuMyMVqddjClPEi+/rLDz+2zDlgVw== X-Received: by 2002:a17:906:d935:b0:a59:d243:945 with SMTP id a640c23a62f3a-a5a2d66a888mr1940746666b.57.1716311752774; Tue, 21 May 2024 10:15:52 -0700 (PDT) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , George Dunlap , Jan Beulich , Stefano Stabellini , Julien Grall , Roberto Bagnara , "consulting @ bugseng . com" , Oleksii Kurochko Subject: [PATCH 3/3] xen/x86: Address two misc MISRA 17.7 violations Date: Tue, 21 May 2024 18:15:46 +0100 Message-Id: <20240521171546.3650664-4-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240521171546.3650664-1-andrew.cooper3@citrix.com> References: <20240521171546.3650664-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1716311784522100007 Content-Type: text/plain; charset="utf-8" Neither text_poke() nor watchdog_setup() have return value consulted. Swit= ch them to being void. Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini --- CC: George Dunlap CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall CC: Roberto Bagnara CC: consulting@bugseng.com CC: Oleksii Kurochko --- xen/arch/x86/alternative.c | 4 ++-- xen/arch/x86/nmi.c | 5 ++--- xen/include/xen/watchdog.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/alternative.c b/xen/arch/x86/alternative.c index 2e7ba6e0b833..7824053c9d33 100644 --- a/xen/arch/x86/alternative.c +++ b/xen/arch/x86/alternative.c @@ -155,10 +155,10 @@ void init_or_livepatch add_nops(void *insns, unsigned= int len) * "noinline" to cause control flow change and thus invalidate I$ and * cause refetch after modification. */ -static void *init_or_livepatch noinline +static void init_or_livepatch noinline text_poke(void *addr, const void *opcode, size_t len) { - return memcpy(addr, opcode, len); + memcpy(addr, opcode, len); } =20 extern void *const __initdata_cf_clobber_start[]; diff --git a/xen/arch/x86/nmi.c b/xen/arch/x86/nmi.c index f6329cb0270e..9793fa23168d 100644 --- a/xen/arch/x86/nmi.c +++ b/xen/arch/x86/nmi.c @@ -464,12 +464,12 @@ bool watchdog_enabled(void) return !atomic_read(&watchdog_disable_count); } =20 -int __init watchdog_setup(void) +void __init watchdog_setup(void) { unsigned int cpu; =20 /* - * Activate periodic heartbeats. We cannot do this earlier during=20 + * Activate periodic heartbeats. We cannot do this earlier during * setup because the timer infrastructure is not available. */ for_each_online_cpu ( cpu ) @@ -477,7 +477,6 @@ int __init watchdog_setup(void) register_cpu_notifier(&cpu_nmi_nfb); =20 watchdog_enable(); - return 0; } =20 /* Returns false if this was not a watchdog NMI, true otherwise */ diff --git a/xen/include/xen/watchdog.h b/xen/include/xen/watchdog.h index 434fcbdd2b11..40c21bca823f 100644 --- a/xen/include/xen/watchdog.h +++ b/xen/include/xen/watchdog.h @@ -10,7 +10,7 @@ #include =20 /* Try to set up a watchdog. */ -int watchdog_setup(void); +void watchdog_setup(void); =20 /* Enable the watchdog. */ void watchdog_enable(void); --=20 2.30.2