From patchwork Fri Jun 21 00:20:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lira, Victor M" X-Patchwork-Id: 13706563 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7ED92C2BA18 for ; Fri, 21 Jun 2024 00:21:36 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.744930.1152049 (Exim 4.92) (envelope-from ) id 1sKS1w-0004oF-Ut; Fri, 21 Jun 2024 00:21:28 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 744930.1152049; Fri, 21 Jun 2024 00:21:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sKS1w-0004o8-RX; Fri, 21 Jun 2024 00:21:28 +0000 Received: by outflank-mailman (input) for mailman id 744930; Fri, 21 Jun 2024 00:21:27 +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 1sKS1v-0004nl-BO for xen-devel@lists.xenproject.org; Fri, 21 Jun 2024 00:21:27 +0000 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2061a.outbound.protection.outlook.com [2a01:111:f403:2009::61a]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 31818b8b-2f64-11ef-90a3-e314d9c70b13; Fri, 21 Jun 2024 02:21:25 +0200 (CEST) Received: from BN9PR03CA0085.namprd03.prod.outlook.com (2603:10b6:408:fc::30) by SA0PR12MB4496.namprd12.prod.outlook.com (2603:10b6:806:9b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.19; Fri, 21 Jun 2024 00:21:22 +0000 Received: from BN3PEPF0000B06D.namprd21.prod.outlook.com (2603:10b6:408:fc:cafe::c1) by BN9PR03CA0085.outlook.office365.com (2603:10b6:408:fc::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.33 via Frontend Transport; Fri, 21 Jun 2024 00:21:21 +0000 Received: from SATLEXMB03.amd.com (165.204.84.17) by BN3PEPF0000B06D.mail.protection.outlook.com (10.167.243.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7719.0 via Frontend Transport; Fri, 21 Jun 2024 00:21:20 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 20 Jun 2024 19:21:20 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 20 Jun 2024 19:21:20 -0500 Received: from xsjwoods50.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Thu, 20 Jun 2024 19:21:19 -0500 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: 31818b8b-2f64-11ef-90a3-e314d9c70b13 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zk61pXsG9FqDEl5FulA1Vz3elwRIHugBhKHZ+6umFwl3ZvlMgVC94DnC7+IDQygWF2aZ9dB/7+cFzhXk70b8wYFvsWtiwX9UCYb01CbxQ/+bk1E+seftq3Kwgx9lLwMZfloR+SiwnhCHf5yNq6i0vAtC5PA6126i9gh0WbRGOHkImYNTljgdykV2cBNkWghUi9SCmPgahg01UfIqSWRTLWCSN3vE9nPERx7K5v/O7fGM7i2uyGFMhFGe6P69Tj6fiUVviDhAaYOak396BOKUzqXqoxXAn568mshq1NCtl0zHI7Io8wztlYXrE1qdNaG3f6X/qhlW3pjPDMrhjdxgQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vpxELYzvYWyx31e2HQRfcOug61WECZXw5QfrjJ9qZVA=; b=K/ZN8uNo8mbmbq2oEMx6OL1sY9GyNEQFcbpVGMt4YqIdPVFgln4EdQtUBOyQaQw3NNu1tkSf1hQfpElPwzWhxXnhdlz+hIBHm4X/sePZ8NbP/DrORflbehYUom1XgfgeHs6HOQsHdda/hAqHDELUlbAa4Z0C+wyCONqbsyl0j7SymlE7JxEPzYBv0JXaiqi1m8uvXA23aCFrat01hLwUtzQepUe2P+8K5ekp1w9UtPKN7DrOu3GDRctOQj09VXK8D5/6zJlogm/xbPl8FnHTnNF3ebqGlcmToeWTC94/9v+1m3ZUyBByfR5ASKC01wDpP1qtC2JIIuUelRlHer49xQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vpxELYzvYWyx31e2HQRfcOug61WECZXw5QfrjJ9qZVA=; b=TrNtBvwAelRayBUKjiF+BJJfqWnga73uKVZaiVnWaZiwJToIc30CNibx5aMhR3pHBT1rR7MmYaodtx1NB56jrvCWm9fuxQ/ehE3c7wW+qUrqZR0S6fjT02h+DJZ7tccinTMZ9B28GooilF8Ciquxld3njT288Tt7UPHtSQQDH5w= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C From: To: CC: , Victor Lira , "Stewart Hildebrand" , George Dunlap , Dario Faggioli , "Juergen Gross" Subject: [XEN PATCH] common/sched: address a violation of MISRA C Rule 8.8 Date: Thu, 20 Jun 2024 17:20:30 -0700 Message-ID: <5b6dfc7571bd76b5546d3881bd660a4e7a745409.1718928467.git.victorm.lira@amd.com> X-Mailer: git-send-email 2.37.6 MIME-Version: 1.0 Received-SPF: None (SATLEXMB05.amd.com: victorm.lira@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN3PEPF0000B06D:EE_|SA0PR12MB4496:EE_ X-MS-Office365-Filtering-Correlation-Id: 463a6245-b74d-41e6-dcab-08dc9188138d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|376011|82310400023|36860700010|1800799021; X-Microsoft-Antispam-Message-Info: Vl1tuuKaOnLtnLRBHLWWaaToJPo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rkf+QXi8dH3bePpg0TTcyegppPQwmAtHoJ1uU3ZmJQ85PmfpvOhwM7wfLaIpWR4ftvkg3jk3DdLr6CtLV5BKTiHjSC1b4KUJK4ebRarxS8oUHkUI6Jwzg/iIf8gfoAm7kfsmevUC5Xws8vcFLdls9gXvrA/tN7tnbJ+PSD4Fnp4QrobIKowKFeP2ggEfRNoTWZDZk2u558+rg5PnoLICZSIB9CSCDXFXvY6MKxJHKPojTds7CBs7kYeXNn9vXurHUB0ktqEnI9+DNixUe8Z09UCzuHzWJmkZ77UMziBvyVecsZb5migU+8gMbr9rjMF5Zc0KdAOqQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230037)(376011)(82310400023)(36860700010)(1800799021);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2024 00:21:20.8786 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 463a6245-b74d-41e6-dcab-08dc9188138d X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN3PEPF0000B06D.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4496 From: Victor Lira Rule 8.8: "The static storage class specifier shall be used in all declarations of objects and functions that have internal linkage" This patch fixes this by adding the static specifier. No functional changes. Reported-by: Stewart Hildebrand Signed-off-by: Victor Lira Acked-by: George Dunlap --- Cc: George Dunlap Cc: Dario Faggioli Cc: Juergen Gross Cc: xen-devel@lists.xenproject.org --- xen/common/sched/credit2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/common/sched/credit2.c b/xen/common/sched/credit2.c index 685929c290..10a32bd160 100644 --- a/xen/common/sched/credit2.c +++ b/xen/common/sched/credit2.c @@ -1476,7 +1476,7 @@ static inline void runq_remove(struct csched2_unit *svc) list_del_init(&svc->runq_elem); } -void burn_credits(struct csched2_runqueue_data *rqd, struct csched2_unit *svc, +static void burn_credits(struct csched2_runqueue_data *rqd, struct csched2_unit *svc, s_time_t now); static inline void @@ -1855,7 +1855,7 @@ static void reset_credit(int cpu, s_time_t now, struct csched2_unit *snext) /* No need to resort runqueue, as everyone's order should be the same. */ } -void burn_credits(struct csched2_runqueue_data *rqd, +static void burn_credits(struct csched2_runqueue_data *rqd, struct csched2_unit *svc, s_time_t now) { s_time_t delta;