Skip to content

Commit 02d7f40

Browse files
Alexey Dobriyanrafaeljw
authored andcommitted
PM: sleep: spread "const char *" correctness
Fixed string literals can be referred to as "const char *". Signed-off-by: Alexey Dobriyan <[email protected]> [ rjw: Minor subject edit ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 6ada7ba commit 02d7f40

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

kernel/power/power.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static inline int init_header_complete(struct swsusp_info *info)
3232
return arch_hibernation_header_save(info, MAX_ARCH_HEADER_SIZE);
3333
}
3434

35-
static inline char *check_image_kernel(struct swsusp_info *info)
35+
static inline const char *check_image_kernel(struct swsusp_info *info)
3636
{
3737
return arch_hibernation_header_restore(info) ?
3838
"architecture specific data" : NULL;

kernel/power/snapshot.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2023,7 +2023,7 @@ static int init_header_complete(struct swsusp_info *info)
20232023
return 0;
20242024
}
20252025

2026-
static char *check_image_kernel(struct swsusp_info *info)
2026+
static const char *check_image_kernel(struct swsusp_info *info)
20272027
{
20282028
if (info->version_code != LINUX_VERSION_CODE)
20292029
return "kernel version";
@@ -2176,7 +2176,7 @@ static void mark_unsafe_pages(struct memory_bitmap *bm)
21762176

21772177
static int check_header(struct swsusp_info *info)
21782178
{
2179-
char *reason;
2179+
const char *reason;
21802180

21812181
reason = check_image_kernel(info);
21822182
if (!reason && info->num_physpages != get_num_physpages())

0 commit comments

Comments
 (0)