From nobody Wed Nov 13 07:19:27 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=1675200598; cv=none; d=zohomail.com; s=zohoarc; b=I4bf9Bm1EVOegR0Oh1btktHzG5wfpMjMhO+4GxlEeAo8Ceu1R/MQjznfoBP6dm1jNsbYuf1tTFcZkAUOeWoQy+gCsuEmmJUM7i5ONLMtBFJ4UY4Urxu38JKphtlJi3rxzfb5HZ8c+gr/O02QJ89yCUiobLHyqqqiiUHOtjiA+j0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1675200598; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=p20tHrivnSUo0jYxnH2bA88tSc5sKQutOOnFgLtA//4=; b=LB+jqfzSk7xCRHD57HOUKvgTUVB45r8sNiXfeJKWfwfdxKIn3/g8fiDpGHgyrVr/hrttd7A4DXT1BXV9CEHq083HEFb2AiVL725ah4b5r8q1JZbEZUAhUk+YjLumEmRFOJUwH6tFUwfuKKCXm2Zf48MDSdg6Nglqh1Ud/RuQJu8= 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 1675200598700799.5175707723296; Tue, 31 Jan 2023 13:29:58 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.487844.755557 (Exim 4.92) (envelope-from ) id 1pMyC4-0000Nz-6D; Tue, 31 Jan 2023 21:29:32 +0000 Received: by outflank-mailman (output) from mailman id 487844.755557; Tue, 31 Jan 2023 21:29:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pMyC4-0000Ns-23; Tue, 31 Jan 2023 21:29:32 +0000 Received: by outflank-mailman (input) for mailman id 487844; Tue, 31 Jan 2023 21:29:30 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1pMyC2-0000Nb-CI for xen-devel@lists.xenproject.org; Tue, 31 Jan 2023 21:29:30 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 54e58ec1-a1ae-11ed-933c-83870f6b2ba8; Tue, 31 Jan 2023 22:29:28 +0100 (CET) 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: 54e58ec1-a1ae-11ed-933c-83870f6b2ba8 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1675200568; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jNU72Uu2tmrcqHFCNgIV8t/XfjcVgtHdUCV/DbhunZ0=; b=QMTAIaJm5uUkfYsHhHh2hOmT50uppvvn2vGnDBTiyGu9DAV8jDMUCRHI deD4VWRrMcJ8iF4eZBFHj1uUyUTGWch1DkfbvylTBb428J9UtTjolI0s9 +3zUzq1u89Eb8QCyeAhb3jWz95EGclaGS6TXrvLTyzEadp/LYwBXR092n 4=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 95499176 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:DRPIu6rBBa1a1sQTvyEoYRPaRKNeBmIZZRIvgKrLsJaIsI4StFCzt garIBmGOayJYmr3L4onPYrg9k1XucfSz4BjHQZtrC9kQy0WoJuZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYWYpAFc+E0/NsDo788YhmIlknNOlNA2Ev NL2sqX3NUSsnjV5KQr40YrawP9UlKm06WxwUmAWP6gR5weHzCBNV/rzGInqR5fGatgMdgKFb 76rIIGRpgvx4xorA9W5pbf3GmVirmn6ZFXmZtJ+AsBOszAazsAA+v9T2Mk0MC+7vw6hjdFpo OihgLTrIesf0g8gr8xGO/VQO3kW0aSrY9YrK1Dn2SCY5xWun3cBX5yCpaz5VGEV0r8fPI1Ay RAXABkVS0ixwMCo+auyR+VI3ZgKHvv6BapK7xmMzRmBZRonaZXKQqGM7t5ExjYgwMtJGJ4yZ eJAN2ApNk6ZJUQSZBFOUslWcOSA3xETdxVxrl6PqLVxyG/U1AFri5DmMcbPe8zMTsJQ9qqdj jObozWoW05EXDCZ4XmM3SylpNbppgPcQLIbD6y90aJ7gULGkwT/DzVJDADm8JFVkHWWS99Zb kAZ5Ccqhawz71CwCMnwWQWip3yJtQJaXMBfe8U24R+A4rDZ6AGYAi4DVDEpVTA9nJZoH3pwj AbPxo63Q2U169V5VE5x6J+9tRbqC283M1YbbCIIaVBZyuvRsbga20enoslYLIa5idj8GDfVy j+MrTQji7h7sfPnx5lX7nic3Wvy+8Ghohodo1yOAzn7tl8RiJuNPdTA1LTN0RpXwG91pHGlt WNMp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snwuunSYJ/oVcnQ+PYfKxPC61 c4LUnOzZ97nz+Ws1fD8WbsZ08= X-IronPort-AV: E=Sophos;i="5.97,261,1669093200"; d="scan'208";a="95499176" From: Andrew Cooper To: Xen-devel CC: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= , Andrew Cooper , Christian Lindig , David Scott , Rob Hoes Subject: [PATCH 1/7] tools/ocaml/libs: Don't declare stubs as taking void Date: Tue, 31 Jan 2023 21:29:07 +0000 Message-ID: <20230131212913.6199-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20230131212913.6199-1-andrew.cooper3@citrix.com> References: <20230131212913.6199-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1675200599685100005 From: Edwin T=C3=B6r=C3=B6k There is no such thing as an Ocaml function (C stub or otherwise) taking no parameters. In the absence of any other parameters, unit is still passed. This doesn't explode with any ABI we care about, but would malfunction for = an ABI environment such as stdcall. Fixes: c3afd398ba7f ("ocaml: Add XS bindings.") Fixes: 8b7ce06a2d34 ("ocaml: Add XC bindings.") Signed-off-by: Edwin T=C3=B6r=C3=B6k Signed-off-by: Andrew Cooper --- CC: Christian Lindig CC: David Scott CC: Edwin T=C3=B6r=C3=B6k CC: Rob Hoes --- tools/ocaml/libs/xb/xenbus_stubs.c | 5 ++--- tools/ocaml/libs/xc/xenctrl_stubs.c | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/ocaml/libs/xb/xenbus_stubs.c b/tools/ocaml/libs/xb/xenbu= s_stubs.c index 3065181a55e6..97116b07826a 100644 --- a/tools/ocaml/libs/xb/xenbus_stubs.c +++ b/tools/ocaml/libs/xb/xenbus_stubs.c @@ -30,10 +30,9 @@ #include #include =20 -CAMLprim value stub_header_size(void) +CAMLprim value stub_header_size(value unit) { - CAMLparam0(); - CAMLreturn(Val_int(sizeof(struct xsd_sockmsg))); + return Val_int(sizeof(struct xsd_sockmsg)); } =20 CAMLprim value stub_header_of_string(value s) diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenc= trl_stubs.c index 2fba9c5e94d6..728818445975 100644 --- a/tools/ocaml/libs/xc/xenctrl_stubs.c +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c @@ -86,9 +86,9 @@ static void Noreturn failwith_xc(xc_interface *xch) caml_raise_with_string(*caml_named_value("xc.error"), error_str); } =20 -CAMLprim value stub_xc_interface_open(void) +CAMLprim value stub_xc_interface_open(value unit) { - CAMLparam0(); + CAMLparam1(unit); CAMLlocal1(result); xc_interface *xch; =20 --=20 2.11.0