From nobody Fri Nov 29 03:33:35 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=1652099109; cv=none; d=zohomail.com; s=zohoarc; b=GWdHUvx9+WR8M8d9ZrbHnLGDOhwJepl4BZjFTEYmdrWKQAM08ePPUi2M3AUDoMxZ0CsCvc3dZJJtX4PKIxquBnWhMxDYP/aeKhB6e6kA3sVmRERdYzB6sLg5iJDyPDMZlHY6VuERNUSOLyakftbMZLqreS5Iz4A7T3m6mpI6c/Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1652099109; 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=NE/MOTwGpZ6bhphzhTvMshJ6BlYUwm1WMNoCG4VcJEk=; b=n7uHIpLL0Cs0iT/gbnQwJVNzPCn4osS2q8jYjmWxl2yAWjZ3owCzXz95Wh8ONw8KgsWNLUEFXiDO40XoIiWBa4PP/rvqY5UyqLzVKENRSDPs+mgZbThCqhMapMDV4R2zGnfKZ46r759MXf6lY4h8o04pVml5ZfJIU63IWzt6iXM= 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 1652099109316513.320329398334; Mon, 9 May 2022 05:25:09 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.324459.546534 (Exim 4.92) (envelope-from ) id 1no2RO-0006WV-84; Mon, 09 May 2022 12:24:42 +0000 Received: by outflank-mailman (output) from mailman id 324459.546534; Mon, 09 May 2022 12:24:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1no2RO-0006W4-2y; Mon, 09 May 2022 12:24:42 +0000 Received: by outflank-mailman (input) for mailman id 324459; Mon, 09 May 2022 12:24:40 +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 1no2RM-0005qB-D3 for xen-devel@lists.xenproject.org; Mon, 09 May 2022 12:24:40 +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 fe502daa-cf92-11ec-a406-831a346695d4; Mon, 09 May 2022 14:24:38 +0200 (CEST) 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: fe502daa-cf92-11ec-a406-831a346695d4 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1652099078; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pISlbMmZOOlDowYEzoDw1/7aI4xrXsrkKlI9u5f/53s=; b=OdkN+dAOvi9PJp1dC9SqMjslLHlAV+ncd0i4UxLZpdEntAtWj3jnFcQ1 SlfaYh8Afg5W5YNSG39I5lEJSXhNBfazndG27RfdmfcGD1JOurl06h4R0 i2+e7d9xUVWAad6WxMA/3yUIhPuSw1hLU+yWqN3IBWVmyDaCeNNbl6dM0 Y=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 5.1 X-MesageID: 71286219 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:bqFWmahaV9g5r/LmrDery3ZJX161qRAKZh0ujC45NGQN5FlHY01je htvCm3VMvbYa2r2ctAlYd7i8EsH7cDTnNNqTQQ9qXo3RH4b9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oDJ9CU6jefSLlbFILas1hpZHGeIcw98z0M68wIFqtQw24LhXlvc4 YqaT/D3YzdJ5RYlagr41IrbwP9flKyaVOQw5wFWiVhj5TcyplFNZH4tDfjZw0jQG+G4KtWSV efbpIxVy0uCl/sb5nFJpZ6gGqECaua60QFjERO6UYD66vRJjnRaPqrWqJPwwKqY4tmEt4kZ9 TlDiXC/YQMqb7DHov9MbyZZFgJ0GZ1K2J3JDWfq5KR/z2WeG5ft6/BnDUVwNowE4OdnR2pJ8 JT0KhhUMErF3bjvhuvmFK883azPL+GyVG8bklhmwSvUErANRpfbTr+RzdRZwC0xloZFGvO2i 88xNmM1PEqaOkwn1lE/A6svmdz1vXjGSxJEuX64hvNpwHnM01kkuFTqGIWMIYHbLSlPpW6au 2bH8mLREhwcctuFxlKtzHWogePemDLhb6gbHra46/1CjUWawyoYDxh+fVG2u+Wjg0iyHddWM VUJ+zEGpLI3skesS7HVQBmQsHOC+BkGVLJ4A+A8rQ2A1KfQywKYHXQfCC5MbsQ8s807TiBs0 UWG9/vLLzFytLyeSVqG66yZ6zi1PEA9NnQebCUJSQ8E5djLo4wpiB/LCNF5H8aIYsbdQG+qh WrQ9W5n2utV3ZVjO7iHEU7vhzH9u5PzVV8J2QTSfWiB3g9ZRoCJeNn9gbTE1spoIIGcR1iHm XELncmC8ewDZa2weDyxrPYlR+/wuavcWNHIqRs2RsR6qWzxk5K2VdoIiAySMnuFJSrtldXBR EbI8T1c65ZIVJdBRf8mOtnhYyjGIEWJKDgEahw2RocVCnSSXFXelM2LWaJ39zq0+HXAaYllZ f+mnT+EVB7285hPwjusXPs62rQ23C04zm67bcmlkk7/jOHPPCPKE+ht3L6yggcRtvjsneko2 4wHa5viJ+t3DoUSnRU7AaZMdAtXfBDX9Lj9qtBNd/7rH+aVMDpJNhMl+pt4I9YNt/0Mzo/gp yjhMmcFmQGXrSCWdm23hoVLNeqHsWBX9iprY0TB/D+AhhAeXGpYxPpBJ8ZvIel7pYSOD5dcF pE4RilJOdwXIhyvxtjXRcOVQFBKHPhzuT+zAg== IronPort-HdrOrdr: A9a23:b7QBUattKOmXFOeqZ4TYEYrI7skDTNV00zEX/kB9WHVpmszxra GTdZMgpGfJYVcqKQgdcL+7Scq9qB/nmqKdpLNhWYtKPzOW3ldATrsSj7cKqgeIc0aVm4JgPO VbAs9D4bXLfCNHZK3BgDVQfexP/DD+ytHMudvj X-IronPort-AV: E=Sophos;i="5.91,211,1647316800"; d="scan'208";a="71286219" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= , Wei Liu , Stefano Stabellini , Julien Grall , Volodymyr Babchuk , Bertrand Marquis Subject: [PATCH 3/3] common/spinlock: Drop inline from _spin_lock_cb() Date: Mon, 9 May 2022 13:24:09 +0100 Message-ID: <20220509122409.14184-4-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20220509122409.14184-1-andrew.cooper3@citrix.com> References: <20220509122409.14184-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: 1652099110773100001 This is undefined behaviour, because there is no _spin_lock_cb() in a separ= ate translation unit (C11 6.7.4.11). Moreover, MISRA prohibits this construct because, in the case where it is w= ell defined, the compiler is free to use either implementation and nothing prevents the two from being different. This function has external users, so drop the inline. Spotted by Eclair MISRA scanner. Signed-off-by: Andrew Cooper Reviewed-by: Bertrand Marquis --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 CC: Wei Liu CC: Stefano Stabellini CC: Julien Grall CC: Volodymyr Babchuk CC: Bertrand Marquis --- xen/common/spinlock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c index 62c83aaa6a73..8cb3b316c5b1 100644 --- a/xen/common/spinlock.c +++ b/xen/common/spinlock.c @@ -159,7 +159,7 @@ static always_inline u16 observe_head(spinlock_tickets_= t *t) return read_atomic(&t->head); } =20 -void inline _spin_lock_cb(spinlock_t *lock, void (*cb)(void *), void *data) +void _spin_lock_cb(spinlock_t *lock, void (*cb)(void *), void *data) { spinlock_tickets_t tickets =3D SPINLOCK_TICKET_INC; LOCK_PROFILE_VAR; --=20 2.11.0