Skip to content

Commit

Permalink
PM: sleep: spread "const char *" correctness
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Alexey Dobriyan authored and rafaeljw committed Jul 14, 2020
1 parent 6ada7ba commit 02d7f40
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion kernel/power/power.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static inline int init_header_complete(struct swsusp_info *info)
return arch_hibernation_header_save(info, MAX_ARCH_HEADER_SIZE);
}

static inline char *check_image_kernel(struct swsusp_info *info)
static inline const char *check_image_kernel(struct swsusp_info *info)
{
return arch_hibernation_header_restore(info) ?
"architecture specific data" : NULL;
Expand Down
4 changes: 2 additions & 2 deletions kernel/power/snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -2023,7 +2023,7 @@ static int init_header_complete(struct swsusp_info *info)
return 0;
}

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

static int check_header(struct swsusp_info *info)
{
char *reason;
const char *reason;

reason = check_image_kernel(info);
if (!reason && info->num_physpages != get_num_physpages())
Expand Down

0 comments on commit 02d7f40

Please sign in to comment.