zipl/boot: Make kdump_os_info_check() argument a const.

Make 'struct os_info *os_info' a const to ensure/indicate that no changes
are made to the given structure.

Signed-off-by: Mikhail Zaslonko <zaslonko@linux.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Mikhail Zaslonko
2023-06-14 19:13:24 +02:00
committed by Jan Höppner
parent 5af2e30d9a
commit b06ca88cd4
4 changed files with 4 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ void kdump_failed(unsigned long reason)
panic(reason, "Dump failed: Check disabled wait code");
}
void kdump_os_info_check(struct os_info *os_info)
void kdump_os_info_check(const struct os_info *os_info)
{
if (os_info == NULL)
kdump_failed(EOS_INFO_MISSING);

View File

@@ -17,7 +17,7 @@
#define OS_INFO_VERSION_MAJOR_SUPPORTED 1
void kdump_os_info_check(struct os_info *os_info);
void kdump_os_info_check(const struct os_info *os_info);
void kdump_failed(unsigned long reason);
#endif /* KDUMP_H */

View File

@@ -26,7 +26,7 @@
*/
void kdump_stage2(unsigned long config_nr)
{
struct os_info *os_info = (struct os_info *)S390_lowcore.os_info;
const struct os_info *os_info = (struct os_info *)S390_lowcore.os_info;
unsigned long crash_size;
void *crash_base;

View File

@@ -35,7 +35,7 @@ static void copy_from_hsa(unsigned long dst, unsigned long src, int cnt)
static void kdump_stage3_scsi(unsigned long *base, unsigned long *size)
{
unsigned long os_info_addr, crash_base, crash_size, crash_end, hsa_page;
struct os_info *os_info;
const struct os_info *os_info;
unsigned long hsa_size;
hsa_page = get_zeroed_page();