x86/kernel: use pr_<level>() and dev_<level>
Subsystems (13)
PATCH 1/1 x86/kernel: use pr_<level>() and dev_<level>
arch/x86/kernel/* use a mixture of printk(KERN_<level> ) and pr_<level>(). This patch converts the bulk of printk(KERN_<level> ) to pr_<level>() and uses dev_dbg() instead of the dev_printk(KERN_DEBUG,). All pr_warning() calls have been replaced with pr_warn().
Not sure what to do about the printk(KERN_DEFAULT) and printk() without a log level.
--- arch/x86/kernel/acpi/boot.c | 106 ++++++++++++++++-------------------- arch/x86/kernel/acpi/cstate.c | 5 +- arch/x86/kernel/acpi/sleep.c | 2 +- arch/x86/kernel/alternative.c | 8 +-- arch/x86/kernel/amd_gart_64.c | 13 ++--- arch/x86/kernel/apb_timer.c | 23 ++++---- arch/x86/kernel/apic/apic.c | 44 +++++++-------- arch/x86/kernel/apic/apic_flat_64.c | 4 +- arch/x86/kernel/apic/apic_noop.c | 2 +- arch/x86/kernel/apic/bigsmp_32.c | 5 +- arch/x86/kernel/apic/io_apic.c | 95 ++++++++++++++++---------------- arch/x86/kernel/apic/probe_32.c | 9 ++- arch/x86/kernel/apic/x2apic_phys.c | 2 +- arch/x86/kernel/apic/x2apic_uv_x.c | 3 +- arch/x86/kernel/apm_32.c | 79 +++++++++++++-------------- arch/x86/kernel/bootflag.c | 4 +- arch/x86/kernel/check.c | 11 ++-- arch/x86/kernel/cpuid.c | 2 +- arch/x86/kernel/crash_dump_32.c | 6 +- arch/x86/kernel/devicetree.c | 6 +- arch/x86/kernel/doublefault.c | 16 +++--- arch/x86/kernel/dumpstack.c | 4 +- arch/x86/kernel/e820.c | 66 +++++++++++----------- arch/x86/kernel/early-quirks.c | 44 +++++++-------- arch/x86/kernel/early_printk.c | 4 +- arch/x86/kernel/fpu/init.c | 3 +- arch/x86/kernel/fpu/xstate.c | 3 +- arch/x86/kernel/hpet.c | 32 +++++------ arch/x86/kernel/i8259.c | 5 +- arch/x86/kernel/irq_32.c | 6 +- arch/x86/kernel/jump_label.c | 4 +- arch/x86/kernel/kgdb.c | 8 +-- arch/x86/kernel/kprobes/core.c | 11 ++-- arch/x86/kernel/kvm.c | 12 ++-- arch/x86/kernel/kvmclock.c | 10 ++-- arch/x86/kernel/mmconf-fam10h_64.c | 2 +- arch/x86/kernel/module.c | 4 +- arch/x86/kernel/nmi_selftest.c | 12 ++-- arch/x86/kernel/paravirt.c | 2 +- arch/x86/kernel/pci-calgary_64.c | 84 ++++++++++++++-------------- arch/x86/kernel/pci-iommu_table.c | 4 +- arch/x86/kernel/pci-nommu.c | 3 +- arch/x86/kernel/pci-swiotlb.c | 4 +- arch/x86/kernel/quirks.c | 48 ++++++++-------- arch/x86/kernel/rtc.c | 7 +-- arch/x86/kernel/setup.c | 22 ++++---- arch/x86/kernel/setup_percpu.c | 2 +- arch/x86/kernel/smpboot.c | 6 +- arch/x86/kernel/sysfb_efi.c | 8 +-- arch/x86/kernel/sysfb_simplefb.c | 2 +- arch/x86/kernel/tboot.c | 16 +++--- arch/x86/kernel/tce_64.c | 6 +- arch/x86/kernel/test_nx.c | 16 +++--- arch/x86/kernel/test_rodata.c | 10 ++-- arch/x86/kernel/tsc_sync.c | 6 +- arch/x86/kernel/vsmp_64.c | 2 +- 56 files changed, 444 insertions(+), 479 deletions(-)
arch/x86/kernel/acpi/boot.c +48 -58
@@ -141,14 +141,14 @@ static int __init acpi_parse_madt(struct acpi_table_header *table) madt = (struct acpi_table_madt *)table;if (!madt) { - printk(KERN_WARNING PREFIX "Unable to map MADT\n"); +pr_warn (PREFIX "Unable to map MADT\n" );return -ENODEV ; }if (madt->address) { acpi_lapic_addr = (u64 ) madt->address; - printk(KERN_DEBUG PREFIX "Local APIC address 0x%08x\n", +pr_debug (PREFIX "Local APIC address 0x%08x\n" , madt->address); }
@@ -170,7 +170,7 @@ static int acpi_register_lapic(int id, u8 enabled)unsigned int ver =0 ;if (id >=MAX_LOCAL_APIC ) { - printk(KERN_INFO PREFIX "skipped apicid that is too big\n"); +pr_info (PREFIX "skipped apicid that is too big\n" );return -EINVAL ; }
@@ -210,11 +210,11 @@ acpi_parse_x2apic(struct acpi_subtable_header *header, const unsigned long end)* when we use CPU hotplug. */ if (!apic->apic_id_valid (apic_id) && enabled) - printk(KERN_WARNING PREFIX "x2apic entry ignored\n"); +pr_warn (PREFIX "x2apic entry ignored\n" );else acpi_register_lapic (apic_id, enabled);#else - printk(KERN_WARNING PREFIX "x2apic entry ignored\n"); +pr_warn (PREFIX "x2apic entry ignored\n" );#endif return 0 ;
@@ -293,7 +293,7 @@ acpi_parse_x2apic_nmi(struct acpi_subtable_header *header,acpi_table_print_madt_entry (header);if (x2apic_nmi->lint !=1 ) - printk(KERN_WARNING PREFIX "NMI not connected to LINT 1!\n"); +pr_warn (PREFIX "NMI not connected to LINT 1!\n" );return 0 ; }
@@ -311,7 +311,7 @@ acpi_parse_lapic_nmi(struct acpi_subtable_header * header, const unsigned long eacpi_table_print_madt_entry (header);if (lapic_nmi->lint !=1 ) - printk(KERN_WARNING PREFIX "NMI not connected to LINT 1!\n"); +pr_warn (PREFIX "NMI not connected to LINT 1!\n" );return 0 ; }
@@ -478,14 +478,14 @@ acpi_parse_int_src_ovr(struct acpi_subtable_header * header,if (intsrc->source_irq ==0 ) {if (acpi_skip_timer_override) { -printk (PREFIX "BIOS IRQ0 override ignored.\n" ); +pr_info (PREFIX "BIOS IRQ0 override ignored.\n" );return 0 ; }if ((intsrc->global_irq ==2 ) && acpi_fix_pin2_polarity && (intsrc->inti_flags &ACPI_MADT_POLARITY_MASK )) { intsrc->inti_flags &= ~ACPI_MADT_POLARITY_MASK ; -printk (PREFIX "BIOS IRQ0 pin2 override: forcing polarity to high active.\n" ); +pr_info (PREFIX "BIOS IRQ0 pin2 override: forcing polarity to high active.\n" ); } }
@@ -561,7 +561,7 @@ void __init acpi_pic_sci_set_trigger(unsigned int irq, u16 trigger)if (old == new)return ; -printk (PREFIX "setting ELCR to %04x (from %04x)\n" , new, old); +pr_info (PREFIX "setting ELCR to %04x (from %04x)\n" , new, old);outb (new,0x4d0 );outb (new >>8 ,0x4d1 ); }
@@ -833,8 +833,7 @@ static int __init acpi_parse_hpet(struct acpi_table_header *table)struct acpi_table_hpet *hpet_tbl = (struct acpi_table_hpet *)table;if (hpet_tbl->address.space_id !=ACPI_SPACE_MEM ) { - printk(KERN_WARNING PREFIX "HPET timers must be located in " - "memory.\n"); +pr_warn (PREFIX "HPET timers must be located in memory.\n" );return -1 ; }
@@ -846,9 +845,8 @@ static int __init acpi_parse_hpet(struct acpi_table_header *table)* want to allocate a resource there. */ if (!hpet_address) { - printk(KERN_WARNING PREFIX -"HPET id: %#x base: %#lx is invalid\n" , - hpet_tbl->id, hpet_address); +pr_warn (PREFIX "HPET id: %#x base: %#lx is invalid\n" , + hpet_tbl->id, hpet_address);return 0 ; }#ifdef CONFIG_X86_64
@@ -859,20 +857,19 @@ static int __init acpi_parse_hpet(struct acpi_table_header *table)*/ if (hpet_address ==0xfed0000000000000UL ) {if (!hpet_force_user) { - printk(KERN_WARNING PREFIX "HPET id: %#x " +pr_warn (PREFIX "HPET id: %#x " "base: 0xfed0000000000000 is bogus\n " "try hpet=force on the kernel command line to " "fix it up to 0xfed00000.\n" , hpet_tbl->id); hpet_address =0 ;return 0 ; } - printk(KERN_WARNING PREFIX -"HPET id: %#x base: 0xfed0000000000000 fixed up " - "to 0xfed00000.\n", hpet_tbl->id); +pr_warn (PREFIX "HPET id: %#x base: 0xfed0000000000000 fixed up " +"to 0xfed00000.\n" , hpet_tbl->id); hpet_address >>=32 ; }#endif - printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", +pr_info (PREFIX "HPET id: %#x base: %#lx\n" , hpet_tbl->id, hpet_address);/*
@@ -935,7 +932,7 @@ static int __init acpi_parse_fadt(struct acpi_table_header *table) pmtmr_ioport = acpi_gbl_FADT.pm_timer_block; }if (pmtmr_ioport) - printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n", +pr_info (PREFIX "PM-Timer IO Port: %#x\n" , pmtmr_ioport);#endif return 0 ;
@@ -962,8 +959,7 @@ static int __init early_acpi_parse_madt_lapic_addr_ovr(void) count =acpi_table_parse_madt (ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE , acpi_parse_lapic_addr_ovr,0 );if (count <0 ) { - printk(KERN_ERR PREFIX - "Error parsing LAPIC address override entry\n"); +pr_err (PREFIX "Error parsing LAPIC address override entry\n" );return count; }
@@ -990,8 +986,7 @@ static int __init acpi_parse_madt_lapic_entries(void) count =acpi_table_parse_madt (ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE , acpi_parse_lapic_addr_ovr,0 );if (count <0 ) { - printk(KERN_ERR PREFIX - "Error parsing LAPIC address override entry\n"); +pr_err (PREFIX "Error parsing LAPIC address override entry\n" );return count; }
@@ -1010,8 +1005,7 @@ static int __init acpi_parse_madt_lapic_entries(void)sizeof (struct acpi_table_madt ), madt_proc, ARRAY_SIZE(madt_proc), MAX_LOCAL_APIC);if (ret <0 ) { - printk(KERN_ERR PREFIX - "Error parsing LAPIC/X2APIC entries\n"); +pr_err (PREFIX "Error parsing LAPIC/X2APIC entries\n" );return ret; }
@@ -1019,11 +1013,11 @@ static int __init acpi_parse_madt_lapic_entries(void) count = madt_proc[1 ].count; }if (!count && !x2count) { - printk(KERN_ERR PREFIX "No LAPIC entries present\n"); +pr_err (PREFIX "No LAPIC entries present\n" );/* TBD: Cleanup to allow fallback to MPS */ return -ENODEV ; }else if (count <0 || x2count <0 ) { - printk(KERN_ERR PREFIX "Error parsing LAPIC entry\n"); +pr_err (PREFIX "Error parsing LAPIC entry\n" );/* TBD: Cleanup to allow fallback to MPS */ return count; }
@@ -1033,7 +1027,7 @@ static int __init acpi_parse_madt_lapic_entries(void) count =acpi_table_parse_madt (ACPI_MADT_TYPE_LOCAL_APIC_NMI , acpi_parse_lapic_nmi,0 );if (count <0 || x2count <0 ) { - printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); +pr_err (PREFIX "Error parsing LAPIC NMI entry\n" );/* TBD: Cleanup to allow fallback to MPS */ return count; }
@@ -1092,7 +1086,7 @@ static void __init mp_config_acpi_legacy_irqs(void) }if (idx != mp_irq_entries) { -printk (KERN_DEBUG "ACPI: IRQ%d used by override.\n" , i); +pr_debug ("ACPI: IRQ%d used by override.\n" , i);continue ;/* IRQ already used */ }
@@ -1132,7 +1126,7 @@ static int __init acpi_parse_madt_ioapic_entries(void)* if "noapic" boot option, don't look for IO-APICs */ if (skip_ioapic_setup) { - printk(KERN_INFO PREFIX "Skipping IOAPIC probe " +pr_info (PREFIX "Skipping IOAPIC probe " "due to 'noapic' option.\n" );return -ENODEV ; }
@@ -1140,17 +1134,17 @@ static int __init acpi_parse_madt_ioapic_entries(void) count =acpi_table_parse_madt (ACPI_MADT_TYPE_IO_APIC , acpi_parse_ioapic,MAX_IO_APICS );if (!count) { - printk(KERN_ERR PREFIX "No IOAPIC entries present\n"); +pr_err (PREFIX "No IOAPIC entries present\n" );return -ENODEV ; }else if (count <0 ) { - printk(KERN_ERR PREFIX "Error parsing IOAPIC entry\n"); +pr_err (PREFIX "Error parsing IOAPIC entry\n" );return count; } count =acpi_table_parse_madt (ACPI_MADT_TYPE_INTERRUPT_OVERRIDE , acpi_parse_int_src_ovr, nr_irqs);if (count <0 ) { - printk(KERN_ERR PREFIX +pr_err (PREFIX "Error parsing interrupt source overrides entry\n" );/* TBD: Cleanup to allow fallback to MPS */ return count;
@@ -1170,7 +1164,7 @@ static int __init acpi_parse_madt_ioapic_entries(void) count =acpi_table_parse_madt (ACPI_MADT_TYPE_NMI_SOURCE , acpi_parse_nmi_src, nr_irqs);if (count <0 ) { - printk(KERN_ERR PREFIX "Error parsing NMI SRC entry\n"); +pr_err (PREFIX "Error parsing NMI SRC entry\n" );/* TBD: Cleanup to allow fallback to MPS */ return count; }
@@ -1203,8 +1197,7 @@ static void __init early_acpi_process_madt(void)/* * Dell Precision Workstation 410, 610 come here. */ - printk(KERN_ERR PREFIX - "Invalid BIOS MADT, disabling ACPI\n"); +pr_err (PREFIX "Invalid BIOS MADT, disabling ACPI\n" );disable_acpi (); } }
@@ -1241,8 +1234,7 @@ static void __init acpi_process_madt(void)/* * Dell Precision Workstation 410, 610 come here. */ - printk(KERN_ERR PREFIX - "Invalid BIOS MADT, disabling ACPI\n"); +pr_err (PREFIX "Invalid BIOS MADT, disabling ACPI\n" );disable_acpi (); } }else {
@@ -1252,8 +1244,7 @@ static void __init acpi_process_madt(void)* Boot with "acpi=off" to use MPS on such a system. */ if (smp_found_config) { - printk(KERN_WARNING PREFIX - "No APIC-table, disabling MPS\n"); +pr_warn (PREFIX "No APIC-table, disabling MPS\n" ); smp_found_config =0 ; } }
@@ -1263,11 +1254,11 @@ static void __init acpi_process_madt(void)* processors, where MPS only supports physical. */ if (acpi_lapic && acpi_ioapic) -printk (KERN_INFO "Using ACPI (MADT) for SMP configuration " -"information\n" ); +pr_info ("Using ACPI (MADT) for SMP configuration " +"information\n" );else if (acpi_lapic) -printk (KERN_INFO "Using ACPI for processor (LAPIC) " -"configuration information\n" ); +pr_info ("Using ACPI for processor (LAPIC) " +"configuration information\n" );#endif return ; }
@@ -1275,8 +1266,8 @@ static void __init acpi_process_madt(void)static int __init disable_acpi_irq (const struct dmi_system_id *d) {if (!acpi_force) { -printk (KERN_NOTICE "%s detected: force use of acpi=noirq\n" , - d->ident); +pr_notice ("%s detected: force use of acpi=noirq\n" , + d->ident);acpi_noirq_set (); }return 0 ;
@@ -1285,8 +1276,8 @@ static int __init disable_acpi_irq(const struct dmi_system_id *d)static int __init disable_acpi_pci (const struct dmi_system_id *d) {if (!acpi_force) { -printk (KERN_NOTICE "%s detected: force use of pci=noacpi\n" , - d->ident); +pr_notice ("%s detected: force use of pci=noacpi\n" , + d->ident);acpi_disable_pci (); }return 0 ;
@@ -1295,11 +1286,10 @@ static int __init disable_acpi_pci(const struct dmi_system_id *d)static int __init dmi_disable_acpi (const struct dmi_system_id *d) {if (!acpi_force) { -printk (KERN_NOTICE "%s detected: acpi off\n" , d->ident); +pr_notice ("%s detected: acpi off\n" , d->ident);disable_acpi (); }else { -printk (KERN_NOTICE -"Warning: DMI blacklist says broken, but acpi forced\n" ); +pr_notice ("Warning: DMI blacklist says broken, but acpi forced\n" ); }return 0 ; }
@@ -1514,9 +1504,9 @@ void __init acpi_boot_table_init(void)*/ if (acpi_blacklisted ()) {if (acpi_force) { - printk(KERN_WARNING PREFIX "acpi=force override\n"); +pr_warn (PREFIX "acpi=force override\n" ); }else { - printk(KERN_WARNING PREFIX "Disabling ACPI support\n"); +pr_warn (PREFIX "Disabling ACPI support\n" );disable_acpi ();return ; }
@@ -1630,9 +1620,9 @@ int __init acpi_mps_check(void)#if defined(CONFIG_X86_LOCAL_APIC ) && !defined(CONFIG_X86_MPPARSE )/* mptable code is not built-in*/ if (acpi_disabled || acpi_noirq) { -printk (KERN_WARNING "MPS support code is not built-in.\n" -"Using acpi=off or acpi=noirq or pci=noacpi " -"may have problem\n" ); +pr_warn ("MPS support code is not built-in.\n" +"Using acpi=off or acpi=noirq or pci=noacpi " +"may have problem\n" );return 1 ; }#endif
arch/x86/kernel/acpi/cstate.c +2 -3
@@ -103,9 +103,8 @@ static long acpi_processor_ffh_cstate_probe_cpu(void *_cx)if (!mwait_supported[cstate_type]) { mwait_supported[cstate_type] =1 ; -printk (KERN_DEBUG -"Monitor-Mwait will be used to enter C-%d " -"state\n" , cx->type); +pr_debug ("Monitor-Mwait will be used to enter C-%d state\n" , + cx->type); } snprintf(cx->desc, ACPI_CX_DESC_LEN, "ACPI FFH INTEL MWAIT 0x%x",
arch/x86/kernel/acpi/sleep.c +1 -1
@@ -48,7 +48,7 @@ int x86_acpi_suspend_lowlevel(void) (struct wakeup_header *)__va (real_mode_header->wakeup_header);if (header->signature !=WAKEUP_HEADER_SIGNATURE ) { -printk (KERN_ERR "wakeup header does not match\n" ); +pr_err ("wakeup header does not match\n" );return -EINVAL ; }
arch/x86/kernel/alternative.c +4 -4
@@ -59,7 +59,7 @@ __setup("noreplace-paravirt", setup_noreplace_paravirt); #define DPRINTK(fmt, args...) \ do { \ if (debug_alternative) \ - printk(KERN_DEBUG "%s: " fmt "\n", __func__, ##args); \ + pr_debug("%s: " fmt "\n", __func__, ##args); \ } while (0) #define DUMP_BYTES(buf, len, fmt, args...) \
@@ -70,10 +70,10 @@ do { \if (!(len)) \break ; \ \ - printk(KERN_DEBUG fmt, ##args); \ + pr_debug(fmt, ##args); \for (j =0 ; j < (len) -1 ; j++) \ -printk (KERN_CONT "%02hhx " , buf[j]); \ -printk (KERN_CONT "%02hhx\n" , buf[j]); \ +pr_cont ("%02hhx " , buf[j]); \ +pr_cont ("%02hhx\n" , buf[j]); \ } \ }while (0 )
arch/x86/kernel/amd_gart_64.c +6 -7
@@ -536,10 +536,9 @@ static __init unsigned long check_iommu_size(unsigned long aper, u64 aper_size) iommu_size -=round_up (a,PMD_PAGE_SIZE ) - a;if (iommu_size <64 *1024 *1024 ) { -pr_warning ( -"PCI-DMA: Warning: Small IOMMU %luMB." +pr_warn ("PCI-DMA: Warning: Small IOMMU %luMB." " Consider increasing the AGP aperture in BIOS\n" , - iommu_size >>20 ); + iommu_size >>20 ); }return iommu_size;
@@ -691,8 +690,8 @@ static __init int init_amd_gatt(struct agp_kern_info *info) nommu:/* Should not happen anymore */ -pr_warning ("PCI-DMA: More than 4GB of RAM and no IOMMU\n" -"falling back to iommu=soft.\n" ); +pr_warn ("PCI-DMA: More than 4GB of RAM and no IOMMU\n" +"falling back to iommu=soft.\n" );return -1 ; }
@@ -757,8 +756,8 @@ int __init gart_iommu_init(void) !gart_iommu_aperture || (no_agp && init_amd_gatt(&info) < 0)) {if (max_pfn >MAX_DMA32_PFN ) { -pr_warning ("More than 4GB of memory but GART IOMMU not available.\n" ); -pr_warning ("falling back to iommu=soft.\n" ); +pr_warn ("More than 4GB of memory but GART IOMMU not available.\n" ); +pr_warn ("falling back to iommu=soft.\n" ); }return 0 ; }
arch/x86/kernel/apb_timer.c +11 -12
@@ -90,13 +90,13 @@ static inline void apbt_set_mapping(void) } mtmr =sfi_get_mtmr (APBT_CLOCKEVENT0_NUM );if (mtmr ==NULL ) { -printk (KERN_ERR "Failed to get MTMR %d from SFI\n" , +pr_err ("Failed to get MTMR %d from SFI\n" ,APBT_CLOCKEVENT0_NUM );return ; } apbt_address = (phys_addr_t )mtmr->phys_addr;if (!apbt_address) { -printk (KERN_WARNING "No timer base from SFI, use default\n" ); +pr_warn ("No timer base from SFI, use default\n" ); apbt_address =APBT_DEFAULT_BASE ; } apbt_virt_address =ioremap_nocache (apbt_address,APBT_MMAP_SIZE );
@@ -142,7 +142,7 @@ static int __init apbt_clockevent_register(void) mtmr =sfi_get_mtmr (APBT_CLOCKEVENT0_NUM );if (mtmr ==NULL ) { -printk (KERN_ERR "Failed to get MTMR %d from SFI\n" , +pr_err ("Failed to get MTMR %d from SFI\n" ,APBT_CLOCKEVENT0_NUM );return -ENODEV ; }
@@ -157,8 +157,8 @@ static int __init apbt_clockevent_register(void)if (intel_mid_timer_options ==INTEL_MID_TIMER_LAPIC_APBT ) { global_clock_event = &adev->timer->ced; -printk (KERN_DEBUG "%s clockevent registered as global\n" , - global_clock_event->name); +pr_debug ("%s clockevent registered as global\n" , + global_clock_event->name); }dw_apb_clockevent_register (adev->timer);
@@ -196,8 +196,8 @@ void apbt_setup_secondary_clock(void)dw_apb_clockevent_resume (adev->timer); } -printk (KERN_INFO "Registering CPU %d clockevent device %s, cpu %08x\n" , - cpu, adev->name, adev->cpu); +pr_info ("Registering CPU %d clockevent device %s, cpu %08x\n" , + cpu, adev->name, adev->cpu);apbt_setup_irq (adev);dw_apb_clockevent_register (adev->timer);
@@ -327,7 +327,7 @@ void __init apbt_time_init(void)#ifdef CONFIG_SMP /* kernel cmdline disable apb timer, so we will use lapic timers */ if (intel_mid_timer_options ==INTEL_MID_TIMER_LAPIC_APBT ) { -printk (KERN_INFO "apbt: disabled per cpu timer\n" ); +pr_info ("apbt: disabled per cpu timer\n" );return ; }pr_debug ("%s: %d CPUs online\n" , __func__,num_online_cpus ());
@@ -346,7 +346,7 @@ void __init apbt_time_init(void)if (p_mtmr) adev->irq = p_mtmr->irq;else -printk (KERN_ERR "Failed to get timer for cpu %d\n" , i); +pr_err ("Failed to get timer for cpu %d\n" , i); snprintf(adev->name, sizeof(adev->name) - 1, "apbt%d", i); }#endif
@@ -400,13 +400,12 @@ unsigned long apbt_quick_calibrate(void) shift =5 ;if (unlikely (loop >> shift ==0 )) { -printk (KERN_INFO -"APBT TSC calibration failed, not enough resolution\n" ); +pr_info ("APBT TSC calibration failed, not enough resolution\n" );return 0 ; } scale = (int )div_u64 ((t2 - t1), loop >> shift); khz = (scale * (apbt_freq /1000 )) >> shift; -printk (KERN_INFO "TSC freq calculated by APB timer is %lu khz\n" , khz); +pr_info ("TSC freq calculated by APB timer is %lu khz\n" , khz);return khz; failed:return 0 ;
arch/x86/kernel/apic/apic.c +21 -23
142 lines not on this page · raw message
arch/x86/kernel/apic/apic_flat_64.c +2 -2
@@ -218,12 +218,12 @@ static int physflat_acpi_madt_oem_check(char *oem_id, char *oem_table_id)*/ if (acpi_gbl_FADT.header.revision >=FADT2_REVISION_ID && (acpi_gbl_FADT.flags &ACPI_FADT_APIC_PHYSICAL )) { -printk (KERN_DEBUG "system APIC only can use physical flat" ); +pr_debug ("system APIC only can use physical flat" );return 1 ; }if (!strncmp (oem_id,"IBM" ,3 ) && !strncmp (oem_table_id,"EXA" ,3 )) { -printk (KERN_DEBUG "IBM Summit detected, will use apic physical" ); +pr_debug ("IBM Summit detected, will use apic physical" );return 1 ; }#endif
arch/x86/kernel/apic/apic_noop.c +1 -1
@@ -94,7 +94,7 @@ static void noop_vector_allocation_domain(int cpu, struct cpumask *retmask, const struct cpumask *mask) {if (cpu !=0 ) -pr_warning ("APIC: Vector allocated for non-BSP cpu\n" ); +pr_warn ("APIC: Vector allocated for non-BSP cpu\n" );cpumask_copy (retmask,cpumask_of (cpu)); }
arch/x86/kernel/apic/bigsmp_32.c +2 -3
@@ -67,8 +67,7 @@ static void bigsmp_init_apic_ldr(void)static void bigsmp_setup_apic_routing (void ) { -printk (KERN_INFO -"Enabling APIC mode: Physflat. Using %d I/O APICs\n" , +pr_info ("Enabling APIC mode: Physflat. Using %d I/O APICs\n" , nr_ioapics); }
@@ -110,7 +109,7 @@ static int dmi_bigsmp; /* can be set by dmi scanners */static int hp_ht_bigsmp (const struct dmi_system_id *d) { -printk (KERN_NOTICE "%s detected: force use of apic=bigsmp\n" , d->ident); +pr_notice ("%s detected: force use of apic=bigsmp\n" , d->ident); dmi_bigsmp =1 ;return 0 ;
arch/x86/kernel/apic/io_apic.c +47 -48
218 lines not on this page · raw message
arch/x86/kernel/apic/probe_32.c +4 -5
@@ -60,8 +60,7 @@ static int default_x86_32_early_logical_apicid(int cpu)static void setup_apic_flat_routing (void ) {#ifdef CONFIG_X86_IO_APIC -printk (KERN_INFO -"Enabling APIC mode: Flat. Using %d I/O APICs\n" , +pr_info ("Enabling APIC mode: Flat. Using %d I/O APICs\n" , nr_ioapics);#endif }
@@ -202,7 +201,7 @@ void __init generic_apic_probe(void)if (drv == __apicdrivers_end)panic ("Didn't find an APIC driver" ); } -printk (KERN_INFO "Using APIC driver %s\n" , apic->name); +pr_info ("Using APIC driver %s\n" , apic->name); }/* This function can switch the APIC even after the initial ->probe() */
@@ -218,8 +217,8 @@ int __init default_acpi_madt_oem_check(char *oem_id, char *oem_table_id)if (!cmdline_apic) { apic = *drv; -printk (KERN_INFO "Switched to APIC driver `%s'.\n" , - apic->name); +pr_info ("Switched to APIC driver `%s'.\n" , + apic->name); }return 1 ; }
arch/x86/kernel/apic/x2apic_phys.c +1 -1
@@ -24,7 +24,7 @@ static bool x2apic_fadt_phys(void)#ifdef CONFIG_ACPI if ((acpi_gbl_FADT.header.revision >=FADT2_REVISION_ID ) && (acpi_gbl_FADT.flags &ACPI_FADT_APIC_PHYSICAL )) { -printk (KERN_DEBUG "System requires x2apic physical mode\n" ); +pr_debug ("System requires x2apic physical mode\n" );return true; }#endif
arch/x86/kernel/apic/x2apic_uv_x.c +1 -2
@@ -725,8 +725,7 @@ static __init void uv_rtc_init(void) status =uv_bios_freq_base (BIOS_FREQ_BASE_REALTIME_CLOCK , &ticks_per_sec);if (status !=BIOS_STATUS_SUCCESS || ticks_per_sec <100000 ) { -printk (KERN_WARNING -"unable to determine platform RTC clock frequency, " +pr_warn ("unable to determine platform RTC clock frequency, " "guessing.\n" );/* BIOS gives wrong value for clock freq. so guess */ sn_rtc_cycles_per_second =1000000000000UL /30000UL ;
arch/x86/kernel/apm_32.c +38 -41
196 lines not on this page · raw message
arch/x86/kernel/bootflag.c +2 -2
@@ -41,7 +41,7 @@ static void __init sbf_write(u8 v)if (!parity (v)) v |=SBF_PARITY ; -printk (KERN_INFO "Simple Boot Flag at 0x%x set to 0x%x\n" , +pr_info ("Simple Boot Flag at 0x%x set to 0x%x\n" , sbf_port, v);spin_lock_irqsave (&rtc_lock, flags);
@@ -84,7 +84,7 @@ static int __init sbf_init(void) v =sbf_read ();if (!sbf_value_valid (v)) { -printk (KERN_WARNING "Simple Boot Flag value 0x%x read from " +pr_warn ("Simple Boot Flag value 0x%x read from " "CMOS RAM was invalid\n" , v); }
arch/x86/kernel/check.c +6 -5
@@ -112,7 +112,8 @@ void __init setup_bios_corruption_check(void) }if (num_scan_areas) -printk (KERN_INFO "Scanning %d areas for low memory corruption\n" , num_scan_areas); +pr_info ("Scanning %d areas for low memory corruption\n" , + num_scan_areas); }
@@ -131,8 +132,8 @@ void check_for_bios_corruption(void)for (; size; addr++, size -=sizeof (unsigned long )) {if (!*addr)continue ; -printk (KERN_ERR "Corrupted low memory at %p (%lx phys) = %08lx\n" , - addr,__pa (addr), *addr); +pr_err ("Corrupted low memory at %p (%lx phys) = %08lx\n" , + addr,__pa (addr), *addr); corruption =1 ; *addr =0 ; }
@@ -156,8 +157,8 @@ static int start_periodic_check_for_corruption(void)if (!num_scan_areas || !memory_corruption_check || corruption_check_period ==0 )return 0 ; -printk (KERN_INFO "Scanning for low memory corruption every %d seconds\n" , - corruption_check_period); +pr_info ("Scanning for low memory corruption every %d seconds\n" , + corruption_check_period);/* First time we run the checks right away */ schedule_delayed_work (&bios_check_work,0 );
arch/x86/kernel/cpuid.c +1 -1
@@ -165,7 +165,7 @@ static int __init cpuid_init(void)if (__register_chrdev (CPUID_MAJOR ,0 ,NR_CPUS ,"cpu/cpuid" , &cpuid_fops)) { -printk (KERN_ERR "cpuid: unable to get major %d for cpuid\n" , +pr_err ("cpuid: unable to get major %d for cpuid\n" ,CPUID_MAJOR ); err = -EBUSY ; goto out;
arch/x86/kernel/crash_dump_32.c +2 -4
@@ -65,8 +65,7 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,kunmap_atomic (vaddr); }else {if (!kdump_buf_page) { -printk (KERN_WARNING "Kdump: Kdump buffer page not" -" allocated\n" ); +pr_warn ("Kdump: Kdump buffer page not allocated\n" );kunmap_atomic (vaddr);return -EFAULT ; }
@@ -85,8 +84,7 @@ static int __init kdump_buf_page_init(void) kdump_buf_page =kmalloc (PAGE_SIZE ,GFP_KERNEL );if (!kdump_buf_page) { -printk (KERN_WARNING "Kdump: Failed to allocate kdump buffer" -" page\n" ); +pr_warn ("Kdump: Failed to allocate kdump buffer page\n" ); ret = -ENOMEM ; }
arch/x86/kernel/devicetree.c +3 -3
@@ -235,8 +235,8 @@ static void __init dtb_add_ioapic(struct device_node *dn) ret =of_address_to_resource (dn,0 , &r);if (ret) { -printk (KERN_ERR "Can't obtain address from node %s.\n" , - dn->full_name); +pr_err ("Can't obtain address from node %s.\n" , + dn->full_name);return ; }mp_register_ioapic (++ioapic_id, r.start, gsi_top, &cfg);
@@ -253,7 +253,7 @@ static void __init dtb_ioapic_setup(void) of_ioapic =1 ; return; } -printk (KERN_ERR "Error: No information about IO-APIC in OF.\n" ); +pr_err ("Error: No information about IO-APIC in OF.\n" ); }#else static void __init dtb_ioapic_setup (void ) {}
arch/x86/kernel/doublefault.c +8 -8
@@ -24,23 +24,23 @@ static void doublefault_fn(void)native_store_gdt (&gdt_desc); gdt = gdt_desc.address; -printk (KERN_EMERG "PANIC: double fault, gdt at %08lx [%d bytes]\n" , gdt, gdt_desc.size); +pr_emerg ("PANIC: double fault, gdt at %08lx [%d bytes]\n" , gdt, gdt_desc.size);if (ptr_ok (gdt)) { gdt +=GDT_ENTRY_TSS <<3 ; tss =get_desc_base ((struct desc_struct *)gdt); -printk (KERN_EMERG "double fault, tss at %08lx\n" , tss); +pr_emerg ("double fault, tss at %08lx\n" , tss);if (ptr_ok (tss)) {struct x86_hw_tss *t = (struct x86_hw_tss *)tss; -printk (KERN_EMERG "eip = %08lx, esp = %08lx\n" , - t->ip, t->sp); +pr_emerg ("eip = %08lx, esp = %08lx\n" , + t->ip, t->sp); -printk (KERN_EMERG "eax = %08lx, ebx = %08lx, ecx = %08lx, edx = %08lx\n" , - t->ax, t->bx, t->cx, t->dx); -printk (KERN_EMERG "esi = %08lx, edi = %08lx\n" , - t->si, t->di); +pr_emerg ("eax = %08lx, ebx = %08lx, ecx = %08lx, edx = %08lx\n" , + t->ax, t->bx, t->cx, t->dx); +pr_emerg ("esi = %08lx, edi = %08lx\n" , + t->si, t->di); } }
arch/x86/kernel/dumpstack.c +2 -2
@@ -285,12 +285,12 @@ int __die(const char *str, struct pt_regs *regs, long err) sp =kernel_stack_pointer (regs); savesegment(ss, ss); } -printk (KERN_EMERG "EIP: [<%08lx>] " , regs->ip); +pr_emerg ("EIP: [<%08lx>] " , regs->ip);print_symbol ("%s" , regs->ip);printk (" SS:ESP %04x:%08lx\n" , ss, sp);#else /* Executive summary in case the oops scrolled away */ -printk (KERN_ALERT "RIP " ); +pr_alert ("RIP " );printk_address (regs->ip);printk (" RSP <%016lx>\n" , regs->sp);#endif
arch/x86/kernel/e820.c +32 -34
177 lines not on this page · raw message
arch/x86/kernel/early-quirks.c +21 -23
81 lines not on this page · raw message
arch/x86/kernel/early_printk.c +2 -2
@@ -319,8 +319,8 @@ static struct console early_serial_console = {static void early_console_register (struct console *con,int keep_early) {if (con->index !=-1 ) { -printk (KERN_CRIT "ERROR: earlyprintk= %s already used\n" , - con->name); +pr_crit ("ERROR: earlyprintk= %s already used\n" , + con->name);return ; } early_console = con;
arch/x86/kernel/fpu/init.c +2 -1
@@ -339,7 +339,8 @@ static void __init fpu__init_system_ctx_switch(void)if (eagerfpu ==ENABLE )setup_force_cpu_cap (X86_FEATURE_EAGER_FPU ); -printk (KERN_INFO "x86/fpu: Using '%s' FPU context switches.\n" , eagerfpu ==ENABLE ?"eager" :"lazy" ); +pr_info ("x86/fpu: Using '%s' FPU context switches.\n" , + eagerfpu ==ENABLE ?"eager" :"lazy" ); }/*
arch/x86/kernel/fpu/xstate.c +2 -1
@@ -222,7 +222,8 @@ static void __init setup_xstate_features(void) "x86/fpu: misordered xstate at %d\n", last_good_offset); last_good_offset = xstate_offsets[i]; -printk (KERN_INFO "x86/fpu: xstate_offset[%d]: %4d, xstate_sizes[%d]: %4d\n" , i, ebx, i, eax); +pr_info ("x86/fpu: xstate_offset[%d]: %4d, xstate_sizes[%d]: %4d\n" , + i, ebx, i, eax); } }
arch/x86/kernel/hpet.c +15 -17
@@ -139,30 +139,30 @@ EXPORT_SYMBOL_GPL(is_hpet_enabled);static void _hpet_print_config (const char *function,int line) {u32 i, timers, l, h; -printk (KERN_INFO "hpet: %s(%d):\n" , function, line); +pr_info ("hpet: %s(%d):\n" , function, line); l =hpet_readl (HPET_ID ); h =hpet_readl (HPET_PERIOD ); timers = ((l &HPET_ID_NUMBER ) >>HPET_ID_NUMBER_SHIFT ) +1 ; -printk (KERN_INFO "hpet: ID: 0x%x, PERIOD: 0x%x\n" , l, h); +pr_info ("hpet: ID: 0x%x, PERIOD: 0x%x\n" , l, h); l =hpet_readl (HPET_CFG ); h =hpet_readl (HPET_STATUS ); -printk (KERN_INFO "hpet: CFG: 0x%x, STATUS: 0x%x\n" , l, h); +pr_info ("hpet: CFG: 0x%x, STATUS: 0x%x\n" , l, h); l =hpet_readl (HPET_COUNTER ); h =hpet_readl (HPET_COUNTER +4 ); -printk (KERN_INFO "hpet: COUNTER_l: 0x%x, COUNTER_h: 0x%x\n" , l, h); +pr_info ("hpet: COUNTER_l: 0x%x, COUNTER_h: 0x%x\n" , l, h);for (i =0 ; i < timers; i++) { l =hpet_readl (HPET_Tn_CFG (i)); h =hpet_readl (HPET_Tn_CFG (i)+4 ); -printk (KERN_INFO "hpet: T%d: CFG_l: 0x%x, CFG_h: 0x%x\n" , +pr_info ("hpet: T%d: CFG_l: 0x%x, CFG_h: 0x%x\n" , i, l, h); l =hpet_readl (HPET_Tn_CMP (i)); h =hpet_readl (HPET_Tn_CMP (i)+4 ); -printk (KERN_INFO "hpet: T%d: CMP_l: 0x%x, CMP_h: 0x%x\n" , +pr_info ("hpet: T%d: CMP_l: 0x%x, CMP_h: 0x%x\n" , i, l, h); l =hpet_readl (HPET_Tn_ROUTE (i)); h =hpet_readl (HPET_Tn_ROUTE (i)+4 ); -printk (KERN_INFO "hpet: T%d ROUTE_l: 0x%x, ROUTE_h: 0x%x\n" , +pr_info ("hpet: T%d ROUTE_l: 0x%x, ROUTE_h: 0x%x\n" , i, l, h); } }
@@ -289,7 +289,7 @@ static void hpet_legacy_clockevent_register(void)clockevents_config_and_register (&hpet_clockevent, hpet_freq,HPET_MIN_PROG_DELTA ,0x7FFFFFFF ); global_clock_event = &hpet_clockevent; -printk (KERN_DEBUG "hpet clockevent registered\n" ); +pr_debug ("hpet clockevent registered\n" ); }static int hpet_set_periodic (struct clock_event_device *evt,int timer)
@@ -526,7 +526,7 @@ static irqreturn_t hpet_interrupt_handler(int irq, void *data)struct clock_event_device *hevt = &dev->evt;if (!hevt->event_handler) { -printk (KERN_INFO "Spurious HPET timer interrupt on HPET timer %d\n" , +pr_info ("Spurious HPET timer interrupt on HPET timer %d\n" , dev->num);return IRQ_HANDLED ; }
@@ -547,7 +547,7 @@ static int hpet_setup_irq(struct hpet_dev *dev)irq_set_affinity (dev->irq,cpumask_of (dev->cpu));enable_irq (dev->irq); -printk (KERN_DEBUG "hpet: %s irq %d for MSI\n" , +pr_debug ("hpet: %s irq %d for MSI\n" , dev->name, dev->irq);return 0 ;
@@ -646,7 +646,7 @@ static void hpet_msi_capability_lookup(unsigned int start_timer)break ; } -printk (KERN_INFO "HPET: %d timers in total, %d timers will be used for per-cpu timer\n" , +pr_info ("HPET: %d timers in total, %d timers will be used for per-cpu timer\n" , num_timers, num_timers_used); }
@@ -800,8 +800,7 @@ static int hpet_clocksource_register(void) }while ((now - start) <200000UL );if (t1 ==hpet_readl (HPET_COUNTER )) { -printk (KERN_WARNING -"HPET counter not counting. HPET disabled\n" ); +pr_warn ("HPET counter not counting. HPET disabled\n" );return -ENODEV ; }
@@ -845,9 +844,8 @@ int __init hpet_enable(void)*/ for (i =0 ;hpet_readl (HPET_CFG ) ==0xFFFFFFFF ; i++) {if (i ==1000 ) { -printk (KERN_WARNING -"HPET config register value = 0xFFFFFFFF. " -"Disabling HPET\n" ); +pr_warn ("HPET config register value = 0xFFFFFFFF. " +"Disabling HPET\n" ); goto out_nohpet; } }
@@ -1231,7 +1229,7 @@ static void hpet_rtc_timer_reinit(void)if (hpet_rtc_flags &RTC_PIE ) hpet_pie_count += lost_ints;if (printk_ratelimit ()) -printk (KERN_WARNING "hpet1: lost %d rtc interrupts\n" , +pr_warn ("hpet1: lost %d rtc interrupts\n" , lost_ints); } }
arch/x86/kernel/i8259.c +2 -3
@@ -204,8 +204,7 @@ spurious_8259A_irq:* lets ACK and report it. [once per IRQ] */ if (!(spurious_irq_mask & irqmask)) { -printk (KERN_DEBUG -"spurious 8259A interrupt: IRQ%d.\n" , irq); +pr_debug ("spurious 8259A interrupt: IRQ%d.\n" , irq); spurious_irq_mask |= irqmask; }atomic_inc (&irq_err_count);
@@ -313,7 +312,7 @@ static int probe_8259A(void)outb (probe_val,PIC_MASTER_IMR ); new_val =inb (PIC_MASTER_IMR );if (new_val != probe_val) { -printk (KERN_INFO "Using NULL legacy PIC\n" ); +pr_info ("Using NULL legacy PIC\n" ); legacy_pic = &null_legacy_pic; }
arch/x86/kernel/irq_32.c +3 -3
@@ -38,7 +38,7 @@ static int check_stack_overflow(void)static void print_stack_overflow (void ) { -printk (KERN_WARNING "low stack detected by irq handler\n" ); +pr_warn ("low stack detected by irq handler\n" );dump_stack ();if (sysctl_panic_on_stackoverflow)panic ("low stack detected by irq handler - check messages\n" );
@@ -124,8 +124,8 @@ void irq_ctx_init(int cpu) THREAD_SIZE_ORDER));per_cpu (softirq_stack, cpu) = irqstk; -printk (KERN_DEBUG "CPU %u irqstacks, hard=%p soft=%p\n" , - cpu,per_cpu (hardirq_stack, cpu),per_cpu (softirq_stack, cpu)); +pr_debug ("CPU %u irqstacks, hard=%p soft=%p\n" , + cpu,per_cpu (hardirq_stack, cpu),per_cpu (softirq_stack, cpu)); }void do_softirq_own_stack (void )
arch/x86/kernel/jump_label.c +2 -2
@@ -31,8 +31,8 @@ static void bug_at(unsigned char *ip, int line)* Something went wrong. Crash the box, as something could be * corrupting the kernel. */ -pr_warning ("Unexpected op at %pS [%p] (%02x %02x %02x %02x %02x) %s:%d\n" , - ip, ip, ip[0 ], ip[1 ], ip[2 ], ip[3 ], ip[4 ], __FILE__, line); +pr_warn ("Unexpected op at %pS [%p] (%02x %02x %02x %02x %02x) %s:%d\n" , + ip, ip, ip[0 ], ip[1 ], ip[2 ], ip[3 ], ip[4 ], __FILE__, line);BUG (); }
arch/x86/kernel/kgdb.c +4 -4
@@ -300,7 +300,7 @@ kgdb_remove_hw_break(unsigned long addr, int len, enum kgdb_bptype bptype)return -1 ;if (hw_break_release_slot (i)) { -printk (KERN_ERR "Cannot remove hw breakpoint at %lx\n" , addr); +pr_err ("Cannot remove hw breakpoint at %lx\n" , addr);return -1 ; } breakinfo[i].enabled =0 ;
@@ -327,7 +327,7 @@ static void kgdb_remove_all_hw_break(void) early_dr7 &= ~encode_dr7 (i, breakinfo[i].len, breakinfo[i].type); else if (hw_break_release_slot(i)) - printk(KERN_ERR "KGDB: hw bpt remove failed %lx\n", + pr_err("KGDB: hw bpt remove failed %lx\n", breakinfo[i].addr); breakinfo[i].enabled =0 ; }
@@ -498,7 +498,7 @@ single_step_cont(struct pt_regs *regs, struct die_args *args)* Single step exception from kernel space to user space so * eat the exception and continue the process: */ -printk (KERN_ERR "KGDB: trap/step from kernel to user space, " +pr_err ("KGDB: trap/step from kernel to user space, " "resuming...\n" );kgdb_arch_handle_exception (args->trapnr, args->signr, args->err,"c" ,"" , regs);
@@ -675,7 +675,7 @@ void kgdb_arch_late(void)continue ; breakinfo[i].pev =register_wide_hw_breakpoint (&attr,NULL ,NULL );if (IS_ERR ((void *__force )breakinfo[i].pev)) { -printk (KERN_ERR "kgdb: Could not allocate hw" +pr_err ("kgdb: Could not allocate hw" "breakpoints\nDisabling the kernel debugger\n" ); breakinfo[i].pev =NULL ;kgdb_arch_exit ();
arch/x86/kernel/kprobes/core.c +5 -6
@@ -581,8 +581,8 @@ static int reenter_kprobe(struct kprobe *p, struct pt_regs *regs,* Raise a BUG or we'll continue in an endless reentering loop * and eventually a stack overflow. */ -printk (KERN_WARNING "Unrecoverable kprobe detected at %p.\n" , - p->addr); +pr_warn ("Unrecoverable kprobe detected at %p.\n" , + p->addr);dump_kprobe (p);BUG ();default :
@@ -1092,12 +1092,11 @@ int longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) (addr < (u8 *) jprobe_return_end)) {if (stack_addr (regs) != saved_sp) {struct pt_regs *saved_regs = &kcb->jprobe_saved_regs; -printk (KERN_ERR -"current sp %p does not match saved sp %p\n" , +pr_err ("current sp %p does not match saved sp %p\n" ,stack_addr (regs), saved_sp); -printk (KERN_ERR "Saved registers for jprobe %p\n" , jp); +pr_err ("Saved registers for jprobe %p\n" , jp);show_regs (saved_regs); -printk (KERN_ERR "Current registers\n" ); +pr_err ("Current registers\n" );show_regs (regs);BUG (); }
arch/x86/kernel/kvm.c +6 -6
@@ -344,8 +344,8 @@ static void kvm_guest_cpu_init(void)#endif wrmsrl (MSR_KVM_ASYNC_PF_EN , pa |KVM_ASYNC_PF_ENABLED );__this_cpu_write (apf_reason.enabled,1 ); -printk (KERN_INFO "KVM setup async PF for cpu %d\n" , -smp_processor_id ()); +pr_info ("KVM setup async PF for cpu %d\n" , +smp_processor_id ()); }if (kvm_para_has_feature (KVM_FEATURE_PV_EOI )) {
@@ -370,8 +370,8 @@ static void kvm_pv_disable_apf(void)wrmsrl (MSR_KVM_ASYNC_PF_EN ,0 );__this_cpu_write (apf_reason.enabled,0 ); -printk (KERN_INFO "Unregister pv shared memory for cpu %d\n" , -smp_processor_id ()); +pr_info ("Unregister pv shared memory for cpu %d\n" , +smp_processor_id ()); }static void kvm_pv_guest_cpu_reboot (void *unused)
@@ -692,7 +692,7 @@ static struct dentry *kvm_init_debugfs(void) { d_kvm_debug =debugfs_create_dir ("kvm-guest" ,NULL );if (!d_kvm_debug) -printk (KERN_WARNING "Could not create 'kvm' debugfs directory\n" ); +pr_warn ("Could not create 'kvm' debugfs directory\n" );return d_kvm_debug; }
@@ -883,7 +883,7 @@ static __init int kvm_spinlock_init_jump(void)return 0 ;static_key_slow_inc (¶virt_ticketlocks_enabled); -printk (KERN_INFO "KVM setup paravirtual spinlock\n" ); +pr_info ("KVM setup paravirtual spinlock\n" );return 0 ; }
arch/x86/kernel/kvmclock.c +5 -5
@@ -114,8 +114,8 @@ static inline void kvm_sched_clock_init(bool stable) pv_time_ops.sched_clock = kvm_sched_clock_read;set_sched_clock_stable (); -printk (KERN_INFO "kvm-clock: using sched offset of %llu cycles\n" , - kvm_sched_clock_offset); +pr_info ("kvm-clock: using sched offset of %llu cycles\n" , + kvm_sched_clock_offset);BUILD_BUG_ON (sizeof (kvm_sched_clock_offset) >sizeof (((struct pvclock_vcpu_time_info *)NULL )->system_time));
@@ -195,8 +195,8 @@ int kvm_register_clock(char *txt) low = (int )slow_virt_to_phys (src) |1 ; high = ((u64 )slow_virt_to_phys (src) >>32 ); ret =native_write_msr_safe (msr_kvm_system_time, low, high); -printk (KERN_INFO "kvm-clock: cpu %d, msr %x:%x, %s\n" , - cpu, high, low, txt); +pr_info ("kvm-clock: cpu %d, msr %x:%x, %s\n" , + cpu, high, low, txt);return ret; }
@@ -263,7 +263,7 @@ void __init kvmclock_init(void) }else if (!(kvmclock &&kvm_para_has_feature (KVM_FEATURE_CLOCKSOURCE )))return ; -printk (KERN_INFO "kvm-clock: Using msrs %x and %x" , +pr_info ("kvm-clock: Using msrs %x and %x" , msr_kvm_system_time, msr_kvm_wall_clock); mem =memblock_alloc (size,PAGE_SIZE );
arch/x86/kernel/mmconf-fam10h_64.c +1 -1
@@ -205,7 +205,7 @@ void fam10h_check_enable_mmcfg(void)return ; } -printk (KERN_INFO "Enable MMCONFIG on AMD Family 10h\n" ); +pr_info ("Enable MMCONFIG on AMD Family 10h\n" ); val &= ~((FAM10H_MMIO_CONF_BASE_MASK <<FAM10H_MMIO_CONF_BASE_SHIFT ) | (FAM10H_MMIO_CONF_BUSRANGE_MASK <<FAM10H_MMIO_CONF_BUSRANGE_SHIFT )); val |= fam10h_pci_mmconf_base | (8 << FAM10H_MMIO_CONF_BUSRANGE_SHIFT) |
arch/x86/kernel/module.c +2 -2
@@ -37,12 +37,12 @@#if 0 #define DEBUGP (fmt, ...) \ - printk(KERN_DEBUG fmt, ##__VA_ARGS__) + pr_debug(fmt, ##__VA_ARGS__)#else #define DEBUGP (fmt, ...) \ do { \ if (0) \ - printk(KERN_DEBUG fmt, ##__VA_ARGS__); \ + pr_debug(fmt, ##__VA_ARGS__); \ } while (0)#endif
arch/x86/kernel/nmi_selftest.c +6 -6
@@ -119,15 +119,15 @@ static void __init dotest(void (*testcase_fn)(void), int expected) unexpected_testcase_failures++;if (nmi_fail ==FAILURE ) -printk (KERN_CONT "FAILED |" ); +pr_cont ("FAILED |" );else if (nmi_fail ==TIMEOUT ) -printk (KERN_CONT "TIMEOUT|" ); +pr_cont ("TIMEOUT|" );else -printk (KERN_CONT "ERROR |" ); +pr_cont ("ERROR |" );dump_stack (); }else { testcase_successes++; -printk (KERN_CONT " ok |" ); +pr_cont (" ok |" ); } testcase_total++;
@@ -152,10 +152,10 @@ void __init nmi_selftest(void)print_testname ("remote IPI" );dotest (remote_ipi,SUCCESS ); -printk (KERN_CONT "\n" ); +pr_cont ("\n" );print_testname ("local IPI" );dotest (local_ipi,SUCCESS ); -printk (KERN_CONT "\n" ); +pr_cont ("\n" );cleanup_nmi_testsuite ();
arch/x86/kernel/paravirt.c +1 -1
@@ -67,7 +67,7 @@ u64 _paravirt_ident_64(u64 x)void __init default_banner (void ) { -printk (KERN_INFO "Booting paravirtualized kernel on %s\n" , +pr_info ("Booting paravirtualized kernel on %s\n" , pv_info.name); }
arch/x86/kernel/pci-calgary_64.c +41 -43
212 lines not on this page · raw message
arch/x86/kernel/pci-iommu_table.c +2 -2
@@ -56,7 +56,7 @@ void __init check_iommu_entries(struct iommu_table_entry *start, q =find_dependents_of (start, finish, p); x =find_dependents_of (start, finish, q);if (p == x) { -printk (KERN_ERR "CYCLIC DEPENDENCY FOUND! %pS depends on %pS and vice-versa. BREAKING IT.\n" , +pr_err ("CYCLIC DEPENDENCY FOUND! %pS depends on %pS and vice-versa. BREAKING IT.\n" , p->detect, q->detect);/* Heavy handed way..*/ x->depend =0 ;
@@ -66,7 +66,7 @@ void __init check_iommu_entries(struct iommu_table_entry *start,for (p = start; p < finish; p++) { q =find_dependents_of (p, finish, p);if (q && q > p) { -printk (KERN_ERR "EXECUTION ORDER INVALID! %pS should be called before %pS!\n" , +pr_err ("EXECUTION ORDER INVALID! %pS should be called before %pS!\n" , p->detect, q->detect); } }
arch/x86/kernel/pci-nommu.c +1 -2
@@ -16,8 +16,7 @@ check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size) {if (hwdev && !dma_capable (hwdev, bus, size)) {if (*hwdev->dma_mask >=DMA_BIT_MASK (32 )) -printk (KERN_ERR -"nommu_%s: overflow %Lx+%zu of device mask %Lx\n" , +pr_err ("nommu_%s: overflow %Lx+%zu of device mask %Lx\n" , name, (long long )bus, size, (long long )*hwdev->dma_mask);return 0 ;
arch/x86/kernel/pci-swiotlb.c +2 -2
@@ -112,8 +112,8 @@ void __init pci_swiotlb_late_init(void)if (!swiotlb)swiotlb_free ();else { -printk (KERN_INFO "PCI-DMA: " -"Using software bounce buffering for IO (SWIOTLB)\n" ); +pr_info ("PCI-DMA: " +"Using software bounce buffering for IO (SWIOTLB)\n" );swiotlb_print_info (); } }
arch/x86/kernel/quirks.c +23 -25
169 lines not on this page · raw message
arch/x86/kernel/rtc.c +3 -4
@@ -48,11 +48,10 @@ int mach_set_rtc_mmss(const struct timespec *now)if (!rtc_valid_tm (&tm)) { retval =set_rtc_time (&tm);if (retval) -printk (KERN_ERR "%s: RTC write failed with error %d\n" , - __func__, retval); +pr_err ("%s: RTC write failed with error %d\n" , + __func__, retval); }else { -printk (KERN_ERR -"%s: Invalid RTC value: write of %lx to RTC failed\n" , +pr_err ("%s: Invalid RTC value: write of %lx to RTC failed\n" , __func__, nowtime); retval = -EINVAL ; }
arch/x86/kernel/setup.c +11 -11
@@ -338,12 +338,12 @@ static void __init relocate_initrd(void)memblock_reserve (relocated_ramdisk, area_size); initrd_start = relocated_ramdisk +PAGE_OFFSET ; initrd_end = initrd_start + ramdisk_size; -printk (KERN_INFO "Allocated new RAMDISK: [mem %#010llx-%#010llx]\n" , +pr_info ("Allocated new RAMDISK: [mem %#010llx-%#010llx]\n" , relocated_ramdisk, relocated_ramdisk + ramdisk_size -1 );copy_from_early_mem ((void *)initrd_start, ramdisk_image, ramdisk_size); -printk (KERN_INFO "Move RAMDISK from [mem %#010llx-%#010llx] to" +pr_info ("Move RAMDISK from [mem %#010llx-%#010llx] to" " [mem %#010llx-%#010llx]\n" , ramdisk_image, ramdisk_image + ramdisk_size -1 , relocated_ramdisk, relocated_ramdisk + ramdisk_size -1 );
@@ -382,7 +382,7 @@ static void __init reserve_initrd(void)"disabling initrd (%lld needed, %lld available)\n" , ramdisk_size, mapped_size>>1); -printk (KERN_INFO "RAMDISK: [mem %#010llx-%#010llx]\n" , ramdisk_image, +pr_info ("RAMDISK: [mem %#010llx-%#010llx]\n" , ramdisk_image, ramdisk_end -1 ); if (pfn_range_is_mapped(PFN_DOWN(ramdisk_image),
@@ -457,7 +457,7 @@ static void __init e820_reserve_setup_data(void)sanitize_e820_map (e820.map,ARRAY_SIZE (e820.map), &e820.nr_map);memcpy (&e820_saved, &e820,sizeof (struct e820map )); -printk (KERN_INFO "extended physical RAM map:\n" ); +pr_info ("extended physical RAM map:\n" );e820_print_map ("reserve setup_data" ); }
@@ -713,7 +713,7 @@ static void __init trim_snb_memory(void)if (!snb_gfx_workaround_needed ())return ; -printk (KERN_DEBUG "reserving inaccessible SNB gfx pages\n" ); +pr_debug ("reserving inaccessible SNB gfx pages\n" );/* * Reserve all memory below the 1 MB mark that has not
@@ -723,8 +723,8 @@ static void __init trim_snb_memory(void)for (i =0 ; i <ARRAY_SIZE (bad_pages); i++) {if (memblock_reserve (bad_pages[i],PAGE_SIZE )) -printk (KERN_WARNING "failed to reserve 0x%08lx\n" , - bad_pages[i]); +pr_warn ("failed to reserve 0x%08lx\n" , + bad_pages[i]); } }
@@ -881,7 +881,7 @@ void __init setup_arch(char **cmdline_p)*/ __flush_tlb_all ();#else -printk (KERN_INFO "Command line: %s\n" , boot_command_line); +pr_info ("Command line: %s\n" , boot_command_line);#endif /*
@@ -1030,7 +1030,7 @@ void __init setup_arch(char **cmdline_p)e820_update_range (0x70000000ULL ,0x40000ULL ,E820_RAM ,E820_RESERVED );sanitize_e820_map (e820.map,ARRAY_SIZE (e820.map), &e820.nr_map); -printk (KERN_INFO "fixed physical RAM map:\n" ); +pr_info ("fixed physical RAM map:\n" ); e820_print_map("bad_ppro"); }#else
@@ -1107,8 +1107,8 @@ void __init setup_arch(char **cmdline_p)#endif #ifdef CONFIG_X86_32 -printk (KERN_DEBUG "initial memory mapped: [mem 0x00000000-%#010lx]\n" , - (max_pfn_mapped<<PAGE_SHIFT ) -1 ); +pr_debug ("initial memory mapped: [mem 0x00000000-%#010lx]\n" , + (max_pfn_mapped<<PAGE_SHIFT ) -1 );#endif reserve_real_mode ();
arch/x86/kernel/setup_percpu.c +1 -1
@@ -206,7 +206,7 @@ void __init setup_per_cpu_areas(void) pcpu_cpu_distance, pcpu_fc_alloc, pcpu_fc_free);if (rc <0 ) -pr_warning ("%s allocator failed (%d), falling back to page size\n" , +pr_warn ("%s allocator failed (%d), falling back to page size\n" , pcpu_fc_names[pcpu_chosen_fc], rc); }if (rc <0 )
arch/x86/kernel/smpboot.c +3 -3
@@ -692,7 +692,7 @@ void smp_announce(void) {int num_nodes =num_online_nodes (); -printk (KERN_INFO "x86: Booted up %d node%s, %d CPUs\n" , +pr_info ("x86: Booted up %d node%s, %d CPUs\n" , num_nodes, (num_nodes >1 ?"s" :"" ),num_online_cpus ()); }
@@ -710,7 +710,7 @@ static void announce_cpu(int cpu, int apicid) node_width =num_digits (num_possible_nodes ()) +1 ;/* + '#' */ if (cpu ==1 ) -printk (KERN_INFO "x86: Booting SMP configuration:\n" ); +pr_info ("x86: Booting SMP configuration:\n" );if (system_state ==SYSTEM_BOOTING ) {if (node != current_node) {
@@ -718,7 +718,7 @@ static void announce_cpu(int cpu, int apicid)pr_cont ("\n" ); current_node = node; -printk (KERN_INFO ".... node %*s#%d, CPUs: " , +pr_info (".... node %*s#%d, CPUs: " , node_width -num_digits (node)," " , node); }
arch/x86/kernel/sysfb_efi.c +4 -4
@@ -142,10 +142,10 @@ static int __init efifb_set_system(const struct dmi_system_id *id)return 0 ; } -printk (KERN_INFO "efifb: dmi detected %s - framebuffer at 0x%08x " -"(%dx%d, stride %d)\n" , id->ident, - screen_info.lfb_base, screen_info.lfb_width, - screen_info.lfb_height, screen_info.lfb_linelength); +pr_info ("efifb: dmi detected %s - framebuffer at 0x%08x " +"(%dx%d, stride %d)\n" , id->ident, + screen_info.lfb_base, screen_info.lfb_width, + screen_info.lfb_height, screen_info.lfb_linelength);return 1 ; }
arch/x86/kernel/sysfb_simplefb.c +1 -1
@@ -73,7 +73,7 @@ __init int create_simplefb(const struct screen_info *si, len = mode->height * mode->stride; len =PAGE_ALIGN (len);if (len > (u64 )si->lfb_size <<16 ) { -printk (KERN_WARNING "sysfb: VRAM smaller than advertised\n" ); +pr_warn ("sysfb: VRAM smaller than advertised\n" );return -EINVAL ; }
arch/x86/kernel/tboot.c +8 -8
@@ -70,13 +70,13 @@ void __init tboot_probe(void)*/ if (!e820_any_mapped (boot_params.tboot_addr, boot_params.tboot_addr,E820_RESERVED )) { -pr_warning ("non-0 tboot_addr but it is not of type E820_RESERVED\n" ); +pr_warn ("non-0 tboot_addr but it is not of type E820_RESERVED\n" );return ; }/* only a natively booted kernel should be using TXT */ if (paravirt_enabled ()) { -pr_warning ("non-0 tboot_addr but pv_ops is enabled\n" ); +pr_warn ("non-0 tboot_addr but pv_ops is enabled\n" );return ; }
@@ -84,13 +84,13 @@ void __init tboot_probe(void)set_fixmap (FIX_TBOOT_BASE , boot_params.tboot_addr); tboot = (struct tboot *)fix_to_virt (FIX_TBOOT_BASE );if (memcmp (&tboot_uuid, &tboot->uuid,sizeof (tboot->uuid))) { -pr_warning ("tboot at 0x%llx is invalid\n" , +pr_warn ("tboot at 0x%llx is invalid\n" , boot_params.tboot_addr); tboot =NULL ;return ; }if (tboot->version <5 ) { -pr_warning ("tboot version is invalid: %u\n" , tboot->version); +pr_warn ("tboot version is invalid: %u\n" , tboot->version); tboot =NULL ;return ; }
@@ -293,7 +293,7 @@ static int tboot_sleep(u8 sleep_state, u32 pm1a_control, u32 pm1b_control)if (sleep_state >=ACPI_S_STATE_COUNT || acpi_shutdown_map[sleep_state] ==-1 ) { -pr_warning ("unsupported sleep state 0x%x\n" , sleep_state); +pr_warn ("unsupported sleep state 0x%x\n" , sleep_state);return -1 ; }
@@ -306,7 +306,7 @@ static int tboot_extended_sleep(u8 sleep_state, u32 val_a, u32 val_b)if (!tboot_enabled ())return 0 ; -pr_warning ("tboot is not able to suspend on platforms with reduced hardware sleep (ACPIv5)" ); +pr_warn ("tboot is not able to suspend on platforms with reduced hardware sleep (ACPIv5)" );return -ENODEV ; }
@@ -324,7 +324,7 @@ static int tboot_wait_for_aps(int num_aps) }if (timeout) -pr_warning ("tboot wait for APs timeout\n" ); +pr_warn ("tboot wait for APs timeout\n" );return !(atomic_read ((atomic_t *)&tboot->num_in_wfs) == num_aps); }
@@ -526,7 +526,7 @@ int tboot_force_iommu(void)return 0 ;if (no_iommu || swiotlb || dmar_disabled) -pr_warning ("Forcing Intel-IOMMU to enabled\n" ); +pr_warn ("Forcing Intel-IOMMU to enabled\n" ); dmar_disabled =0 ;#ifdef CONFIG_SWIOTLB
arch/x86/kernel/tce_64.c +3 -3
@@ -113,7 +113,7 @@ static int tce_table_setparms(struct pci_dev *dev, struct iommu_table *tbl) bitmapsz = tbl->it_size /BITS_PER_BYTE ; bmppages =__get_free_pages (GFP_KERNEL ,get_order (bitmapsz));if (!bmppages) { -printk (KERN_ERR "Calgary: cannot allocate bitmap\n" ); +pr_err ("Calgary: cannot allocate bitmap\n" ); ret = -ENOMEM ; goto done; }
@@ -138,14 +138,14 @@ int __init build_tce_table(struct pci_dev *dev, void __iomem *bbar)int ret;if (pci_iommu (dev->bus)) { -printk (KERN_ERR "Calgary: dev %p has sysdata->iommu %p\n" , +pr_err ("Calgary: dev %p has sysdata->iommu %p\n" , dev,pci_iommu (dev->bus));BUG (); } tbl =kzalloc (sizeof (struct iommu_table ),GFP_KERNEL );if (!tbl) { -printk (KERN_ERR "Calgary: error allocating iommu_table\n" ); +pr_err ("Calgary: error allocating iommu_table\n" ); ret = -ENOMEM ; goto done; }
arch/x86/kernel/test_nx.c +8 -8
@@ -54,8 +54,8 @@ static void fudze_exception_table(void *marker, void *new)* table. */ if (mod->num_exentries >1 ) { -printk (KERN_ERR "test_nx: too many exception table entries!\n" ); -printk (KERN_ERR "test_nx: test results are not reliable.\n" ); +pr_err ("test_nx: too many exception table entries!\n" ); +pr_err ("test_nx: test results are not reliable.\n" );return ; } extable = (struct exception_table_entry *)mod->extable;
@@ -115,11 +115,11 @@ static int test_NX(void) test_data =0xC3 ; -printk (KERN_INFO "Testing NX protection\n" ); +pr_info ("Testing NX protection\n" );/* Test 1: check if the stack is not executable */ if (test_address (&stackcode)) { -printk (KERN_ERR "test_nx: stack was executable\n" ); +pr_err ("test_nx: stack was executable\n" ); ret = -ENODEV ; }
@@ -131,7 +131,7 @@ static int test_NX(void) heap[0 ] =0xC3 ;/* opcode for "ret" */ if (test_address (heap)) { -printk (KERN_ERR "test_nx: heap was executable\n" ); +pr_err ("test_nx: heap was executable\n" ); ret = -ENODEV ; }kfree (heap);
@@ -145,10 +145,10 @@ static int test_NX(void)#ifdef CONFIG_DEBUG_RODATA /* Test 3: Check if the .rodata section is executable */ if (rodata_test_data !=0xC3 ) { -printk (KERN_ERR "test_nx: .rodata marker has invalid value\n" ); +pr_err ("test_nx: .rodata marker has invalid value\n" ); ret = -ENODEV ; }else if (test_address (&rodata_test_data)) { -printk (KERN_ERR "test_nx: .rodata section is executable\n" ); +pr_err ("test_nx: .rodata section is executable\n" ); ret = -ENODEV ; }#endif
@@ -156,7 +156,7 @@ static int test_NX(void)#if 0 /* Test 4: Check if the .data section of a module is executable */ if (test_address (&test_data)) { -printk (KERN_ERR "test_nx: .data section is executable\n" ); +pr_err ("test_nx: .data section is executable\n" ); ret = -ENODEV ; }
arch/x86/kernel/test_rodata.c +5 -5
@@ -22,7 +22,7 @@ int rodata_test(void)/* test 1: read the value */ /* If this test fails, some previous testrun has clobbered the state */ if (!rodata_test_data) { -printk (KERN_ERR "rodata_test: test 1 fails (start data)\n" ); +pr_err ("rodata_test: test 1 fails (start data)\n" );return -ENODEV ; }
@@ -50,25 +50,25 @@ int rodata_test(void)if (!result) { -printk (KERN_ERR "rodata_test: test data was not read only\n" ); +pr_err ("rodata_test: test data was not read only\n" );return -ENODEV ; }/* test 3: check the value hasn't changed */ /* If this test fails, we managed to overwrite the data */ if (!rodata_test_data) { -printk (KERN_ERR "rodata_test: Test 3 fails (end data)\n" ); +pr_err ("rodata_test: Test 3 fails (end data)\n" );return -ENODEV ; }/* test 4: check if the rodata section is 4Kb aligned */ start = (unsigned long )__start_rodata; end = (unsigned long )__end_rodata;if (start & (PAGE_SIZE -1 )) { -printk (KERN_ERR "rodata_test: .rodata is not 4k aligned\n" ); +pr_err ("rodata_test: .rodata is not 4k aligned\n" );return -ENODEV ; }if (end & (PAGE_SIZE -1 )) { -printk (KERN_ERR "rodata_test: .rodata end is not 4k aligned\n" ); +pr_err ("rodata_test: .rodata end is not 4k aligned\n" );return -ENODEV ; }
arch/x86/kernel/tsc_sync.c +3 -3
@@ -156,10 +156,10 @@ void check_tsc_sync_source(int cpu)cpu_relax ();if (nr_warps) { -pr_warning ("TSC synchronization [CPU#%d -> CPU#%d]:\n" , +pr_warn ("TSC synchronization [CPU#%d -> CPU#%d]:\n" ,smp_processor_id (), cpu); -pr_warning ("Measured %Ld cycles TSC warp between CPUs, " -"turning off TSC clock.\n" , max_warp); +pr_warn ("Measured %Ld cycles TSC warp between CPUs, " +"turning off TSC clock.\n" , max_warp);mark_tsc_unstable ("check_tsc_sync_source failed" ); }else { pr_debug("TSC synchronization [CPU#%d -> CPU#%d]: passed\n",
arch/x86/kernel/vsmp_64.c +1 -1
@@ -97,7 +97,7 @@ static void __init set_vsmp_pv_ops(void) address =early_ioremap (cfg,8 ); cap =readl (address); ctl =readl (address +4 ); -printk (KERN_INFO "vSMP CTL: capabilities:0x%08x control:0x%08x\n" , +pr_info ("vSMP CTL: capabilities:0x%08x control:0x%08x\n" , cap, ctl);/* If possible, let the vSMP foundation route the interrupt optimally */
Signature · 1 line
1.8.3.1
Quoted 9 lines · Chen Yucong
arch/x86/kernel/*use a mixture ofprintk(KERN_<level> )and pr_<level>(). This patch converts the bulk ofprintk(KERN_<level> )to pr_<level>() and usesdev_dbg()instead of thedev_printk(KERN_DEBUG,). Allpr_warning()calls have been replaced withpr_warn().Not sure what to do about the
printk(KERN_DEFAULT)andprintk()without a log level.Signed-off-by Chen Yucong <[email protected]>
When converting please also join broken up format strings, such as:
- printk(KERN_WARNING PREFIX
- "HPET id: %#x base: 0xfed0000000000000 fixed up "
- "to 0xfed00000.\n", hpet_tbl->id);
+ pr_warn(PREFIX "HPET id: %#x base: 0xfed0000000000000 fixed up "
+ "to 0xfed00000.\n", hpet_tbl->id);
ignore checkpatch: we don't line-break user visible strings.
Thanks,
Ingo
Quoted 21 lines · Ingo Molnar
Quoted 9 lines · Chen Yucong
arch/x86/kernel/*use a mixture ofprintk(KERN_<level> )and pr_<level>(). This patch converts the bulk ofprintk(KERN_<level> )to pr_<level>() and usesdev_dbg()instead of thedev_printk(KERN_DEBUG,). Allpr_warning()calls have been replaced withpr_warn().Not sure what to do about the
printk(KERN_DEFAULT)andprintk()without a log level.Signed-off-by Chen Yucong <[email protected]>When converting please also join broken up format strings, such as:
arch/x86/kernel/acpi/boot.c +2
-3- printk(KERN_WARNING PREFIX -"HPET id: %#x base: 0xfed0000000000000 fixed up " - "to 0xfed00000.\n", hpet_tbl->id); +pr_warn (PREFIX "HPET id: %#x base: 0xfed0000000000000 fixed up " +"to 0xfed00000.\n" , hpet_tbl->id);
Quoted 1 line
ignore checkpatch: we don't line-break user visible strings.
And please get rid of PREFIX. define pr_fmt instead.
Thanks,
tglx
Quoted 14 lines · Ingo Molnar
Quoted 9 lines · Chen Yucong
arch/x86/kernel/*use a mixture ofprintk(KERN_ )andpr_(). This patch converts the bulk ofprintk(KERN_ )topr_()and usesdev_dbg()instead of thedev_printk(KERN_DEBUG,). Allpr_warning()calls have been replaced withpr_warn().Not sure what to do about the
printk(KERN_DEFAULT)andprintk()without a log level.Signed-off-by Chen Yucong <[email protected]>When converting please also join broken up format strings, such as:
Quoted 7 lines
- printk(KERN_WARNING PREFIX
- "HPET id: %#x base:0xfed0000000000000fixed up " - "to 0xfed00000.\n",hpet_tbl->id);
+ pr_warn(PREFIX "HPET id: %#x base:0xfed0000000000000fixed up " + "to 0xfed00000.\n",hpet_tbl->id);ignore checkpatch: we don't line-break user visible strings.
Umm, checkpatch already suggests to coalesce split strings.
ie:
WARNING: quoted string split across lines
#850: FILE: arch/x86/kernel/hpet.c:850:
+ "HPET config register value = 0xFFFFFFFF. "
+ "Disabling HPET\n");
and checkpatch does the fixing using something like:
$ ./scripts/checkpatch.pl -f --fix-inplace --types=split_string arch/x86/kernel/hpet.c