From nobody Thu Apr 25 12:03:26 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1560217052; cv=none; d=zoho.com; s=zohoarc; b=HuHMyaE6gCyi9EIeajIASViMuPvQakqeYeJynCmCjUl4UGrgul37kePNxccXXTmT3ZfCVlfBPLGWkRzbybU4GLVgc3PnsJQ8AfrFisTHfmiEiv7mmexpg8CuSV24cooGyz/RVbzh/MQfvckFblmq5+OPYTQtnnwGLCeRRZqRKhs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560217052; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=TwbinkjW4HxFfpzEYaqvZgzLRcV/dRqx5i0AhQ3aT40=; b=n1Ho/SxI6JBslZF3osXGzpgqDWYCnmYRpOIBoEAUXBOvAc62fYLd77TOeFLTGpDkSsmVwKhmO6PzMPjUYeEhew4Dms5AF2/F1pRN4Ut4j8X8OnO/gq6Jz1nt4w/lB8Mz1kymdVNVhQlWxJUwWU0rZ4Q9oXEMWrhXSxWakj0uMqU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1560217052456700.3911609633941; Mon, 10 Jun 2019 18:37:32 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1haVho-0004Yq-JR; Tue, 11 Jun 2019 01:36:08 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1haVhn-0004Yl-QV for xen-devel@lists.xenproject.org; Tue, 11 Jun 2019 01:36:07 +0000 Received: from mxnavi-mail.mxnavi.com (unknown [116.90.87.199]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 46562782-8be9-11e9-8980-bc764e045a96; Tue, 11 Jun 2019 01:36:05 +0000 (UTC) Received: from localhost.localdomain (61.161.186.150) by mxnavi-mail.mxnavi.com (116.90.87.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1591.10; Tue, 11 Jun 2019 09:32:53 +0800 X-Inumbo-ID: 46562782-8be9-11e9-8980-bc764e045a96 From: Baodong Chen To: Date: Tue, 11 Jun 2019 09:35:45 +0800 Message-ID: <1560216945-24227-1-git-send-email-chenbaodong@mxnavi.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [61.161.186.150] X-ClientProxiedBy: mxnavi-mail.mxnavi.com (116.90.87.199) To mxnavi-mail.mxnavi.com (116.90.87.199) Subject: [Xen-devel] [PATCH] xen/scheduler: remove 'name' from 'struct scheduler' X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Tim Deegan , Stefano Stabellini , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Robert VanVossen , Dario Faggioli , Julien Grall , Josh Whitehead , Meng Xu , Jan Beulich , Baodong Chen Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 'struct scheduler' already has member 'opt_name' and 'sched_id', thus 'name' is a little redundant, so remove it. Signed-off-by: Baodong Chen --- xen/common/sched_arinc653.c | 1 - xen/common/sched_credit.c | 1 - xen/common/sched_credit2.c | 1 - xen/common/sched_null.c | 1 - xen/common/sched_rt.c | 1 - xen/common/schedule.c | 12 ++++++------ xen/include/xen/sched-if.h | 3 +-- 7 files changed, 7 insertions(+), 13 deletions(-) diff --git a/xen/common/sched_arinc653.c b/xen/common/sched_arinc653.c index a4c6d00..98d6bdd 100644 --- a/xen/common/sched_arinc653.c +++ b/xen/common/sched_arinc653.c @@ -701,7 +701,6 @@ a653sched_adjust_global(const struct scheduler *ops, * The symbol must be visible to the rest of Xen at link time. */ static const struct scheduler sched_arinc653_def =3D { - .name =3D "ARINC 653 Scheduler", .opt_name =3D "arinc653", .sched_id =3D XEN_SCHEDULER_ARINC653, .sched_data =3D NULL, diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c index 7b7facb..220b179 100644 --- a/xen/common/sched_credit.c +++ b/xen/common/sched_credit.c @@ -2262,7 +2262,6 @@ static void csched_tick_resume(const struct scheduler= *ops, unsigned int cpu) } =20 static const struct scheduler sched_credit_def =3D { - .name =3D "SMP Credit Scheduler", .opt_name =3D "credit", .sched_id =3D XEN_SCHEDULER_CREDIT, .sched_data =3D NULL, diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c index 9c1c3b4..1974e0f 100644 --- a/xen/common/sched_credit2.c +++ b/xen/common/sched_credit2.c @@ -4076,7 +4076,6 @@ csched2_deinit(struct scheduler *ops) } =20 static const struct scheduler sched_credit2_def =3D { - .name =3D "SMP Credit Scheduler rev2", .opt_name =3D "credit2", .sched_id =3D XEN_SCHEDULER_CREDIT2, .sched_data =3D NULL, diff --git a/xen/common/sched_null.c b/xen/common/sched_null.c index c9700f1..4d8a1cc 100644 --- a/xen/common/sched_null.c +++ b/xen/common/sched_null.c @@ -871,7 +871,6 @@ static void null_dump(const struct scheduler *ops) } =20 static const struct scheduler sched_null_def =3D { - .name =3D "null Scheduler", .opt_name =3D "null", .sched_id =3D XEN_SCHEDULER_NULL, .sched_data =3D NULL, diff --git a/xen/common/sched_rt.c b/xen/common/sched_rt.c index f1b81f0..e46b2c2 100644 --- a/xen/common/sched_rt.c +++ b/xen/common/sched_rt.c @@ -1541,7 +1541,6 @@ static void repl_timer_handler(void *data){ } =20 static const struct scheduler sched_rtds_def =3D { - .name =3D "SMP RTDS Scheduler", .opt_name =3D "rtds", .sched_id =3D XEN_SCHEDULER_RTDS, .sched_data =3D NULL, diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 86341bc..d5094ba 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -1729,11 +1729,11 @@ void __init scheduler_init(void) { if ( schedulers[i]->global_init && schedulers[i]->global_init() < = 0 ) schedulers[i] =3D NULL; - else if ( !ops.name && !strcmp(schedulers[i]->opt_name, opt_sched)= ) + else if ( !ops.opt_name && !strcmp(schedulers[i]->opt_name, opt_sc= hed) ) ops =3D *schedulers[i]; } =20 - if ( !ops.name ) + if ( !ops.opt_name ) { printk("Could not find scheduler: %s\n", opt_sched); for ( i =3D 0; i < NUM_SCHEDULERS; i++ ) @@ -1743,15 +1743,15 @@ void __init scheduler_init(void) ops =3D *schedulers[i]; break; } - BUG_ON(!ops.name); - printk("Using '%s' (%s)\n", ops.name, ops.opt_name); + BUG_ON(!ops.opt_name); + printk("Using scheduler (%s)\n", ops.opt_name); } =20 if ( cpu_schedule_up(0) ) BUG(); register_cpu_notifier(&cpu_schedule_nfb); =20 - printk("Using scheduler: %s (%s)\n", ops.name, ops.opt_name); + printk("Using scheduler: (%s)\n", ops.opt_name); if ( SCHED_OP(&ops, init) ) panic("scheduler returned error on init\n"); =20 @@ -1926,7 +1926,7 @@ void schedule_dump(struct cpupool *c) { sched =3D c->sched; cpus =3D c->cpu_valid; - printk("Scheduler: %s (%s)\n", sched->name, sched->opt_name); + printk("Scheduler: (%s)\n", sched->opt_name); SCHED_OP(sched, dump_settings); } else diff --git a/xen/include/xen/sched-if.h b/xen/include/xen/sched-if.h index 92bc7a0..6e3d952 100644 --- a/xen/include/xen/sched-if.h +++ b/xen/include/xen/sched-if.h @@ -130,8 +130,7 @@ struct task_slice { }; =20 struct scheduler { - char *name; /* full name for this scheduler */ - char *opt_name; /* option name for this scheduler */ + const char *opt_name; /* option name for this scheduler */ unsigned int sched_id; /* ID for this scheduler */ void *sched_data; /* global data pointer */ =20 --=20 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel