Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI: bus: Clean up printing messages

Replace all of the ACPI_DEBUG_PRINT() and ACPI_EXCEPTION() instances
in bus.c with pr_debug() and pr_info(), respectively, drop the
_COMPONENT and ACPI_MODULE_NAME() definitions that are not used any
more and replace direct printk() invocations with the matching
pr_*() calls (with a couple of exceptions where the log level is
decreased).

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

+26 -34
+26 -34
drivers/acpi/bus.c
··· 5 5 * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> 6 6 */ 7 7 8 + #define pr_fmt(fmt) "ACPI: " fmt 9 + 8 10 #include <linux/module.h> 9 11 #include <linux/init.h> 10 12 #include <linux/ioport.h> ··· 33 31 34 32 #include "internal.h" 35 33 36 - #define _COMPONENT ACPI_BUS_COMPONENT 37 - ACPI_MODULE_NAME("bus"); 38 - 39 34 struct acpi_device *acpi_root; 40 35 struct proc_dir_entry *acpi_root_dir; 41 36 EXPORT_SYMBOL(acpi_root_dir); ··· 46 47 #else 47 48 static int set_copy_dsdt(const struct dmi_system_id *id) 48 49 { 49 - printk(KERN_NOTICE "%s detected - " 50 - "force copy of DSDT to local memory\n", id->ident); 50 + pr_notice("%s detected - force copy of DSDT to local memory\n", id->ident); 51 51 acpi_gbl_copy_dsdt_locally = 1; 52 52 return 0; 53 53 } ··· 114 116 acpi_set_device_status(device, sta); 115 117 116 118 if (device->status.functional && !device->status.present) { 117 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device [%s] status [%08x]: " 118 - "functional but not present;\n", 119 - device->pnp.bus_id, (u32)sta)); 119 + pr_debug("Device [%s] status [%08x]: functional but not present\n", 120 + device->pnp.bus_id, (u32)sta); 120 121 } 121 122 122 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device [%s] status [%08x]\n", 123 - device->pnp.bus_id, (u32)sta)); 123 + pr_debug("Device [%s] status [%08x]\n", device->pnp.bus_id, (u32)sta); 124 124 return 0; 125 125 } 126 126 EXPORT_SYMBOL(acpi_bus_get_status); ··· 911 915 return ret; 912 916 913 917 acpi_dev->driver = acpi_drv; 914 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, 915 - "Driver [%s] successfully bound to device [%s]\n", 916 - acpi_drv->name, acpi_dev->pnp.bus_id)); 918 + 919 + pr_debug("Driver [%s] successfully bound to device [%s]\n", 920 + acpi_drv->name, acpi_dev->pnp.bus_id); 917 921 918 922 if (acpi_drv->ops.notify) { 919 923 ret = acpi_device_install_notify_handler(acpi_dev); ··· 927 931 } 928 932 } 929 933 930 - ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found driver [%s] for device [%s]\n", 931 - acpi_drv->name, acpi_dev->pnp.bus_id)); 934 + pr_debug("Found driver [%s] for device [%s]\n", acpi_drv->name, 935 + acpi_dev->pnp.bus_id); 936 + 932 937 get_device(dev); 933 938 return 0; 934 939 } ··· 992 995 message = "platform specific model"; 993 996 break; 994 997 default: 995 - printk(KERN_WARNING PREFIX "Unknown interrupt routing model\n"); 998 + pr_info("Unknown interrupt routing model\n"); 996 999 return -ENODEV; 997 1000 } 998 1001 999 - printk(KERN_INFO PREFIX "Using %s for interrupt routing\n", message); 1002 + pr_info("Using %s for interrupt routing\n", message); 1000 1003 1001 1004 status = acpi_execute_simple_method(NULL, "\\_PIC", acpi_irq_model); 1002 1005 if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { 1003 - ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PIC")); 1006 + pr_info("_PIC evaluation failed: %s\n", acpi_format_exception(status)); 1004 1007 return -ENODEV; 1005 1008 } 1006 1009 ··· 1024 1027 if (acpi_disabled) 1025 1028 return; 1026 1029 1027 - printk(KERN_INFO PREFIX "Core revision %08x\n", ACPI_CA_VERSION); 1030 + pr_info("Core revision %08x\n", ACPI_CA_VERSION); 1028 1031 1029 1032 /* enable workarounds, unless strict ACPI spec. compliance */ 1030 1033 if (!acpi_strict) ··· 1045 1048 1046 1049 status = acpi_reallocate_root_table(); 1047 1050 if (ACPI_FAILURE(status)) { 1048 - printk(KERN_ERR PREFIX 1049 - "Unable to reallocate ACPI tables\n"); 1051 + pr_err("Unable to reallocate ACPI tables\n"); 1050 1052 goto error0; 1051 1053 } 1052 1054 1053 1055 status = acpi_initialize_subsystem(); 1054 1056 if (ACPI_FAILURE(status)) { 1055 - printk(KERN_ERR PREFIX 1056 - "Unable to initialize the ACPI Interpreter\n"); 1057 + pr_err("Unable to initialize the ACPI Interpreter\n"); 1057 1058 goto error0; 1058 1059 } 1059 1060 ··· 1097 1102 1098 1103 status = acpi_enable_subsystem(~ACPI_NO_ACPI_ENABLE); 1099 1104 if (ACPI_FAILURE(status)) { 1100 - printk(KERN_ERR PREFIX "Unable to enable ACPI\n"); 1105 + pr_err("Unable to enable ACPI\n"); 1101 1106 disable_acpi(); 1102 1107 } else { 1103 1108 /* ··· 1126 1131 1127 1132 status = acpi_load_tables(); 1128 1133 if (ACPI_FAILURE(status)) { 1129 - printk(KERN_ERR PREFIX 1130 - "Unable to load the System Description Tables\n"); 1134 + pr_err("Unable to load the System Description Tables\n"); 1131 1135 goto error1; 1132 1136 } 1133 1137 ··· 1144 1150 1145 1151 status = acpi_enable_subsystem(ACPI_NO_ACPI_ENABLE); 1146 1152 if (ACPI_FAILURE(status)) { 1147 - printk(KERN_ERR PREFIX 1148 - "Unable to start the ACPI Interpreter\n"); 1153 + pr_err("Unable to start the ACPI Interpreter\n"); 1149 1154 goto error1; 1150 1155 } 1151 1156 1152 1157 status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION); 1153 1158 if (ACPI_FAILURE(status)) { 1154 - printk(KERN_ERR PREFIX "Unable to initialize ACPI objects\n"); 1159 + pr_err("Unable to initialize ACPI objects\n"); 1155 1160 goto error1; 1156 1161 } 1157 1162 ··· 1179 1186 */ 1180 1187 acpi_ec_dsdt_probe(); 1181 1188 1182 - printk(KERN_INFO PREFIX "Interpreter enabled\n"); 1189 + pr_info("Interpreter enabled\n"); 1183 1190 1184 1191 /* Initialize sleep structures */ 1185 1192 acpi_sleep_init(); ··· 1198 1205 acpi_install_notify_handler(ACPI_ROOT_OBJECT, ACPI_SYSTEM_NOTIFY, 1199 1206 &acpi_bus_notify, NULL); 1200 1207 if (ACPI_FAILURE(status)) { 1201 - printk(KERN_ERR PREFIX 1202 - "Unable to register for device notifications\n"); 1208 + pr_err("Unable to register for system notifications\n"); 1203 1209 goto error1; 1204 1210 } 1205 1211 ··· 1225 1233 int result; 1226 1234 1227 1235 if (acpi_disabled) { 1228 - printk(KERN_INFO PREFIX "Interpreter disabled.\n"); 1236 + pr_info("Interpreter disabled.\n"); 1229 1237 return -ENODEV; 1230 1238 } 1231 1239 1232 1240 acpi_kobj = kobject_create_and_add("acpi", firmware_kobj); 1233 1241 if (!acpi_kobj) { 1234 - printk(KERN_WARNING "%s: kset create error\n", __func__); 1242 + pr_debug("%s: kset create error\n", __func__); 1235 1243 acpi_kobj = NULL; 1236 1244 } 1237 1245