[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/6] x86/setup: Make the loader variable const
- To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- Date: Mon, 20 Nov 2023 22:49:07 +0000
- Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roberto Bagnara <roberto.bagnara@xxxxxxxxxxx>
- Delivery-date: Mon, 20 Nov 2023 22:49:31 +0000
- Ironport-data: A9a23:NRCWsKPWwwIoxHjvrR2ll8FynXyQoLVcMsEvi/4bfWQNrUpx0jAHm 2AcUDzXafaNN2LyLttzbduy8BkA75LXx9ZjSwto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CQ6jefQAOOkVIYoAwgpLSd8UiAtlBl/rOAwh49skLCRDhiE/ Nj/uKUzAnf8s9JPGjxSs/7rRC9H5qyo42pB5ARmP5ingXeF/5UrJMNHTU2OByOQrrl8RoaSW +vFxbelyWLVlz9F5gSNy+uTnuUiG9Y+DCDW4pZkc/HKbitq/0Te5p0TJvsEAXq7vh3S9zxHJ HehgrTrIeshFvWkdO3wyHC0GQkmVUFN0OevzXRSLaV/ZqAJGpfh66wGMa04AWEX0sJrMGYe5 d48Ei4mLRKahszo7ejgSvY506zPLOGzVG8eknRpzDWfBvc6W5HTBa7N4Le03h9p2JoIR6yHI ZNEOHwwNHwsYDUWUrsTILs4kP2lmT/UdDpApUjOjaE2/3LS3Ep6172F3N/9I4bVGZ4LxR7Ez o7A127EGi5Bc/yY8BWErnKMvcmfxgLrQ6tHQdVU8dY12QbOlwT/EiY+RVa95PW0lEO6c9ZeM FAPvDojq7Ao806mRcW7WAe3yFamlBMBX9tbE8Uh9RqAjKHT5m6xGWwsXjNHLts8u6ceQz0h0 VuA2c3kGSZutry9Q2+S7bqSonW5Pi19BXUFbyIeUQxD6dDspogphzrFU9l4Hai6yNbyHFnNL yui9XZkwe9J1IhSivT9ogivby+QSobhahIE4VXHfEaf8Cg6ZpekSdKFswPb8qMVRGqGdWVtr EToiuDHs7hWUcDTznXTKNjhCo1F8BpsDdE9vbKMN8N4n9hV0yT/Fb28GRknTKuTDu4KeCXyf GjYsh5L6ZlYMROCNPAvO9/pVp52lPG/S7wJs8w4iPIUOvCdkyfdpElTibO4hTixwCDAb4ljU XtkTSpcJSlDUvk2pNZHb+wczaUq1kgDKZD7HPjGI+Cc+ePGPha9EO5VWGZim8hltMtoVi2Jq YcAXyZLoj0DONDDjt7/qN9PdA1SdCBkVPgbaaV/L4a+H+avI0l5Y9e5/F/rU9UNc3h9/gsQw kyAZw==
- Ironport-hdrordr: A9a23:/82i1aPMKG9BnsBcTvmjsMiBIKoaSvp037Eqv3oedfUzSL3gqy nOpoV86faaslYssR0b9exofZPwJE80lqQFhrX5X43SPzUO0VHAROoJgLcKgQeQfxEWntQtrZ uIGJIeNDSfNzdHZL7BkWuFL+o=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
It is never written to, but has a string literal assigned, and needs to be
const to support -Wwrite-strings
Suggested-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Roberto Bagnara <roberto.bagnara@xxxxxxxxxxx>
CC: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
---
xen/arch/x86/setup.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
index a3d3f797bb1e..c41dfdb2bdf8 100644
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -971,8 +971,8 @@ static struct domain *__init create_dom0(const module_t
*image,
/* SAF-1-safe */
void __init noreturn __start_xen(unsigned long mbi_p)
{
- const char *memmap_type = NULL;
- char *cmdline, *kextra, *loader;
+ const char *memmap_type = NULL, *loader;
+ char *cmdline, *kextra;
void *bsp_stack;
struct cpu_info *info = get_cpu_info(), *bsp_info;
unsigned int initrdidx, num_parked = 0;
@@ -1023,8 +1023,8 @@ void __init noreturn __start_xen(unsigned long mbi_p)
mod = __va(mbi->mods_addr);
}
- loader = (mbi->flags & MBI_LOADERNAME)
- ? (char *)__va(mbi->boot_loader_name) : "unknown";
+ loader = (mbi->flags & MBI_LOADERNAME) ? __va(mbi->boot_loader_name)
+ : "unknown";
/* Parse the command-line options. */
cmdline = cmdline_cook((mbi->flags & MBI_CMDLINE) ?
--
2.30.2
|