Skip to content

Commit

Permalink
m68k/mac: Modernize printing of kernel messages
Browse files Browse the repository at this point in the history
Convert from printk() to pr_*().

Signed-off-by: Geert Uytterhoeven <[email protected]>
[FT: Adjusted log message severity levels and retained bootinfo log]
Signed-off-by: Finn Thain <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
  • Loading branch information
geertu committed Apr 20, 2017
1 parent 4629a17 commit 889121b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 21 deletions.
12 changes: 5 additions & 7 deletions arch/m68k/mac/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ static void mac_cache_card_flush(int writeback)
void __init config_mac(void)
{
if (!MACH_IS_MAC)
printk(KERN_ERR "ERROR: no Mac, but config_mac() called!!\n");
pr_err("ERROR: no Mac, but config_mac() called!!\n");

mach_sched_init = mac_sched_init;
mach_init_IRQ = mac_init_IRQ;
Expand Down Expand Up @@ -837,8 +837,7 @@ static void __init mac_identify(void)
/* no bootinfo model id -> NetBSD booter was used! */
/* XXX FIXME: breaks for model > 31 */
model = (mac_bi_data.cpuid >> 2) & 63;
printk(KERN_WARNING "No bootinfo model ID, using cpuid instead "
"(obsolete bootloader?)\n");
pr_warn("No bootinfo model ID, using cpuid instead (obsolete bootloader?)\n");
}

macintosh_config = mac_data_table;
Expand Down Expand Up @@ -880,14 +879,13 @@ static void __init mac_identify(void)
*/
iop_preinit();

printk(KERN_INFO "Detected Macintosh model: %d\n", model);
pr_info("Detected Macintosh model: %d\n", model);

/*
* Report booter data:
*/
printk(KERN_DEBUG " Penguin bootinfo data:\n");
printk(KERN_DEBUG " Video: addr 0x%lx "
"row 0x%lx depth %lx dimensions %ld x %ld\n",
printk(KERN_DEBUG " Video: addr 0x%lx row 0x%lx depth %lx dimensions %ld x %ld\n",
mac_bi_data.videoaddr, mac_bi_data.videorow,
mac_bi_data.videodepth, mac_bi_data.dimensions & 0xFFFF,
mac_bi_data.dimensions >> 16);
Expand All @@ -912,7 +910,7 @@ static void __init mac_identify(void)

static void __init mac_report_hardware(void)
{
printk(KERN_INFO "Apple Macintosh %s\n", macintosh_config->name);
pr_info("Apple Macintosh %s\n", macintosh_config->name);
}

static void mac_get_model(char *str)
Expand Down
23 changes: 9 additions & 14 deletions arch/m68k/mac/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,7 @@ static long via_read_time(void)
last_result.idata = result.idata;
}

pr_err("via_read_time: failed to read a stable value; "
"got 0x%08lx then 0x%08lx\n",
pr_err("via_read_time: failed to read a stable value; got 0x%08lx then 0x%08lx\n",
last_result.idata, result.idata);

return 0;
Expand Down Expand Up @@ -465,7 +464,7 @@ void mac_poweroff(void)
#endif
}
local_irq_enable();
printk("It is now safe to turn off your Macintosh.\n");
pr_crit("It is now safe to turn off your Macintosh.\n");
while(1);
}

Expand Down Expand Up @@ -556,7 +555,7 @@ void mac_reset(void)

/* should never get here */
local_irq_enable();
printk ("Restart failed. Please restart manually.\n");
pr_crit("Restart failed. Please restart manually.\n");
while(1);
}

Expand Down Expand Up @@ -661,17 +660,13 @@ int mac_hwclk(int op, struct rtc_time *t)
unmktime(now, 0,
&t->tm_year, &t->tm_mon, &t->tm_mday,
&t->tm_hour, &t->tm_min, &t->tm_sec);
#if 0
printk("mac_hwclk: read %04d-%02d-%-2d %02d:%02d:%02d\n",
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec);
#endif
pr_debug("%s: read %04d-%02d-%-2d %02d:%02d:%02d\n",
__func__, t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec);
} else { /* write */
#if 0
printk("mac_hwclk: tried to write %04d-%02d-%-2d %02d:%02d:%02d\n",
t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec);
#endif
pr_debug("%s: tried to write %04d-%02d-%-2d %02d:%02d:%02d\n",
__func__, t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec);

now = mktime(t->tm_year + 1900, t->tm_mon + 1, t->tm_mday,
t->tm_hour, t->tm_min, t->tm_sec);
Expand Down

0 comments on commit 889121b

Please sign in to comment.