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

ACPI: delete tracing macros from drivers/acpi/*.c

Signed-off-by: Len Brown <len.brown@intel.com>

authored by

Patrick Mochel and committed by
Len Brown
d550d98d d7fa2589

+862 -1187
+22 -31
drivers/acpi/ac.c
··· 84 84 { 85 85 acpi_status status = AE_OK; 86 86 87 - ACPI_FUNCTION_TRACE("acpi_ac_get_state"); 88 87 89 88 if (!ac) 90 - return_VALUE(-EINVAL); 89 + return -EINVAL; 91 90 92 91 status = acpi_evaluate_integer(ac->handle, "_PSR", NULL, &ac->state); 93 92 if (ACPI_FAILURE(status)) { 94 93 ACPI_EXCEPTION((AE_INFO, status, "Error reading AC Adapter state")); 95 94 ac->state = ACPI_AC_STATUS_UNKNOWN; 96 - return_VALUE(-ENODEV); 95 + return -ENODEV; 97 96 } 98 97 99 - return_VALUE(0); 98 + return 0; 100 99 } 101 100 102 101 /* -------------------------------------------------------------------------- ··· 108 109 { 109 110 struct acpi_ac *ac = (struct acpi_ac *)seq->private; 110 111 111 - ACPI_FUNCTION_TRACE("acpi_ac_seq_show"); 112 112 113 113 if (!ac) 114 - return_VALUE(0); 114 + return 0; 115 115 116 116 if (acpi_ac_get_state(ac)) { 117 117 seq_puts(seq, "ERROR: Unable to read AC Adapter state\n"); 118 - return_VALUE(0); 118 + return 0; 119 119 } 120 120 121 121 seq_puts(seq, "state: "); ··· 130 132 break; 131 133 } 132 134 133 - return_VALUE(0); 135 + return 0; 134 136 } 135 137 136 138 static int acpi_ac_open_fs(struct inode *inode, struct file *file) ··· 142 144 { 143 145 struct proc_dir_entry *entry = NULL; 144 146 145 - ACPI_FUNCTION_TRACE("acpi_ac_add_fs"); 146 147 147 148 if (!acpi_device_dir(device)) { 148 149 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), 149 150 acpi_ac_dir); 150 151 if (!acpi_device_dir(device)) 151 - return_VALUE(-ENODEV); 152 + return -ENODEV; 152 153 acpi_device_dir(device)->owner = THIS_MODULE; 153 154 } 154 155 ··· 155 158 entry = create_proc_entry(ACPI_AC_FILE_STATE, 156 159 S_IRUGO, acpi_device_dir(device)); 157 160 if (!entry) 158 - return_VALUE(-ENODEV); 161 + return -ENODEV; 159 162 else { 160 163 entry->proc_fops = &acpi_ac_fops; 161 164 entry->data = acpi_driver_data(device); 162 165 entry->owner = THIS_MODULE; 163 166 } 164 167 165 - return_VALUE(0); 168 + return 0; 166 169 } 167 170 168 171 static int acpi_ac_remove_fs(struct acpi_device *device) 169 172 { 170 - ACPI_FUNCTION_TRACE("acpi_ac_remove_fs"); 171 173 172 174 if (acpi_device_dir(device)) { 173 175 remove_proc_entry(ACPI_AC_FILE_STATE, acpi_device_dir(device)); ··· 175 179 acpi_device_dir(device) = NULL; 176 180 } 177 181 178 - return_VALUE(0); 182 + return 0; 179 183 } 180 184 181 185 /* -------------------------------------------------------------------------- ··· 187 191 struct acpi_ac *ac = (struct acpi_ac *)data; 188 192 struct acpi_device *device = NULL; 189 193 190 - ACPI_FUNCTION_TRACE("acpi_ac_notify"); 191 194 192 195 if (!ac) 193 - return_VOID; 196 + return; 194 197 195 198 if (acpi_bus_get_device(ac->handle, &device)) 196 - return_VOID; 199 + return; 197 200 198 201 switch (event) { 199 202 case ACPI_AC_NOTIFY_STATUS: ··· 205 210 break; 206 211 } 207 212 208 - return_VOID; 213 + return; 209 214 } 210 215 211 216 static int acpi_ac_add(struct acpi_device *device) ··· 214 219 acpi_status status = AE_OK; 215 220 struct acpi_ac *ac = NULL; 216 221 217 - ACPI_FUNCTION_TRACE("acpi_ac_add"); 218 222 219 223 if (!device) 220 - return_VALUE(-EINVAL); 224 + return -EINVAL; 221 225 222 226 ac = kmalloc(sizeof(struct acpi_ac), GFP_KERNEL); 223 227 if (!ac) 224 - return_VALUE(-ENOMEM); 228 + return -ENOMEM; 225 229 memset(ac, 0, sizeof(struct acpi_ac)); 226 230 227 231 ac->handle = device->handle; ··· 254 260 kfree(ac); 255 261 } 256 262 257 - return_VALUE(result); 263 + return result; 258 264 } 259 265 260 266 static int acpi_ac_remove(struct acpi_device *device, int type) ··· 262 268 acpi_status status = AE_OK; 263 269 struct acpi_ac *ac = NULL; 264 270 265 - ACPI_FUNCTION_TRACE("acpi_ac_remove"); 266 271 267 272 if (!device || !acpi_driver_data(device)) 268 - return_VALUE(-EINVAL); 273 + return -EINVAL; 269 274 270 275 ac = (struct acpi_ac *)acpi_driver_data(device); 271 276 ··· 275 282 276 283 kfree(ac); 277 284 278 - return_VALUE(0); 285 + return 0; 279 286 } 280 287 281 288 static int __init acpi_ac_init(void) 282 289 { 283 290 int result = 0; 284 291 285 - ACPI_FUNCTION_TRACE("acpi_ac_init"); 286 292 287 293 acpi_ac_dir = proc_mkdir(ACPI_AC_CLASS, acpi_root_dir); 288 294 if (!acpi_ac_dir) 289 - return_VALUE(-ENODEV); 295 + return -ENODEV; 290 296 acpi_ac_dir->owner = THIS_MODULE; 291 297 292 298 result = acpi_bus_register_driver(&acpi_ac_driver); 293 299 if (result < 0) { 294 300 remove_proc_entry(ACPI_AC_CLASS, acpi_root_dir); 295 - return_VALUE(-ENODEV); 301 + return -ENODEV; 296 302 } 297 303 298 - return_VALUE(0); 304 + return 0; 299 305 } 300 306 301 307 static void __exit acpi_ac_exit(void) 302 308 { 303 - ACPI_FUNCTION_TRACE("acpi_ac_exit"); 304 309 305 310 acpi_bus_unregister_driver(&acpi_ac_driver); 306 311 307 312 remove_proc_entry(ACPI_AC_CLASS, acpi_root_dir); 308 313 309 - return_VOID; 314 + return; 310 315 } 311 316 312 317 module_init(acpi_ac_init);
+34 -48
drivers/acpi/acpi_memhotplug.c
··· 85 85 struct acpi_resource *resource = NULL; 86 86 struct acpi_resource_address64 address64; 87 87 88 - ACPI_FUNCTION_TRACE("acpi_memory_get_device_resources"); 89 88 90 89 /* Get the range from the _CRS */ 91 90 status = acpi_get_current_resources(mem_device->handle, &buffer); 92 91 if (ACPI_FAILURE(status)) 93 - return_VALUE(-EINVAL); 92 + return -EINVAL; 94 93 95 94 resource = (struct acpi_resource *)buffer.pointer; 96 95 status = acpi_resource_to_address64(resource, &address64); ··· 105 106 } 106 107 107 108 acpi_os_free(buffer.pointer); 108 - return_VALUE(0); 109 + return 0; 109 110 } 110 111 111 112 static int ··· 117 118 struct acpi_device *device = NULL; 118 119 struct acpi_device *pdevice = NULL; 119 120 120 - ACPI_FUNCTION_TRACE("acpi_memory_get_device"); 121 121 122 122 if (!acpi_bus_get_device(handle, &device) && device) 123 123 goto end; ··· 124 126 status = acpi_get_parent(handle, &phandle); 125 127 if (ACPI_FAILURE(status)) { 126 128 ACPI_EXCEPTION((AE_INFO, status, "Cannot find acpi parent")); 127 - return_VALUE(-EINVAL); 129 + return -EINVAL; 128 130 } 129 131 130 132 /* Get the parent device */ 131 133 status = acpi_bus_get_device(phandle, &pdevice); 132 134 if (ACPI_FAILURE(status)) { 133 135 ACPI_EXCEPTION((AE_INFO, status, "Cannot get acpi bus device")); 134 - return_VALUE(-EINVAL); 136 + return -EINVAL; 135 137 } 136 138 137 139 /* ··· 141 143 status = acpi_bus_add(&device, pdevice, handle, ACPI_BUS_TYPE_DEVICE); 142 144 if (ACPI_FAILURE(status)) { 143 145 ACPI_EXCEPTION((AE_INFO, status, "Cannot add acpi bus")); 144 - return_VALUE(-EINVAL); 146 + return -EINVAL; 145 147 } 146 148 147 149 end: 148 150 *mem_device = acpi_driver_data(device); 149 151 if (!(*mem_device)) { 150 152 printk(KERN_ERR "\n driver data not found"); 151 - return_VALUE(-ENODEV); 153 + return -ENODEV; 152 154 } 153 155 154 - return_VALUE(0); 156 + return 0; 155 157 } 156 158 157 159 static int acpi_memory_check_device(struct acpi_memory_device *mem_device) 158 160 { 159 161 unsigned long current_status; 160 162 161 - ACPI_FUNCTION_TRACE("acpi_memory_check_device"); 162 163 163 164 /* Get device present/absent information from the _STA */ 164 165 if (ACPI_FAILURE(acpi_evaluate_integer(mem_device->handle, "_STA", 165 166 NULL, &current_status))) 166 - return_VALUE(-ENODEV); 167 + return -ENODEV; 167 168 /* 168 169 * Check for device status. Device should be 169 170 * present/enabled/functioning. ··· 170 173 if (!((current_status & ACPI_MEMORY_STA_PRESENT) 171 174 && (current_status & ACPI_MEMORY_STA_ENABLED) 172 175 && (current_status & ACPI_MEMORY_STA_FUNCTIONAL))) 173 - return_VALUE(-ENODEV); 176 + return -ENODEV; 174 177 175 - return_VALUE(0); 178 + return 0; 176 179 } 177 180 178 181 static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) 179 182 { 180 183 int result; 181 184 182 - ACPI_FUNCTION_TRACE("acpi_memory_enable_device"); 183 185 184 186 /* Get the range from the _CRS */ 185 187 result = acpi_memory_get_device_resources(mem_device); ··· 209 213 union acpi_object arg; 210 214 unsigned long current_status; 211 215 212 - ACPI_FUNCTION_TRACE("acpi_memory_powerdown_device"); 213 216 214 217 /* Issue the _EJ0 command */ 215 218 arg_list.count = 1; ··· 220 225 /* Return on _EJ0 failure */ 221 226 if (ACPI_FAILURE(status)) { 222 227 ACPI_EXCEPTION((AE_INFO, status, "_EJ0 failed")); 223 - return_VALUE(-ENODEV); 228 + return -ENODEV; 224 229 } 225 230 226 231 /* Evalute _STA to check if the device is disabled */ 227 232 status = acpi_evaluate_integer(mem_device->handle, "_STA", 228 233 NULL, &current_status); 229 234 if (ACPI_FAILURE(status)) 230 - return_VALUE(-ENODEV); 235 + return -ENODEV; 231 236 232 237 /* Check for device status. Device should be disabled */ 233 238 if (current_status & ACPI_MEMORY_STA_ENABLED) 234 - return_VALUE(-EINVAL); 239 + return -EINVAL; 235 240 236 - return_VALUE(0); 241 + return 0; 237 242 } 238 243 239 244 static int acpi_memory_disable_device(struct acpi_memory_device *mem_device) ··· 242 247 u64 start = mem_device->start_addr; 243 248 u64 len = mem_device->length; 244 249 245 - ACPI_FUNCTION_TRACE("acpi_memory_disable_device"); 246 250 247 251 /* 248 252 * Ask the VM to offline this memory range. ··· 249 255 */ 250 256 result = remove_memory(start, len); 251 257 if (result) 252 - return_VALUE(result); 258 + return result; 253 259 254 260 /* Power-off and eject the device */ 255 261 result = acpi_memory_powerdown_device(mem_device); ··· 268 274 struct acpi_memory_device *mem_device; 269 275 struct acpi_device *device; 270 276 271 - ACPI_FUNCTION_TRACE("acpi_memory_device_notify"); 272 277 273 278 switch (event) { 274 279 case ACPI_NOTIFY_BUS_CHECK: ··· 280 287 "\nReceived DEVICE CHECK notification for device\n")); 281 288 if (acpi_memory_get_device(handle, &mem_device)) { 282 289 printk(KERN_ERR PREFIX "Cannot find driver data\n"); 283 - return_VOID; 290 + return; 284 291 } 285 292 286 293 if (!acpi_memory_check_device(mem_device)) { ··· 322 329 break; 323 330 } 324 331 325 - return_VOID; 332 + return; 326 333 } 327 334 328 335 static int acpi_memory_device_add(struct acpi_device *device) ··· 330 337 int result; 331 338 struct acpi_memory_device *mem_device = NULL; 332 339 333 - ACPI_FUNCTION_TRACE("acpi_memory_device_add"); 334 340 335 341 if (!device) 336 - return_VALUE(-EINVAL); 342 + return -EINVAL; 337 343 338 344 mem_device = kmalloc(sizeof(struct acpi_memory_device), GFP_KERNEL); 339 345 if (!mem_device) 340 - return_VALUE(-ENOMEM); 346 + return -ENOMEM; 341 347 memset(mem_device, 0, sizeof(struct acpi_memory_device)); 342 348 343 349 mem_device->handle = device->handle; ··· 348 356 result = acpi_memory_get_device_resources(mem_device); 349 357 if (result) { 350 358 kfree(mem_device); 351 - return_VALUE(result); 359 + return result; 352 360 } 353 361 354 362 /* Set the device state */ ··· 356 364 357 365 printk(KERN_INFO "%s \n", acpi_device_name(device)); 358 366 359 - return_VALUE(result); 367 + return result; 360 368 } 361 369 362 370 static int acpi_memory_device_remove(struct acpi_device *device, int type) 363 371 { 364 372 struct acpi_memory_device *mem_device = NULL; 365 373 366 - ACPI_FUNCTION_TRACE("acpi_memory_device_remove"); 367 374 368 375 if (!device || !acpi_driver_data(device)) 369 - return_VALUE(-EINVAL); 376 + return -EINVAL; 370 377 371 378 mem_device = (struct acpi_memory_device *)acpi_driver_data(device); 372 379 kfree(mem_device); 373 380 374 - return_VALUE(0); 381 + return 0; 375 382 } 376 383 377 384 /* ··· 383 392 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 384 393 struct acpi_device_info *info; 385 394 386 - ACPI_FUNCTION_TRACE("is_memory_device"); 387 395 388 396 status = acpi_get_object_info(handle, &buffer); 389 397 if (ACPI_FAILURE(status)) 390 - return_ACPI_STATUS(status); 398 + return status; 391 399 392 400 info = buffer.pointer; 393 401 if (!(info->valid & ACPI_VALID_HID)) { 394 402 acpi_os_free(buffer.pointer); 395 - return_ACPI_STATUS(AE_ERROR); 403 + return AE_ERROR; 396 404 } 397 405 398 406 hardware_id = info->hardware_id.value; ··· 400 410 status = AE_ERROR; 401 411 402 412 acpi_os_free(buffer.pointer); 403 - return_ACPI_STATUS(status); 413 + return status; 404 414 } 405 415 406 416 static acpi_status ··· 409 419 { 410 420 acpi_status status; 411 421 412 - ACPI_FUNCTION_TRACE("acpi_memory_register_notify_handler"); 413 422 414 423 status = is_memory_device(handle); 415 424 if (ACPI_FAILURE(status)){ 416 425 ACPI_EXCEPTION((AE_INFO, status, "handle is no memory device")); 417 - return_ACPI_STATUS(AE_OK); /* continue */ 426 + return AE_OK; /* continue */ 418 427 } 419 428 420 429 status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, 421 430 acpi_memory_device_notify, NULL); 422 431 /* continue */ 423 - return_ACPI_STATUS(AE_OK); 432 + return AE_OK; 424 433 } 425 434 426 435 static acpi_status ··· 428 439 { 429 440 acpi_status status; 430 441 431 - ACPI_FUNCTION_TRACE("acpi_memory_deregister_notify_handler"); 432 442 433 443 status = is_memory_device(handle); 434 444 if (ACPI_FAILURE(status)){ 435 445 ACPI_EXCEPTION((AE_INFO, status, "handle is no memory device")); 436 - return_ACPI_STATUS(AE_OK); /* continue */ 446 + return AE_OK; /* continue */ 437 447 } 438 448 439 449 status = acpi_remove_notify_handler(handle, 440 450 ACPI_SYSTEM_NOTIFY, 441 451 acpi_memory_device_notify); 442 452 443 - return_ACPI_STATUS(AE_OK); /* continue */ 453 + return AE_OK; /* continue */ 444 454 } 445 455 446 456 static int __init acpi_memory_device_init(void) ··· 447 459 int result; 448 460 acpi_status status; 449 461 450 - ACPI_FUNCTION_TRACE("acpi_memory_device_init"); 451 462 452 463 result = acpi_bus_register_driver(&acpi_memory_device_driver); 453 464 454 465 if (result < 0) 455 - return_VALUE(-ENODEV); 466 + return -ENODEV; 456 467 457 468 status = acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, 458 469 ACPI_UINT32_MAX, ··· 461 474 if (ACPI_FAILURE(status)) { 462 475 ACPI_EXCEPTION((AE_INFO, status, "walk_namespace failed")); 463 476 acpi_bus_unregister_driver(&acpi_memory_device_driver); 464 - return_VALUE(-ENODEV); 477 + return -ENODEV; 465 478 } 466 479 467 - return_VALUE(0); 480 + return 0; 468 481 } 469 482 470 483 static void __exit acpi_memory_device_exit(void) 471 484 { 472 485 acpi_status status; 473 486 474 - ACPI_FUNCTION_TRACE("acpi_memory_device_exit"); 475 487 476 488 /* 477 489 * Adding this to un-install notification handlers for all the device ··· 486 500 487 501 acpi_bus_unregister_driver(&acpi_memory_device_driver); 488 502 489 - return_VOID; 503 + return; 490 504 } 491 505 492 506 module_init(acpi_memory_device_init);
+41 -56
drivers/acpi/battery.c
··· 132 132 struct acpi_buffer data = { 0, NULL }; 133 133 union acpi_object *package = NULL; 134 134 135 - ACPI_FUNCTION_TRACE("acpi_battery_get_info"); 136 135 137 136 if (!battery || !bif) 138 - return_VALUE(-EINVAL); 137 + return -EINVAL; 139 138 140 139 /* Evalute _BIF */ 141 140 142 141 status = acpi_evaluate_object(battery->handle, "_BIF", NULL, &buffer); 143 142 if (ACPI_FAILURE(status)) { 144 143 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BIF")); 145 - return_VALUE(-ENODEV); 144 + return -ENODEV; 146 145 } 147 146 148 147 package = (union acpi_object *)buffer.pointer; ··· 176 177 if (!result) 177 178 (*bif) = (struct acpi_battery_info *)data.pointer; 178 179 179 - return_VALUE(result); 180 + return result; 180 181 } 181 182 182 183 static int ··· 192 193 struct acpi_buffer data = { 0, NULL }; 193 194 union acpi_object *package = NULL; 194 195 195 - ACPI_FUNCTION_TRACE("acpi_battery_get_status"); 196 196 197 197 if (!battery || !bst) 198 - return_VALUE(-EINVAL); 198 + return -EINVAL; 199 199 200 200 /* Evalute _BST */ 201 201 202 202 status = acpi_evaluate_object(battery->handle, "_BST", NULL, &buffer); 203 203 if (ACPI_FAILURE(status)) { 204 204 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BST")); 205 - return_VALUE(-ENODEV); 205 + return -ENODEV; 206 206 } 207 207 208 208 package = (union acpi_object *)buffer.pointer; ··· 236 238 if (!result) 237 239 (*bst) = (struct acpi_battery_status *)data.pointer; 238 240 239 - return_VALUE(result); 241 + return result; 240 242 } 241 243 242 244 static int ··· 246 248 union acpi_object arg0 = { ACPI_TYPE_INTEGER }; 247 249 struct acpi_object_list arg_list = { 1, &arg0 }; 248 250 249 - ACPI_FUNCTION_TRACE("acpi_battery_set_alarm"); 250 251 251 252 if (!battery) 252 - return_VALUE(-EINVAL); 253 + return -EINVAL; 253 254 254 255 if (!battery->flags.alarm) 255 - return_VALUE(-ENODEV); 256 + return -ENODEV; 256 257 257 258 arg0.integer.value = alarm; 258 259 259 260 status = acpi_evaluate_object(battery->handle, "_BTP", &arg_list, NULL); 260 261 if (ACPI_FAILURE(status)) 261 - return_VALUE(-ENODEV); 262 + return -ENODEV; 262 263 263 264 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Alarm set to %d\n", (u32) alarm)); 264 265 265 266 battery->alarm = alarm; 266 267 267 - return_VALUE(0); 268 + return 0; 268 269 } 269 270 270 271 static int acpi_battery_check(struct acpi_battery *battery) ··· 274 277 struct acpi_device *device = NULL; 275 278 struct acpi_battery_info *bif = NULL; 276 279 277 - ACPI_FUNCTION_TRACE("acpi_battery_check"); 278 280 279 281 if (!battery) 280 - return_VALUE(-EINVAL); 282 + return -EINVAL; 281 283 282 284 result = acpi_bus_get_device(battery->handle, &device); 283 285 if (result) 284 - return_VALUE(result); 286 + return result; 285 287 286 288 result = acpi_bus_get_status(device); 287 289 if (result) 288 - return_VALUE(result); 290 + return result; 289 291 290 292 /* Insertion? */ 291 293 ··· 296 300 297 301 result = acpi_battery_get_info(battery, &bif); 298 302 if (result) 299 - return_VALUE(result); 303 + return result; 300 304 301 305 battery->flags.power_unit = bif->power_unit; 302 306 battery->trips.warning = bif->design_capacity_warning; ··· 320 324 321 325 battery->flags.present = device->status.battery_present; 322 326 323 - return_VALUE(result); 327 + return result; 324 328 } 325 329 326 330 /* -------------------------------------------------------------------------- ··· 335 339 struct acpi_battery_info *bif = NULL; 336 340 char *units = "?"; 337 341 338 - ACPI_FUNCTION_TRACE("acpi_battery_read_info"); 339 342 340 343 if (!battery) 341 344 goto end; ··· 404 409 end: 405 410 kfree(bif); 406 411 407 - return_VALUE(0); 412 + return 0; 408 413 } 409 414 410 415 static int acpi_battery_info_open_fs(struct inode *inode, struct file *file) ··· 419 424 struct acpi_battery_status *bst = NULL; 420 425 char *units = "?"; 421 426 422 - ACPI_FUNCTION_TRACE("acpi_battery_read_state"); 423 427 424 428 if (!battery) 425 429 goto end; ··· 481 487 end: 482 488 kfree(bst); 483 489 484 - return_VALUE(0); 490 + return 0; 485 491 } 486 492 487 493 static int acpi_battery_state_open_fs(struct inode *inode, struct file *file) ··· 494 500 struct acpi_battery *battery = (struct acpi_battery *)seq->private; 495 501 char *units = "?"; 496 502 497 - ACPI_FUNCTION_TRACE("acpi_battery_read_alarm"); 498 503 499 504 if (!battery) 500 505 goto end; ··· 518 525 seq_printf(seq, "%d %sh\n", (u32) battery->alarm, units); 519 526 520 527 end: 521 - return_VALUE(0); 528 + return 0; 522 529 } 523 530 524 531 static ssize_t ··· 531 538 struct seq_file *m = (struct seq_file *)file->private_data; 532 539 struct acpi_battery *battery = (struct acpi_battery *)m->private; 533 540 534 - ACPI_FUNCTION_TRACE("acpi_battery_write_alarm"); 535 541 536 542 if (!battery || (count > sizeof(alarm_string) - 1)) 537 - return_VALUE(-EINVAL); 543 + return -EINVAL; 538 544 539 545 if (!battery->flags.present) 540 - return_VALUE(-ENODEV); 546 + return -ENODEV; 541 547 542 548 if (copy_from_user(alarm_string, buffer, count)) 543 - return_VALUE(-EFAULT); 549 + return -EFAULT; 544 550 545 551 alarm_string[count] = '\0'; 546 552 547 553 result = acpi_battery_set_alarm(battery, 548 554 simple_strtoul(alarm_string, NULL, 0)); 549 555 if (result) 550 - return_VALUE(result); 556 + return result; 551 557 552 - return_VALUE(count); 558 + return count; 553 559 } 554 560 555 561 static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file) ··· 585 593 { 586 594 struct proc_dir_entry *entry = NULL; 587 595 588 - ACPI_FUNCTION_TRACE("acpi_battery_add_fs"); 589 596 590 597 if (!acpi_device_dir(device)) { 591 598 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), 592 599 acpi_battery_dir); 593 600 if (!acpi_device_dir(device)) 594 - return_VALUE(-ENODEV); 601 + return -ENODEV; 595 602 acpi_device_dir(device)->owner = THIS_MODULE; 596 603 } 597 604 ··· 598 607 entry = create_proc_entry(ACPI_BATTERY_FILE_INFO, 599 608 S_IRUGO, acpi_device_dir(device)); 600 609 if (!entry) 601 - return_VALUE(-ENODEV); 610 + return -ENODEV; 602 611 else { 603 612 entry->proc_fops = &acpi_battery_info_ops; 604 613 entry->data = acpi_driver_data(device); ··· 609 618 entry = create_proc_entry(ACPI_BATTERY_FILE_STATUS, 610 619 S_IRUGO, acpi_device_dir(device)); 611 620 if (!entry) 612 - return_VALUE(-ENODEV); 621 + return -ENODEV; 613 622 else { 614 623 entry->proc_fops = &acpi_battery_state_ops; 615 624 entry->data = acpi_driver_data(device); ··· 621 630 S_IFREG | S_IRUGO | S_IWUSR, 622 631 acpi_device_dir(device)); 623 632 if (!entry) 624 - return_VALUE(-ENODEV); 633 + return -ENODEV; 625 634 else { 626 635 entry->proc_fops = &acpi_battery_alarm_ops; 627 636 entry->data = acpi_driver_data(device); 628 637 entry->owner = THIS_MODULE; 629 638 } 630 639 631 - return_VALUE(0); 640 + return 0; 632 641 } 633 642 634 643 static int acpi_battery_remove_fs(struct acpi_device *device) 635 644 { 636 - ACPI_FUNCTION_TRACE("acpi_battery_remove_fs"); 637 645 638 646 if (acpi_device_dir(device)) { 639 647 remove_proc_entry(ACPI_BATTERY_FILE_ALARM, ··· 646 656 acpi_device_dir(device) = NULL; 647 657 } 648 658 649 - return_VALUE(0); 659 + return 0; 650 660 } 651 661 652 662 /* -------------------------------------------------------------------------- ··· 658 668 struct acpi_battery *battery = (struct acpi_battery *)data; 659 669 struct acpi_device *device = NULL; 660 670 661 - ACPI_FUNCTION_TRACE("acpi_battery_notify"); 662 671 663 672 if (!battery) 664 - return_VOID; 673 + return; 665 674 666 675 if (acpi_bus_get_device(handle, &device)) 667 - return_VOID; 676 + return; 668 677 669 678 switch (event) { 670 679 case ACPI_BATTERY_NOTIFY_STATUS: ··· 677 688 break; 678 689 } 679 690 680 - return_VOID; 691 + return; 681 692 } 682 693 683 694 static int acpi_battery_add(struct acpi_device *device) ··· 686 697 acpi_status status = 0; 687 698 struct acpi_battery *battery = NULL; 688 699 689 - ACPI_FUNCTION_TRACE("acpi_battery_add"); 690 700 691 701 if (!device) 692 - return_VALUE(-EINVAL); 702 + return -EINVAL; 693 703 694 704 battery = kmalloc(sizeof(struct acpi_battery), GFP_KERNEL); 695 705 if (!battery) 696 - return_VALUE(-ENOMEM); 706 + return -ENOMEM; 697 707 memset(battery, 0, sizeof(struct acpi_battery)); 698 708 699 709 battery->handle = device->handle; ··· 726 738 kfree(battery); 727 739 } 728 740 729 - return_VALUE(result); 741 + return result; 730 742 } 731 743 732 744 static int acpi_battery_remove(struct acpi_device *device, int type) ··· 734 746 acpi_status status = 0; 735 747 struct acpi_battery *battery = NULL; 736 748 737 - ACPI_FUNCTION_TRACE("acpi_battery_remove"); 738 749 739 750 if (!device || !acpi_driver_data(device)) 740 - return_VALUE(-EINVAL); 751 + return -EINVAL; 741 752 742 753 battery = (struct acpi_battery *)acpi_driver_data(device); 743 754 ··· 748 761 749 762 kfree(battery); 750 763 751 - return_VALUE(0); 764 + return 0; 752 765 } 753 766 754 767 static int __init acpi_battery_init(void) 755 768 { 756 769 int result = 0; 757 770 758 - ACPI_FUNCTION_TRACE("acpi_battery_init"); 759 771 760 772 acpi_battery_dir = proc_mkdir(ACPI_BATTERY_CLASS, acpi_root_dir); 761 773 if (!acpi_battery_dir) 762 - return_VALUE(-ENODEV); 774 + return -ENODEV; 763 775 acpi_battery_dir->owner = THIS_MODULE; 764 776 765 777 result = acpi_bus_register_driver(&acpi_battery_driver); 766 778 if (result < 0) { 767 779 remove_proc_entry(ACPI_BATTERY_CLASS, acpi_root_dir); 768 - return_VALUE(-ENODEV); 780 + return -ENODEV; 769 781 } 770 782 771 - return_VALUE(0); 783 + return 0; 772 784 } 773 785 774 786 static void __exit acpi_battery_exit(void) 775 787 { 776 - ACPI_FUNCTION_TRACE("acpi_battery_exit"); 777 788 778 789 acpi_bus_unregister_driver(&acpi_battery_driver); 779 790 780 791 remove_proc_entry(ACPI_BATTERY_CLASS, acpi_root_dir); 781 792 782 - return_VOID; 793 + return; 783 794 } 784 795 785 796 module_init(acpi_battery_init);
+46 -59
drivers/acpi/bus.c
··· 60 60 { 61 61 acpi_status status = AE_OK; 62 62 63 - ACPI_FUNCTION_TRACE("acpi_bus_get_device"); 64 63 65 64 if (!device) 66 - return_VALUE(-EINVAL); 65 + return -EINVAL; 67 66 68 67 /* TBD: Support fixed-feature devices */ 69 68 70 69 status = acpi_get_data(handle, acpi_bus_data_handler, (void **)device); 71 70 if (ACPI_FAILURE(status) || !*device) { 72 71 ACPI_EXCEPTION((AE_INFO, status, "No context for object [%p]", handle)); 73 - return_VALUE(-ENODEV); 72 + return -ENODEV; 74 73 } 75 74 76 - return_VALUE(0); 75 + return 0; 77 76 } 78 77 79 78 EXPORT_SYMBOL(acpi_bus_get_device); ··· 82 83 acpi_status status = AE_OK; 83 84 unsigned long sta = 0; 84 85 85 - ACPI_FUNCTION_TRACE("acpi_bus_get_status"); 86 86 87 87 if (!device) 88 - return_VALUE(-EINVAL); 88 + return -EINVAL; 89 89 90 90 /* 91 91 * Evaluate _STA if present. ··· 93 95 status = 94 96 acpi_evaluate_integer(device->handle, "_STA", NULL, &sta); 95 97 if (ACPI_FAILURE(status)) 96 - return_VALUE(-ENODEV); 98 + return -ENODEV; 97 99 STRUCT_TO_INT(device->status) = (int)sta; 98 100 } 99 101 ··· 117 119 device->pnp.bus_id, 118 120 (u32) STRUCT_TO_INT(device->status))); 119 121 120 - return_VALUE(0); 122 + return 0; 121 123 } 122 124 123 125 EXPORT_SYMBOL(acpi_bus_get_status); ··· 133 135 struct acpi_device *device = NULL; 134 136 unsigned long psc = 0; 135 137 136 - ACPI_FUNCTION_TRACE("acpi_bus_get_power"); 137 138 138 139 result = acpi_bus_get_device(handle, &device); 139 140 if (result) 140 - return_VALUE(result); 141 + return result; 141 142 142 143 *state = ACPI_STATE_UNKNOWN; 143 144 ··· 155 158 status = acpi_evaluate_integer(device->handle, "_PSC", 156 159 NULL, &psc); 157 160 if (ACPI_FAILURE(status)) 158 - return_VALUE(-ENODEV); 161 + return -ENODEV; 159 162 device->power.state = (int)psc; 160 163 } else if (device->power.flags.power_resources) { 161 164 result = acpi_power_get_inferred_state(device); 162 165 if (result) 163 - return_VALUE(result); 166 + return result; 164 167 } 165 168 166 169 *state = device->power.state; ··· 169 172 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device [%s] power state is D%d\n", 170 173 device->pnp.bus_id, device->power.state)); 171 174 172 - return_VALUE(0); 175 + return 0; 173 176 } 174 177 175 178 EXPORT_SYMBOL(acpi_bus_get_power); ··· 181 184 struct acpi_device *device = NULL; 182 185 char object_name[5] = { '_', 'P', 'S', '0' + state, '\0' }; 183 186 184 - ACPI_FUNCTION_TRACE("acpi_bus_set_power"); 185 187 186 188 result = acpi_bus_get_device(handle, &device); 187 189 if (result) 188 - return_VALUE(result); 190 + return result; 189 191 190 192 if ((state < ACPI_STATE_D0) || (state > ACPI_STATE_D3)) 191 - return_VALUE(-EINVAL); 193 + return -EINVAL; 192 194 193 195 /* Make sure this is a valid target state */ 194 196 195 197 if (!device->flags.power_manageable) { 196 198 printk(KERN_DEBUG "Device `[%s]is not power manageable", 197 199 device->kobj.name); 198 - return_VALUE(-ENODEV); 200 + return -ENODEV; 199 201 } 200 202 /* 201 203 * Get device's current power state if it's unknown ··· 206 210 if (state == device->power.state) { 207 211 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device is already at D%d\n", 208 212 state)); 209 - return_VALUE(0); 213 + return 0; 210 214 } 211 215 } 212 216 if (!device->power.states[state].flags.valid) { 213 217 printk(KERN_WARNING PREFIX "Device does not support D%d\n", state); 214 - return_VALUE(-ENODEV); 218 + return -ENODEV; 215 219 } 216 220 if (device->parent && (state < device->parent->power.state)) { 217 221 printk(KERN_WARNING PREFIX 218 222 "Cannot set device to a higher-powered" 219 223 " state than parent\n"); 220 - return_VALUE(-ENODEV); 224 + return -ENODEV; 221 225 } 222 226 223 227 /* ··· 267 271 "Device [%s] transitioned to D%d\n", 268 272 device->pnp.bus_id, state)); 269 273 270 - return_VALUE(result); 274 + return result; 271 275 } 272 276 273 277 EXPORT_SYMBOL(acpi_bus_set_power); ··· 288 292 struct acpi_bus_event *event = NULL; 289 293 unsigned long flags = 0; 290 294 291 - ACPI_FUNCTION_TRACE("acpi_bus_generate_event"); 292 295 293 296 if (!device) 294 - return_VALUE(-EINVAL); 297 + return -EINVAL; 295 298 296 299 /* drop event on the floor if no one's listening */ 297 300 if (!event_is_open) 298 - return_VALUE(0); 301 + return 0; 299 302 300 303 event = kmalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC); 301 304 if (!event) 302 - return_VALUE(-ENOMEM); 305 + return -ENOMEM; 303 306 304 307 strcpy(event->device_class, device->pnp.device_class); 305 308 strcpy(event->bus_id, device->pnp.bus_id); ··· 311 316 312 317 wake_up_interruptible(&acpi_bus_event_queue); 313 318 314 - return_VALUE(0); 319 + return 0; 315 320 } 316 321 317 322 EXPORT_SYMBOL(acpi_bus_generate_event); ··· 323 328 324 329 DECLARE_WAITQUEUE(wait, current); 325 330 326 - ACPI_FUNCTION_TRACE("acpi_bus_receive_event"); 327 331 328 332 if (!event) 329 - return_VALUE(-EINVAL); 333 + return -EINVAL; 330 334 331 335 if (list_empty(&acpi_bus_event_list)) { 332 336 ··· 339 345 set_current_state(TASK_RUNNING); 340 346 341 347 if (signal_pending(current)) 342 - return_VALUE(-ERESTARTSYS); 348 + return -ERESTARTSYS; 343 349 } 344 350 345 351 spin_lock_irqsave(&acpi_bus_event_lock, flags); ··· 350 356 spin_unlock_irqrestore(&acpi_bus_event_lock, flags); 351 357 352 358 if (!entry) 353 - return_VALUE(-ENODEV); 359 + return -ENODEV; 354 360 355 361 memcpy(event, entry, sizeof(struct acpi_bus_event)); 356 362 357 363 kfree(entry); 358 364 359 - return_VALUE(0); 365 + return 0; 360 366 } 361 367 362 368 EXPORT_SYMBOL(acpi_bus_receive_event); ··· 371 377 acpi_status status = 0; 372 378 struct acpi_device_status old_status; 373 379 374 - ACPI_FUNCTION_TRACE("acpi_bus_check_device"); 375 380 376 381 if (!device) 377 - return_VALUE(-EINVAL); 382 + return -EINVAL; 378 383 379 384 if (status_changed) 380 385 *status_changed = 0; ··· 390 397 if (status_changed) 391 398 *status_changed = 1; 392 399 } 393 - return_VALUE(0); 400 + return 0; 394 401 } 395 402 396 403 status = acpi_bus_get_status(device); 397 404 if (ACPI_FAILURE(status)) 398 - return_VALUE(-ENODEV); 405 + return -ENODEV; 399 406 400 407 if (STRUCT_TO_INT(old_status) == STRUCT_TO_INT(device->status)) 401 - return_VALUE(0); 408 + return 0; 402 409 403 410 if (status_changed) 404 411 *status_changed = 1; ··· 414 421 /* TBD: Handle device removal */ 415 422 } 416 423 417 - return_VALUE(0); 424 + return 0; 418 425 } 419 426 420 427 static int acpi_bus_check_scope(struct acpi_device *device) ··· 422 429 int result = 0; 423 430 int status_changed = 0; 424 431 425 - ACPI_FUNCTION_TRACE("acpi_bus_check_scope"); 426 432 427 433 if (!device) 428 - return_VALUE(-EINVAL); 434 + return -EINVAL; 429 435 430 436 /* Status Change? */ 431 437 result = acpi_bus_check_device(device, &status_changed); 432 438 if (result) 433 - return_VALUE(result); 439 + return result; 434 440 435 441 if (!status_changed) 436 - return_VALUE(0); 442 + return 0; 437 443 438 444 /* 439 445 * TBD: Enumerate child devices within this device's scope and 440 446 * run acpi_bus_check_device()'s on them. 441 447 */ 442 448 443 - return_VALUE(0); 449 + return 0; 444 450 } 445 451 446 452 /** ··· 452 460 int result = 0; 453 461 struct acpi_device *device = NULL; 454 462 455 - ACPI_FUNCTION_TRACE("acpi_bus_notify"); 456 463 457 464 if (acpi_bus_get_device(handle, &device)) 458 - return_VOID; 465 + return; 459 466 460 467 switch (type) { 461 468 ··· 529 538 break; 530 539 } 531 540 532 - return_VOID; 541 + return; 533 542 } 534 543 535 544 /* -------------------------------------------------------------------------- ··· 543 552 struct acpi_object_list arg_list = { 1, &arg }; 544 553 char *message = NULL; 545 554 546 - ACPI_FUNCTION_TRACE("acpi_bus_init_irq"); 547 555 548 556 /* 549 557 * Let the system know what interrupt model we are using by ··· 561 571 break; 562 572 default: 563 573 printk(KERN_WARNING PREFIX "Unknown interrupt routing model\n"); 564 - return_VALUE(-ENODEV); 574 + return -ENODEV; 565 575 } 566 576 567 577 printk(KERN_INFO PREFIX "Using %s for interrupt routing\n", message); ··· 571 581 status = acpi_evaluate_object(NULL, "\\_PIC", &arg_list, NULL); 572 582 if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { 573 583 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PIC")); 574 - return_VALUE(-ENODEV); 584 + return -ENODEV; 575 585 } 576 586 577 - return_VALUE(0); 587 + return 0; 578 588 } 579 589 580 590 void __init acpi_early_init(void) ··· 582 592 acpi_status status = AE_OK; 583 593 struct acpi_buffer buffer = { sizeof(acpi_fadt), &acpi_fadt }; 584 594 585 - ACPI_FUNCTION_TRACE("acpi_early_init"); 586 595 587 596 if (acpi_disabled) 588 - return_VOID; 597 + return; 589 598 590 599 printk(KERN_INFO PREFIX "Core revision %08x\n", ACPI_CA_VERSION); 591 600 ··· 644 655 goto error0; 645 656 } 646 657 647 - return_VOID; 658 + return; 648 659 649 660 error0: 650 661 disable_acpi(); 651 - return_VOID; 662 + return; 652 663 } 653 664 654 665 static int __init acpi_bus_init(void) ··· 657 668 acpi_status status = AE_OK; 658 669 extern acpi_status acpi_os_initialize1(void); 659 670 660 - ACPI_FUNCTION_TRACE("acpi_bus_init"); 661 671 662 672 status = acpi_os_initialize1(); 663 673 ··· 718 730 */ 719 731 acpi_root_dir = proc_mkdir(ACPI_BUS_FILE_ROOT, NULL); 720 732 721 - return_VALUE(0); 733 + return 0; 722 734 723 735 /* Mimic structured exception handling */ 724 736 error1: 725 737 acpi_terminate(); 726 - return_VALUE(-ENODEV); 738 + return -ENODEV; 727 739 } 728 740 729 741 decl_subsys(acpi, NULL, NULL); ··· 732 744 { 733 745 int result = 0; 734 746 735 - ACPI_FUNCTION_TRACE("acpi_init"); 736 747 737 748 if (acpi_disabled) { 738 749 printk(KERN_INFO PREFIX "Interpreter disabled.\n"); 739 - return_VALUE(-ENODEV); 750 + return -ENODEV; 740 751 } 741 752 742 753 firmware_register(&acpi_subsys); ··· 756 769 } else 757 770 disable_acpi(); 758 771 759 - return_VALUE(result); 772 + return result; 760 773 } 761 774 762 775 subsys_initcall(acpi_init);
+23 -33
drivers/acpi/button.c
··· 112 112 { 113 113 struct acpi_button *button = (struct acpi_button *)seq->private; 114 114 115 - ACPI_FUNCTION_TRACE("acpi_button_info_seq_show"); 116 115 117 116 if (!button || !button->device) 118 - return_VALUE(0); 117 + return 0; 119 118 120 119 seq_printf(seq, "type: %s\n", 121 120 acpi_device_name(button->device)); 122 121 123 - return_VALUE(0); 122 + return 0; 124 123 } 125 124 126 125 static int acpi_button_info_open_fs(struct inode *inode, struct file *file) ··· 133 134 acpi_status status; 134 135 unsigned long state; 135 136 136 - ACPI_FUNCTION_TRACE("acpi_button_state_seq_show"); 137 137 138 138 if (!button || !button->device) 139 - return_VALUE(0); 139 + return 0; 140 140 141 141 status = acpi_evaluate_integer(button->handle, "_LID", NULL, &state); 142 142 if (ACPI_FAILURE(status)) { ··· 145 147 (state ? "open" : "closed")); 146 148 } 147 149 148 - return_VALUE(0); 150 + return 0; 149 151 } 150 152 151 153 static int acpi_button_state_open_fs(struct inode *inode, struct file *file) ··· 162 164 struct proc_dir_entry *entry = NULL; 163 165 struct acpi_button *button = NULL; 164 166 165 - ACPI_FUNCTION_TRACE("acpi_button_add_fs"); 166 167 167 168 if (!device || !acpi_driver_data(device)) 168 - return_VALUE(-EINVAL); 169 + return -EINVAL; 169 170 170 171 button = acpi_driver_data(device); 171 172 ··· 192 195 } 193 196 194 197 if (!entry) 195 - return_VALUE(-ENODEV); 198 + return -ENODEV; 196 199 entry->owner = THIS_MODULE; 197 200 198 201 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), entry); 199 202 if (!acpi_device_dir(device)) 200 - return_VALUE(-ENODEV); 203 + return -ENODEV; 201 204 acpi_device_dir(device)->owner = THIS_MODULE; 202 205 203 206 /* 'info' [R] */ 204 207 entry = create_proc_entry(ACPI_BUTTON_FILE_INFO, 205 208 S_IRUGO, acpi_device_dir(device)); 206 209 if (!entry) 207 - return_VALUE(-ENODEV); 210 + return -ENODEV; 208 211 else { 209 212 entry->proc_fops = &acpi_button_info_fops; 210 213 entry->data = acpi_driver_data(device); ··· 224 227 } 225 228 } 226 229 227 - return_VALUE(0); 230 + return 0; 228 231 } 229 232 230 233 static int acpi_button_remove_fs(struct acpi_device *device) 231 234 { 232 235 struct acpi_button *button = NULL; 233 236 234 - ACPI_FUNCTION_TRACE("acpi_button_remove_fs"); 235 237 236 238 button = acpi_driver_data(device); 237 239 if (acpi_device_dir(device)) { ··· 245 249 acpi_device_dir(device) = NULL; 246 250 } 247 251 248 - return_VALUE(0); 252 + return 0; 249 253 } 250 254 251 255 /* -------------------------------------------------------------------------- ··· 256 260 { 257 261 struct acpi_button *button = (struct acpi_button *)data; 258 262 259 - ACPI_FUNCTION_TRACE("acpi_button_notify"); 260 263 261 264 if (!button || !button->device) 262 - return_VOID; 265 + return; 263 266 264 267 switch (event) { 265 268 case ACPI_BUTTON_NOTIFY_STATUS: ··· 271 276 break; 272 277 } 273 278 274 - return_VOID; 279 + return; 275 280 } 276 281 277 282 static acpi_status acpi_button_notify_fixed(void *data) 278 283 { 279 284 struct acpi_button *button = (struct acpi_button *)data; 280 285 281 - ACPI_FUNCTION_TRACE("acpi_button_notify_fixed"); 282 286 283 287 if (!button) 284 - return_ACPI_STATUS(AE_BAD_PARAMETER); 288 + return AE_BAD_PARAMETER; 285 289 286 290 acpi_button_notify(button->handle, ACPI_BUTTON_NOTIFY_STATUS, button); 287 291 288 - return_ACPI_STATUS(AE_OK); 292 + return AE_OK; 289 293 } 290 294 291 295 static int acpi_button_add(struct acpi_device *device) ··· 293 299 acpi_status status = AE_OK; 294 300 struct acpi_button *button = NULL; 295 301 296 - ACPI_FUNCTION_TRACE("acpi_button_add"); 297 302 298 303 if (!device) 299 - return_VALUE(-EINVAL); 304 + return -EINVAL; 300 305 301 306 button = kmalloc(sizeof(struct acpi_button), GFP_KERNEL); 302 307 if (!button) 303 - return_VALUE(-ENOMEM); 308 + return -ENOMEM; 304 309 memset(button, 0, sizeof(struct acpi_button)); 305 310 306 311 button->device = device; ··· 393 400 kfree(button); 394 401 } 395 402 396 - return_VALUE(result); 403 + return result; 397 404 } 398 405 399 406 static int acpi_button_remove(struct acpi_device *device, int type) ··· 401 408 acpi_status status = 0; 402 409 struct acpi_button *button = NULL; 403 410 404 - ACPI_FUNCTION_TRACE("acpi_button_remove"); 405 411 406 412 if (!device || !acpi_driver_data(device)) 407 - return_VALUE(-EINVAL); 413 + return -EINVAL; 408 414 409 415 button = acpi_driver_data(device); 410 416 ··· 430 438 431 439 kfree(button); 432 440 433 - return_VALUE(0); 441 + return 0; 434 442 } 435 443 436 444 static int __init acpi_button_init(void) 437 445 { 438 446 int result = 0; 439 447 440 - ACPI_FUNCTION_TRACE("acpi_button_init"); 441 448 442 449 acpi_button_dir = proc_mkdir(ACPI_BUTTON_CLASS, acpi_root_dir); 443 450 if (!acpi_button_dir) 444 - return_VALUE(-ENODEV); 451 + return -ENODEV; 445 452 acpi_button_dir->owner = THIS_MODULE; 446 453 result = acpi_bus_register_driver(&acpi_button_driver); 447 454 if (result < 0) { 448 455 remove_proc_entry(ACPI_BUTTON_CLASS, acpi_root_dir); 449 - return_VALUE(-ENODEV); 456 + return -ENODEV; 450 457 } 451 458 452 - return_VALUE(0); 459 + return 0; 453 460 } 454 461 455 462 static void __exit acpi_button_exit(void) 456 463 { 457 - ACPI_FUNCTION_TRACE("acpi_button_exit"); 458 464 459 465 acpi_bus_unregister_driver(&acpi_button_driver); 460 466 ··· 464 474 remove_proc_entry(ACPI_BUTTON_SUBCLASS_LID, acpi_button_dir); 465 475 remove_proc_entry(ACPI_BUTTON_CLASS, acpi_root_dir); 466 476 467 - return_VOID; 477 + return; 468 478 } 469 479 470 480 module_init(acpi_button_init);
+14 -20
drivers/acpi/container.c
··· 73 73 acpi_status status; 74 74 unsigned long sta; 75 75 76 - ACPI_FUNCTION_TRACE("is_device_present"); 77 76 78 77 status = acpi_get_handle(handle, "_STA", &temp); 79 78 if (ACPI_FAILURE(status)) 80 - return_VALUE(1); /* _STA not found, assmue device present */ 79 + return 1; /* _STA not found, assmue device present */ 81 80 82 81 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); 83 82 if (ACPI_FAILURE(status)) 84 - return_VALUE(0); /* Firmware error */ 83 + return 0; /* Firmware error */ 85 84 86 - return_VALUE((sta & ACPI_STA_PRESENT) == ACPI_STA_PRESENT); 85 + return ((sta & ACPI_STA_PRESENT) == ACPI_STA_PRESENT); 87 86 } 88 87 89 88 /*******************************************************************/ ··· 90 91 { 91 92 struct acpi_container *container; 92 93 93 - ACPI_FUNCTION_TRACE("acpi_container_add"); 94 94 95 95 if (!device) { 96 96 printk(KERN_ERR PREFIX "device is NULL\n"); 97 - return_VALUE(-EINVAL); 97 + return -EINVAL; 98 98 } 99 99 100 100 container = kmalloc(sizeof(struct acpi_container), GFP_KERNEL); 101 101 if (!container) 102 - return_VALUE(-ENOMEM); 102 + return -ENOMEM; 103 103 104 104 memset(container, 0, sizeof(struct acpi_container)); 105 105 container->handle = device->handle; ··· 109 111 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device <%s> bid <%s>\n", 110 112 acpi_device_name(device), acpi_device_bid(device))); 111 113 112 - return_VALUE(0); 114 + return 0; 113 115 } 114 116 115 117 static int acpi_container_remove(struct acpi_device *device, int type) ··· 128 130 struct acpi_device *pdev; 129 131 int result; 130 132 131 - ACPI_FUNCTION_TRACE("container_device_add"); 132 133 133 134 if (acpi_get_parent(handle, &phandle)) { 134 - return_VALUE(-ENODEV); 135 + return -ENODEV; 135 136 } 136 137 137 138 if (acpi_bus_get_device(phandle, &pdev)) { 138 - return_VALUE(-ENODEV); 139 + return -ENODEV; 139 140 } 140 141 141 142 if (acpi_bus_add(device, pdev, handle, ACPI_BUS_TYPE_DEVICE)) { 142 - return_VALUE(-ENODEV); 143 + return -ENODEV; 143 144 } 144 145 145 146 result = acpi_bus_start(*device); 146 147 147 - return_VALUE(result); 148 + return result; 148 149 } 149 150 150 151 static void container_notify_cb(acpi_handle handle, u32 type, void *context) ··· 153 156 int present; 154 157 acpi_status status; 155 158 156 - ACPI_FUNCTION_TRACE("container_notify_cb"); 157 159 158 160 present = is_device_present(handle); 159 161 ··· 188 192 default: 189 193 break; 190 194 } 191 - return_VOID; 195 + return; 192 196 } 193 197 194 198 static acpi_status ··· 201 205 acpi_status status; 202 206 int *action = context; 203 207 204 - ACPI_FUNCTION_TRACE("container_walk_namespace_cb"); 205 208 206 209 status = acpi_get_object_info(handle, &buffer); 207 210 if (ACPI_FAILURE(status) || !buffer.pointer) { 208 - return_ACPI_STATUS(AE_OK); 211 + return AE_OK; 209 212 } 210 213 211 214 info = buffer.pointer; ··· 238 243 end: 239 244 acpi_os_free(buffer.pointer); 240 245 241 - return_ACPI_STATUS(AE_OK); 246 + return AE_OK; 242 247 } 243 248 244 249 static int __init acpi_container_init(void) ··· 264 269 { 265 270 int action = UNINSTALL_NOTIFY_HANDLER; 266 271 267 - ACPI_FUNCTION_TRACE("acpi_container_exit"); 268 272 269 273 acpi_walk_namespace(ACPI_TYPE_DEVICE, 270 274 ACPI_ROOT_OBJECT, ··· 272 278 273 279 acpi_bus_unregister_driver(&acpi_container_driver); 274 280 275 - return_VOID; 281 + return; 276 282 } 277 283 278 284 module_init(acpi_container_init);
+6 -8
drivers/acpi/debug.c
··· 155 155 { 156 156 char debug_string[12] = { '\0' }; 157 157 158 - ACPI_FUNCTION_TRACE("acpi_system_write_debug"); 159 158 160 159 if (count > sizeof(debug_string) - 1) 161 - return_VALUE(-EINVAL); 160 + return -EINVAL; 162 161 163 162 if (copy_from_user(debug_string, buffer, count)) 164 - return_VALUE(-EFAULT); 163 + return -EFAULT; 165 164 166 165 debug_string[count] = '\0'; 167 166 ··· 172 173 acpi_dbg_level = simple_strtoul(debug_string, NULL, 0); 173 174 break; 174 175 default: 175 - return_VALUE(-EINVAL); 176 + return -EINVAL; 176 177 } 177 178 178 - return_VALUE(count); 179 + return count; 179 180 } 180 181 181 182 static int __init acpi_debug_init(void) ··· 184 185 int error = 0; 185 186 char *name; 186 187 187 - ACPI_FUNCTION_TRACE("acpi_debug_init"); 188 188 189 189 if (acpi_disabled) 190 - return_VALUE(0); 190 + return 0; 191 191 192 192 /* 'debug_layer' [R/W] */ 193 193 name = ACPI_SYSTEM_FILE_DEBUG_LAYER; ··· 211 213 goto Error; 212 214 213 215 Done: 214 - return_VALUE(error); 216 + return error; 215 217 216 218 Error: 217 219 remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LEVEL, acpi_root_dir);
+62 -84
drivers/acpi/ec.c
··· 207 207 { 208 208 int result = 0; 209 209 210 - ACPI_FUNCTION_TRACE("acpi_ec_wait"); 211 210 212 211 ec->intr.expect_event = event; 213 212 smp_mb(); ··· 215 216 case ACPI_EC_EVENT_IBE: 216 217 if (~acpi_ec_read_status(ec) & event) { 217 218 ec->intr.expect_event = 0; 218 - return_VALUE(0); 219 + return 0; 219 220 } 220 221 break; 221 222 default: ··· 237 238 switch (event) { 238 239 case ACPI_EC_EVENT_OBF: 239 240 if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_OBF) 240 - return_VALUE(0); 241 + return 0; 241 242 break; 242 243 243 244 case ACPI_EC_EVENT_IBE: 244 245 if (~acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) 245 - return_VALUE(0); 246 + return 0; 246 247 break; 247 248 } 248 249 249 - return_VALUE(-ETIME); 250 + return -ETIME; 250 251 } 251 252 252 253 #ifdef ACPI_FUTURE_USAGE ··· 259 260 u32 tmp = 0; 260 261 int status = 0; 261 262 262 - ACPI_FUNCTION_TRACE("acpi_ec_enter_burst_mode"); 263 263 264 264 status = acpi_ec_read_status(ec); 265 265 if (status != -EINVAL && !(status & ACPI_EC_FLAG_BURST)) { ··· 270 272 status = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF); 271 273 acpi_hw_low_level_read(8, &tmp, &ec->common.data_addr); 272 274 if (tmp != 0x90) { /* Burst ACK byte */ 273 - return_VALUE(-EINVAL); 275 + return -EINVAL; 274 276 } 275 277 } 276 278 277 279 atomic_set(&ec->intr.leaving_burst, 0); 278 - return_VALUE(0); 280 + return 0; 279 281 end: 280 282 ACPI_EXCEPTION ((AE_INFO, status, "EC wait, burst mode"); 281 - return_VALUE(-1); 283 + return -1; 282 284 } 283 285 284 286 int acpi_ec_leave_burst_mode(union acpi_ec *ec) 285 287 { 286 288 int status = 0; 287 289 288 - ACPI_FUNCTION_TRACE("acpi_ec_leave_burst_mode"); 289 290 290 291 status = acpi_ec_read_status(ec); 291 292 if (status != -EINVAL && (status & ACPI_EC_FLAG_BURST)){ ··· 295 298 acpi_ec_wait(ec, ACPI_EC_FLAG_IBF); 296 299 } 297 300 atomic_set(&ec->intr.leaving_burst, 1); 298 - return_VALUE(0); 301 + return 0; 299 302 end: 300 303 ACPI_EXCEPTION((AE_INFO, status, "EC leave burst mode"); 301 - return_VALUE(-1); 304 + return -1; 302 305 } 303 306 #endif /* ACPI_FUTURE_USAGE */ 304 307 ··· 322 325 int result = 0; 323 326 u32 glk = 0; 324 327 325 - ACPI_FUNCTION_TRACE("acpi_ec_read"); 326 328 327 329 if (!ec || !data) 328 - return_VALUE(-EINVAL); 330 + return -EINVAL; 329 331 330 332 *data = 0; 331 333 332 334 if (ec->common.global_lock) { 333 335 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); 334 336 if (ACPI_FAILURE(status)) 335 - return_VALUE(-ENODEV); 337 + return -ENODEV; 336 338 } 337 339 338 340 if (down_interruptible(&ec->poll.sem)) { ··· 361 365 if (ec->common.global_lock) 362 366 acpi_release_global_lock(glk); 363 367 364 - return_VALUE(result); 368 + return result; 365 369 } 366 370 367 371 static int acpi_ec_poll_write(union acpi_ec *ec, u8 address, u8 data) ··· 370 374 acpi_status status = AE_OK; 371 375 u32 glk = 0; 372 376 373 - ACPI_FUNCTION_TRACE("acpi_ec_write"); 374 377 375 378 if (!ec) 376 - return_VALUE(-EINVAL); 379 + return -EINVAL; 377 380 378 381 if (ec->common.global_lock) { 379 382 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); 380 383 if (ACPI_FAILURE(status)) 381 - return_VALUE(-ENODEV); 384 + return -ENODEV; 382 385 } 383 386 384 387 if (down_interruptible(&ec->poll.sem)) { ··· 410 415 if (ec->common.global_lock) 411 416 acpi_release_global_lock(glk); 412 417 413 - return_VALUE(result); 418 + return result; 414 419 } 415 420 416 421 static int acpi_ec_intr_read(union acpi_ec *ec, u8 address, u32 * data) ··· 418 423 int status = 0; 419 424 u32 glk; 420 425 421 - ACPI_FUNCTION_TRACE("acpi_ec_read"); 422 426 423 427 if (!ec || !data) 424 - return_VALUE(-EINVAL); 428 + return -EINVAL; 425 429 426 430 *data = 0; 427 431 428 432 if (ec->common.global_lock) { 429 433 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); 430 434 if (ACPI_FAILURE(status)) 431 - return_VALUE(-ENODEV); 435 + return -ENODEV; 432 436 } 433 437 434 438 WARN_ON(in_interrupt()); ··· 461 467 if (ec->common.global_lock) 462 468 acpi_release_global_lock(glk); 463 469 464 - return_VALUE(status); 470 + return status; 465 471 } 466 472 467 473 static int acpi_ec_intr_write(union acpi_ec *ec, u8 address, u8 data) ··· 469 475 int status = 0; 470 476 u32 glk; 471 477 472 - ACPI_FUNCTION_TRACE("acpi_ec_write"); 473 478 474 479 if (!ec) 475 - return_VALUE(-EINVAL); 480 + return -EINVAL; 476 481 477 482 if (ec->common.global_lock) { 478 483 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); 479 484 if (ACPI_FAILURE(status)) 480 - return_VALUE(-ENODEV); 485 + return -ENODEV; 481 486 } 482 487 483 488 WARN_ON(in_interrupt()); ··· 509 516 if (ec->common.global_lock) 510 517 acpi_release_global_lock(glk); 511 518 512 - return_VALUE(status); 519 + return status; 513 520 } 514 521 515 522 /* ··· 567 574 acpi_status status = AE_OK; 568 575 u32 glk = 0; 569 576 570 - ACPI_FUNCTION_TRACE("acpi_ec_query"); 571 577 572 578 if (!ec || !data) 573 - return_VALUE(-EINVAL); 579 + return -EINVAL; 574 580 575 581 *data = 0; 576 582 577 583 if (ec->common.global_lock) { 578 584 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); 579 585 if (ACPI_FAILURE(status)) 580 - return_VALUE(-ENODEV); 586 + return -ENODEV; 581 587 } 582 588 583 589 /* ··· 605 613 if (ec->common.global_lock) 606 614 acpi_release_global_lock(glk); 607 615 608 - return_VALUE(result); 616 + return result; 609 617 } 610 618 static int acpi_ec_intr_query(union acpi_ec *ec, u32 * data) 611 619 { 612 620 int status = 0; 613 621 u32 glk; 614 622 615 - ACPI_FUNCTION_TRACE("acpi_ec_query"); 616 623 617 624 if (!ec || !data) 618 - return_VALUE(-EINVAL); 625 + return -EINVAL; 619 626 *data = 0; 620 627 621 628 if (ec->common.global_lock) { 622 629 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); 623 630 if (ACPI_FAILURE(status)) 624 - return_VALUE(-ENODEV); 631 + return -ENODEV; 625 632 } 626 633 627 634 down(&ec->intr.sem); ··· 653 662 if (ec->common.global_lock) 654 663 acpi_release_global_lock(glk); 655 664 656 - return_VALUE(status); 665 + return status; 657 666 } 658 667 659 668 /* -------------------------------------------------------------------------- ··· 682 691 '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' 683 692 }; 684 693 685 - ACPI_FUNCTION_TRACE("acpi_ec_gpe_query"); 686 694 687 695 if (!ec_cxt) 688 696 goto end; 689 697 690 698 if (down_interruptible (&ec->poll.sem)) { 691 - return_VOID; 699 + return; 692 700 } 693 701 acpi_hw_low_level_read(8, &value, &ec->common.command_addr); 694 702 up(&ec->poll.sem); ··· 724 734 '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' 725 735 }; 726 736 727 - ACPI_FUNCTION_TRACE("acpi_ec_gpe_query"); 728 737 729 738 if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_SCI) 730 739 result = acpi_ec_query(ec, &value); ··· 835 846 acpi_integer f_v = 0; 836 847 int i = 0; 837 848 838 - ACPI_FUNCTION_TRACE("acpi_ec_space_handler"); 839 849 840 850 if ((address > 0xFF) || !value || !handler_context) 841 - return_VALUE(AE_BAD_PARAMETER); 851 + return AE_BAD_PARAMETER; 842 852 843 853 if (bit_width != 8 && acpi_strict) { 844 854 printk(KERN_WARNING PREFIX 845 855 "acpi_ec_space_handler: bit_width should be 8\n"); 846 - return_VALUE(AE_BAD_PARAMETER); 856 + return AE_BAD_PARAMETER; 847 857 } 848 858 849 859 ec = (union acpi_ec *)handler_context; ··· 881 893 out: 882 894 switch (result) { 883 895 case -EINVAL: 884 - return_VALUE(AE_BAD_PARAMETER); 896 + return AE_BAD_PARAMETER; 885 897 break; 886 898 case -ENODEV: 887 - return_VALUE(AE_NOT_FOUND); 899 + return AE_NOT_FOUND; 888 900 break; 889 901 case -ETIME: 890 - return_VALUE(AE_TIME); 902 + return AE_TIME; 891 903 break; 892 904 default: 893 - return_VALUE(AE_OK); 905 + return AE_OK; 894 906 } 895 907 } 896 908 ··· 904 916 { 905 917 union acpi_ec *ec = (union acpi_ec *)seq->private; 906 918 907 - ACPI_FUNCTION_TRACE("acpi_ec_read_info"); 908 919 909 920 if (!ec) 910 921 goto end; ··· 918 931 acpi_enable_gpe(NULL, ec->common.gpe_bit, ACPI_NOT_ISR); 919 932 920 933 end: 921 - return_VALUE(0); 934 + return 0; 922 935 } 923 936 924 937 static int acpi_ec_info_open_fs(struct inode *inode, struct file *file) ··· 938 951 { 939 952 struct proc_dir_entry *entry = NULL; 940 953 941 - ACPI_FUNCTION_TRACE("acpi_ec_add_fs"); 942 954 943 955 if (!acpi_device_dir(device)) { 944 956 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), 945 957 acpi_ec_dir); 946 958 if (!acpi_device_dir(device)) 947 - return_VALUE(-ENODEV); 959 + return -ENODEV; 948 960 } 949 961 950 962 entry = create_proc_entry(ACPI_EC_FILE_INFO, S_IRUGO, 951 963 acpi_device_dir(device)); 952 964 if (!entry) 953 - return_VALUE(-ENODEV); 965 + return -ENODEV; 954 966 else { 955 967 entry->proc_fops = &acpi_ec_info_ops; 956 968 entry->data = acpi_driver_data(device); 957 969 entry->owner = THIS_MODULE; 958 970 } 959 971 960 - return_VALUE(0); 972 + return 0; 961 973 } 962 974 963 975 static int acpi_ec_remove_fs(struct acpi_device *device) 964 976 { 965 - ACPI_FUNCTION_TRACE("acpi_ec_remove_fs"); 966 977 967 978 if (acpi_device_dir(device)) { 968 979 remove_proc_entry(ACPI_EC_FILE_INFO, acpi_device_dir(device)); ··· 968 983 acpi_device_dir(device) = NULL; 969 984 } 970 985 971 - return_VALUE(0); 986 + return 0; 972 987 } 973 988 974 989 /* -------------------------------------------------------------------------- ··· 981 996 acpi_status status = AE_OK; 982 997 union acpi_ec *ec = NULL; 983 998 984 - ACPI_FUNCTION_TRACE("acpi_ec_add"); 985 999 986 1000 if (!device) 987 - return_VALUE(-EINVAL); 1001 + return -EINVAL; 988 1002 989 1003 ec = kmalloc(sizeof(union acpi_ec), GFP_KERNEL); 990 1004 if (!ec) 991 - return_VALUE(-ENOMEM); 1005 + return -ENOMEM; 992 1006 memset(ec, 0, sizeof(union acpi_ec)); 993 1007 994 1008 ec->common.handle = device->handle; ··· 1040 1056 if (result) 1041 1057 kfree(ec); 1042 1058 1043 - return_VALUE(result); 1059 + return result; 1044 1060 } 1045 1061 static int acpi_ec_intr_add(struct acpi_device *device) 1046 1062 { ··· 1048 1064 acpi_status status = AE_OK; 1049 1065 union acpi_ec *ec = NULL; 1050 1066 1051 - ACPI_FUNCTION_TRACE("acpi_ec_add"); 1052 1067 1053 1068 if (!device) 1054 - return_VALUE(-EINVAL); 1069 + return -EINVAL; 1055 1070 1056 1071 ec = kmalloc(sizeof(union acpi_ec), GFP_KERNEL); 1057 1072 if (!ec) 1058 - return_VALUE(-ENOMEM); 1073 + return -ENOMEM; 1059 1074 memset(ec, 0, sizeof(union acpi_ec)); 1060 1075 1061 1076 ec->common.handle = device->handle; ··· 1110 1127 if (result) 1111 1128 kfree(ec); 1112 1129 1113 - return_VALUE(result); 1130 + return result; 1114 1131 } 1115 1132 1116 1133 static int acpi_ec_remove(struct acpi_device *device, int type) 1117 1134 { 1118 1135 union acpi_ec *ec = NULL; 1119 1136 1120 - ACPI_FUNCTION_TRACE("acpi_ec_remove"); 1121 1137 1122 1138 if (!device) 1123 - return_VALUE(-EINVAL); 1139 + return -EINVAL; 1124 1140 1125 1141 ec = acpi_driver_data(device); 1126 1142 ··· 1127 1145 1128 1146 kfree(ec); 1129 1147 1130 - return_VALUE(0); 1148 + return 0; 1131 1149 } 1132 1150 1133 1151 static acpi_status ··· 1166 1184 acpi_status status = AE_OK; 1167 1185 union acpi_ec *ec = NULL; 1168 1186 1169 - ACPI_FUNCTION_TRACE("acpi_ec_start"); 1170 1187 1171 1188 if (!device) 1172 - return_VALUE(-EINVAL); 1189 + return -EINVAL; 1173 1190 1174 1191 ec = acpi_driver_data(device); 1175 1192 1176 1193 if (!ec) 1177 - return_VALUE(-EINVAL); 1194 + return -EINVAL; 1178 1195 1179 1196 /* 1180 1197 * Get I/O port addresses. Convert to GAS format. ··· 1183 1202 if (ACPI_FAILURE(status) 1184 1203 || ec->common.command_addr.register_bit_width == 0) { 1185 1204 printk(KERN_ERR PREFIX "Error getting I/O port addresses\n"); 1186 - return_VALUE(-ENODEV); 1205 + return -ENODEV; 1187 1206 } 1188 1207 1189 1208 ec->common.status_addr = ec->common.command_addr; ··· 1200 1219 ACPI_GPE_EDGE_TRIGGERED, 1201 1220 &acpi_ec_gpe_handler, ec); 1202 1221 if (ACPI_FAILURE(status)) { 1203 - return_VALUE(-ENODEV); 1222 + return -ENODEV; 1204 1223 } 1205 1224 acpi_set_gpe_type(NULL, ec->common.gpe_bit, ACPI_GPE_TYPE_RUNTIME); 1206 1225 acpi_enable_gpe(NULL, ec->common.gpe_bit, ACPI_NOT_ISR); ··· 1212 1231 if (ACPI_FAILURE(status)) { 1213 1232 acpi_remove_gpe_handler(NULL, ec->common.gpe_bit, 1214 1233 &acpi_ec_gpe_handler); 1215 - return_VALUE(-ENODEV); 1234 + return -ENODEV; 1216 1235 } 1217 1236 1218 - return_VALUE(AE_OK); 1237 + return AE_OK; 1219 1238 } 1220 1239 1221 1240 static int acpi_ec_stop(struct acpi_device *device, int type) ··· 1223 1242 acpi_status status = AE_OK; 1224 1243 union acpi_ec *ec = NULL; 1225 1244 1226 - ACPI_FUNCTION_TRACE("acpi_ec_stop"); 1227 1245 1228 1246 if (!device) 1229 - return_VALUE(-EINVAL); 1247 + return -EINVAL; 1230 1248 1231 1249 ec = acpi_driver_data(device); 1232 1250 ··· 1233 1253 ACPI_ADR_SPACE_EC, 1234 1254 &acpi_ec_space_handler); 1235 1255 if (ACPI_FAILURE(status)) 1236 - return_VALUE(-ENODEV); 1256 + return -ENODEV; 1237 1257 1238 1258 status = 1239 1259 acpi_remove_gpe_handler(NULL, ec->common.gpe_bit, 1240 1260 &acpi_ec_gpe_handler); 1241 1261 if (ACPI_FAILURE(status)) 1242 - return_VALUE(-ENODEV); 1262 + return -ENODEV; 1243 1263 1244 - return_VALUE(0); 1264 + return 0; 1245 1265 } 1246 1266 1247 1267 static acpi_status __init ··· 1511 1531 { 1512 1532 int result = 0; 1513 1533 1514 - ACPI_FUNCTION_TRACE("acpi_ec_init"); 1515 1534 1516 1535 if (acpi_disabled) 1517 - return_VALUE(0); 1536 + return 0; 1518 1537 1519 1538 acpi_ec_dir = proc_mkdir(ACPI_EC_CLASS, acpi_root_dir); 1520 1539 if (!acpi_ec_dir) 1521 - return_VALUE(-ENODEV); 1540 + return -ENODEV; 1522 1541 1523 1542 /* Now register the driver for the EC */ 1524 1543 result = acpi_bus_register_driver(&acpi_ec_driver); 1525 1544 if (result < 0) { 1526 1545 remove_proc_entry(ACPI_EC_CLASS, acpi_root_dir); 1527 - return_VALUE(-ENODEV); 1546 + return -ENODEV; 1528 1547 } 1529 1548 1530 - return_VALUE(result); 1549 + return result; 1531 1550 } 1532 1551 1533 1552 subsys_initcall(acpi_ec_init); ··· 1535 1556 #if 0 1536 1557 static void __exit acpi_ec_exit(void) 1537 1558 { 1538 - ACPI_FUNCTION_TRACE("acpi_ec_exit"); 1539 1559 1540 1560 acpi_bus_unregister_driver(&acpi_ec_driver); 1541 1561 1542 1562 remove_proc_entry(ACPI_EC_CLASS, acpi_root_dir); 1543 1563 1544 - return_VOID; 1564 + return; 1545 1565 } 1546 1566 #endif /* 0 */ 1547 1567
+6 -8
drivers/acpi/event.c
··· 48 48 static int chars_remaining = 0; 49 49 static char *ptr; 50 50 51 - ACPI_FUNCTION_TRACE("acpi_system_read_event"); 52 51 53 52 if (!chars_remaining) { 54 53 memset(&event, 0, sizeof(struct acpi_bus_event)); 55 54 56 55 if ((file->f_flags & O_NONBLOCK) 57 56 && (list_empty(&acpi_bus_event_list))) 58 - return_VALUE(-EAGAIN); 57 + return -EAGAIN; 59 58 60 59 result = acpi_bus_receive_event(&event); 61 60 if (result) 62 - return_VALUE(result); 61 + return result; 63 62 64 63 chars_remaining = sprintf(str, "%s %s %08x %08x\n", 65 64 event.device_class ? event. ··· 74 75 } 75 76 76 77 if (copy_to_user(buffer, ptr, count)) 77 - return_VALUE(-EFAULT); 78 + return -EFAULT; 78 79 79 80 *ppos += count; 80 81 chars_remaining -= count; 81 82 ptr += count; 82 83 83 - return_VALUE(count); 84 + return count; 84 85 } 85 86 86 87 static int acpi_system_close_event(struct inode *inode, struct file *file) ··· 111 112 struct proc_dir_entry *entry; 112 113 int error = 0; 113 114 114 - ACPI_FUNCTION_TRACE("acpi_event_init"); 115 115 116 116 if (acpi_disabled) 117 - return_VALUE(0); 117 + return 0; 118 118 119 119 /* 'event' [R] */ 120 120 entry = create_proc_entry("event", S_IRUSR, acpi_root_dir); ··· 122 124 else { 123 125 error = -ENODEV; 124 126 } 125 - return_VALUE(error); 127 + return error; 126 128 } 127 129 128 130 subsys_initcall(acpi_event_init);
+19 -27
drivers/acpi/fan.c
··· 78 78 struct acpi_fan *fan = seq->private; 79 79 int state = 0; 80 80 81 - ACPI_FUNCTION_TRACE("acpi_fan_read_state"); 82 81 83 82 if (fan) { 84 83 if (acpi_bus_get_power(fan->handle, &state)) ··· 86 87 seq_printf(seq, "status: %s\n", 87 88 !state ? "on" : "off"); 88 89 } 89 - return_VALUE(0); 90 + return 0; 90 91 } 91 92 92 93 static int acpi_fan_state_open_fs(struct inode *inode, struct file *file) ··· 103 104 struct acpi_fan *fan = (struct acpi_fan *)m->private; 104 105 char state_string[12] = { '\0' }; 105 106 106 - ACPI_FUNCTION_TRACE("acpi_fan_write_state"); 107 107 108 108 if (!fan || (count > sizeof(state_string) - 1)) 109 - return_VALUE(-EINVAL); 109 + return -EINVAL; 110 110 111 111 if (copy_from_user(state_string, buffer, count)) 112 - return_VALUE(-EFAULT); 112 + return -EFAULT; 113 113 114 114 state_string[count] = '\0'; 115 115 116 116 result = acpi_bus_set_power(fan->handle, 117 117 simple_strtoul(state_string, NULL, 0)); 118 118 if (result) 119 - return_VALUE(result); 119 + return result; 120 120 121 - return_VALUE(count); 121 + return count; 122 122 } 123 123 124 124 static struct file_operations acpi_fan_state_ops = { ··· 133 135 { 134 136 struct proc_dir_entry *entry = NULL; 135 137 136 - ACPI_FUNCTION_TRACE("acpi_fan_add_fs"); 137 138 138 139 if (!device) 139 - return_VALUE(-EINVAL); 140 + return -EINVAL; 140 141 141 142 if (!acpi_device_dir(device)) { 142 143 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), 143 144 acpi_fan_dir); 144 145 if (!acpi_device_dir(device)) 145 - return_VALUE(-ENODEV); 146 + return -ENODEV; 146 147 acpi_device_dir(device)->owner = THIS_MODULE; 147 148 } 148 149 ··· 150 153 S_IFREG | S_IRUGO | S_IWUSR, 151 154 acpi_device_dir(device)); 152 155 if (!entry) 153 - return_VALUE(-ENODEV); 156 + return -ENODEV; 154 157 else { 155 158 entry->proc_fops = &acpi_fan_state_ops; 156 159 entry->data = acpi_driver_data(device); 157 160 entry->owner = THIS_MODULE; 158 161 } 159 162 160 - return_VALUE(0); 163 + return 0; 161 164 } 162 165 163 166 static int acpi_fan_remove_fs(struct acpi_device *device) 164 167 { 165 - ACPI_FUNCTION_TRACE("acpi_fan_remove_fs"); 166 168 167 169 if (acpi_device_dir(device)) { 168 170 remove_proc_entry(ACPI_FAN_FILE_STATE, acpi_device_dir(device)); ··· 169 173 acpi_device_dir(device) = NULL; 170 174 } 171 175 172 - return_VALUE(0); 176 + return 0; 173 177 } 174 178 175 179 /* -------------------------------------------------------------------------- ··· 182 186 struct acpi_fan *fan = NULL; 183 187 int state = 0; 184 188 185 - ACPI_FUNCTION_TRACE("acpi_fan_add"); 186 189 187 190 if (!device) 188 - return_VALUE(-EINVAL); 191 + return -EINVAL; 189 192 190 193 fan = kmalloc(sizeof(struct acpi_fan), GFP_KERNEL); 191 194 if (!fan) 192 - return_VALUE(-ENOMEM); 195 + return -ENOMEM; 193 196 memset(fan, 0, sizeof(struct acpi_fan)); 194 197 195 198 fan->handle = device->handle; ··· 218 223 if (result) 219 224 kfree(fan); 220 225 221 - return_VALUE(result); 226 + return result; 222 227 } 223 228 224 229 static int acpi_fan_remove(struct acpi_device *device, int type) 225 230 { 226 231 struct acpi_fan *fan = NULL; 227 232 228 - ACPI_FUNCTION_TRACE("acpi_fan_remove"); 229 233 230 234 if (!device || !acpi_driver_data(device)) 231 - return_VALUE(-EINVAL); 235 + return -EINVAL; 232 236 233 237 fan = (struct acpi_fan *)acpi_driver_data(device); 234 238 ··· 235 241 236 242 kfree(fan); 237 243 238 - return_VALUE(0); 244 + return 0; 239 245 } 240 246 241 247 static int acpi_fan_suspend(struct acpi_device *device, int state) ··· 274 280 { 275 281 int result = 0; 276 282 277 - ACPI_FUNCTION_TRACE("acpi_fan_init"); 278 283 279 284 acpi_fan_dir = proc_mkdir(ACPI_FAN_CLASS, acpi_root_dir); 280 285 if (!acpi_fan_dir) 281 - return_VALUE(-ENODEV); 286 + return -ENODEV; 282 287 acpi_fan_dir->owner = THIS_MODULE; 283 288 284 289 result = acpi_bus_register_driver(&acpi_fan_driver); 285 290 if (result < 0) { 286 291 remove_proc_entry(ACPI_FAN_CLASS, acpi_root_dir); 287 - return_VALUE(-ENODEV); 292 + return -ENODEV; 288 293 } 289 294 290 - return_VALUE(0); 295 + return 0; 291 296 } 292 297 293 298 static void __exit acpi_fan_exit(void) 294 299 { 295 - ACPI_FUNCTION_TRACE("acpi_fan_exit"); 296 300 297 301 acpi_bus_unregister_driver(&acpi_fan_driver); 298 302 299 303 remove_proc_entry(ACPI_FAN_CLASS, acpi_root_dir); 300 304 301 - return_VOID; 305 + return; 302 306 } 303 307 304 308 module_init(acpi_fan_init);
+36 -58
drivers/acpi/hotkey.c
··· 231 231 232 232 static int hotkey_info_seq_show(struct seq_file *seq, void *offset) 233 233 { 234 - ACPI_FUNCTION_TRACE("hotkey_info_seq_show"); 235 234 236 235 seq_printf(seq, "Hotkey generic driver ver: %s\n", HOTKEY_ACPI_VERSION); 237 236 238 - return_VALUE(0); 237 + return 0; 239 238 } 240 239 241 240 static int hotkey_info_open_fs(struct inode *inode, struct file *file) ··· 265 266 (struct acpi_polling_hotkey *)seq->private; 266 267 char *buf; 267 268 268 - ACPI_FUNCTION_TRACE("hotkey_polling_seq_show"); 269 269 270 270 if (poll_hotkey->poll_result) { 271 271 buf = format_result(poll_hotkey->poll_result); ··· 272 274 seq_printf(seq, "%s", buf); 273 275 kfree(buf); 274 276 } 275 - return_VALUE(0); 277 + return 0; 276 278 } 277 279 278 280 static int hotkey_polling_open_fs(struct inode *inode, struct file *file) ··· 291 293 struct list_head *entries; 292 294 int val = -1; 293 295 294 - ACPI_FUNCTION_TRACE("hotkey_get_internal_event"); 295 296 296 297 list_for_each(entries, list->entries) { 297 298 union acpi_hotkey *key = ··· 302 305 } 303 306 } 304 307 305 - return_VALUE(val); 308 + return val; 306 309 } 307 310 308 311 static void ··· 311 314 struct acpi_device *device = NULL; 312 315 u32 internal_event; 313 316 314 - ACPI_FUNCTION_TRACE("acpi_hotkey_notify_handler"); 315 317 316 318 if (acpi_bus_get_device(handle, &device)) 317 - return_VOID; 319 + return; 318 320 319 321 internal_event = hotkey_get_internal_event(event, &global_hotkey_list); 320 322 acpi_bus_generate_event(device, internal_event, 0); 321 323 322 - return_VOID; 324 + return; 323 325 } 324 326 325 327 /* Need to invent automatically hotkey add method */ ··· 342 346 char proc_name[80]; 343 347 mode_t mode; 344 348 345 - ACPI_FUNCTION_TRACE("create_polling_proc"); 346 349 mode = S_IFREG | S_IRUGO | S_IWUGO; 347 350 348 351 sprintf(proc_name, "%d", device->link.hotkey_standard_num); ··· 351 356 proc = create_proc_entry(proc_name, mode, hotkey_proc_dir); 352 357 353 358 if (!proc) { 354 - return_VALUE(-ENODEV); 359 + return -ENODEV; 355 360 } else { 356 361 proc->proc_fops = &hotkey_polling_fops; 357 362 proc->owner = THIS_MODULE; ··· 360 365 proc->gid = 0; 361 366 device->poll_hotkey.proc = proc; 362 367 } 363 - return_VALUE(0); 368 + return 0; 364 369 } 365 370 366 371 static int hotkey_add(union acpi_hotkey *device) ··· 368 373 int status = 0; 369 374 struct acpi_device *dev = NULL; 370 375 371 - ACPI_FUNCTION_TRACE("hotkey_add"); 372 376 373 377 if (device->link.hotkey_type == ACPI_HOTKEY_EVENT) { 374 378 acpi_bus_get_device(device->event_hotkey.bus_handle, &dev); ··· 382 388 383 389 list_add_tail(&device->link.entries, global_hotkey_list.entries); 384 390 385 - return_VALUE(status); 391 + return status; 386 392 } 387 393 388 394 static int hotkey_remove(union acpi_hotkey *device) 389 395 { 390 396 struct list_head *entries, *next; 391 397 392 - ACPI_FUNCTION_TRACE("hotkey_remove"); 393 398 394 399 list_for_each_safe(entries, next, global_hotkey_list.entries) { 395 400 union acpi_hotkey *key = ··· 402 409 } 403 410 } 404 411 kfree(device); 405 - return_VALUE(0); 412 + return 0; 406 413 } 407 414 408 415 static int hotkey_update(union acpi_hotkey *key) 409 416 { 410 417 struct list_head *entries; 411 418 412 - ACPI_FUNCTION_TRACE("hotkey_update"); 413 419 414 420 list_for_each(entries, global_hotkey_list.entries) { 415 421 union acpi_hotkey *tmp = ··· 450 458 */ 451 459 kfree(key); 452 460 } 453 - return_VALUE(0); 461 + return 0; 454 462 break; 455 463 } 456 464 } 457 465 458 - return_VALUE(-ENODEV); 466 + return -ENODEV; 459 467 } 460 468 461 469 static void free_hotkey_device(union acpi_hotkey *key) 462 470 { 463 471 struct acpi_device *dev; 464 472 465 - ACPI_FUNCTION_TRACE("free_hotkey_device"); 466 473 467 474 if (key->link.hotkey_type == ACPI_HOTKEY_EVENT) { 468 475 acpi_bus_get_device(key->event_hotkey.bus_handle, &dev); ··· 481 490 free_poll_hotkey_buffer(key); 482 491 } 483 492 kfree(key); 484 - return_VOID; 493 + return; 485 494 } 486 495 487 496 static void free_hotkey_buffer(union acpi_hotkey *key) ··· 502 511 acpi_handle tmp_handle; 503 512 acpi_status status = AE_OK; 504 513 505 - ACPI_FUNCTION_TRACE("init_hotkey_device"); 506 514 507 515 if (std_num < 0 || IS_POLL(std_num) || !key) 508 516 goto do_fail; ··· 528 538 method, &tmp_handle); 529 539 if (ACPI_FAILURE(status)) 530 540 goto do_fail; 531 - return_VALUE(AE_OK); 541 + return AE_OK; 532 542 do_fail: 533 - return_VALUE(-ENODEV); 543 + return -ENODEV; 534 544 } 535 545 536 546 static int ··· 542 552 acpi_status status = AE_OK; 543 553 acpi_handle tmp_handle; 544 554 545 - ACPI_FUNCTION_TRACE("init_poll_hotkey_device"); 546 555 547 556 if (std_num < 0 || IS_EVENT(std_num) || !key) 548 557 goto do_fail; ··· 576 587 (union acpi_object *)kmalloc(sizeof(union acpi_object), GFP_KERNEL); 577 588 if (!key->poll_hotkey.poll_result) 578 589 goto do_fail; 579 - return_VALUE(AE_OK); 590 + return AE_OK; 580 591 do_fail: 581 - return_VALUE(-ENODEV); 592 + return -ENODEV; 582 593 } 583 594 584 595 static int hotkey_open_config(struct inode *inode, struct file *file) 585 596 { 586 - ACPI_FUNCTION_TRACE("hotkey_open_config"); 587 - return_VALUE(single_open 597 + return (single_open 588 598 (file, hotkey_config_seq_show, PDE(inode)->data)); 589 599 } 590 600 591 601 static int hotkey_poll_open_config(struct inode *inode, struct file *file) 592 602 { 593 - ACPI_FUNCTION_TRACE("hotkey_poll_open_config"); 594 - return_VALUE(single_open 603 + return (single_open 595 604 (file, hotkey_poll_config_seq_show, PDE(inode)->data)); 596 605 } 597 606 ··· 602 615 struct acpi_buffer bus = { ACPI_PATHNAME_MAX, bus_name }; 603 616 struct acpi_buffer act = { ACPI_PATHNAME_MAX, action_name }; 604 617 605 - ACPI_FUNCTION_TRACE(("hotkey_config_seq_show")); 606 618 607 619 list_for_each(entries, hotkey_list->entries) { 608 620 union acpi_hotkey *key = ··· 619 633 } 620 634 } 621 635 seq_puts(seq, "\n"); 622 - return_VALUE(0); 636 + return 0; 623 637 } 624 638 625 639 static int hotkey_poll_config_seq_show(struct seq_file *seq, void *offset) ··· 631 645 struct acpi_buffer bus = { ACPI_PATHNAME_MAX, bus_name }; 632 646 struct acpi_buffer act = { ACPI_PATHNAME_MAX, action_name }; 633 647 634 - ACPI_FUNCTION_TRACE(("hotkey_config_seq_show")); 635 648 636 649 list_for_each(entries, hotkey_list->entries) { 637 650 union acpi_hotkey *key = ··· 648 663 } 649 664 } 650 665 seq_puts(seq, "\n"); 651 - return_VALUE(0); 666 + return 0; 652 667 } 653 668 654 669 static int ··· 660 675 char **method, int *internal_event_num, int *external_event_num) 661 676 { 662 677 char *tmp, *tmp1, count; 663 - ACPI_FUNCTION_TRACE(("get_parms")); 664 678 665 679 sscanf(config_record, "%d", cmd); 666 680 ··· 725 741 0) 726 742 goto do_fail; 727 743 728 - return_VALUE(6); 744 + return 6; 729 745 do_fail: 730 - return_VALUE(-1); 746 + return -1; 731 747 } 732 748 733 749 /* count is length for one input record */ ··· 744 760 int ret = 0; 745 761 union acpi_hotkey *key = NULL; 746 762 747 - ACPI_FUNCTION_TRACE(("hotkey_write_config")); 748 763 749 764 config_record = (char *)kmalloc(count + 1, GFP_KERNEL); 750 765 if (!config_record) 751 - return_VALUE(-ENOMEM); 766 + return -ENOMEM; 752 767 753 768 if (copy_from_user(config_record, buffer, count)) { 754 769 kfree(config_record); 755 770 printk(KERN_ERR PREFIX "Invalid data\n"); 756 - return_VALUE(-EINVAL); 771 + return -EINVAL; 757 772 } 758 773 config_record[count] = 0; 759 774 ··· 773 790 kfree(action_handle); 774 791 kfree(method); 775 792 printk(KERN_ERR PREFIX "Invalid data format ret=%d\n", ret); 776 - return_VALUE(-EINVAL); 793 + return -EINVAL; 777 794 } 778 795 779 796 key = kmalloc(sizeof(union acpi_hotkey), GFP_KERNEL); ··· 808 825 free_poll_hotkey_buffer(key); 809 826 kfree(key); 810 827 printk(KERN_ERR PREFIX "Invalid hotkey\n"); 811 - return_VALUE(-EINVAL); 828 + return -EINVAL; 812 829 } 813 830 814 831 cont_cmd: ··· 834 851 goto fail_out; 835 852 break; 836 853 } 837 - return_VALUE(count); 854 + return count; 838 855 fail_out: 839 856 if (IS_EVENT(internal_event_num)) 840 857 free_hotkey_buffer(key); ··· 842 859 free_poll_hotkey_buffer(key); 843 860 kfree(key); 844 861 printk(KERN_ERR PREFIX "invalid key\n"); 845 - return_VALUE(-EINVAL); 862 + return -EINVAL; 846 863 } 847 864 848 865 /* ··· 859 876 union acpi_object in_obj; /* the only param we use */ 860 877 acpi_status status; 861 878 862 - ACPI_FUNCTION_TRACE("write_acpi_int"); 863 879 params.count = 1; 864 880 params.pointer = &in_obj; 865 881 in_obj.type = ACPI_TYPE_INTEGER; ··· 866 884 867 885 status = acpi_evaluate_object(handle, (char *)method, &params, output); 868 886 869 - return_VALUE(status == AE_OK); 887 + return (status == AE_OK); 870 888 } 871 889 872 890 static int read_acpi_int(acpi_handle handle, const char *method, ··· 876 894 union acpi_object out_obj; 877 895 acpi_status status; 878 896 879 - ACPI_FUNCTION_TRACE("read_acpi_int"); 880 897 output.length = sizeof(out_obj); 881 898 output.pointer = &out_obj; 882 899 ··· 885 904 val->type = out_obj.type; 886 905 } else 887 906 printk(KERN_ERR PREFIX "null val pointer\n"); 888 - return_VALUE((status == AE_OK) 907 + return ((status == AE_OK) 889 908 && (out_obj.type == ACPI_TYPE_INTEGER)); 890 909 } 891 910 ··· 922 941 int event, method_type, type, value; 923 942 union acpi_hotkey *key; 924 943 925 - ACPI_FUNCTION_TRACE("hotkey_execte_aml_method"); 926 944 927 945 arg = (char *)kmalloc(count + 1, GFP_KERNEL); 928 946 if (!arg) 929 - return_VALUE(-ENOMEM); 947 + return -ENOMEM; 930 948 arg[count] = 0; 931 949 932 950 if (copy_from_user(arg, buffer, count)) { 933 951 kfree(arg); 934 952 printk(KERN_ERR PREFIX "Invalid argument 2\n"); 935 - return_VALUE(-EINVAL); 953 + return -EINVAL; 936 954 } 937 955 938 956 if (sscanf(arg, "%d:%d:%d:%d", &event, &method_type, &type, &value) != 939 957 4) { 940 958 kfree(arg); 941 959 printk(KERN_ERR PREFIX "Invalid argument 3\n"); 942 - return_VALUE(-EINVAL); 960 + return -EINVAL; 943 961 } 944 962 kfree(arg); 945 963 if (type == ACPI_TYPE_INTEGER) { ··· 964 984 } 965 985 } else { 966 986 printk(KERN_WARNING "Not supported\n"); 967 - return_VALUE(-EINVAL); 987 + return -EINVAL; 968 988 } 969 - return_VALUE(count); 989 + return count; 970 990 do_fail: 971 - return_VALUE(-EINVAL); 991 + return -EINVAL; 972 992 973 993 } 974 994 ··· 977 997 int result; 978 998 mode_t mode = S_IFREG | S_IRUGO | S_IWUGO; 979 999 980 - ACPI_FUNCTION_TRACE("hotkey_init"); 981 1000 982 1001 if (acpi_disabled) 983 1002 return -ENODEV; ··· 1063 1084 { 1064 1085 struct list_head *entries, *next; 1065 1086 1066 - ACPI_FUNCTION_TRACE("hotkey_exit"); 1067 1087 1068 1088 list_for_each_safe(entries, next, global_hotkey_list.entries) { 1069 1089 union acpi_hotkey *key =
+2 -3
drivers/acpi/motherboard.c
··· 52 52 { 53 53 struct resource *requested_res = NULL; 54 54 55 - ACPI_FUNCTION_TRACE("acpi_reserve_io_ranges"); 56 55 57 56 if (res->type == ACPI_RESOURCE_TYPE_IO) { 58 57 struct acpi_resource_io *io_res = &res->data.io; 59 58 60 59 if (io_res->minimum != io_res->maximum) 61 - return_VALUE(AE_OK); 60 + return AE_OK; 62 61 if (IS_RESERVED_ADDR 63 62 (io_res->minimum, io_res->address_length)) { 64 63 ACPI_DEBUG_PRINT((ACPI_DB_INFO, ··· 91 92 92 93 if (requested_res) 93 94 requested_res->flags &= ~IORESOURCE_BUSY; 94 - return_VALUE(AE_OK); 95 + return AE_OK; 95 96 } 96 97 97 98 static int acpi_motherboard_add(struct acpi_device *device)
+14 -21
drivers/acpi/osl.c
··· 587 587 { 588 588 struct acpi_os_dpc *dpc = NULL; 589 589 590 - ACPI_FUNCTION_TRACE("os_execute_deferred"); 591 590 592 591 dpc = (struct acpi_os_dpc *)context; 593 592 if (!dpc) { 594 593 printk(KERN_ERR PREFIX "Invalid (NULL) context\n"); 595 - return_VOID; 594 + return; 596 595 } 597 596 598 597 dpc->function(dpc->context); 599 598 600 599 kfree(dpc); 601 600 602 - return_VOID; 601 + return; 603 602 } 604 603 605 604 static int acpi_os_execute_thread(void *context) ··· 692 693 { 693 694 spinlock_t *lock_ptr; 694 695 695 - ACPI_FUNCTION_TRACE("os_create_lock"); 696 696 697 697 lock_ptr = acpi_os_allocate(sizeof(spinlock_t)); 698 698 ··· 701 703 702 704 *out_handle = lock_ptr; 703 705 704 - return_ACPI_STATUS(AE_OK); 706 + return AE_OK; 705 707 } 706 708 707 709 /* ··· 709 711 */ 710 712 void acpi_os_delete_lock(acpi_handle handle) 711 713 { 712 - ACPI_FUNCTION_TRACE("os_create_lock"); 713 714 714 715 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Deleting spinlock[%p].\n", handle)); 715 716 716 717 acpi_os_free(handle); 717 718 718 - return_VOID; 719 + return; 719 720 } 720 721 721 722 acpi_status ··· 722 725 { 723 726 struct semaphore *sem = NULL; 724 727 725 - ACPI_FUNCTION_TRACE("os_create_semaphore"); 726 728 727 729 sem = acpi_os_allocate(sizeof(struct semaphore)); 728 730 if (!sem) 729 - return_ACPI_STATUS(AE_NO_MEMORY); 731 + return AE_NO_MEMORY; 730 732 memset(sem, 0, sizeof(struct semaphore)); 731 733 732 734 sema_init(sem, initial_units); ··· 735 739 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Creating semaphore[%p|%d].\n", 736 740 *handle, initial_units)); 737 741 738 - return_ACPI_STATUS(AE_OK); 742 + return AE_OK; 739 743 } 740 744 741 745 EXPORT_SYMBOL(acpi_os_create_semaphore); ··· 751 755 { 752 756 struct semaphore *sem = (struct semaphore *)handle; 753 757 754 - ACPI_FUNCTION_TRACE("os_delete_semaphore"); 755 758 756 759 if (!sem) 757 - return_ACPI_STATUS(AE_BAD_PARAMETER); 760 + return AE_BAD_PARAMETER; 758 761 759 762 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Deleting semaphore[%p].\n", handle)); 760 763 761 764 acpi_os_free(sem); 762 765 sem = NULL; 763 766 764 - return_ACPI_STATUS(AE_OK); 767 + return AE_OK; 765 768 } 766 769 767 770 EXPORT_SYMBOL(acpi_os_delete_semaphore); ··· 780 785 struct semaphore *sem = (struct semaphore *)handle; 781 786 int ret = 0; 782 787 783 - ACPI_FUNCTION_TRACE("os_wait_semaphore"); 784 788 785 789 if (!sem || (units < 1)) 786 - return_ACPI_STATUS(AE_BAD_PARAMETER); 790 + return AE_BAD_PARAMETER; 787 791 788 792 if (units > 1) 789 - return_ACPI_STATUS(AE_SUPPORT); 793 + return AE_SUPPORT; 790 794 791 795 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Waiting for semaphore[%p|%d|%d]\n", 792 796 handle, units, timeout)); ··· 844 850 units, timeout)); 845 851 } 846 852 847 - return_ACPI_STATUS(status); 853 + return status; 848 854 } 849 855 850 856 EXPORT_SYMBOL(acpi_os_wait_semaphore); ··· 856 862 { 857 863 struct semaphore *sem = (struct semaphore *)handle; 858 864 859 - ACPI_FUNCTION_TRACE("os_signal_semaphore"); 860 865 861 866 if (!sem || (units < 1)) 862 - return_ACPI_STATUS(AE_BAD_PARAMETER); 867 + return AE_BAD_PARAMETER; 863 868 864 869 if (units > 1) 865 - return_ACPI_STATUS(AE_SUPPORT); 870 + return AE_SUPPORT; 866 871 867 872 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Signaling semaphore[%p|%d]\n", handle, 868 873 units)); 869 874 870 875 up(sem); 871 876 872 - return_ACPI_STATUS(AE_OK); 877 + return AE_OK; 873 878 } 874 879 875 880 EXPORT_SYMBOL(acpi_os_signal_semaphore);
+16 -21
drivers/acpi/pci_bind.c
··· 47 47 static void acpi_pci_data_handler(acpi_handle handle, u32 function, 48 48 void *context) 49 49 { 50 - ACPI_FUNCTION_TRACE("acpi_pci_data_handler"); 51 50 52 51 /* TBD: Anything we need to do here? */ 53 52 54 - return_VOID; 53 + return; 55 54 } 56 55 57 56 /** ··· 67 68 struct acpi_device *device = NULL; 68 69 struct acpi_pci_data *data = NULL; 69 70 70 - ACPI_FUNCTION_TRACE("acpi_get_pci_id"); 71 71 72 72 if (!id) 73 - return_ACPI_STATUS(AE_BAD_PARAMETER); 73 + return AE_BAD_PARAMETER; 74 74 75 75 result = acpi_bus_get_device(handle, &device); 76 76 if (result) { 77 77 printk(KERN_ERR PREFIX 78 78 "Invalid ACPI Bus context for device %s\n", 79 79 acpi_device_bid(device)); 80 - return_ACPI_STATUS(AE_NOT_EXIST); 80 + return AE_NOT_EXIST; 81 81 } 82 82 83 83 status = acpi_get_data(handle, acpi_pci_data_handler, (void **)&data); ··· 84 86 ACPI_EXCEPTION((AE_INFO, status, 85 87 "Invalid ACPI-PCI context for device %s", 86 88 acpi_device_bid(device))); 87 - return_ACPI_STATUS(status); 89 + return status; 88 90 } 89 91 90 92 *id = data->id; ··· 101 103 acpi_device_bid(device), id->segment, id->bus, 102 104 id->device, id->function)); 103 105 104 - return_ACPI_STATUS(AE_OK); 106 + return AE_OK; 105 107 } 106 108 107 109 EXPORT_SYMBOL(acpi_get_pci_id); ··· 118 120 struct pci_dev *dev; 119 121 struct pci_bus *bus; 120 122 121 - ACPI_FUNCTION_TRACE("acpi_pci_bind"); 122 123 123 124 if (!device || !device->parent) 124 - return_VALUE(-EINVAL); 125 + return -EINVAL; 125 126 126 127 pathname = kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); 127 128 if (!pathname) 128 - return_VALUE(-ENOMEM); 129 + return -ENOMEM; 129 130 memset(pathname, 0, ACPI_PATHNAME_MAX); 130 131 buffer.length = ACPI_PATHNAME_MAX; 131 132 buffer.pointer = pathname; ··· 132 135 data = kmalloc(sizeof(struct acpi_pci_data), GFP_KERNEL); 133 136 if (!data) { 134 137 kfree(pathname); 135 - return_VALUE(-ENOMEM); 138 + return -ENOMEM; 136 139 } 137 140 memset(data, 0, sizeof(struct acpi_pci_data)); 138 141 ··· 266 269 if (result) 267 270 kfree(data); 268 271 269 - return_VALUE(result); 272 + return result; 270 273 } 271 274 272 275 int acpi_pci_unbind(struct acpi_device *device) ··· 277 280 char *pathname = NULL; 278 281 struct acpi_buffer buffer = { 0, NULL }; 279 282 280 - ACPI_FUNCTION_TRACE("acpi_pci_unbind"); 281 283 282 284 if (!device || !device->parent) 283 - return_VALUE(-EINVAL); 285 + return -EINVAL; 284 286 285 287 pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); 286 288 if (!pathname) 287 - return_VALUE(-ENOMEM); 289 + return -ENOMEM; 288 290 memset(pathname, 0, ACPI_PATHNAME_MAX); 289 291 290 292 buffer.length = ACPI_PATHNAME_MAX; ··· 318 322 kfree(data); 319 323 320 324 end: 321 - return_VALUE(result); 325 + return result; 322 326 } 323 327 324 328 int ··· 331 335 char *pathname = NULL; 332 336 struct acpi_buffer buffer = { 0, NULL }; 333 337 334 - ACPI_FUNCTION_TRACE("acpi_pci_bind_root"); 335 338 336 339 pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); 337 340 if (!pathname) 338 - return_VALUE(-ENOMEM); 341 + return -ENOMEM; 339 342 memset(pathname, 0, ACPI_PATHNAME_MAX); 340 343 341 344 buffer.length = ACPI_PATHNAME_MAX; ··· 342 347 343 348 if (!device || !id || !bus) { 344 349 kfree(pathname); 345 - return_VALUE(-EINVAL); 350 + return -EINVAL; 346 351 } 347 352 348 353 data = kmalloc(sizeof(struct acpi_pci_data), GFP_KERNEL); 349 354 if (!data) { 350 355 kfree(pathname); 351 - return_VALUE(-ENOMEM); 356 + return -ENOMEM; 352 357 } 353 358 memset(data, 0, sizeof(struct acpi_pci_data)); 354 359 ··· 376 381 if (result != 0) 377 382 kfree(data); 378 383 379 - return_VALUE(result); 384 + return result; 380 385 }
+31 -40
drivers/acpi/pci_irq.c
··· 55 55 struct list_head *node = NULL; 56 56 struct acpi_prt_entry *entry = NULL; 57 57 58 - ACPI_FUNCTION_TRACE("acpi_pci_irq_find_prt_entry"); 59 58 60 59 if (!acpi_prt.count) 61 - return_PTR(NULL); 60 + return NULL; 62 61 63 62 /* 64 63 * Parse through all PRT entries looking for a match on the specified ··· 72 73 && (device == entry->id.device) 73 74 && (pin == entry->pin)) { 74 75 spin_unlock(&acpi_prt_lock); 75 - return_PTR(entry); 76 + return entry; 76 77 } 77 78 } 78 79 79 80 spin_unlock(&acpi_prt_lock); 80 - return_PTR(NULL); 81 + return NULL; 81 82 } 82 83 83 84 static int ··· 86 87 { 87 88 struct acpi_prt_entry *entry = NULL; 88 89 89 - ACPI_FUNCTION_TRACE("acpi_pci_irq_add_entry"); 90 90 91 91 if (!prt) 92 - return_VALUE(-EINVAL); 92 + return -EINVAL; 93 93 94 94 entry = kmalloc(sizeof(struct acpi_prt_entry), GFP_KERNEL); 95 95 if (!entry) 96 - return_VALUE(-ENOMEM); 96 + return -ENOMEM; 97 97 memset(entry, 0, sizeof(struct acpi_prt_entry)); 98 98 99 99 entry->id.segment = segment; ··· 139 141 acpi_prt.count++; 140 142 spin_unlock(&acpi_prt_lock); 141 143 142 - return_VALUE(0); 144 + return 0; 143 145 } 144 146 145 147 static void ··· 161 163 struct acpi_pci_routing_table *entry = NULL; 162 164 static int first_time = 1; 163 165 164 - ACPI_FUNCTION_TRACE("acpi_pci_irq_add_prt"); 165 166 166 167 pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); 167 168 if (!pathname) 168 - return_VALUE(-ENOMEM); 169 + return -ENOMEM; 169 170 memset(pathname, 0, ACPI_PATHNAME_MAX); 170 171 171 172 if (first_time) { ··· 196 199 if (status != AE_BUFFER_OVERFLOW) { 197 200 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRT [%s]", 198 201 acpi_format_exception(status))); 199 - return_VALUE(-ENODEV); 202 + return -ENODEV; 200 203 } 201 204 202 205 prt = kmalloc(buffer.length, GFP_KERNEL); 203 206 if (!prt) { 204 - return_VALUE(-ENOMEM); 207 + return -ENOMEM; 205 208 } 206 209 memset(prt, 0, buffer.length); 207 210 buffer.pointer = prt; ··· 211 214 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRT [%s]", 212 215 acpi_format_exception(status))); 213 216 kfree(buffer.pointer); 214 - return_VALUE(-ENODEV); 217 + return -ENODEV; 215 218 } 216 219 217 220 entry = prt; ··· 224 227 225 228 kfree(prt); 226 229 227 - return_VALUE(0); 230 + return 0; 228 231 } 229 232 230 233 void acpi_pci_irq_del_prt(int segment, int bus) ··· 259 262 { 260 263 int irq; 261 264 262 - ACPI_FUNCTION_TRACE("acpi_pci_allocate_irq"); 263 265 264 266 if (entry->link.handle) { 265 267 irq = acpi_pci_link_allocate_irq(entry->link.handle, ··· 267 271 if (irq < 0) { 268 272 printk(KERN_WARNING PREFIX 269 273 "Invalid IRQ link routing entry\n"); 270 - return_VALUE(-1); 274 + return -1; 271 275 } 272 276 } else { 273 277 irq = entry->link.index; ··· 276 280 } 277 281 278 282 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found IRQ %d\n", irq)); 279 - return_VALUE(irq); 283 + return irq; 280 284 } 281 285 282 286 static int ··· 285 289 { 286 290 int irq; 287 291 288 - ACPI_FUNCTION_TRACE("acpi_pci_free_irq"); 289 292 if (entry->link.handle) { 290 293 irq = acpi_pci_link_free_irq(entry->link.handle); 291 294 } else { 292 295 irq = entry->link.index; 293 296 } 294 - return_VALUE(irq); 297 + return irq; 295 298 } 296 299 297 300 /* ··· 310 315 int bus_nr = bus->number; 311 316 int ret; 312 317 313 - ACPI_FUNCTION_TRACE("acpi_pci_irq_lookup"); 314 318 315 319 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 316 320 "Searching for PRT entry for %02x:%02x:%02x[%c]\n", ··· 318 324 entry = acpi_pci_irq_find_prt_entry(segment, bus_nr, device, pin); 319 325 if (!entry) { 320 326 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "PRT entry not found\n")); 321 - return_VALUE(-1); 327 + return -1; 322 328 } 323 329 324 330 ret = func(entry, triggering, polarity, link); 325 - return_VALUE(ret); 331 + return ret; 326 332 } 327 333 328 334 /* ··· 340 346 int irq = -1; 341 347 u8 bridge_pin = 0; 342 348 343 - ACPI_FUNCTION_TRACE("acpi_pci_irq_derive"); 344 349 345 350 if (!dev) 346 - return_VALUE(-EINVAL); 351 + return -EINVAL; 347 352 348 353 /* 349 354 * Attempt to derive an IRQ for this device from a parent bridge's ··· 359 366 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 360 367 "No interrupt pin configured for device %s\n", 361 368 pci_name(bridge))); 362 - return_VALUE(-1); 369 + return -1; 363 370 } 364 371 /* Pin is from 0 to 3 */ 365 372 bridge_pin--; ··· 374 381 if (irq < 0) { 375 382 printk(KERN_WARNING PREFIX "Unable to derive IRQ for device %s\n", 376 383 pci_name(dev)); 377 - return_VALUE(-1); 384 + return -1; 378 385 } 379 386 380 387 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Derive IRQ %d for device %s from %s\n", 381 388 irq, pci_name(dev), pci_name(bridge))); 382 389 383 - return_VALUE(irq); 390 + return irq; 384 391 } 385 392 386 393 /* ··· 398 405 char *link = NULL; 399 406 int rc; 400 407 401 - ACPI_FUNCTION_TRACE("acpi_pci_irq_enable"); 402 408 403 409 if (!dev) 404 - return_VALUE(-EINVAL); 410 + return -EINVAL; 405 411 406 412 pin = dev->pin; 407 413 if (!pin) { 408 414 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 409 415 "No interrupt pin configured for device %s\n", 410 416 pci_name(dev))); 411 - return_VALUE(0); 417 + return 0; 412 418 } 413 419 pin--; 414 420 415 421 if (!dev->bus) { 416 422 printk(KERN_ERR PREFIX "Invalid (NULL) 'bus' field\n"); 417 - return_VALUE(-ENODEV); 423 + return -ENODEV; 418 424 } 419 425 420 426 /* ··· 445 453 printk(" - using IRQ %d\n", dev->irq); 446 454 acpi_register_gsi(dev->irq, ACPI_LEVEL_SENSITIVE, 447 455 ACPI_ACTIVE_LOW); 448 - return_VALUE(0); 456 + return 0; 449 457 } else { 450 458 printk("\n"); 451 - return_VALUE(0); 459 + return 0; 452 460 } 453 461 } 454 462 ··· 456 464 if (rc < 0) { 457 465 printk(KERN_WARNING PREFIX "PCI Interrupt %s[%c]: failed " 458 466 "to register GSI\n", pci_name(dev), ('A' + pin)); 459 - return_VALUE(rc); 467 + return rc; 460 468 } 461 469 dev->irq = rc; 462 470 ··· 470 478 (triggering == ACPI_LEVEL_SENSITIVE) ? "level" : "edge", 471 479 (polarity == ACPI_ACTIVE_LOW) ? "low" : "high", dev->irq); 472 480 473 - return_VALUE(0); 481 + return 0; 474 482 } 475 483 476 484 EXPORT_SYMBOL(acpi_pci_irq_enable); ··· 487 495 int triggering = ACPI_LEVEL_SENSITIVE; 488 496 int polarity = ACPI_ACTIVE_LOW; 489 497 490 - ACPI_FUNCTION_TRACE("acpi_pci_irq_disable"); 491 498 492 499 if (!dev || !dev->bus) 493 - return_VOID; 500 + return; 494 501 495 502 pin = dev->pin; 496 503 if (!pin) 497 - return_VOID; 504 + return; 498 505 pin--; 499 506 500 507 /* ··· 511 520 &triggering, &polarity, NULL, 512 521 acpi_pci_free_irq); 513 522 if (gsi < 0) 514 - return_VOID; 523 + return; 515 524 516 525 /* 517 526 * TBD: It might be worth clearing dev->irq by magic constant ··· 523 532 524 533 acpi_unregister_gsi(gsi); 525 534 526 - return_VOID; 535 + return; 527 536 }
+45 -60
drivers/acpi/pci_link.c
··· 107 107 struct acpi_pci_link *link = (struct acpi_pci_link *)context; 108 108 u32 i = 0; 109 109 110 - ACPI_FUNCTION_TRACE("acpi_pci_link_check_possible"); 111 110 112 111 switch (resource->type) { 113 112 case ACPI_RESOURCE_TYPE_START_DEPENDENT: 114 - return_ACPI_STATUS(AE_OK); 113 + return AE_OK; 115 114 case ACPI_RESOURCE_TYPE_IRQ: 116 115 { 117 116 struct acpi_resource_irq *p = &resource->data.irq; 118 117 if (!p || !p->interrupt_count) { 119 118 printk(KERN_WARNING PREFIX "Blank IRQ resource\n"); 120 - return_ACPI_STATUS(AE_OK); 119 + return AE_OK; 121 120 } 122 121 for (i = 0; 123 122 (i < p->interrupt_count ··· 141 142 if (!p || !p->interrupt_count) { 142 143 printk(KERN_WARNING PREFIX 143 144 "Blank EXT IRQ resource\n"); 144 - return_ACPI_STATUS(AE_OK); 145 + return AE_OK; 145 146 } 146 147 for (i = 0; 147 148 (i < p->interrupt_count ··· 161 162 } 162 163 default: 163 164 printk(KERN_ERR PREFIX "Resource is not an IRQ entry\n"); 164 - return_ACPI_STATUS(AE_OK); 165 + return AE_OK; 165 166 } 166 167 167 - return_ACPI_STATUS(AE_CTRL_TERMINATE); 168 + return AE_CTRL_TERMINATE; 168 169 } 169 170 170 171 static int acpi_pci_link_get_possible(struct acpi_pci_link *link) 171 172 { 172 173 acpi_status status; 173 174 174 - ACPI_FUNCTION_TRACE("acpi_pci_link_get_possible"); 175 175 176 176 if (!link) 177 - return_VALUE(-EINVAL); 177 + return -EINVAL; 178 178 179 179 status = acpi_walk_resources(link->handle, METHOD_NAME__PRS, 180 180 acpi_pci_link_check_possible, link); 181 181 if (ACPI_FAILURE(status)) { 182 182 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRS")); 183 - return_VALUE(-ENODEV); 183 + return -ENODEV; 184 184 } 185 185 186 186 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 187 187 "Found %d possible IRQs\n", 188 188 link->irq.possible_count)); 189 189 190 - return_VALUE(0); 190 + return 0; 191 191 } 192 192 193 193 static acpi_status ··· 194 196 { 195 197 int *irq = (int *)context; 196 198 197 - ACPI_FUNCTION_TRACE("acpi_pci_link_check_current"); 198 199 199 200 switch (resource->type) { 200 201 case ACPI_RESOURCE_TYPE_IRQ: ··· 206 209 */ 207 210 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 208 211 "Blank IRQ resource\n")); 209 - return_ACPI_STATUS(AE_OK); 212 + return AE_OK; 210 213 } 211 214 *irq = p->interrupts[0]; 212 215 break; ··· 222 225 */ 223 226 printk(KERN_WARNING PREFIX 224 227 "Blank EXT IRQ resource\n"); 225 - return_ACPI_STATUS(AE_OK); 228 + return AE_OK; 226 229 } 227 230 *irq = p->interrupts[0]; 228 231 break; ··· 231 234 default: 232 235 printk(KERN_ERR PREFIX "Resource %d isn't an IRQ\n", resource->type); 233 236 case ACPI_RESOURCE_TYPE_END_TAG: 234 - return_ACPI_STATUS(AE_OK); 237 + return AE_OK; 235 238 } 236 - return_ACPI_STATUS(AE_CTRL_TERMINATE); 239 + return AE_CTRL_TERMINATE; 237 240 } 238 241 239 242 /* ··· 249 252 acpi_status status = AE_OK; 250 253 int irq = 0; 251 254 252 - ACPI_FUNCTION_TRACE("acpi_pci_link_get_current"); 253 255 254 256 if (!link || !link->handle) 255 - return_VALUE(-EINVAL); 257 + return -EINVAL; 256 258 257 259 link->irq.active = 0; 258 260 ··· 266 270 267 271 if (!link->device->status.enabled) { 268 272 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Link disabled\n")); 269 - return_VALUE(0); 273 + return 0; 270 274 } 271 275 } 272 276 ··· 292 296 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Link at IRQ %d \n", link->irq.active)); 293 297 294 298 end: 295 - return_VALUE(result); 299 + return result; 296 300 } 297 301 298 302 static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) ··· 305 309 } *resource; 306 310 struct acpi_buffer buffer = { 0, NULL }; 307 311 308 - ACPI_FUNCTION_TRACE("acpi_pci_link_set"); 309 312 310 313 if (!link || !irq) 311 - return_VALUE(-EINVAL); 314 + return -EINVAL; 312 315 313 316 resource = kmalloc(sizeof(*resource) + 1, GFP_ATOMIC); 314 317 if (!resource) 315 - return_VALUE(-ENOMEM); 318 + return -ENOMEM; 316 319 317 320 memset(resource, 0, sizeof(*resource) + 1); 318 321 buffer.length = sizeof(*resource) + 1; ··· 408 413 409 414 end: 410 415 kfree(resource); 411 - return_VALUE(result); 416 + return result; 412 417 } 413 418 414 419 /* -------------------------------------------------------------------------- ··· 482 487 struct acpi_pci_link *link = NULL; 483 488 int i = 0; 484 489 485 - ACPI_FUNCTION_TRACE("acpi_irq_penalty_init"); 486 490 487 491 /* 488 492 * Update penalties to facilitate IRQ balancing. ··· 518 524 /* Add a penalty for the SCI */ 519 525 acpi_irq_penalty[acpi_fadt.sci_int] += PIRQ_PENALTY_PCI_USING; 520 526 521 - return_VALUE(0); 527 + return 0; 522 528 } 523 529 524 530 static int acpi_irq_balance; /* 0: static, 1: balance */ ··· 528 534 int irq; 529 535 int i; 530 536 531 - ACPI_FUNCTION_TRACE("acpi_pci_link_allocate"); 532 537 533 538 if (link->irq.initialized) { 534 539 if (link->refcnt == 0) 535 540 /* This means the link is disabled but initialized */ 536 541 acpi_pci_link_set(link, link->irq.active); 537 - return_VALUE(0); 542 + return 0; 538 543 } 539 544 540 545 /* ··· 580 587 "Try pci=noacpi or acpi=off\n", 581 588 acpi_device_name(link->device), 582 589 acpi_device_bid(link->device)); 583 - return_VALUE(-ENODEV); 590 + return -ENODEV; 584 591 } else { 585 592 acpi_irq_penalty[link->irq.active] += PIRQ_PENALTY_PCI_USING; 586 593 printk(PREFIX "%s [%s] enabled at IRQ %d\n", ··· 590 597 591 598 link->irq.initialized = 1; 592 599 593 - return_VALUE(0); 600 + return 0; 594 601 } 595 602 596 603 /* ··· 608 615 struct acpi_device *device = NULL; 609 616 struct acpi_pci_link *link = NULL; 610 617 611 - ACPI_FUNCTION_TRACE("acpi_pci_link_allocate_irq"); 612 618 613 619 result = acpi_bus_get_device(handle, &device); 614 620 if (result) { 615 621 printk(KERN_ERR PREFIX "Invalid link device\n"); 616 - return_VALUE(-1); 622 + return -1; 617 623 } 618 624 619 625 link = (struct acpi_pci_link *)acpi_driver_data(device); 620 626 if (!link) { 621 627 printk(KERN_ERR PREFIX "Invalid link context\n"); 622 - return_VALUE(-1); 628 + return -1; 623 629 } 624 630 625 631 /* TBD: Support multiple index (IRQ) entries per Link Device */ 626 632 if (index) { 627 633 printk(KERN_ERR PREFIX "Invalid index %d\n", index); 628 - return_VALUE(-1); 634 + return -1; 629 635 } 630 636 631 637 mutex_lock(&acpi_link_lock); 632 638 if (acpi_pci_link_allocate(link)) { 633 639 mutex_unlock(&acpi_link_lock); 634 - return_VALUE(-1); 640 + return -1; 635 641 } 636 642 637 643 if (!link->irq.active) { 638 644 mutex_unlock(&acpi_link_lock); 639 645 printk(KERN_ERR PREFIX "Link active IRQ is 0!\n"); 640 - return_VALUE(-1); 646 + return -1; 641 647 } 642 648 link->refcnt++; 643 649 mutex_unlock(&acpi_link_lock); ··· 650 658 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 651 659 "Link %s is referenced\n", 652 660 acpi_device_bid(link->device))); 653 - return_VALUE(link->irq.active); 661 + return (link->irq.active); 654 662 } 655 663 656 664 /* ··· 663 671 struct acpi_pci_link *link = NULL; 664 672 acpi_status result; 665 673 666 - ACPI_FUNCTION_TRACE("acpi_pci_link_free_irq"); 667 674 668 675 result = acpi_bus_get_device(handle, &device); 669 676 if (result) { 670 677 printk(KERN_ERR PREFIX "Invalid link device\n"); 671 - return_VALUE(-1); 678 + return -1; 672 679 } 673 680 674 681 link = (struct acpi_pci_link *)acpi_driver_data(device); 675 682 if (!link) { 676 683 printk(KERN_ERR PREFIX "Invalid link context\n"); 677 - return_VALUE(-1); 684 + return -1; 678 685 } 679 686 680 687 mutex_lock(&acpi_link_lock); 681 688 if (!link->irq.initialized) { 682 689 mutex_unlock(&acpi_link_lock); 683 690 printk(KERN_ERR PREFIX "Link isn't initialized\n"); 684 - return_VALUE(-1); 691 + return -1; 685 692 } 686 693 #ifdef FUTURE_USE 687 694 /* ··· 702 711 acpi_ut_evaluate_object(link->handle, "_DIS", 0, NULL); 703 712 } 704 713 mutex_unlock(&acpi_link_lock); 705 - return_VALUE(link->irq.active); 714 + return (link->irq.active); 706 715 } 707 716 708 717 /* -------------------------------------------------------------------------- ··· 716 725 int i = 0; 717 726 int found = 0; 718 727 719 - ACPI_FUNCTION_TRACE("acpi_pci_link_add"); 720 728 721 729 if (!device) 722 - return_VALUE(-EINVAL); 730 + return -EINVAL; 723 731 724 732 link = kmalloc(sizeof(struct acpi_pci_link), GFP_KERNEL); 725 733 if (!link) 726 - return_VALUE(-ENOMEM); 734 + return -ENOMEM; 727 735 memset(link, 0, sizeof(struct acpi_pci_link)); 728 736 729 737 link->device = device; ··· 771 781 if (result) 772 782 kfree(link); 773 783 774 - return_VALUE(result); 784 + return result; 775 785 } 776 786 777 787 static int acpi_pci_link_resume(struct acpi_pci_link *link) 778 788 { 779 - ACPI_FUNCTION_TRACE("acpi_pci_link_resume"); 780 789 781 790 if (link->refcnt && link->irq.active && link->irq.initialized) 782 - return_VALUE(acpi_pci_link_set(link, link->irq.active)); 791 + return (acpi_pci_link_set(link, link->irq.active)); 783 792 else 784 - return_VALUE(0); 793 + return 0; 785 794 } 786 795 787 796 /* ··· 793 804 struct list_head *node = NULL; 794 805 struct acpi_pci_link *link = NULL; 795 806 796 - ACPI_FUNCTION_TRACE("irqrouter_resume"); 797 807 798 808 /* Make sure SCI is enabled again (Apple firmware bug?) */ 799 809 acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1, ACPI_MTX_DO_NOT_LOCK); ··· 807 819 acpi_pci_link_resume(link); 808 820 } 809 821 acpi_in_resume = 0; 810 - return_VALUE(0); 822 + return 0; 811 823 } 812 824 813 825 static int acpi_pci_link_remove(struct acpi_device *device, int type) 814 826 { 815 827 struct acpi_pci_link *link = NULL; 816 828 817 - ACPI_FUNCTION_TRACE("acpi_pci_link_remove"); 818 829 819 830 if (!device || !acpi_driver_data(device)) 820 - return_VALUE(-EINVAL); 831 + return -EINVAL; 821 832 822 833 link = (struct acpi_pci_link *)acpi_driver_data(device); 823 834 ··· 826 839 827 840 kfree(link); 828 841 829 - return_VALUE(0); 842 + return 0; 830 843 } 831 844 832 845 /* ··· 932 945 { 933 946 int error; 934 947 935 - ACPI_FUNCTION_TRACE("irqrouter_init_sysfs"); 936 948 937 949 if (acpi_disabled || acpi_noirq) 938 - return_VALUE(0); 950 + return 0; 939 951 940 952 error = sysdev_class_register(&irqrouter_sysdev_class); 941 953 if (!error) 942 954 error = sysdev_register(&device_irqrouter); 943 955 944 - return_VALUE(error); 956 + return error; 945 957 } 946 958 947 959 device_initcall(irqrouter_init_sysfs); 948 960 949 961 static int __init acpi_pci_link_init(void) 950 962 { 951 - ACPI_FUNCTION_TRACE("acpi_pci_link_init"); 952 963 953 964 if (acpi_noirq) 954 - return_VALUE(0); 965 + return 0; 955 966 956 967 acpi_link.count = 0; 957 968 INIT_LIST_HEAD(&acpi_link.entries); 958 969 959 970 if (acpi_bus_register_driver(&acpi_pci_link_driver) < 0) 960 - return_VALUE(-ENODEV); 971 + return -ENODEV; 961 972 962 - return_VALUE(0); 973 + return 0; 963 974 } 964 975 965 976 subsys_initcall(acpi_pci_link_init);
+10 -14
drivers/acpi/pci_root.c
··· 160 160 unsigned long value = 0; 161 161 acpi_handle handle = NULL; 162 162 163 - ACPI_FUNCTION_TRACE("acpi_pci_root_add"); 164 163 165 164 if (!device) 166 - return_VALUE(-EINVAL); 165 + return -EINVAL; 167 166 168 167 root = kmalloc(sizeof(struct acpi_pci_root), GFP_KERNEL); 169 168 if (!root) 170 - return_VALUE(-ENOMEM); 169 + return -ENOMEM; 171 170 memset(root, 0, sizeof(struct acpi_pci_root)); 172 171 INIT_LIST_HEAD(&root->node); 173 172 ··· 306 307 kfree(root); 307 308 } 308 309 309 - return_VALUE(result); 310 + return result; 310 311 } 311 312 312 313 static int acpi_pci_root_start(struct acpi_device *device) 313 314 { 314 315 struct acpi_pci_root *root; 315 316 316 - ACPI_FUNCTION_TRACE("acpi_pci_root_start"); 317 317 318 318 list_for_each_entry(root, &acpi_pci_roots, node) { 319 319 if (root->handle == device->handle) { 320 320 pci_bus_add_devices(root->bus); 321 - return_VALUE(0); 321 + return 0; 322 322 } 323 323 } 324 - return_VALUE(-ENODEV); 324 + return -ENODEV; 325 325 } 326 326 327 327 static int acpi_pci_root_remove(struct acpi_device *device, int type) 328 328 { 329 329 struct acpi_pci_root *root = NULL; 330 330 331 - ACPI_FUNCTION_TRACE("acpi_pci_root_remove"); 332 331 333 332 if (!device || !acpi_driver_data(device)) 334 - return_VALUE(-EINVAL); 333 + return -EINVAL; 335 334 336 335 root = (struct acpi_pci_root *)acpi_driver_data(device); 337 336 338 337 kfree(root); 339 338 340 - return_VALUE(0); 339 + return 0; 341 340 } 342 341 343 342 static int __init acpi_pci_root_init(void) 344 343 { 345 - ACPI_FUNCTION_TRACE("acpi_pci_root_init"); 346 344 347 345 if (acpi_pci_disabled) 348 - return_VALUE(0); 346 + return 0; 349 347 350 348 /* DEBUG: 351 349 acpi_dbg_layer = ACPI_PCI_COMPONENT; ··· 350 354 */ 351 355 352 356 if (acpi_bus_register_driver(&acpi_pci_root_driver) < 0) 353 - return_VALUE(-ENODEV); 357 + return -ENODEV; 354 358 355 - return_VALUE(0); 359 + return 0; 356 360 } 357 361 358 362 subsys_initcall(acpi_pci_root_init);
+55 -70
drivers/acpi/power.c
··· 98 98 int result = 0; 99 99 struct acpi_device *device = NULL; 100 100 101 - ACPI_FUNCTION_TRACE("acpi_power_get_context"); 102 101 103 102 if (!resource) 104 - return_VALUE(-ENODEV); 103 + return -ENODEV; 105 104 106 105 result = acpi_bus_get_device(handle, &device); 107 106 if (result) { 108 107 printk(KERN_WARNING PREFIX "Getting context [%p]\n", handle); 109 - return_VALUE(result); 108 + return result; 110 109 } 111 110 112 111 *resource = (struct acpi_power_resource *)acpi_driver_data(device); 113 112 if (!resource) 114 - return_VALUE(-ENODEV); 113 + return -ENODEV; 115 114 116 - return_VALUE(0); 115 + return 0; 117 116 } 118 117 119 118 static int acpi_power_get_state(struct acpi_power_resource *resource) ··· 120 121 acpi_status status = AE_OK; 121 122 unsigned long sta = 0; 122 123 123 - ACPI_FUNCTION_TRACE("acpi_power_get_state"); 124 124 125 125 if (!resource) 126 - return_VALUE(-EINVAL); 126 + return -EINVAL; 127 127 128 128 status = acpi_evaluate_integer(resource->handle, "_STA", NULL, &sta); 129 129 if (ACPI_FAILURE(status)) 130 - return_VALUE(-ENODEV); 130 + return -ENODEV; 131 131 132 132 if (sta & 0x01) 133 133 resource->state = ACPI_POWER_RESOURCE_STATE_ON; ··· 136 138 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] is %s\n", 137 139 resource->name, resource->state ? "on" : "off")); 138 140 139 - return_VALUE(0); 141 + return 0; 140 142 } 141 143 142 144 static int acpi_power_get_list_state(struct acpi_handle_list *list, int *state) ··· 145 147 struct acpi_power_resource *resource = NULL; 146 148 u32 i = 0; 147 149 148 - ACPI_FUNCTION_TRACE("acpi_power_get_list_state"); 149 150 150 151 if (!list || !state) 151 - return_VALUE(-EINVAL); 152 + return -EINVAL; 152 153 153 154 /* The state of the list is 'on' IFF all resources are 'on'. */ 154 155 155 156 for (i = 0; i < list->count; i++) { 156 157 result = acpi_power_get_context(list->handles[i], &resource); 157 158 if (result) 158 - return_VALUE(result); 159 + return result; 159 160 result = acpi_power_get_state(resource); 160 161 if (result) 161 - return_VALUE(result); 162 + return result; 162 163 163 164 *state = resource->state; 164 165 ··· 168 171 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource list is %s\n", 169 172 *state ? "on" : "off")); 170 173 171 - return_VALUE(result); 174 + return result; 172 175 } 173 176 174 177 static int acpi_power_on(acpi_handle handle) ··· 178 181 struct acpi_device *device = NULL; 179 182 struct acpi_power_resource *resource = NULL; 180 183 181 - ACPI_FUNCTION_TRACE("acpi_power_on"); 182 184 183 185 result = acpi_power_get_context(handle, &resource); 184 186 if (result) 185 - return_VALUE(result); 187 + return result; 186 188 187 189 resource->references++; 188 190 ··· 189 193 || (resource->state == ACPI_POWER_RESOURCE_STATE_ON)) { 190 194 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] already on\n", 191 195 resource->name)); 192 - return_VALUE(0); 196 + return 0; 193 197 } 194 198 195 199 status = acpi_evaluate_object(resource->handle, "_ON", NULL, NULL); 196 200 if (ACPI_FAILURE(status)) 197 - return_VALUE(-ENODEV); 201 + return -ENODEV; 198 202 199 203 result = acpi_power_get_state(resource); 200 204 if (result) 201 - return_VALUE(result); 205 + return result; 202 206 if (resource->state != ACPI_POWER_RESOURCE_STATE_ON) 203 - return_VALUE(-ENOEXEC); 207 + return -ENOEXEC; 204 208 205 209 /* Update the power resource's _device_ power state */ 206 210 result = acpi_bus_get_device(resource->handle, &device); 207 211 if (result) 208 - return_VALUE(result); 212 + return result; 209 213 device->power.state = ACPI_STATE_D0; 210 214 211 215 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] turned on\n", 212 216 resource->name)); 213 217 214 - return_VALUE(0); 218 + return 0; 215 219 } 216 220 217 221 static int acpi_power_off_device(acpi_handle handle) ··· 221 225 struct acpi_device *device = NULL; 222 226 struct acpi_power_resource *resource = NULL; 223 227 224 - ACPI_FUNCTION_TRACE("acpi_power_off_device"); 225 228 226 229 result = acpi_power_get_context(handle, &resource); 227 230 if (result) 228 - return_VALUE(result); 231 + return result; 229 232 230 233 if (resource->references) 231 234 resource->references--; ··· 233 238 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 234 239 "Resource [%s] is still in use, dereferencing\n", 235 240 device->pnp.bus_id)); 236 - return_VALUE(0); 241 + return 0; 237 242 } 238 243 239 244 if (resource->state == ACPI_POWER_RESOURCE_STATE_OFF) { 240 245 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] already off\n", 241 246 device->pnp.bus_id)); 242 - return_VALUE(0); 247 + return 0; 243 248 } 244 249 245 250 status = acpi_evaluate_object(resource->handle, "_OFF", NULL, NULL); 246 251 if (ACPI_FAILURE(status)) 247 - return_VALUE(-ENODEV); 252 + return -ENODEV; 248 253 249 254 result = acpi_power_get_state(resource); 250 255 if (result) 251 - return_VALUE(result); 256 + return result; 252 257 if (resource->state != ACPI_POWER_RESOURCE_STATE_OFF) 253 - return_VALUE(-ENOEXEC); 258 + return -ENOEXEC; 254 259 255 260 /* Update the power resource's _device_ power state */ 256 261 result = acpi_bus_get_device(resource->handle, &device); 257 262 if (result) 258 - return_VALUE(result); 263 + return result; 259 264 device->power.state = ACPI_STATE_D3; 260 265 261 266 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] turned off\n", 262 267 resource->name)); 263 268 264 - return_VALUE(0); 269 + return 0; 265 270 } 266 271 267 272 /* ··· 277 282 int i; 278 283 int ret = 0; 279 284 280 - ACPI_FUNCTION_TRACE("acpi_enable_wakeup_device_power"); 281 285 if (!dev || !dev->wakeup.flags.valid) 282 - return_VALUE(-1); 286 + return -1; 283 287 284 288 arg.integer.value = 1; 285 289 /* Open power resource */ ··· 287 293 if (ret) { 288 294 printk(KERN_ERR PREFIX "Transition power state\n"); 289 295 dev->wakeup.flags.valid = 0; 290 - return_VALUE(-1); 296 + return -1; 291 297 } 292 298 } 293 299 ··· 299 305 ret = -1; 300 306 } 301 307 302 - return_VALUE(ret); 308 + return ret; 303 309 } 304 310 305 311 /* ··· 315 321 int i; 316 322 int ret = 0; 317 323 318 - ACPI_FUNCTION_TRACE("acpi_disable_wakeup_device_power"); 319 324 320 325 if (!dev || !dev->wakeup.flags.valid) 321 - return_VALUE(-1); 326 + return -1; 322 327 323 328 arg.integer.value = 0; 324 329 /* Execute PSW */ ··· 325 332 if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { 326 333 printk(KERN_ERR PREFIX "Evaluate _PSW\n"); 327 334 dev->wakeup.flags.valid = 0; 328 - return_VALUE(-1); 335 + return -1; 329 336 } 330 337 331 338 /* Close power resource */ ··· 334 341 if (ret) { 335 342 printk(KERN_ERR PREFIX "Transition power state\n"); 336 343 dev->wakeup.flags.valid = 0; 337 - return_VALUE(-1); 344 + return -1; 338 345 } 339 346 } 340 347 341 - return_VALUE(ret); 348 + return ret; 342 349 } 343 350 344 351 /* -------------------------------------------------------------------------- ··· 352 359 int list_state = 0; 353 360 int i = 0; 354 361 355 - ACPI_FUNCTION_TRACE("acpi_power_get_inferred_state"); 356 362 357 363 if (!device) 358 - return_VALUE(-EINVAL); 364 + return -EINVAL; 359 365 360 366 device->power.state = ACPI_STATE_UNKNOWN; 361 367 ··· 369 377 370 378 result = acpi_power_get_list_state(list, &list_state); 371 379 if (result) 372 - return_VALUE(result); 380 + return result; 373 381 374 382 if (list_state == ACPI_POWER_RESOURCE_STATE_ON) { 375 383 device->power.state = i; 376 - return_VALUE(0); 384 + return 0; 377 385 } 378 386 } 379 387 380 388 device->power.state = ACPI_STATE_D3; 381 389 382 - return_VALUE(0); 390 + return 0; 383 391 } 384 392 385 393 int acpi_power_transition(struct acpi_device *device, int state) ··· 389 397 struct acpi_handle_list *tl = NULL; /* Target Resources */ 390 398 int i = 0; 391 399 392 - ACPI_FUNCTION_TRACE("acpi_power_transition"); 393 400 394 401 if (!device || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3)) 395 - return_VALUE(-EINVAL); 402 + return -EINVAL; 396 403 397 404 if ((device->power.state < ACPI_STATE_D0) 398 405 || (device->power.state > ACPI_STATE_D3)) 399 - return_VALUE(-ENODEV); 406 + return -ENODEV; 400 407 401 408 cl = &device->power.states[device->power.state].resources; 402 409 tl = &device->power.states[state].resources; ··· 435 444 printk(KERN_WARNING PREFIX "Transitioning device [%s] to D%d\n", 436 445 device->pnp.bus_id, state); 437 446 438 - return_VALUE(result); 447 + return result; 439 448 } 440 449 441 450 /* -------------------------------------------------------------------------- ··· 448 457 { 449 458 struct acpi_power_resource *resource = NULL; 450 459 451 - ACPI_FUNCTION_TRACE("acpi_power_seq_show"); 452 460 453 461 resource = (struct acpi_power_resource *)seq->private; 454 462 ··· 474 484 resource->order, resource->references); 475 485 476 486 end: 477 - return_VALUE(0); 487 + return 0; 478 488 } 479 489 480 490 static int acpi_power_open_fs(struct inode *inode, struct file *file) ··· 486 496 { 487 497 struct proc_dir_entry *entry = NULL; 488 498 489 - ACPI_FUNCTION_TRACE("acpi_power_add_fs"); 490 499 491 500 if (!device) 492 - return_VALUE(-EINVAL); 501 + return -EINVAL; 493 502 494 503 if (!acpi_device_dir(device)) { 495 504 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), 496 505 acpi_power_dir); 497 506 if (!acpi_device_dir(device)) 498 - return_VALUE(-ENODEV); 507 + return -ENODEV; 499 508 } 500 509 501 510 /* 'status' [R] */ 502 511 entry = create_proc_entry(ACPI_POWER_FILE_STATUS, 503 512 S_IRUGO, acpi_device_dir(device)); 504 513 if (!entry) 505 - return_VALUE(-EIO); 514 + return -EIO; 506 515 else { 507 516 entry->proc_fops = &acpi_power_fops; 508 517 entry->data = acpi_driver_data(device); 509 518 } 510 519 511 - return_VALUE(0); 520 + return 0; 512 521 } 513 522 514 523 static int acpi_power_remove_fs(struct acpi_device *device) 515 524 { 516 - ACPI_FUNCTION_TRACE("acpi_power_remove_fs"); 517 525 518 526 if (acpi_device_dir(device)) { 519 527 remove_proc_entry(ACPI_POWER_FILE_STATUS, ··· 520 532 acpi_device_dir(device) = NULL; 521 533 } 522 534 523 - return_VALUE(0); 535 + return 0; 524 536 } 525 537 526 538 /* -------------------------------------------------------------------------- ··· 535 547 union acpi_object acpi_object; 536 548 struct acpi_buffer buffer = { sizeof(acpi_object), &acpi_object }; 537 549 538 - ACPI_FUNCTION_TRACE("acpi_power_add"); 539 550 540 551 if (!device) 541 - return_VALUE(-EINVAL); 552 + return -EINVAL; 542 553 543 554 resource = kmalloc(sizeof(struct acpi_power_resource), GFP_KERNEL); 544 555 if (!resource) 545 - return_VALUE(-ENOMEM); 556 + return -ENOMEM; 546 557 memset(resource, 0, sizeof(struct acpi_power_resource)); 547 558 548 559 resource->handle = device->handle; ··· 586 599 if (result) 587 600 kfree(resource); 588 601 589 - return_VALUE(result); 602 + return result; 590 603 } 591 604 592 605 static int acpi_power_remove(struct acpi_device *device, int type) 593 606 { 594 607 struct acpi_power_resource *resource = NULL; 595 608 596 - ACPI_FUNCTION_TRACE("acpi_power_remove"); 597 609 598 610 if (!device || !acpi_driver_data(device)) 599 - return_VALUE(-EINVAL); 611 + return -EINVAL; 600 612 601 613 resource = (struct acpi_power_resource *)acpi_driver_data(device); 602 614 ··· 603 617 604 618 kfree(resource); 605 619 606 - return_VALUE(0); 620 + return 0; 607 621 } 608 622 609 623 static int __init acpi_power_init(void) 610 624 { 611 625 int result = 0; 612 626 613 - ACPI_FUNCTION_TRACE("acpi_power_init"); 614 627 615 628 if (acpi_disabled) 616 - return_VALUE(0); 629 + return 0; 617 630 618 631 INIT_LIST_HEAD(&acpi_power_resource_list); 619 632 620 633 acpi_power_dir = proc_mkdir(ACPI_POWER_CLASS, acpi_root_dir); 621 634 if (!acpi_power_dir) 622 - return_VALUE(-ENODEV); 635 + return -ENODEV; 623 636 624 637 result = acpi_bus_register_driver(&acpi_power_driver); 625 638 if (result < 0) { 626 639 remove_proc_entry(ACPI_POWER_CLASS, acpi_root_dir); 627 - return_VALUE(-ENODEV); 640 + return -ENODEV; 628 641 } 629 642 630 - return_VALUE(0); 643 + return 0; 631 644 } 632 645 633 646 subsys_initcall(acpi_power_init);
+47 -64
drivers/acpi/processor_core.c
··· 122 122 u8 value1 = 0; 123 123 u8 value2 = 0; 124 124 125 - ACPI_FUNCTION_TRACE("acpi_processor_errata_piix4"); 126 125 127 126 if (!dev) 128 - return_VALUE(-EINVAL); 127 + return -EINVAL; 129 128 130 129 /* 131 130 * Note that 'dev' references the PIIX4 ACPI Controller. ··· 217 218 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 218 219 "Type-F DMA livelock erratum (C3 disabled)\n")); 219 220 220 - return_VALUE(0); 221 + return 0; 221 222 } 222 223 223 224 static int acpi_processor_errata(struct acpi_processor *pr) ··· 225 226 int result = 0; 226 227 struct pci_dev *dev = NULL; 227 228 228 - ACPI_FUNCTION_TRACE("acpi_processor_errata"); 229 229 230 230 if (!pr) 231 - return_VALUE(-EINVAL); 231 + return -EINVAL; 232 232 233 233 /* 234 234 * PIIX4 ··· 240 242 pci_dev_put(dev); 241 243 } 242 244 243 - return_VALUE(result); 245 + return result; 244 246 } 245 247 246 248 /* -------------------------------------------------------------------------- ··· 256 258 struct acpi_object_list *pdc_in = pr->pdc; 257 259 acpi_status status = AE_OK; 258 260 259 - ACPI_FUNCTION_TRACE("acpi_processor_set_pdc"); 260 261 261 262 if (!pdc_in) 262 - return_VALUE(status); 263 + return status; 263 264 264 265 status = acpi_evaluate_object(pr->handle, "_PDC", pdc_in, NULL); 265 266 ··· 266 269 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 267 270 "Could not evaluate _PDC, using legacy perf. control...\n")); 268 271 269 - return_VALUE(status); 272 + return status; 270 273 } 271 274 272 275 /* -------------------------------------------------------------------------- ··· 279 282 { 280 283 struct acpi_processor *pr = (struct acpi_processor *)seq->private; 281 284 282 - ACPI_FUNCTION_TRACE("acpi_processor_info_seq_show"); 283 285 284 286 if (!pr) 285 287 goto end; ··· 297 301 pr->flags.limit ? "yes" : "no"); 298 302 299 303 end: 300 - return_VALUE(0); 304 + return 0; 301 305 } 302 306 303 307 static int acpi_processor_info_open_fs(struct inode *inode, struct file *file) ··· 310 314 { 311 315 struct proc_dir_entry *entry = NULL; 312 316 313 - ACPI_FUNCTION_TRACE("acpi_processor_add_fs"); 314 317 315 318 if (!acpi_device_dir(device)) { 316 319 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), 317 320 acpi_processor_dir); 318 321 if (!acpi_device_dir(device)) 319 - return_VALUE(-ENODEV); 322 + return -ENODEV; 320 323 } 321 324 acpi_device_dir(device)->owner = THIS_MODULE; 322 325 ··· 323 328 entry = create_proc_entry(ACPI_PROCESSOR_FILE_INFO, 324 329 S_IRUGO, acpi_device_dir(device)); 325 330 if (!entry) 326 - return_VALUE(-EIO); 331 + return -EIO; 327 332 else { 328 333 entry->proc_fops = &acpi_processor_info_fops; 329 334 entry->data = acpi_driver_data(device); ··· 335 340 S_IFREG | S_IRUGO | S_IWUSR, 336 341 acpi_device_dir(device)); 337 342 if (!entry) 338 - return_VALUE(-EIO); 343 + return -EIO; 339 344 else { 340 345 entry->proc_fops = &acpi_processor_throttling_fops; 341 346 entry->data = acpi_driver_data(device); ··· 347 352 S_IFREG | S_IRUGO | S_IWUSR, 348 353 acpi_device_dir(device)); 349 354 if (!entry) 350 - return_VALUE( -EIO); 355 + return -EIO; 351 356 else { 352 357 entry->proc_fops = &acpi_processor_limit_fops; 353 358 entry->data = acpi_driver_data(device); 354 359 entry->owner = THIS_MODULE; 355 360 } 356 361 357 - return_VALUE(0); 362 + return 0; 358 363 } 359 364 360 365 static int acpi_processor_remove_fs(struct acpi_device *device) 361 366 { 362 - ACPI_FUNCTION_TRACE("acpi_processor_remove_fs"); 363 367 364 368 if (acpi_device_dir(device)) { 365 369 remove_proc_entry(ACPI_PROCESSOR_FILE_INFO, ··· 371 377 acpi_device_dir(device) = NULL; 372 378 } 373 379 374 - return_VALUE(0); 380 + return 0; 375 381 } 376 382 377 383 /* Use the acpiid in MADT to map cpus in case of SMP */ ··· 418 424 int cpu_index; 419 425 static int cpu0_initialized; 420 426 421 - ACPI_FUNCTION_TRACE("acpi_processor_get_info"); 422 427 423 428 if (!pr) 424 - return_VALUE(-EINVAL); 429 + return -EINVAL; 425 430 426 431 if (num_online_cpus() > 1) 427 432 errata.smp = TRUE; ··· 447 454 status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer); 448 455 if (ACPI_FAILURE(status)) { 449 456 printk(KERN_ERR PREFIX "Evaluating processor object\n"); 450 - return_VALUE(-ENODEV); 457 + return -ENODEV; 451 458 } 452 459 453 460 /* ··· 479 486 printk(KERN_ERR PREFIX 480 487 "Getting cpuindex for acpiid 0x%x\n", 481 488 pr->acpi_id); 482 - return_VALUE(-ENODEV); 489 + return -ENODEV; 483 490 } 484 491 } 485 492 ··· 514 521 acpi_processor_get_throttling_info(pr); 515 522 acpi_processor_get_limit_info(pr); 516 523 517 - return_VALUE(0); 524 + return 0; 518 525 } 519 526 520 527 static void *processor_device_array[NR_CPUS]; ··· 525 532 acpi_status status = AE_OK; 526 533 struct acpi_processor *pr; 527 534 528 - ACPI_FUNCTION_TRACE("acpi_processor_start"); 529 535 530 536 pr = acpi_driver_data(device); 531 537 532 538 result = acpi_processor_get_info(pr); 533 539 if (result) { 534 540 /* Processor is physically not present */ 535 - return_VALUE(0); 541 + return 0; 536 542 } 537 543 538 544 BUG_ON((pr->id >= NR_CPUS) || (pr->id < 0)); ··· 545 553 processor_device_array[pr->id] != (void *)device) { 546 554 printk(KERN_WARNING "BIOS reported wrong ACPI id" 547 555 "for the processor\n"); 548 - return_VALUE(-ENODEV); 556 + return -ENODEV; 549 557 } 550 558 processor_device_array[pr->id] = (void *)device; 551 559 ··· 573 581 574 582 end: 575 583 576 - return_VALUE(result); 584 + return result; 577 585 } 578 586 579 587 static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) ··· 581 589 struct acpi_processor *pr = (struct acpi_processor *)data; 582 590 struct acpi_device *device = NULL; 583 591 584 - ACPI_FUNCTION_TRACE("acpi_processor_notify"); 585 592 586 593 if (!pr) 587 - return_VOID; 594 + return; 588 595 589 596 if (acpi_bus_get_device(pr->handle, &device)) 590 - return_VOID; 597 + return; 591 598 592 599 switch (event) { 593 600 case ACPI_PROCESSOR_NOTIFY_PERFORMANCE: ··· 604 613 break; 605 614 } 606 615 607 - return_VOID; 616 + return; 608 617 } 609 618 610 619 static int acpi_processor_add(struct acpi_device *device) 611 620 { 612 621 struct acpi_processor *pr = NULL; 613 622 614 - ACPI_FUNCTION_TRACE("acpi_processor_add"); 615 623 616 624 if (!device) 617 - return_VALUE(-EINVAL); 625 + return -EINVAL; 618 626 619 627 pr = kmalloc(sizeof(struct acpi_processor), GFP_KERNEL); 620 628 if (!pr) 621 - return_VALUE(-ENOMEM); 629 + return -ENOMEM; 622 630 memset(pr, 0, sizeof(struct acpi_processor)); 623 631 624 632 pr->handle = device->handle; ··· 625 635 strcpy(acpi_device_class(device), ACPI_PROCESSOR_CLASS); 626 636 acpi_driver_data(device) = pr; 627 637 628 - return_VALUE(0); 638 + return 0; 629 639 } 630 640 631 641 static int acpi_processor_remove(struct acpi_device *device, int type) ··· 633 643 acpi_status status = AE_OK; 634 644 struct acpi_processor *pr = NULL; 635 645 636 - ACPI_FUNCTION_TRACE("acpi_processor_remove"); 637 646 638 647 if (!device || !acpi_driver_data(device)) 639 - return_VALUE(-EINVAL); 648 + return -EINVAL; 640 649 641 650 pr = (struct acpi_processor *)acpi_driver_data(device); 642 651 643 652 if (pr->id >= NR_CPUS) { 644 653 kfree(pr); 645 - return_VALUE(0); 654 + return 0; 646 655 } 647 656 648 657 if (type == ACPI_BUS_REMOVAL_EJECT) { 649 658 if (acpi_processor_handle_eject(pr)) 650 - return_VALUE(-EINVAL); 659 + return -EINVAL; 651 660 } 652 661 653 662 acpi_processor_power_exit(pr, device); ··· 660 671 661 672 kfree(pr); 662 673 663 - return_VALUE(0); 674 + return 0; 664 675 } 665 676 666 677 #ifdef CONFIG_ACPI_HOTPLUG_CPU ··· 675 686 acpi_status status; 676 687 unsigned long sta = 0; 677 688 678 - ACPI_FUNCTION_TRACE("is_processor_present"); 679 689 680 690 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); 681 691 if (ACPI_FAILURE(status) || !(sta & ACPI_STA_PRESENT)) { 682 692 ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present")); 683 - return_VALUE(0); 693 + return 0; 684 694 } 685 - return_VALUE(1); 695 + return 1; 686 696 } 687 697 688 698 static ··· 691 703 struct acpi_device *pdev; 692 704 struct acpi_processor *pr; 693 705 694 - ACPI_FUNCTION_TRACE("acpi_processor_device_add"); 695 706 696 707 if (acpi_get_parent(handle, &phandle)) { 697 - return_VALUE(-ENODEV); 708 + return -ENODEV; 698 709 } 699 710 700 711 if (acpi_bus_get_device(phandle, &pdev)) { 701 - return_VALUE(-ENODEV); 712 + return -ENODEV; 702 713 } 703 714 704 715 if (acpi_bus_add(device, pdev, handle, ACPI_BUS_TYPE_PROCESSOR)) { 705 - return_VALUE(-ENODEV); 716 + return -ENODEV; 706 717 } 707 718 708 719 acpi_bus_start(*device); 709 720 710 721 pr = acpi_driver_data(*device); 711 722 if (!pr) 712 - return_VALUE(-ENODEV); 723 + return -ENODEV; 713 724 714 725 if ((pr->id >= 0) && (pr->id < NR_CPUS)) { 715 726 kobject_uevent(&(*device)->kobj, KOBJ_ONLINE); 716 727 } 717 - return_VALUE(0); 728 + return 0; 718 729 } 719 730 720 731 static void ··· 723 736 struct acpi_device *device = NULL; 724 737 int result; 725 738 726 - ACPI_FUNCTION_TRACE("acpi_processor_hotplug_notify"); 727 739 728 740 switch (event) { 729 741 case ACPI_NOTIFY_BUS_CHECK: ··· 774 788 if (!pr) { 775 789 printk(KERN_ERR PREFIX 776 790 "Driver data is NULL, dropping EJECT\n"); 777 - return_VOID; 791 + return; 778 792 } 779 793 780 794 if ((pr->id < NR_CPUS) && (cpu_present(pr->id))) ··· 786 800 break; 787 801 } 788 802 789 - return_VOID; 803 + return; 790 804 } 791 805 792 806 static acpi_status ··· 825 839 826 840 static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu) 827 841 { 828 - ACPI_FUNCTION_TRACE("acpi_processor_hotadd_init"); 829 842 830 843 if (!is_processor_present(handle)) { 831 - return_VALUE(AE_ERROR); 844 + return AE_ERROR; 832 845 } 833 846 834 847 if (acpi_map_lsapic(handle, p_cpu)) 835 - return_VALUE(AE_ERROR); 848 + return AE_ERROR; 836 849 837 850 if (arch_register_cpu(*p_cpu)) { 838 851 acpi_unmap_lsapic(*p_cpu); 839 - return_VALUE(AE_ERROR); 852 + return AE_ERROR; 840 853 } 841 854 842 - return_VALUE(AE_OK); 855 + return AE_OK; 843 856 } 844 857 845 858 static int acpi_processor_handle_eject(struct acpi_processor *pr) ··· 895 910 { 896 911 int result = 0; 897 912 898 - ACPI_FUNCTION_TRACE("acpi_processor_init"); 899 913 900 914 memset(&processors, 0, sizeof(processors)); 901 915 memset(&errata, 0, sizeof(errata)); 902 916 903 917 acpi_processor_dir = proc_mkdir(ACPI_PROCESSOR_CLASS, acpi_root_dir); 904 918 if (!acpi_processor_dir) 905 - return_VALUE(0); 919 + return 0; 906 920 acpi_processor_dir->owner = THIS_MODULE; 907 921 908 922 result = acpi_bus_register_driver(&acpi_processor_driver); 909 923 if (result < 0) { 910 924 remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir); 911 - return_VALUE(0); 925 + return 0; 912 926 } 913 927 914 928 acpi_processor_install_hotplug_notify(); ··· 916 932 917 933 acpi_processor_ppc_init(); 918 934 919 - return_VALUE(0); 935 + return 0; 920 936 } 921 937 922 938 static void __exit acpi_processor_exit(void) 923 939 { 924 - ACPI_FUNCTION_TRACE("acpi_processor_exit"); 925 940 926 941 acpi_processor_ppc_exit(); 927 942 ··· 932 949 933 950 remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir); 934 951 935 - return_VOID; 952 + return; 936 953 } 937 954 938 955 module_init(acpi_processor_init);
+30 -41
drivers/acpi/processor_idle.c
··· 517 517 struct acpi_processor_cx *higher = NULL; 518 518 struct acpi_processor_cx *cx; 519 519 520 - ACPI_FUNCTION_TRACE("acpi_processor_set_power_policy"); 521 520 522 521 if (!pr) 523 - return_VALUE(-EINVAL); 522 + return -EINVAL; 524 523 525 524 /* 526 525 * This function sets the default Cx state policy (OS idle handler). ··· 543 544 } 544 545 545 546 if (!state_is_set) 546 - return_VALUE(-ENODEV); 547 + return -ENODEV; 547 548 548 549 /* demotion */ 549 550 for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) { ··· 582 583 higher = cx; 583 584 } 584 585 585 - return_VALUE(0); 586 + return 0; 586 587 } 587 588 588 589 static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) 589 590 { 590 - ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_fadt"); 591 591 592 592 if (!pr) 593 - return_VALUE(-EINVAL); 593 + return -EINVAL; 594 594 595 595 if (!pr->pblk) 596 - return_VALUE(-ENODEV); 596 + return -ENODEV; 597 597 598 598 /* if info is obtained from pblk/fadt, type equals state */ 599 599 pr->power.states[ACPI_STATE_C2].type = ACPI_STATE_C2; ··· 604 606 * an SMP system. 605 607 */ 606 608 if ((num_online_cpus() > 1) && !acpi_fadt.plvl2_up) 607 - return_VALUE(-ENODEV); 609 + return -ENODEV; 608 610 #endif 609 611 610 612 /* determine C2 and C3 address from pblk */ ··· 620 622 pr->power.states[ACPI_STATE_C2].address, 621 623 pr->power.states[ACPI_STATE_C3].address)); 622 624 623 - return_VALUE(0); 625 + return 0; 624 626 } 625 627 626 628 static int acpi_processor_get_power_info_default_c1(struct acpi_processor *pr) 627 629 { 628 - ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_default_c1"); 629 630 630 631 /* Zero initialize all the C-states info. */ 631 632 memset(pr->power.states, 0, sizeof(pr->power.states)); ··· 637 640 pr->power.states[ACPI_STATE_C0].valid = 1; 638 641 pr->power.states[ACPI_STATE_C1].valid = 1; 639 642 640 - return_VALUE(0); 643 + return 0; 641 644 } 642 645 643 646 static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) ··· 649 652 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 650 653 union acpi_object *cst; 651 654 652 - ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_cst"); 653 655 654 656 if (nocst) 655 - return_VALUE(-ENODEV); 657 + return -ENODEV; 656 658 657 659 current_count = 1; 658 660 ··· 663 667 status = acpi_evaluate_object(pr->handle, "_CST", NULL, &buffer); 664 668 if (ACPI_FAILURE(status)) { 665 669 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No _CST, giving up\n")); 666 - return_VALUE(-ENODEV); 670 + return -ENODEV; 667 671 } 668 672 669 673 cst = (union acpi_object *)buffer.pointer; ··· 769 773 end: 770 774 acpi_os_free(buffer.pointer); 771 775 772 - return_VALUE(status); 776 + return status; 773 777 } 774 778 775 779 static void acpi_processor_power_verify_c2(struct acpi_processor_cx *cx) 776 780 { 777 - ACPI_FUNCTION_TRACE("acpi_processor_get_power_verify_c2"); 778 781 779 782 if (!cx->address) 780 - return_VOID; 783 + return; 781 784 782 785 /* 783 786 * C2 latency must be less than or equal to 100 ··· 785 790 else if (cx->latency > ACPI_PROCESSOR_MAX_C2_LATENCY) { 786 791 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 787 792 "latency too large [%d]\n", cx->latency)); 788 - return_VOID; 793 + return; 789 794 } 790 795 791 796 /* ··· 795 800 cx->valid = 1; 796 801 cx->latency_ticks = US_TO_PM_TIMER_TICKS(cx->latency); 797 802 798 - return_VOID; 803 + return; 799 804 } 800 805 801 806 static void acpi_processor_power_verify_c3(struct acpi_processor *pr, ··· 803 808 { 804 809 static int bm_check_flag; 805 810 806 - ACPI_FUNCTION_TRACE("acpi_processor_get_power_verify_c3"); 807 811 808 812 if (!cx->address) 809 - return_VOID; 813 + return; 810 814 811 815 /* 812 816 * C3 latency must be less than or equal to 1000 ··· 814 820 else if (cx->latency > ACPI_PROCESSOR_MAX_C3_LATENCY) { 815 821 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 816 822 "latency too large [%d]\n", cx->latency)); 817 - return_VOID; 823 + return; 818 824 } 819 825 820 826 /* ··· 827 833 else if (errata.piix4.fdma) { 828 834 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 829 835 "C3 not supported on PIIX4 with Type-F DMA\n")); 830 - return_VOID; 836 + return; 831 837 } 832 838 833 839 /* All the logic here assumes flags.bm_check is same across all CPUs */ ··· 844 850 if (!pr->flags.bm_control) { 845 851 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 846 852 "C3 support requires bus mastering control\n")); 847 - return_VOID; 853 + return; 848 854 } 849 855 } else { 850 856 /* ··· 855 861 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 856 862 "Cache invalidation should work properly" 857 863 " for C3 to be enabled on SMP systems\n")); 858 - return_VOID; 864 + return; 859 865 } 860 866 acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 861 867 0, ACPI_MTX_DO_NOT_LOCK); ··· 870 876 cx->valid = 1; 871 877 cx->latency_ticks = US_TO_PM_TIMER_TICKS(cx->latency); 872 878 873 - return_VOID; 879 + return; 874 880 } 875 881 876 882 static int acpi_processor_power_verify(struct acpi_processor *pr) ··· 929 935 unsigned int i; 930 936 int result; 931 937 932 - ACPI_FUNCTION_TRACE("acpi_processor_get_power_info"); 933 938 934 939 /* NOTE: the idle thread may not be running while calling 935 940 * this function */ ··· 951 958 */ 952 959 result = acpi_processor_set_power_policy(pr); 953 960 if (result) 954 - return_VALUE(result); 961 + return result; 955 962 956 963 /* 957 964 * if one state of type C2 or C3 is available, mark this ··· 965 972 } 966 973 } 967 974 968 - return_VALUE(0); 975 + return 0; 969 976 } 970 977 971 978 int acpi_processor_cst_has_changed(struct acpi_processor *pr) 972 979 { 973 980 int result = 0; 974 981 975 - ACPI_FUNCTION_TRACE("acpi_processor_cst_has_changed"); 976 982 977 983 if (!pr) 978 - return_VALUE(-EINVAL); 984 + return -EINVAL; 979 985 980 986 if (nocst) { 981 - return_VALUE(-ENODEV); 987 + return -ENODEV; 982 988 } 983 989 984 990 if (!pr->flags.power_setup_done) 985 - return_VALUE(-ENODEV); 991 + return -ENODEV; 986 992 987 993 /* Fall back to the default idle loop */ 988 994 pm_idle = pm_idle_save; ··· 992 1000 if ((pr->flags.power == 1) && (pr->flags.power_setup_done)) 993 1001 pm_idle = acpi_processor_idle; 994 1002 995 - return_VALUE(result); 1003 + return result; 996 1004 } 997 1005 998 1006 /* proc interface */ ··· 1002 1010 struct acpi_processor *pr = (struct acpi_processor *)seq->private; 1003 1011 unsigned int i; 1004 1012 1005 - ACPI_FUNCTION_TRACE("acpi_processor_power_seq_show"); 1006 1013 1007 1014 if (!pr) 1008 1015 goto end; ··· 1059 1068 } 1060 1069 1061 1070 end: 1062 - return_VALUE(0); 1071 + return 0; 1063 1072 } 1064 1073 1065 1074 static int acpi_processor_power_open_fs(struct inode *inode, struct file *file) ··· 1083 1092 struct proc_dir_entry *entry = NULL; 1084 1093 unsigned int i; 1085 1094 1086 - ACPI_FUNCTION_TRACE("acpi_processor_power_init"); 1087 1095 1088 1096 if (!first_run) { 1089 1097 dmi_check_system(processor_power_dmi_table); ··· 1094 1104 } 1095 1105 1096 1106 if (!pr) 1097 - return_VALUE(-EINVAL); 1107 + return -EINVAL; 1098 1108 1099 1109 if (acpi_fadt.cst_cnt && !nocst) { 1100 1110 status = ··· 1139 1149 1140 1150 pr->flags.power_setup_done = 1; 1141 1151 1142 - return_VALUE(0); 1152 + return 0; 1143 1153 } 1144 1154 1145 1155 int acpi_processor_power_exit(struct acpi_processor *pr, 1146 1156 struct acpi_device *device) 1147 1157 { 1148 - ACPI_FUNCTION_TRACE("acpi_processor_power_exit"); 1149 1158 1150 1159 pr->flags.power_setup_done = 0; 1151 1160 ··· 1164 1175 cpu_idle_wait(); 1165 1176 } 1166 1177 1167 - return_VALUE(0); 1178 + return 0; 1168 1179 }
+38 -49
drivers/acpi/processor_perflib.c
··· 108 108 acpi_status status = 0; 109 109 unsigned long ppc = 0; 110 110 111 - ACPI_FUNCTION_TRACE("acpi_processor_get_platform_limit"); 112 111 113 112 if (!pr) 114 - return_VALUE(-EINVAL); 113 + return -EINVAL; 115 114 116 115 /* 117 116 * _PPC indicates the maximum state currently supported by the platform ··· 123 124 124 125 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { 125 126 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PPC")); 126 - return_VALUE(-ENODEV); 127 + return -ENODEV; 127 128 } 128 129 129 130 pr->performance_platform_limit = (int)ppc; 130 131 131 - return_VALUE(0); 132 + return 0; 132 133 } 133 134 134 135 int acpi_processor_ppc_has_changed(struct acpi_processor *pr) ··· 167 168 union acpi_object *pct = NULL; 168 169 union acpi_object obj = { 0 }; 169 170 170 - ACPI_FUNCTION_TRACE("acpi_processor_get_performance_control"); 171 171 172 172 status = acpi_evaluate_object(pr->handle, "_PCT", NULL, &buffer); 173 173 if (ACPI_FAILURE(status)) { 174 174 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PCT")); 175 - return_VALUE(-ENODEV); 175 + return -ENODEV; 176 176 } 177 177 178 178 pct = (union acpi_object *)buffer.pointer; ··· 218 220 end: 219 221 acpi_os_free(buffer.pointer); 220 222 221 - return_VALUE(result); 223 + return result; 222 224 } 223 225 224 226 static int acpi_processor_get_performance_states(struct acpi_processor *pr) ··· 231 233 union acpi_object *pss = NULL; 232 234 int i; 233 235 234 - ACPI_FUNCTION_TRACE("acpi_processor_get_performance_states"); 235 236 236 237 status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer); 237 238 if (ACPI_FAILURE(status)) { 238 239 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PSS")); 239 - return_VALUE(-ENODEV); 240 + return -ENODEV; 240 241 } 241 242 242 243 pss = (union acpi_object *)buffer.pointer; ··· 296 299 end: 297 300 acpi_os_free(buffer.pointer); 298 301 299 - return_VALUE(result); 302 + return result; 300 303 } 301 304 302 305 static int acpi_processor_get_performance_info(struct acpi_processor *pr) ··· 305 308 acpi_status status = AE_OK; 306 309 acpi_handle handle = NULL; 307 310 308 - ACPI_FUNCTION_TRACE("acpi_processor_get_performance_info"); 309 311 310 312 if (!pr || !pr->performance || !pr->handle) 311 - return_VALUE(-EINVAL); 313 + return -EINVAL; 312 314 313 315 status = acpi_get_handle(pr->handle, "_PCT", &handle); 314 316 if (ACPI_FAILURE(status)) { 315 317 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 316 318 "ACPI-based processor performance control unavailable\n")); 317 - return_VALUE(-ENODEV); 319 + return -ENODEV; 318 320 } 319 321 320 322 result = acpi_processor_get_performance_control(pr); 321 323 if (result) 322 - return_VALUE(result); 324 + return result; 323 325 324 326 result = acpi_processor_get_performance_states(pr); 325 327 if (result) 326 - return_VALUE(result); 328 + return result; 327 329 328 330 result = acpi_processor_get_platform_limit(pr); 329 331 if (result) 330 - return_VALUE(result); 332 + return result; 331 333 332 - return_VALUE(0); 334 + return 0; 333 335 } 334 336 335 337 int acpi_processor_notify_smm(struct module *calling_module) ··· 336 340 acpi_status status; 337 341 static int is_done = 0; 338 342 339 - ACPI_FUNCTION_TRACE("acpi_processor_notify_smm"); 340 343 341 344 if (!(acpi_processor_ppc_status & PPC_REGISTERED)) 342 - return_VALUE(-EBUSY); 345 + return -EBUSY; 343 346 344 347 if (!try_module_get(calling_module)) 345 - return_VALUE(-EINVAL); 348 + return -EINVAL; 346 349 347 350 /* is_done is set to negative if an error occured, 348 351 * and to postitive if _no_ error occured, but SMM ··· 350 355 */ 351 356 if (is_done > 0) { 352 357 module_put(calling_module); 353 - return_VALUE(0); 358 + return 0; 354 359 } else if (is_done < 0) { 355 360 module_put(calling_module); 356 - return_VALUE(is_done); 361 + return is_done; 357 362 } 358 363 359 364 is_done = -EIO; ··· 362 367 if ((!acpi_fadt.smi_cmd) || (!acpi_fadt.pstate_cnt)) { 363 368 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No SMI port or pstate_cnt\n")); 364 369 module_put(calling_module); 365 - return_VALUE(0); 370 + return 0; 366 371 } 367 372 368 373 ACPI_DEBUG_PRINT((ACPI_DB_INFO, ··· 384 389 "smi_cmd [0x%x]", acpi_fadt.pstate_cnt, 385 390 acpi_fadt.smi_cmd)); 386 391 module_put(calling_module); 387 - return_VALUE(status); 392 + return status; 388 393 } 389 394 390 395 /* Success. If there's no _PPC, we need to fear nothing, so ··· 394 399 if (!(acpi_processor_ppc_status & PPC_IN_USE)) 395 400 module_put(calling_module); 396 401 397 - return_VALUE(0); 402 + return 0; 398 403 } 399 404 400 405 EXPORT_SYMBOL(acpi_processor_notify_smm); ··· 415 420 struct acpi_processor *pr = (struct acpi_processor *)seq->private; 416 421 int i; 417 422 418 - ACPI_FUNCTION_TRACE("acpi_processor_perf_seq_show"); 419 423 420 424 if (!pr) 421 425 goto end; ··· 438 444 (u32) pr->performance->states[i].transition_latency); 439 445 440 446 end: 441 - return_VALUE(0); 447 + return 0; 442 448 } 443 449 444 450 static int acpi_processor_perf_open_fs(struct inode *inode, struct file *file) ··· 460 466 unsigned int new_state = 0; 461 467 struct cpufreq_policy policy; 462 468 463 - ACPI_FUNCTION_TRACE("acpi_processor_write_performance"); 464 469 465 470 if (!pr || (count > sizeof(state_string) - 1)) 466 - return_VALUE(-EINVAL); 471 + return -EINVAL; 467 472 468 473 perf = pr->performance; 469 474 if (!perf) 470 - return_VALUE(-EINVAL); 475 + return -EINVAL; 471 476 472 477 if (copy_from_user(state_string, buffer, count)) 473 - return_VALUE(-EFAULT); 478 + return -EFAULT; 474 479 475 480 state_string[count] = '\0'; 476 481 new_state = simple_strtoul(state_string, NULL, 0); 477 482 478 483 if (new_state >= perf->state_count) 479 - return_VALUE(-EINVAL); 484 + return -EINVAL; 480 485 481 486 cpufreq_get_policy(&policy, pr->id); 482 487 ··· 485 492 486 493 result = cpufreq_set_policy(&policy); 487 494 if (result) 488 - return_VALUE(result); 495 + return result; 489 496 490 - return_VALUE(count); 497 + return count; 491 498 } 492 499 493 500 static void acpi_cpufreq_add_file(struct acpi_processor *pr) ··· 495 502 struct proc_dir_entry *entry = NULL; 496 503 struct acpi_device *device = NULL; 497 504 498 - ACPI_FUNCTION_TRACE("acpi_cpufreq_addfile"); 499 505 500 506 if (acpi_bus_get_device(pr->handle, &device)) 501 - return_VOID; 507 + return; 502 508 503 509 /* add file 'performance' [R/W] */ 504 510 entry = create_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE, ··· 509 517 entry->data = acpi_driver_data(device); 510 518 entry->owner = THIS_MODULE; 511 519 } 512 - return_VOID; 520 + return; 513 521 } 514 522 515 523 static void acpi_cpufreq_remove_file(struct acpi_processor *pr) 516 524 { 517 525 struct acpi_device *device = NULL; 518 526 519 - ACPI_FUNCTION_TRACE("acpi_cpufreq_addfile"); 520 527 521 528 if (acpi_bus_get_device(pr->handle, &device)) 522 - return_VOID; 529 + return; 523 530 524 531 /* remove file 'performance' */ 525 532 remove_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE, 526 533 acpi_device_dir(device)); 527 534 528 - return_VOID; 535 + return; 529 536 } 530 537 531 538 #else ··· 768 777 { 769 778 struct acpi_processor *pr; 770 779 771 - ACPI_FUNCTION_TRACE("acpi_processor_register_performance"); 772 780 773 781 if (!(acpi_processor_ppc_status & PPC_REGISTERED)) 774 - return_VALUE(-EINVAL); 782 + return -EINVAL; 775 783 776 784 mutex_lock(&performance_mutex); 777 785 778 786 pr = processors[cpu]; 779 787 if (!pr) { 780 788 mutex_unlock(&performance_mutex); 781 - return_VALUE(-ENODEV); 789 + return -ENODEV; 782 790 } 783 791 784 792 if (pr->performance) { 785 793 mutex_unlock(&performance_mutex); 786 - return_VALUE(-EBUSY); 794 + return -EBUSY; 787 795 } 788 796 789 797 WARN_ON(!performance); ··· 792 802 if (acpi_processor_get_performance_info(pr)) { 793 803 pr->performance = NULL; 794 804 mutex_unlock(&performance_mutex); 795 - return_VALUE(-EIO); 805 + return -EIO; 796 806 } 797 807 798 808 acpi_cpufreq_add_file(pr); 799 809 800 810 mutex_unlock(&performance_mutex); 801 - return_VALUE(0); 811 + return 0; 802 812 } 803 813 804 814 EXPORT_SYMBOL(acpi_processor_register_performance); ··· 809 819 { 810 820 struct acpi_processor *pr; 811 821 812 - ACPI_FUNCTION_TRACE("acpi_processor_unregister_performance"); 813 822 814 823 mutex_lock(&performance_mutex); 815 824 816 825 pr = processors[cpu]; 817 826 if (!pr) { 818 827 mutex_unlock(&performance_mutex); 819 - return_VOID; 828 + return; 820 829 } 821 830 822 831 if (pr->performance) ··· 826 837 827 838 mutex_unlock(&performance_mutex); 828 839 829 - return_VOID; 840 + return; 830 841 } 831 842 832 843 EXPORT_SYMBOL(acpi_processor_unregister_performance);
+16 -21
drivers/acpi/processor_thermal.c
··· 54 54 u16 px = 0; 55 55 u16 tx = 0; 56 56 57 - ACPI_FUNCTION_TRACE("acpi_processor_apply_limit"); 58 57 59 58 if (!pr) 60 - return_VALUE(-EINVAL); 59 + return -EINVAL; 61 60 62 61 if (!pr->flags.limit) 63 - return_VALUE(-ENODEV); 62 + return -ENODEV; 64 63 65 64 if (pr->flags.throttling) { 66 65 if (pr->limit.user.tx > tx) ··· 83 84 if (result) 84 85 printk(KERN_ERR PREFIX "Unable to set limit\n"); 85 86 86 - return_VALUE(result); 87 + return result; 87 88 } 88 89 89 90 #ifdef CONFIG_CPU_FREQ ··· 199 200 struct acpi_device *device = NULL; 200 201 int tx = 0, max_tx_px = 0; 201 202 202 - ACPI_FUNCTION_TRACE("acpi_processor_set_thermal_limit"); 203 203 204 204 if ((type < ACPI_PROCESSOR_LIMIT_NONE) 205 205 || (type > ACPI_PROCESSOR_LIMIT_DECREMENT)) 206 - return_VALUE(-EINVAL); 206 + return -EINVAL; 207 207 208 208 result = acpi_bus_get_device(handle, &device); 209 209 if (result) 210 - return_VALUE(result); 210 + return result; 211 211 212 212 pr = (struct acpi_processor *)acpi_driver_data(device); 213 213 if (!pr) 214 - return_VALUE(-ENODEV); 214 + return -ENODEV; 215 215 216 216 /* Thermal limits are always relative to the current Px/Tx state. */ 217 217 if (pr->flags.throttling) ··· 294 296 } else 295 297 result = 0; 296 298 if (max_tx_px) 297 - return_VALUE(1); 299 + return 1; 298 300 else 299 - return_VALUE(result); 301 + return result; 300 302 } 301 303 302 304 int acpi_processor_get_limit_info(struct acpi_processor *pr) 303 305 { 304 - ACPI_FUNCTION_TRACE("acpi_processor_get_limit_info"); 305 306 306 307 if (!pr) 307 - return_VALUE(-EINVAL); 308 + return -EINVAL; 308 309 309 310 if (pr->flags.throttling) 310 311 pr->flags.limit = 1; 311 312 312 - return_VALUE(0); 313 + return 0; 313 314 } 314 315 315 316 /* /proc interface */ ··· 317 320 { 318 321 struct acpi_processor *pr = (struct acpi_processor *)seq->private; 319 322 320 - ACPI_FUNCTION_TRACE("acpi_processor_limit_seq_show"); 321 323 322 324 if (!pr) 323 325 goto end; ··· 334 338 pr->limit.thermal.px, pr->limit.thermal.tx); 335 339 336 340 end: 337 - return_VALUE(0); 341 + return 0; 338 342 } 339 343 340 344 static int acpi_processor_limit_open_fs(struct inode *inode, struct file *file) ··· 354 358 int px = 0; 355 359 int tx = 0; 356 360 357 - ACPI_FUNCTION_TRACE("acpi_processor_write_limit"); 358 361 359 362 if (!pr || (count > sizeof(limit_string) - 1)) { 360 - return_VALUE(-EINVAL); 363 + return -EINVAL; 361 364 } 362 365 363 366 if (copy_from_user(limit_string, buffer, count)) { 364 - return_VALUE(-EFAULT); 367 + return -EFAULT; 365 368 } 366 369 367 370 limit_string[count] = '\0'; 368 371 369 372 if (sscanf(limit_string, "%d:%d", &px, &tx) != 2) { 370 373 printk(KERN_ERR PREFIX "Invalid data format\n"); 371 - return_VALUE(-EINVAL); 374 + return -EINVAL; 372 375 } 373 376 374 377 if (pr->flags.throttling) { 375 378 if ((tx < 0) || (tx > (pr->throttling.state_count - 1))) { 376 379 printk(KERN_ERR PREFIX "Invalid tx\n"); 377 - return_VALUE(-EINVAL); 380 + return -EINVAL; 378 381 } 379 382 pr->limit.user.tx = tx; 380 383 } 381 384 382 385 result = acpi_processor_apply_limit(pr); 383 386 384 - return_VALUE(count); 387 + return count; 385 388 } 386 389 387 390 struct file_operations acpi_processor_limit_fops = {
+19 -24
drivers/acpi/processor_throttling.c
··· 55 55 u32 duty_mask = 0; 56 56 u32 duty_value = 0; 57 57 58 - ACPI_FUNCTION_TRACE("acpi_processor_get_throttling"); 59 58 60 59 if (!pr) 61 - return_VALUE(-EINVAL); 60 + return -EINVAL; 62 61 63 62 if (!pr->flags.throttling) 64 - return_VALUE(-ENODEV); 63 + return -ENODEV; 65 64 66 65 pr->throttling.state = 0; 67 66 ··· 92 93 "Throttling state is T%d (%d%% throttling applied)\n", 93 94 state, pr->throttling.states[state].performance)); 94 95 95 - return_VALUE(0); 96 + return 0; 96 97 } 97 98 98 99 int acpi_processor_set_throttling(struct acpi_processor *pr, int state) ··· 101 102 u32 duty_mask = 0; 102 103 u32 duty_value = 0; 103 104 104 - ACPI_FUNCTION_TRACE("acpi_processor_set_throttling"); 105 105 106 106 if (!pr) 107 - return_VALUE(-EINVAL); 107 + return -EINVAL; 108 108 109 109 if ((state < 0) || (state > (pr->throttling.state_count - 1))) 110 - return_VALUE(-EINVAL); 110 + return -EINVAL; 111 111 112 112 if (!pr->flags.throttling) 113 - return_VALUE(-ENODEV); 113 + return -ENODEV; 114 114 115 115 if (state == pr->throttling.state) 116 - return_VALUE(0); 116 + return 0; 117 117 118 118 /* 119 119 * Calculate the duty_value and duty_mask. ··· 163 165 (pr->throttling.states[state].performance ? pr-> 164 166 throttling.states[state].performance / 10 : 0))); 165 167 166 - return_VALUE(0); 168 + return 0; 167 169 } 168 170 169 171 int acpi_processor_get_throttling_info(struct acpi_processor *pr) ··· 172 174 int step = 0; 173 175 int i = 0; 174 176 175 - ACPI_FUNCTION_TRACE("acpi_processor_get_throttling_info"); 176 177 177 178 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 178 179 "pblk_address[0x%08x] duty_offset[%d] duty_width[%d]\n", ··· 180 183 pr->throttling.duty_width)); 181 184 182 185 if (!pr) 183 - return_VALUE(-EINVAL); 186 + return -EINVAL; 184 187 185 188 /* TBD: Support ACPI 2.0 objects */ 186 189 187 190 if (!pr->throttling.address) { 188 191 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling register\n")); 189 - return_VALUE(0); 192 + return 0; 190 193 } else if (!pr->throttling.duty_width) { 191 194 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling states\n")); 192 - return_VALUE(0); 195 + return 0; 193 196 } 194 197 /* TBD: Support duty_cycle values that span bit 4. */ 195 198 else if ((pr->throttling.duty_offset + pr->throttling.duty_width) > 4) { 196 199 printk(KERN_WARNING PREFIX "duty_cycle spans bit 4\n"); 197 - return_VALUE(0); 200 + return 0; 198 201 } 199 202 200 203 /* ··· 205 208 if (errata.piix4.throttle) { 206 209 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 207 210 "Throttling not supported on PIIX4 A- or B-step\n")); 208 - return_VALUE(0); 211 + return 0; 209 212 } 210 213 211 214 pr->throttling.state_count = 1 << acpi_fadt.duty_width; ··· 251 254 if (result) 252 255 pr->flags.throttling = 0; 253 256 254 - return_VALUE(result); 257 + return result; 255 258 } 256 259 257 260 /* proc interface */ ··· 263 266 int i = 0; 264 267 int result = 0; 265 268 266 - ACPI_FUNCTION_TRACE("acpi_processor_throttling_seq_show"); 267 269 268 270 if (!pr) 269 271 goto end; ··· 292 296 throttling.states[i].performance / 10 : 0)); 293 297 294 298 end: 295 - return_VALUE(0); 299 + return 0; 296 300 } 297 301 298 302 static int acpi_processor_throttling_open_fs(struct inode *inode, ··· 311 315 struct acpi_processor *pr = (struct acpi_processor *)m->private; 312 316 char state_string[12] = { '\0' }; 313 317 314 - ACPI_FUNCTION_TRACE("acpi_processor_write_throttling"); 315 318 316 319 if (!pr || (count > sizeof(state_string) - 1)) 317 - return_VALUE(-EINVAL); 320 + return -EINVAL; 318 321 319 322 if (copy_from_user(state_string, buffer, count)) 320 - return_VALUE(-EFAULT); 323 + return -EFAULT; 321 324 322 325 state_string[count] = '\0'; 323 326 ··· 324 329 simple_strtoul(state_string, 325 330 NULL, 0)); 326 331 if (result) 327 - return_VALUE(result); 332 + return result; 328 333 329 - return_VALUE(count); 334 + return count; 330 335 } 331 336 332 337 struct file_operations acpi_processor_throttling_fops = {
+30 -47
drivers/acpi/scan.c
··· 162 162 163 163 void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context) 164 164 { 165 - ACPI_FUNCTION_TRACE("acpi_bus_data_handler"); 166 165 167 166 /* TBD */ 168 167 169 - return_VOID; 168 + return; 170 169 } 171 170 172 171 static int acpi_bus_get_power_flags(struct acpi_device *device) ··· 174 175 acpi_handle handle = NULL; 175 176 u32 i = 0; 176 177 177 - ACPI_FUNCTION_TRACE("acpi_bus_get_power_flags"); 178 178 179 179 /* 180 180 * Power Management Flags ··· 226 228 227 229 device->power.state = ACPI_STATE_UNKNOWN; 228 230 229 - return_VALUE(0); 231 + return 0; 230 232 } 231 233 232 234 int acpi_match_ids(struct acpi_device *device, char *ids) ··· 304 306 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 305 307 union acpi_object *package = NULL; 306 308 307 - ACPI_FUNCTION_TRACE("acpi_bus_get_wakeup_flags"); 308 309 309 310 /* _PRW */ 310 311 status = acpi_evaluate_object(device->handle, "_PRW", NULL, &buffer); ··· 329 332 end: 330 333 if (ACPI_FAILURE(status)) 331 334 device->flags.wake_capable = 0; 332 - return_VALUE(0); 335 + return 0; 333 336 } 334 337 335 338 /* -------------------------------------------------------------------------- ··· 485 488 { 486 489 int result = 0; 487 490 488 - ACPI_FUNCTION_TRACE("acpi_bus_driver_init"); 489 491 490 492 if (!device || !driver) 491 - return_VALUE(-EINVAL); 493 + return -EINVAL; 492 494 493 495 if (!driver->ops.add) 494 - return_VALUE(-ENOSYS); 496 + return -ENOSYS; 495 497 496 498 result = driver->ops.add(device); 497 499 if (result) { 498 500 device->driver = NULL; 499 501 acpi_driver_data(device) = NULL; 500 - return_VALUE(result); 502 + return result; 501 503 } 502 504 503 505 device->driver = driver; ··· 508 512 509 513 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 510 514 "Driver successfully bound to device\n")); 511 - return_VALUE(0); 515 + return 0; 512 516 } 513 517 514 518 static int acpi_start_single_object(struct acpi_device *device) ··· 516 520 int result = 0; 517 521 struct acpi_driver *driver; 518 522 519 - ACPI_FUNCTION_TRACE("acpi_start_single_object"); 520 523 521 524 if (!(driver = device->driver)) 522 - return_VALUE(0); 525 + return 0; 523 526 524 527 if (driver->ops.start) { 525 528 result = driver->ops.start(device); ··· 526 531 driver->ops.remove(device, ACPI_BUS_REMOVAL_NORMAL); 527 532 } 528 533 529 - return_VALUE(result); 534 + return result; 530 535 } 531 536 532 537 static void acpi_driver_attach(struct acpi_driver *drv) 533 538 { 534 539 struct list_head *node, *next; 535 540 536 - ACPI_FUNCTION_TRACE("acpi_driver_attach"); 537 541 538 542 spin_lock(&acpi_device_lock); 539 543 list_for_each_safe(node, next, &acpi_device_list) { ··· 561 567 { 562 568 struct list_head *node, *next; 563 569 564 - ACPI_FUNCTION_TRACE("acpi_driver_detach"); 565 570 566 571 spin_lock(&acpi_device_lock); 567 572 list_for_each_safe(node, next, &acpi_device_list) { ··· 590 597 */ 591 598 int acpi_bus_register_driver(struct acpi_driver *driver) 592 599 { 593 - ACPI_FUNCTION_TRACE("acpi_bus_register_driver"); 594 600 595 601 if (acpi_disabled) 596 - return_VALUE(-ENODEV); 602 + return -ENODEV; 597 603 598 604 spin_lock(&acpi_device_lock); 599 605 list_add_tail(&driver->node, &acpi_bus_drivers); 600 606 spin_unlock(&acpi_device_lock); 601 607 acpi_driver_attach(driver); 602 608 603 - return_VALUE(0); 609 + return 0; 604 610 } 605 611 606 612 EXPORT_SYMBOL(acpi_bus_register_driver); ··· 637 645 int result = 0; 638 646 struct list_head *node, *next; 639 647 640 - ACPI_FUNCTION_TRACE("acpi_bus_find_driver"); 641 648 642 649 spin_lock(&acpi_device_lock); 643 650 list_for_each_safe(node, next, &acpi_bus_drivers) { ··· 656 665 spin_unlock(&acpi_device_lock); 657 666 658 667 Done: 659 - return_VALUE(result); 668 + return result; 660 669 } 661 670 662 671 /* -------------------------------------------------------------------------- ··· 668 677 acpi_status status = AE_OK; 669 678 acpi_handle temp = NULL; 670 679 671 - ACPI_FUNCTION_TRACE("acpi_bus_get_flags"); 672 680 673 681 /* Presence of _STA indicates 'dynamic_status' */ 674 682 status = acpi_get_handle(device->handle, "_STA", &temp); ··· 713 723 714 724 /* TBD: Peformance management */ 715 725 716 - return_VALUE(0); 726 + return 0; 717 727 } 718 728 719 729 static void acpi_device_get_busid(struct acpi_device *device, ··· 907 917 int result = 0; 908 918 struct acpi_driver *driver; 909 919 910 - ACPI_FUNCTION_TRACE("acpi_bus_remove"); 911 920 912 921 if (!dev) 913 - return_VALUE(-EINVAL); 922 + return -EINVAL; 914 923 915 924 driver = dev->driver; 916 925 ··· 918 929 if (driver->ops.stop) { 919 930 result = driver->ops.stop(dev, ACPI_BUS_REMOVAL_EJECT); 920 931 if (result) 921 - return_VALUE(result); 932 + return result; 922 933 } 923 934 924 935 result = dev->driver->ops.remove(dev, ACPI_BUS_REMOVAL_EJECT); 925 936 if (result) { 926 - return_VALUE(result); 937 + return result; 927 938 } 928 939 929 940 atomic_dec(&dev->driver->references); ··· 932 943 } 933 944 934 945 if (!rmdevice) 935 - return_VALUE(0); 946 + return 0; 936 947 937 948 if (dev->flags.bus_address) { 938 949 if ((dev->parent) && (dev->parent->ops.unbind)) ··· 941 952 942 953 acpi_device_unregister(dev, ACPI_BUS_REMOVAL_EJECT); 943 954 944 - return_VALUE(0); 955 + return 0; 945 956 } 946 957 947 958 static int ··· 951 962 int result = 0; 952 963 struct acpi_device *device = NULL; 953 964 954 - ACPI_FUNCTION_TRACE("acpi_add_single_object"); 955 965 956 966 if (!child) 957 - return_VALUE(-EINVAL); 967 + return -EINVAL; 958 968 959 969 device = kmalloc(sizeof(struct acpi_device), GFP_KERNEL); 960 970 if (!device) { 961 971 printk(KERN_ERR PREFIX "Memory allocation error\n"); 962 - return_VALUE(-ENOMEM); 972 + return -ENOMEM; 963 973 } 964 974 memset(device, 0, sizeof(struct acpi_device)); 965 975 ··· 1083 1095 kfree(device); 1084 1096 } 1085 1097 1086 - return_VALUE(result); 1098 + return result; 1087 1099 } 1088 1100 1089 1101 static int acpi_bus_scan(struct acpi_device *start, struct acpi_bus_ops *ops) ··· 1096 1108 acpi_object_type type = 0; 1097 1109 u32 level = 1; 1098 1110 1099 - ACPI_FUNCTION_TRACE("acpi_bus_scan"); 1100 1111 1101 1112 if (!start) 1102 - return_VALUE(-EINVAL); 1113 + return -EINVAL; 1103 1114 1104 1115 parent = start; 1105 1116 phandle = start->handle; ··· 1195 1208 } 1196 1209 } 1197 1210 1198 - return_VALUE(0); 1211 + return 0; 1199 1212 } 1200 1213 1201 1214 int ··· 1205 1218 int result; 1206 1219 struct acpi_bus_ops ops; 1207 1220 1208 - ACPI_FUNCTION_TRACE("acpi_bus_add"); 1209 1221 1210 1222 result = acpi_add_single_object(child, parent, handle, type); 1211 1223 if (!result) { ··· 1212 1226 ops.acpi_op_add = 1; 1213 1227 result = acpi_bus_scan(*child, &ops); 1214 1228 } 1215 - return_VALUE(result); 1229 + return result; 1216 1230 } 1217 1231 1218 1232 EXPORT_SYMBOL(acpi_bus_add); ··· 1222 1236 int result; 1223 1237 struct acpi_bus_ops ops; 1224 1238 1225 - ACPI_FUNCTION_TRACE("acpi_bus_start"); 1226 1239 1227 1240 if (!device) 1228 - return_VALUE(-EINVAL); 1241 + return -EINVAL; 1229 1242 1230 1243 result = acpi_start_single_object(device); 1231 1244 if (!result) { ··· 1232 1247 ops.acpi_op_start = 1; 1233 1248 result = acpi_bus_scan(device, &ops); 1234 1249 } 1235 - return_VALUE(result); 1250 + return result; 1236 1251 } 1237 1252 1238 1253 EXPORT_SYMBOL(acpi_bus_start); ··· 1298 1313 int result = 0; 1299 1314 struct acpi_device *device = NULL; 1300 1315 1301 - ACPI_FUNCTION_TRACE("acpi_bus_scan_fixed"); 1302 1316 1303 1317 if (!root) 1304 - return_VALUE(-ENODEV); 1318 + return -ENODEV; 1305 1319 1306 1320 /* 1307 1321 * Enumerate all fixed-feature devices. ··· 1321 1337 result = acpi_start_single_object(device); 1322 1338 } 1323 1339 1324 - return_VALUE(result); 1340 + return result; 1325 1341 } 1326 1342 1327 1343 ··· 1423 1439 int result; 1424 1440 struct acpi_bus_ops ops; 1425 1441 1426 - ACPI_FUNCTION_TRACE("acpi_scan_init"); 1427 1442 1428 1443 if (acpi_disabled) 1429 - return_VALUE(0); 1444 + return 0; 1430 1445 1431 1446 kset_register(&acpi_namespace_kset); 1432 1447 ··· 1470 1487 acpi_device_unregister(acpi_root, ACPI_BUS_REMOVAL_NORMAL); 1471 1488 1472 1489 Done: 1473 - return_VALUE(result); 1490 + return result; 1474 1491 } 1475 1492 1476 1493 subsys_initcall(acpi_scan_init);
+7 -11
drivers/acpi/system.c
··· 47 47 48 48 static int acpi_system_read_info(struct seq_file *seq, void *offset) 49 49 { 50 - ACPI_FUNCTION_TRACE("acpi_system_read_info"); 51 50 52 51 seq_printf(seq, "version: %x\n", ACPI_CA_VERSION); 53 - return_VALUE(0); 52 + return 0; 54 53 } 55 54 56 55 static int acpi_system_info_open_fs(struct inode *inode, struct file *file) ··· 79 80 struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL }; 80 81 ssize_t res; 81 82 82 - ACPI_FUNCTION_TRACE("acpi_system_read_dsdt"); 83 83 84 84 status = acpi_get_table(ACPI_TABLE_ID_DSDT, 1, &dsdt); 85 85 if (ACPI_FAILURE(status)) 86 - return_VALUE(-ENODEV); 86 + return -ENODEV; 87 87 88 88 res = simple_read_from_buffer(buffer, count, ppos, 89 89 dsdt.pointer, dsdt.length); 90 90 acpi_os_free(dsdt.pointer); 91 91 92 - return_VALUE(res); 92 + return res; 93 93 } 94 94 95 95 static ssize_t acpi_system_read_fadt(struct file *, char __user *, size_t, ··· 106 108 struct acpi_buffer fadt = { ACPI_ALLOCATE_BUFFER, NULL }; 107 109 ssize_t res; 108 110 109 - ACPI_FUNCTION_TRACE("acpi_system_read_fadt"); 110 111 111 112 status = acpi_get_table(ACPI_TABLE_ID_FADT, 1, &fadt); 112 113 if (ACPI_FAILURE(status)) 113 - return_VALUE(-ENODEV); 114 + return -ENODEV; 114 115 115 116 res = simple_read_from_buffer(buffer, count, ppos, 116 117 fadt.pointer, fadt.length); 117 118 acpi_os_free(fadt.pointer); 118 119 119 - return_VALUE(res); 120 + return res; 120 121 } 121 122 122 123 static int __init acpi_system_init(void) ··· 124 127 int error = 0; 125 128 char *name; 126 129 127 - ACPI_FUNCTION_TRACE("acpi_system_init"); 128 130 129 131 if (acpi_disabled) 130 - return_VALUE(0); 132 + return 0; 131 133 132 134 /* 'info' [R] */ 133 135 name = ACPI_SYSTEM_FILE_INFO; ··· 154 158 goto Error; 155 159 156 160 Done: 157 - return_VALUE(error); 161 + return error; 158 162 159 163 Error: 160 164 remove_proc_entry(ACPI_SYSTEM_FILE_FADT, acpi_root_dir);
+71 -99
drivers/acpi/thermal.c
··· 222 222 { 223 223 acpi_status status = AE_OK; 224 224 225 - ACPI_FUNCTION_TRACE("acpi_thermal_get_temperature"); 226 225 227 226 if (!tz) 228 - return_VALUE(-EINVAL); 227 + return -EINVAL; 229 228 230 229 tz->last_temperature = tz->temperature; 231 230 232 231 status = 233 232 acpi_evaluate_integer(tz->handle, "_TMP", NULL, &tz->temperature); 234 233 if (ACPI_FAILURE(status)) 235 - return_VALUE(-ENODEV); 234 + return -ENODEV; 236 235 237 236 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Temperature is %lu dK\n", 238 237 tz->temperature)); 239 238 240 - return_VALUE(0); 239 + return 0; 241 240 } 242 241 243 242 static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz) 244 243 { 245 244 acpi_status status = AE_OK; 246 245 247 - ACPI_FUNCTION_TRACE("acpi_thermal_get_polling_frequency"); 248 246 249 247 if (!tz) 250 - return_VALUE(-EINVAL); 248 + return -EINVAL; 251 249 252 250 status = 253 251 acpi_evaluate_integer(tz->handle, "_TZP", NULL, 254 252 &tz->polling_frequency); 255 253 if (ACPI_FAILURE(status)) 256 - return_VALUE(-ENODEV); 254 + return -ENODEV; 257 255 258 256 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Polling frequency is %lu dS\n", 259 257 tz->polling_frequency)); 260 258 261 - return_VALUE(0); 259 + return 0; 262 260 } 263 261 264 262 static int acpi_thermal_set_polling(struct acpi_thermal *tz, int seconds) 265 263 { 266 - ACPI_FUNCTION_TRACE("acpi_thermal_set_polling"); 267 264 268 265 if (!tz) 269 - return_VALUE(-EINVAL); 266 + return -EINVAL; 270 267 271 268 tz->polling_frequency = seconds * 10; /* Convert value to deci-seconds */ 272 269 ··· 271 274 "Polling frequency set to %lu seconds\n", 272 275 tz->polling_frequency)); 273 276 274 - return_VALUE(0); 277 + return 0; 275 278 } 276 279 277 280 static int acpi_thermal_set_cooling_mode(struct acpi_thermal *tz, int mode) ··· 281 284 struct acpi_object_list arg_list = { 1, &arg0 }; 282 285 acpi_handle handle = NULL; 283 286 284 - ACPI_FUNCTION_TRACE("acpi_thermal_set_cooling_mode"); 285 287 286 288 if (!tz) 287 - return_VALUE(-EINVAL); 289 + return -EINVAL; 288 290 289 291 status = acpi_get_handle(tz->handle, "_SCP", &handle); 290 292 if (ACPI_FAILURE(status)) { 291 293 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "_SCP not present\n")); 292 - return_VALUE(-ENODEV); 294 + return -ENODEV; 293 295 } 294 296 295 297 arg0.integer.value = mode; 296 298 297 299 status = acpi_evaluate_object(handle, NULL, &arg_list, NULL); 298 300 if (ACPI_FAILURE(status)) 299 - return_VALUE(-ENODEV); 301 + return -ENODEV; 300 302 301 303 tz->cooling_mode = mode; 302 304 303 305 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Cooling mode [%s]\n", 304 306 mode ? "passive" : "active")); 305 307 306 - return_VALUE(0); 308 + return 0; 307 309 } 308 310 309 311 static int acpi_thermal_get_trip_points(struct acpi_thermal *tz) ··· 310 314 acpi_status status = AE_OK; 311 315 int i = 0; 312 316 313 - ACPI_FUNCTION_TRACE("acpi_thermal_get_trip_points"); 314 317 315 318 if (!tz) 316 - return_VALUE(-EINVAL); 319 + return -EINVAL; 317 320 318 321 /* Critical Shutdown (required) */ 319 322 ··· 321 326 if (ACPI_FAILURE(status)) { 322 327 tz->trips.critical.flags.valid = 0; 323 328 ACPI_EXCEPTION((AE_INFO, status, "No critical threshold")); 324 - return_VALUE(-ENODEV); 329 + return -ENODEV; 325 330 } else { 326 331 tz->trips.critical.flags.valid = 1; 327 332 ACPI_DEBUG_PRINT((ACPI_DB_INFO, ··· 412 417 "Invalid active threshold [%d]", i)); 413 418 } 414 419 415 - return_VALUE(0); 420 + return 0; 416 421 } 417 422 418 423 static int acpi_thermal_get_devices(struct acpi_thermal *tz) 419 424 { 420 425 acpi_status status = AE_OK; 421 426 422 - ACPI_FUNCTION_TRACE("acpi_thermal_get_devices"); 423 427 424 428 if (!tz) 425 - return_VALUE(-EINVAL); 429 + return -EINVAL; 426 430 427 431 status = 428 432 acpi_evaluate_reference(tz->handle, "_TZD", NULL, &tz->devices); 429 433 if (ACPI_FAILURE(status)) 430 - return_VALUE(-ENODEV); 434 + return -ENODEV; 431 435 432 - return_VALUE(0); 436 + return 0; 433 437 } 434 438 435 439 static int acpi_thermal_call_usermode(char *path) ··· 436 442 char *argv[2] = { NULL, NULL }; 437 443 char *envp[3] = { NULL, NULL, NULL }; 438 444 439 - ACPI_FUNCTION_TRACE("acpi_thermal_call_usermode"); 440 445 441 446 if (!path) 442 - return_VALUE(-EINVAL); 447 + return -EINVAL; 443 448 444 449 argv[0] = path; 445 450 ··· 448 455 449 456 call_usermodehelper(argv[0], argv, envp, 0); 450 457 451 - return_VALUE(0); 458 + return 0; 452 459 } 453 460 454 461 static int acpi_thermal_critical(struct acpi_thermal *tz) ··· 456 463 int result = 0; 457 464 struct acpi_device *device = NULL; 458 465 459 - ACPI_FUNCTION_TRACE("acpi_thermal_critical"); 460 466 461 467 if (!tz || !tz->trips.critical.flags.valid) 462 - return_VALUE(-EINVAL); 468 + return -EINVAL; 463 469 464 470 if (tz->temperature >= tz->trips.critical.temperature) { 465 471 printk(KERN_WARNING PREFIX "Critical trip point\n"); ··· 468 476 469 477 result = acpi_bus_get_device(tz->handle, &device); 470 478 if (result) 471 - return_VALUE(result); 479 + return result; 472 480 473 481 printk(KERN_EMERG 474 482 "Critical temperature reached (%ld C), shutting down.\n", ··· 478 486 479 487 acpi_thermal_call_usermode(ACPI_THERMAL_PATH_POWEROFF); 480 488 481 - return_VALUE(0); 489 + return 0; 482 490 } 483 491 484 492 static int acpi_thermal_hot(struct acpi_thermal *tz) ··· 486 494 int result = 0; 487 495 struct acpi_device *device = NULL; 488 496 489 - ACPI_FUNCTION_TRACE("acpi_thermal_hot"); 490 497 491 498 if (!tz || !tz->trips.hot.flags.valid) 492 - return_VALUE(-EINVAL); 499 + return -EINVAL; 493 500 494 501 if (tz->temperature >= tz->trips.hot.temperature) { 495 502 printk(KERN_WARNING PREFIX "Hot trip point\n"); ··· 498 507 499 508 result = acpi_bus_get_device(tz->handle, &device); 500 509 if (result) 501 - return_VALUE(result); 510 + return result; 502 511 503 512 acpi_bus_generate_event(device, ACPI_THERMAL_NOTIFY_HOT, 504 513 tz->trips.hot.flags.enabled); 505 514 506 515 /* TBD: Call user-mode "sleep(S4)" function */ 507 516 508 - return_VALUE(0); 517 + return 0; 509 518 } 510 519 511 520 static void acpi_thermal_passive(struct acpi_thermal *tz) ··· 515 524 int trend = 0; 516 525 int i = 0; 517 526 518 - ACPI_FUNCTION_TRACE("acpi_thermal_passive"); 519 527 520 528 if (!tz || !tz->trips.passive.flags.valid) 521 529 return; ··· 603 613 int j = 0; 604 614 unsigned long maxtemp = 0; 605 615 606 - ACPI_FUNCTION_TRACE("acpi_thermal_active"); 607 616 608 617 if (!tz) 609 618 return; ··· 684 695 int i = 0; 685 696 struct acpi_thermal_state state; 686 697 687 - ACPI_FUNCTION_TRACE("acpi_thermal_check"); 688 698 689 699 if (!tz) { 690 700 printk(KERN_ERR PREFIX "Invalid (NULL) context\n"); 691 - return_VOID; 701 + return; 692 702 } 693 703 694 704 state = tz->state; 695 705 696 706 result = acpi_thermal_get_temperature(tz); 697 707 if (result) 698 - return_VOID; 708 + return; 699 709 700 710 memset(&tz->state, 0, sizeof(tz->state)); 701 711 ··· 783 795 } 784 796 } 785 797 786 - return_VOID; 798 + return; 787 799 } 788 800 789 801 /* -------------------------------------------------------------------------- ··· 796 808 { 797 809 struct acpi_thermal *tz = (struct acpi_thermal *)seq->private; 798 810 799 - ACPI_FUNCTION_TRACE("acpi_thermal_state_seq_show"); 800 811 801 812 if (!tz) 802 813 goto end; ··· 818 831 } 819 832 820 833 end: 821 - return_VALUE(0); 834 + return 0; 822 835 } 823 836 824 837 static int acpi_thermal_state_open_fs(struct inode *inode, struct file *file) ··· 831 844 int result = 0; 832 845 struct acpi_thermal *tz = (struct acpi_thermal *)seq->private; 833 846 834 - ACPI_FUNCTION_TRACE("acpi_thermal_temp_seq_show"); 835 847 836 848 if (!tz) 837 849 goto end; ··· 843 857 KELVIN_TO_CELSIUS(tz->temperature)); 844 858 845 859 end: 846 - return_VALUE(0); 860 + return 0; 847 861 } 848 862 849 863 static int acpi_thermal_temp_open_fs(struct inode *inode, struct file *file) ··· 857 871 int i = 0; 858 872 int j = 0; 859 873 860 - ACPI_FUNCTION_TRACE("acpi_thermal_trip_seq_show"); 861 874 862 875 if (!tz) 863 876 goto end; ··· 896 911 } 897 912 898 913 end: 899 - return_VALUE(0); 914 + return 0; 900 915 } 901 916 902 917 static int acpi_thermal_trip_open_fs(struct inode *inode, struct file *file) ··· 917 932 int *active; 918 933 int i = 0; 919 934 920 - ACPI_FUNCTION_TRACE("acpi_thermal_write_trip_points"); 921 935 922 936 limit_string = kmalloc(ACPI_THERMAL_MAX_LIMIT_STR_LEN, GFP_KERNEL); 923 937 if (!limit_string) 924 - return_VALUE(-ENOMEM); 938 + return -ENOMEM; 925 939 926 940 memset(limit_string, 0, ACPI_THERMAL_MAX_LIMIT_STR_LEN); 927 941 928 942 active = kmalloc(ACPI_THERMAL_MAX_ACTIVE * sizeof(int), GFP_KERNEL); 929 943 if (!active) { 930 944 kfree(limit_string); 931 - return_VALUE(-ENOMEM); 945 + return -ENOMEM; 932 946 } 933 947 934 948 if (!tz || (count > ACPI_THERMAL_MAX_LIMIT_STR_LEN - 1)) { ··· 964 980 end: 965 981 kfree(active); 966 982 kfree(limit_string); 967 - return_VALUE(count); 983 + return count; 968 984 } 969 985 970 986 static int acpi_thermal_cooling_seq_show(struct seq_file *seq, void *offset) 971 987 { 972 988 struct acpi_thermal *tz = (struct acpi_thermal *)seq->private; 973 989 974 - ACPI_FUNCTION_TRACE("acpi_thermal_cooling_seq_show"); 975 990 976 991 if (!tz) 977 992 goto end; ··· 986 1003 tz->cooling_mode ? "passive" : "active"); 987 1004 988 1005 end: 989 - return_VALUE(0); 1006 + return 0; 990 1007 } 991 1008 992 1009 static int acpi_thermal_cooling_open_fs(struct inode *inode, struct file *file) ··· 1005 1022 int result = 0; 1006 1023 char mode_string[12] = { '\0' }; 1007 1024 1008 - ACPI_FUNCTION_TRACE("acpi_thermal_write_cooling_mode"); 1009 1025 1010 1026 if (!tz || (count > sizeof(mode_string) - 1)) 1011 - return_VALUE(-EINVAL); 1027 + return -EINVAL; 1012 1028 1013 1029 if (!tz->flags.cooling_mode) 1014 - return_VALUE(-ENODEV); 1030 + return -ENODEV; 1015 1031 1016 1032 if (copy_from_user(mode_string, buffer, count)) 1017 - return_VALUE(-EFAULT); 1033 + return -EFAULT; 1018 1034 1019 1035 mode_string[count] = '\0'; 1020 1036 ··· 1021 1039 simple_strtoul(mode_string, NULL, 1022 1040 0)); 1023 1041 if (result) 1024 - return_VALUE(result); 1042 + return result; 1025 1043 1026 1044 acpi_thermal_check(tz); 1027 1045 1028 - return_VALUE(count); 1046 + return count; 1029 1047 } 1030 1048 1031 1049 static int acpi_thermal_polling_seq_show(struct seq_file *seq, void *offset) 1032 1050 { 1033 1051 struct acpi_thermal *tz = (struct acpi_thermal *)seq->private; 1034 1052 1035 - ACPI_FUNCTION_TRACE("acpi_thermal_polling_seq_show"); 1036 1053 1037 1054 if (!tz) 1038 1055 goto end; ··· 1045 1064 (tz->polling_frequency / 10)); 1046 1065 1047 1066 end: 1048 - return_VALUE(0); 1067 + return 0; 1049 1068 } 1050 1069 1051 1070 static int acpi_thermal_polling_open_fs(struct inode *inode, struct file *file) ··· 1065 1084 char polling_string[12] = { '\0' }; 1066 1085 int seconds = 0; 1067 1086 1068 - ACPI_FUNCTION_TRACE("acpi_thermal_write_polling"); 1069 1087 1070 1088 if (!tz || (count > sizeof(polling_string) - 1)) 1071 - return_VALUE(-EINVAL); 1089 + return -EINVAL; 1072 1090 1073 1091 if (copy_from_user(polling_string, buffer, count)) 1074 - return_VALUE(-EFAULT); 1092 + return -EFAULT; 1075 1093 1076 1094 polling_string[count] = '\0'; 1077 1095 ··· 1078 1098 1079 1099 result = acpi_thermal_set_polling(tz, seconds); 1080 1100 if (result) 1081 - return_VALUE(result); 1101 + return result; 1082 1102 1083 1103 acpi_thermal_check(tz); 1084 1104 1085 - return_VALUE(count); 1105 + return count; 1086 1106 } 1087 1107 1088 1108 static int acpi_thermal_add_fs(struct acpi_device *device) 1089 1109 { 1090 1110 struct proc_dir_entry *entry = NULL; 1091 1111 1092 - ACPI_FUNCTION_TRACE("acpi_thermal_add_fs"); 1093 1112 1094 1113 if (!acpi_device_dir(device)) { 1095 1114 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), 1096 1115 acpi_thermal_dir); 1097 1116 if (!acpi_device_dir(device)) 1098 - return_VALUE(-ENODEV); 1117 + return -ENODEV; 1099 1118 acpi_device_dir(device)->owner = THIS_MODULE; 1100 1119 } 1101 1120 ··· 1102 1123 entry = create_proc_entry(ACPI_THERMAL_FILE_STATE, 1103 1124 S_IRUGO, acpi_device_dir(device)); 1104 1125 if (!entry) 1105 - return_VALUE(-ENODEV); 1126 + return -ENODEV; 1106 1127 else { 1107 1128 entry->proc_fops = &acpi_thermal_state_fops; 1108 1129 entry->data = acpi_driver_data(device); ··· 1113 1134 entry = create_proc_entry(ACPI_THERMAL_FILE_TEMPERATURE, 1114 1135 S_IRUGO, acpi_device_dir(device)); 1115 1136 if (!entry) 1116 - return_VALUE(-ENODEV); 1137 + return -ENODEV; 1117 1138 else { 1118 1139 entry->proc_fops = &acpi_thermal_temp_fops; 1119 1140 entry->data = acpi_driver_data(device); ··· 1125 1146 S_IFREG | S_IRUGO | S_IWUSR, 1126 1147 acpi_device_dir(device)); 1127 1148 if (!entry) 1128 - return_VALUE(-ENODEV); 1149 + return -ENODEV; 1129 1150 else { 1130 1151 entry->proc_fops = &acpi_thermal_trip_fops; 1131 1152 entry->data = acpi_driver_data(device); ··· 1137 1158 S_IFREG | S_IRUGO | S_IWUSR, 1138 1159 acpi_device_dir(device)); 1139 1160 if (!entry) 1140 - return_VALUE(-ENODEV); 1161 + return -ENODEV; 1141 1162 else { 1142 1163 entry->proc_fops = &acpi_thermal_cooling_fops; 1143 1164 entry->data = acpi_driver_data(device); ··· 1149 1170 S_IFREG | S_IRUGO | S_IWUSR, 1150 1171 acpi_device_dir(device)); 1151 1172 if (!entry) 1152 - return_VALUE(-ENODEV); 1173 + return -ENODEV; 1153 1174 else { 1154 1175 entry->proc_fops = &acpi_thermal_polling_fops; 1155 1176 entry->data = acpi_driver_data(device); 1156 1177 entry->owner = THIS_MODULE; 1157 1178 } 1158 1179 1159 - return_VALUE(0); 1180 + return 0; 1160 1181 } 1161 1182 1162 1183 static int acpi_thermal_remove_fs(struct acpi_device *device) 1163 1184 { 1164 - ACPI_FUNCTION_TRACE("acpi_thermal_remove_fs"); 1165 1185 1166 1186 if (acpi_device_dir(device)) { 1167 1187 remove_proc_entry(ACPI_THERMAL_FILE_POLLING_FREQ, ··· 1177 1199 acpi_device_dir(device) = NULL; 1178 1200 } 1179 1201 1180 - return_VALUE(0); 1202 + return 0; 1181 1203 } 1182 1204 1183 1205 /* -------------------------------------------------------------------------- ··· 1189 1211 struct acpi_thermal *tz = (struct acpi_thermal *)data; 1190 1212 struct acpi_device *device = NULL; 1191 1213 1192 - ACPI_FUNCTION_TRACE("acpi_thermal_notify"); 1193 1214 1194 1215 if (!tz) 1195 - return_VOID; 1216 + return; 1196 1217 1197 1218 if (acpi_bus_get_device(tz->handle, &device)) 1198 - return_VOID; 1219 + return; 1199 1220 1200 1221 switch (event) { 1201 1222 case ACPI_THERMAL_NOTIFY_TEMPERATURE: ··· 1216 1239 break; 1217 1240 } 1218 1241 1219 - return_VOID; 1242 + return; 1220 1243 } 1221 1244 1222 1245 static int acpi_thermal_get_info(struct acpi_thermal *tz) 1223 1246 { 1224 1247 int result = 0; 1225 1248 1226 - ACPI_FUNCTION_TRACE("acpi_thermal_get_info"); 1227 1249 1228 1250 if (!tz) 1229 - return_VALUE(-EINVAL); 1251 + return -EINVAL; 1230 1252 1231 1253 /* Get temperature [_TMP] (required) */ 1232 1254 result = acpi_thermal_get_temperature(tz); 1233 1255 if (result) 1234 - return_VALUE(result); 1256 + return result; 1235 1257 1236 1258 /* Get trip points [_CRT, _PSV, etc.] (required) */ 1237 1259 result = acpi_thermal_get_trip_points(tz); 1238 1260 if (result) 1239 - return_VALUE(result); 1261 + return result; 1240 1262 1241 1263 /* Set the cooling mode [_SCP] to active cooling (default) */ 1242 1264 result = acpi_thermal_set_cooling_mode(tz, ACPI_THERMAL_MODE_ACTIVE); ··· 1275 1299 if (!result) 1276 1300 tz->flags.devices = 1; 1277 1301 1278 - return_VALUE(0); 1302 + return 0; 1279 1303 } 1280 1304 1281 1305 static int acpi_thermal_add(struct acpi_device *device) ··· 1284 1308 acpi_status status = AE_OK; 1285 1309 struct acpi_thermal *tz = NULL; 1286 1310 1287 - ACPI_FUNCTION_TRACE("acpi_thermal_add"); 1288 1311 1289 1312 if (!device) 1290 - return_VALUE(-EINVAL); 1313 + return -EINVAL; 1291 1314 1292 1315 tz = kmalloc(sizeof(struct acpi_thermal), GFP_KERNEL); 1293 1316 if (!tz) 1294 - return_VALUE(-ENOMEM); 1317 + return -ENOMEM; 1295 1318 memset(tz, 0, sizeof(struct acpi_thermal)); 1296 1319 1297 1320 tz->handle = device->handle; ··· 1329 1354 kfree(tz); 1330 1355 } 1331 1356 1332 - return_VALUE(result); 1357 + return result; 1333 1358 } 1334 1359 1335 1360 static int acpi_thermal_remove(struct acpi_device *device, int type) ··· 1337 1362 acpi_status status = AE_OK; 1338 1363 struct acpi_thermal *tz = NULL; 1339 1364 1340 - ACPI_FUNCTION_TRACE("acpi_thermal_remove"); 1341 1365 1342 1366 if (!device || !acpi_driver_data(device)) 1343 - return_VALUE(-EINVAL); 1367 + return -EINVAL; 1344 1368 1345 1369 tz = (struct acpi_thermal *)acpi_driver_data(device); 1346 1370 ··· 1370 1396 acpi_thermal_remove_fs(device); 1371 1397 1372 1398 kfree(tz); 1373 - return_VALUE(0); 1399 + return 0; 1374 1400 } 1375 1401 1376 1402 static int acpi_thermal_resume(struct acpi_device *device, int state) ··· 1378 1404 struct acpi_thermal *tz = NULL; 1379 1405 1380 1406 if (!device || !acpi_driver_data(device)) 1381 - return_VALUE(-EINVAL); 1407 + return -EINVAL; 1382 1408 1383 1409 tz = (struct acpi_thermal *)acpi_driver_data(device); 1384 1410 ··· 1391 1417 { 1392 1418 int result = 0; 1393 1419 1394 - ACPI_FUNCTION_TRACE("acpi_thermal_init"); 1395 1420 1396 1421 acpi_thermal_dir = proc_mkdir(ACPI_THERMAL_CLASS, acpi_root_dir); 1397 1422 if (!acpi_thermal_dir) 1398 - return_VALUE(-ENODEV); 1423 + return -ENODEV; 1399 1424 acpi_thermal_dir->owner = THIS_MODULE; 1400 1425 1401 1426 result = acpi_bus_register_driver(&acpi_thermal_driver); 1402 1427 if (result < 0) { 1403 1428 remove_proc_entry(ACPI_THERMAL_CLASS, acpi_root_dir); 1404 - return_VALUE(-ENODEV); 1429 + return -ENODEV; 1405 1430 } 1406 1431 1407 - return_VALUE(0); 1432 + return 0; 1408 1433 } 1409 1434 1410 1435 static void __exit acpi_thermal_exit(void) 1411 1436 { 1412 - ACPI_FUNCTION_TRACE("acpi_thermal_exit"); 1413 1437 1414 1438 acpi_bus_unregister_driver(&acpi_thermal_driver); 1415 1439 1416 1440 remove_proc_entry(ACPI_THERMAL_CLASS, acpi_root_dir); 1417 1441 1418 - return_VOID; 1442 + return; 1419 1443 } 1420 1444 1421 1445 module_init(acpi_thermal_init);
+25 -29
drivers/acpi/utils.c
··· 58 58 u8 *head = NULL; 59 59 u8 *tail = NULL; 60 60 61 - ACPI_FUNCTION_TRACE("acpi_extract_package"); 62 61 63 62 if (!package || (package->type != ACPI_TYPE_PACKAGE) 64 63 || (package->package.count < 1)) { 65 64 printk(KERN_WARNING PREFIX "Invalid package argument\n"); 66 - return_ACPI_STATUS(AE_BAD_PARAMETER); 65 + return AE_BAD_PARAMETER; 67 66 } 68 67 69 68 if (!format || !format->pointer || (format->length < 1)) { 70 69 printk(KERN_WARNING PREFIX "Invalid format argument\n"); 71 - return_ACPI_STATUS(AE_BAD_PARAMETER); 70 + return AE_BAD_PARAMETER; 72 71 } 73 72 74 73 if (!buffer) { 75 74 printk(KERN_WARNING PREFIX "Invalid buffer argument\n"); 76 - return_ACPI_STATUS(AE_BAD_PARAMETER); 75 + return AE_BAD_PARAMETER; 77 76 } 78 77 79 78 format_count = (format->length / sizeof(char)) - 1; ··· 80 81 printk(KERN_WARNING PREFIX "Format specifies more objects [%d]" 81 82 " than exist in package [%d].\n", 82 83 format_count, package->package.count); 83 - return_ACPI_STATUS(AE_BAD_DATA); 84 + return AE_BAD_DATA; 84 85 } 85 86 86 87 format_string = (char *)format->pointer; ··· 93 94 union acpi_object *element = &(package->package.elements[i]); 94 95 95 96 if (!element) { 96 - return_ACPI_STATUS(AE_BAD_DATA); 97 + return AE_BAD_DATA; 97 98 } 98 99 99 100 switch (element->type) { ··· 115 116 " [%d]: got number, expecing" 116 117 " [%c]\n", 117 118 i, format_string[i]); 118 - return_ACPI_STATUS(AE_BAD_DATA); 119 + return AE_BAD_DATA; 119 120 break; 120 121 } 121 122 break; ··· 141 142 " [%d] got string/buffer," 142 143 " expecing [%c]\n", 143 144 i, format_string[i]); 144 - return_ACPI_STATUS(AE_BAD_DATA); 145 + return AE_BAD_DATA; 145 146 break; 146 147 } 147 148 break; ··· 152 153 "Found unsupported element at index=%d\n", 153 154 i)); 154 155 /* TBD: handle nested packages... */ 155 - return_ACPI_STATUS(AE_SUPPORT); 156 + return AE_SUPPORT; 156 157 break; 157 158 } 158 159 } ··· 162 163 */ 163 164 if (buffer->length < size_required) { 164 165 buffer->length = size_required; 165 - return_ACPI_STATUS(AE_BUFFER_OVERFLOW); 166 + return AE_BUFFER_OVERFLOW; 166 167 } else if (buffer->length != size_required || !buffer->pointer) { 167 - return_ACPI_STATUS(AE_BAD_PARAMETER); 168 + return AE_BAD_PARAMETER; 168 169 } 169 170 170 171 head = buffer->pointer; ··· 179 180 union acpi_object *element = &(package->package.elements[i]); 180 181 181 182 if (!element) { 182 - return_ACPI_STATUS(AE_BAD_DATA); 183 + return AE_BAD_DATA; 183 184 } 184 185 185 186 switch (element->type) { ··· 244 245 } 245 246 } 246 247 247 - return_ACPI_STATUS(AE_OK); 248 + return AE_OK; 248 249 } 249 250 250 251 EXPORT_SYMBOL(acpi_extract_package); ··· 258 259 union acpi_object *element; 259 260 struct acpi_buffer buffer = { 0, NULL }; 260 261 261 - ACPI_FUNCTION_TRACE("acpi_evaluate_integer"); 262 262 263 263 if (!data) 264 - return_ACPI_STATUS(AE_BAD_PARAMETER); 264 + return AE_BAD_PARAMETER; 265 265 266 266 element = kmalloc(sizeof(union acpi_object), GFP_KERNEL); 267 267 if (!element) 268 - return_ACPI_STATUS(AE_NO_MEMORY); 268 + return AE_NO_MEMORY; 269 269 270 270 memset(element, 0, sizeof(union acpi_object)); 271 271 buffer.length = sizeof(union acpi_object); ··· 273 275 if (ACPI_FAILURE(status)) { 274 276 acpi_util_eval_error(handle, pathname, status); 275 277 kfree(element); 276 - return_ACPI_STATUS(status); 278 + return status; 277 279 } 278 280 279 281 if (element->type != ACPI_TYPE_INTEGER) { 280 282 acpi_util_eval_error(handle, pathname, AE_BAD_DATA); 281 283 kfree(element); 282 - return_ACPI_STATUS(AE_BAD_DATA); 284 + return AE_BAD_DATA; 283 285 } 284 286 285 287 *data = element->integer.value; ··· 287 289 288 290 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%lu]\n", *data)); 289 291 290 - return_ACPI_STATUS(AE_OK); 292 + return AE_OK; 291 293 } 292 294 293 295 EXPORT_SYMBOL(acpi_evaluate_integer); ··· 302 304 acpi_object *element = NULL; 303 305 acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 304 306 305 - ACPI_FUNCTION_TRACE("acpi_evaluate_string"); 306 307 307 308 if (!data) 308 - return_ACPI_STATUS(AE_BAD_PARAMETER); 309 + return AE_BAD_PARAMETER; 309 310 310 311 status = acpi_evaluate_object(handle, pathname, arguments, &buffer); 311 312 if (ACPI_FAILURE(status)) { 312 313 acpi_util_eval_error(handle, pathname, status); 313 - return_ACPI_STATUS(status); 314 + return status; 314 315 } 315 316 316 317 element = (acpi_object *) buffer.pointer; ··· 318 321 || (element->type != ACPI_TYPE_BUFFER) 319 322 || !element->string.length) { 320 323 acpi_util_eval_error(handle, pathname, AE_BAD_DATA); 321 - return_ACPI_STATUS(AE_BAD_DATA); 324 + return AE_BAD_DATA; 322 325 } 323 326 324 327 *data = kmalloc(element->string.length + 1, GFP_KERNEL); 325 328 if (!data) { 326 329 printk(KERN_ERR PREFIX "Memory allocation\n"); 327 - return_VALUE(-ENOMEM); 330 + return -ENOMEM; 328 331 } 329 332 memset(*data, 0, element->string.length + 1); 330 333 ··· 334 337 335 338 acpi_os_free(buffer.pointer); 336 339 337 - return_ACPI_STATUS(AE_OK); 340 + return AE_OK; 338 341 } 339 342 #endif 340 343 ··· 350 353 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 351 354 u32 i = 0; 352 355 353 - ACPI_FUNCTION_TRACE("acpi_evaluate_reference"); 354 356 355 357 if (!list) { 356 - return_ACPI_STATUS(AE_BAD_PARAMETER); 358 + return AE_BAD_PARAMETER; 357 359 } 358 360 359 361 /* Evaluate object. */ ··· 386 390 } 387 391 388 392 if (package->package.count > ACPI_MAX_HANDLES) { 389 - return_ACPI_STATUS(AE_NO_MEMORY); 393 + return AE_NO_MEMORY; 390 394 } 391 395 list->count = package->package.count; 392 396 ··· 420 424 421 425 acpi_os_free(buffer.pointer); 422 426 423 - return_ACPI_STATUS(status); 427 + return status; 424 428 } 425 429 426 430 EXPORT_SYMBOL(acpi_evaluate_reference);
+97 -141
drivers/acpi/video.c
··· 272 272 acpi_video_device_query(struct acpi_video_device *device, unsigned long *state) 273 273 { 274 274 int status; 275 - ACPI_FUNCTION_TRACE("acpi_video_device_query"); 276 275 status = acpi_evaluate_integer(device->handle, "_DGS", NULL, state); 277 276 278 - return_VALUE(status); 277 + return status; 279 278 } 280 279 281 280 static int ··· 283 284 { 284 285 int status; 285 286 286 - ACPI_FUNCTION_TRACE("acpi_video_device_get_state"); 287 287 288 288 status = acpi_evaluate_integer(device->handle, "_DCS", NULL, state); 289 289 290 - return_VALUE(status); 290 + return status; 291 291 } 292 292 293 293 static int ··· 297 299 struct acpi_object_list args = { 1, &arg0 }; 298 300 unsigned long ret; 299 301 300 - ACPI_FUNCTION_TRACE("acpi_video_device_set_state"); 301 302 302 303 arg0.integer.value = state; 303 304 status = acpi_evaluate_integer(device->handle, "_DSS", &args, &ret); 304 305 305 - return_VALUE(status); 306 + return status; 306 307 } 307 308 308 309 static int ··· 312 315 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 313 316 union acpi_object *obj; 314 317 315 - ACPI_FUNCTION_TRACE("acpi_video_device_lcd_query_levels"); 316 318 317 319 *levels = NULL; 318 320 319 321 status = acpi_evaluate_object(device->handle, "_BCL", NULL, &buffer); 320 322 if (!ACPI_SUCCESS(status)) 321 - return_VALUE(status); 323 + return status; 322 324 obj = (union acpi_object *)buffer.pointer; 323 325 if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) { 324 326 printk(KERN_ERR PREFIX "Invalid _BCL data\n"); ··· 327 331 328 332 *levels = obj; 329 333 330 - return_VALUE(0); 334 + return 0; 331 335 332 336 err: 333 337 kfree(buffer.pointer); 334 338 335 - return_VALUE(status); 339 + return status; 336 340 } 337 341 338 342 static int ··· 342 346 union acpi_object arg0 = { ACPI_TYPE_INTEGER }; 343 347 struct acpi_object_list args = { 1, &arg0 }; 344 348 345 - ACPI_FUNCTION_TRACE("acpi_video_device_lcd_set_level"); 346 349 347 350 arg0.integer.value = level; 348 351 status = acpi_evaluate_object(device->handle, "_BCM", &args, NULL); 349 352 350 353 printk(KERN_DEBUG "set_level status: %x\n", status); 351 - return_VALUE(status); 354 + return status; 352 355 } 353 356 354 357 static int ··· 355 360 unsigned long *level) 356 361 { 357 362 int status; 358 - ACPI_FUNCTION_TRACE("acpi_video_device_lcd_get_level_current"); 359 363 360 364 status = acpi_evaluate_integer(device->handle, "_BQC", NULL, level); 361 365 362 - return_VALUE(status); 366 + return status; 363 367 } 364 368 365 369 static int ··· 371 377 union acpi_object arg0 = { ACPI_TYPE_INTEGER }; 372 378 struct acpi_object_list args = { 1, &arg0 }; 373 379 374 - ACPI_FUNCTION_TRACE("acpi_video_device_get_EDID"); 375 380 376 381 *edid = NULL; 377 382 378 383 if (!device) 379 - return_VALUE(-ENODEV); 384 + return -ENODEV; 380 385 if (length == 128) 381 386 arg0.integer.value = 1; 382 387 else if (length == 256) 383 388 arg0.integer.value = 2; 384 389 else 385 - return_VALUE(-EINVAL); 390 + return -EINVAL; 386 391 387 392 status = acpi_evaluate_object(device->handle, "_DDC", &args, &buffer); 388 393 if (ACPI_FAILURE(status)) 389 - return_VALUE(-ENODEV); 394 + return -ENODEV; 390 395 391 396 obj = (union acpi_object *)buffer.pointer; 392 397 ··· 397 404 kfree(obj); 398 405 } 399 406 400 - return_VALUE(status); 407 + return status; 401 408 } 402 409 403 410 /* bus */ ··· 410 417 union acpi_object arg0 = { ACPI_TYPE_INTEGER }; 411 418 struct acpi_object_list args = { 1, &arg0 }; 412 419 413 - ACPI_FUNCTION_TRACE("acpi_video_bus_set_POST"); 414 420 415 421 arg0.integer.value = option; 416 422 ··· 417 425 if (ACPI_SUCCESS(status)) 418 426 status = tmp ? (-EINVAL) : (AE_OK); 419 427 420 - return_VALUE(status); 428 + return status; 421 429 } 422 430 423 431 static int ··· 425 433 { 426 434 int status; 427 435 428 - ACPI_FUNCTION_TRACE("acpi_video_bus_get_POST"); 429 436 430 437 status = acpi_evaluate_integer(video->handle, "_GPD", NULL, id); 431 438 432 - return_VALUE(status); 439 + return status; 433 440 } 434 441 435 442 static int ··· 436 445 unsigned long *options) 437 446 { 438 447 int status; 439 - ACPI_FUNCTION_TRACE("acpi_video_bus_POST_options"); 440 448 441 449 status = acpi_evaluate_integer(video->handle, "_VPO", NULL, options); 442 450 *options &= 3; 443 451 444 - return_VALUE(status); 452 + return status; 445 453 } 446 454 447 455 /* ··· 471 481 union acpi_object arg0 = { ACPI_TYPE_INTEGER }; 472 482 struct acpi_object_list args = { 1, &arg0 }; 473 483 474 - ACPI_FUNCTION_TRACE("acpi_video_bus_DOS"); 475 484 476 485 if (bios_flag < 0 || bios_flag > 3 || lcd_flag < 0 || lcd_flag > 1) { 477 486 status = -1; ··· 481 492 acpi_evaluate_object(video->handle, "_DOS", &args, NULL); 482 493 483 494 Failed: 484 - return_VALUE(status); 495 + return status; 485 496 } 486 497 487 498 /* ··· 503 514 union acpi_object *obj = NULL; 504 515 struct acpi_video_device_brightness *br = NULL; 505 516 506 - ACPI_FUNCTION_TRACE("acpi_video_device_find_cap"); 507 517 508 518 memset(&device->cap, 0, 4); 509 519 ··· 570 582 571 583 kfree(obj); 572 584 573 - return_VOID; 585 + return; 574 586 } 575 587 576 588 /* ··· 617 629 { 618 630 acpi_status status = -ENOENT; 619 631 620 - ACPI_FUNCTION_TRACE("acpi_video_bus_check"); 621 632 622 633 if (!video) 623 - return_VALUE(-EINVAL); 634 + return -EINVAL; 624 635 625 636 /* Since there is no HID, CID and so on for VGA driver, we have 626 637 * to check well known required nodes. ··· 643 656 status = 0; 644 657 } 645 658 646 - return_VALUE(status); 659 + return status; 647 660 } 648 661 649 662 /* -------------------------------------------------------------------------- ··· 659 672 struct acpi_video_device *dev = 660 673 (struct acpi_video_device *)seq->private; 661 674 662 - ACPI_FUNCTION_TRACE("acpi_video_device_info_seq_show"); 663 675 664 676 if (!dev) 665 677 goto end; ··· 677 691 seq_printf(seq, "known by bios: %s\n", dev->flags.bios ? "yes" : "no"); 678 692 679 693 end: 680 - return_VALUE(0); 694 + return 0; 681 695 } 682 696 683 697 static int ··· 694 708 (struct acpi_video_device *)seq->private; 695 709 unsigned long state; 696 710 697 - ACPI_FUNCTION_TRACE("acpi_video_device_state_seq_show"); 698 711 699 712 if (!dev) 700 713 goto end; ··· 713 728 seq_printf(seq, "<not supported>\n"); 714 729 715 730 end: 716 - return_VALUE(0); 731 + return 0; 717 732 } 718 733 719 734 static int ··· 734 749 char str[12] = { 0 }; 735 750 u32 state = 0; 736 751 737 - ACPI_FUNCTION_TRACE("acpi_video_device_write_state"); 738 752 739 753 if (!dev || count + 1 > sizeof str) 740 - return_VALUE(-EINVAL); 754 + return -EINVAL; 741 755 742 756 if (copy_from_user(str, buffer, count)) 743 - return_VALUE(-EFAULT); 757 + return -EFAULT; 744 758 745 759 str[count] = 0; 746 760 state = simple_strtoul(str, NULL, 0); ··· 748 764 status = acpi_video_device_set_state(dev, state); 749 765 750 766 if (status) 751 - return_VALUE(-EFAULT); 767 + return -EFAULT; 752 768 753 - return_VALUE(count); 769 + return count; 754 770 } 755 771 756 772 static int ··· 760 776 (struct acpi_video_device *)seq->private; 761 777 int i; 762 778 763 - ACPI_FUNCTION_TRACE("acpi_video_device_brightness_seq_show"); 764 779 765 780 if (!dev || !dev->brightness) { 766 781 seq_printf(seq, "<not supported>\n"); 767 - return_VALUE(0); 782 + return 0; 768 783 } 769 784 770 785 seq_printf(seq, "levels: "); ··· 771 788 seq_printf(seq, " %d", dev->brightness->levels[i]); 772 789 seq_printf(seq, "\ncurrent: %d\n", dev->brightness->curr); 773 790 774 - return_VALUE(0); 791 + return 0; 775 792 } 776 793 777 794 static int ··· 792 809 unsigned int level = 0; 793 810 int i; 794 811 795 - ACPI_FUNCTION_TRACE("acpi_video_device_write_brightness"); 796 812 797 813 if (!dev || !dev->brightness || count + 1 > sizeof str) 798 - return_VALUE(-EINVAL); 814 + return -EINVAL; 799 815 800 816 if (copy_from_user(str, buffer, count)) 801 - return_VALUE(-EFAULT); 817 + return -EFAULT; 802 818 803 819 str[count] = 0; 804 820 level = simple_strtoul(str, NULL, 0); 805 821 806 822 if (level > 100) 807 - return_VALUE(-EFAULT); 823 + return -EFAULT; 808 824 809 825 /* validate though the list of available levels */ 810 826 for (i = 0; i < dev->brightness->count; i++) ··· 814 832 break; 815 833 } 816 834 817 - return_VALUE(count); 835 + return count; 818 836 } 819 837 820 838 static int acpi_video_device_EDID_seq_show(struct seq_file *seq, void *offset) ··· 825 843 int i; 826 844 union acpi_object *edid = NULL; 827 845 828 - ACPI_FUNCTION_TRACE("acpi_video_device_EDID_seq_show"); 829 846 830 847 if (!dev) 831 848 goto out; ··· 849 868 else 850 869 kfree(edid); 851 870 852 - return_VALUE(0); 871 + return 0; 853 872 } 854 873 855 874 static int ··· 864 883 struct proc_dir_entry *entry = NULL; 865 884 struct acpi_video_device *vid_dev; 866 885 867 - ACPI_FUNCTION_TRACE("acpi_video_device_add_fs"); 868 886 869 887 if (!device) 870 - return_VALUE(-ENODEV); 888 + return -ENODEV; 871 889 872 890 vid_dev = (struct acpi_video_device *)acpi_driver_data(device); 873 891 if (!vid_dev) 874 - return_VALUE(-ENODEV); 892 + return -ENODEV; 875 893 876 894 if (!acpi_device_dir(device)) { 877 895 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), 878 896 vid_dev->video->dir); 879 897 if (!acpi_device_dir(device)) 880 - return_VALUE(-ENODEV); 898 + return -ENODEV; 881 899 acpi_device_dir(device)->owner = THIS_MODULE; 882 900 } 883 901 884 902 /* 'info' [R] */ 885 903 entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device)); 886 904 if (!entry) 887 - return_VALUE(-ENODEV); 905 + return -ENODEV; 888 906 else { 889 907 entry->proc_fops = &acpi_video_device_info_fops; 890 908 entry->data = acpi_driver_data(device); ··· 895 915 create_proc_entry("state", S_IFREG | S_IRUGO | S_IWUSR, 896 916 acpi_device_dir(device)); 897 917 if (!entry) 898 - return_VALUE(-ENODEV); 918 + return -ENODEV; 899 919 else { 900 920 acpi_video_device_state_fops.write = acpi_video_device_write_state; 901 921 entry->proc_fops = &acpi_video_device_state_fops; ··· 908 928 create_proc_entry("brightness", S_IFREG | S_IRUGO | S_IWUSR, 909 929 acpi_device_dir(device)); 910 930 if (!entry) 911 - return_VALUE(-ENODEV); 931 + return -ENODEV; 912 932 else { 913 933 acpi_video_device_brightness_fops.write = acpi_video_device_write_brightness; 914 934 entry->proc_fops = &acpi_video_device_brightness_fops; ··· 919 939 /* 'EDID' [R] */ 920 940 entry = create_proc_entry("EDID", S_IRUGO, acpi_device_dir(device)); 921 941 if (!entry) 922 - return_VALUE(-ENODEV); 942 + return -ENODEV; 923 943 else { 924 944 entry->proc_fops = &acpi_video_device_EDID_fops; 925 945 entry->data = acpi_driver_data(device); 926 946 entry->owner = THIS_MODULE; 927 947 } 928 948 929 - return_VALUE(0); 949 + return 0; 930 950 } 931 951 932 952 static int acpi_video_device_remove_fs(struct acpi_device *device) 933 953 { 934 954 struct acpi_video_device *vid_dev; 935 - ACPI_FUNCTION_TRACE("acpi_video_device_remove_fs"); 936 955 937 956 vid_dev = (struct acpi_video_device *)acpi_driver_data(device); 938 957 if (!vid_dev || !vid_dev->video || !vid_dev->video->dir) 939 - return_VALUE(-ENODEV); 958 + return -ENODEV; 940 959 941 960 if (acpi_device_dir(device)) { 942 961 remove_proc_entry("info", acpi_device_dir(device)); ··· 946 967 acpi_device_dir(device) = NULL; 947 968 } 948 969 949 - return_VALUE(0); 970 + return 0; 950 971 } 951 972 952 973 /* video bus */ ··· 954 975 { 955 976 struct acpi_video_bus *video = (struct acpi_video_bus *)seq->private; 956 977 957 - ACPI_FUNCTION_TRACE("acpi_video_bus_info_seq_show"); 958 978 959 979 if (!video) 960 980 goto end; ··· 966 988 video->flags.post ? "yes" : "no"); 967 989 968 990 end: 969 - return_VALUE(0); 991 + return 0; 970 992 } 971 993 972 994 static int acpi_video_bus_info_open_fs(struct inode *inode, struct file *file) ··· 979 1001 { 980 1002 struct acpi_video_bus *video = (struct acpi_video_bus *)seq->private; 981 1003 982 - ACPI_FUNCTION_TRACE("acpi_video_bus_ROM_seq_show"); 983 1004 984 1005 if (!video) 985 1006 goto end; ··· 987 1010 seq_printf(seq, "<TODO>\n"); 988 1011 989 1012 end: 990 - return_VALUE(0); 1013 + return 0; 991 1014 } 992 1015 993 1016 static int acpi_video_bus_ROM_open_fs(struct inode *inode, struct file *file) ··· 1001 1024 unsigned long options; 1002 1025 int status; 1003 1026 1004 - ACPI_FUNCTION_TRACE("acpi_video_bus_POST_info_seq_show"); 1005 1027 1006 1028 if (!video) 1007 1029 goto end; ··· 1023 1047 } else 1024 1048 seq_printf(seq, "<not supported>\n"); 1025 1049 end: 1026 - return_VALUE(0); 1050 + return 0; 1027 1051 } 1028 1052 1029 1053 static int ··· 1039 1063 int status; 1040 1064 unsigned long id; 1041 1065 1042 - ACPI_FUNCTION_TRACE("acpi_video_bus_POST_seq_show"); 1043 1066 1044 1067 if (!video) 1045 1068 goto end; ··· 1051 1076 seq_printf(seq, "device posted is <%s>\n", device_decode[id & 3]); 1052 1077 1053 1078 end: 1054 - return_VALUE(0); 1079 + return 0; 1055 1080 } 1056 1081 1057 1082 static int acpi_video_bus_DOS_seq_show(struct seq_file *seq, void *offset) 1058 1083 { 1059 1084 struct acpi_video_bus *video = (struct acpi_video_bus *)seq->private; 1060 1085 1061 - ACPI_FUNCTION_TRACE("acpi_video_bus_DOS_seq_show"); 1062 1086 1063 1087 seq_printf(seq, "DOS setting: <%d>\n", video->dos_setting); 1064 1088 1065 - return_VALUE(0); 1089 + return 0; 1066 1090 } 1067 1091 1068 1092 static int acpi_video_bus_POST_open_fs(struct inode *inode, struct file *file) ··· 1086 1112 char str[12] = { 0 }; 1087 1113 unsigned long opt, options; 1088 1114 1089 - ACPI_FUNCTION_TRACE("acpi_video_bus_write_POST"); 1090 1115 1091 1116 if (!video || count + 1 > sizeof str) 1092 - return_VALUE(-EINVAL); 1117 + return -EINVAL; 1093 1118 1094 1119 status = acpi_video_bus_POST_options(video, &options); 1095 1120 if (!ACPI_SUCCESS(status)) 1096 - return_VALUE(-EINVAL); 1121 + return -EINVAL; 1097 1122 1098 1123 if (copy_from_user(str, buffer, count)) 1099 - return_VALUE(-EFAULT); 1124 + return -EFAULT; 1100 1125 1101 1126 str[count] = 0; 1102 1127 opt = strtoul(str, NULL, 0); 1103 1128 if (opt > 3) 1104 - return_VALUE(-EFAULT); 1129 + return -EFAULT; 1105 1130 1106 1131 /* just in case an OEM 'forget' the motherboard... */ 1107 1132 options |= 1; ··· 1108 1135 if (options & (1ul << opt)) { 1109 1136 status = acpi_video_bus_set_POST(video, opt); 1110 1137 if (!ACPI_SUCCESS(status)) 1111 - return_VALUE(-EFAULT); 1138 + return -EFAULT; 1112 1139 1113 1140 } 1114 1141 1115 - return_VALUE(count); 1142 + return count; 1116 1143 } 1117 1144 1118 1145 static ssize_t ··· 1126 1153 char str[12] = { 0 }; 1127 1154 unsigned long opt; 1128 1155 1129 - ACPI_FUNCTION_TRACE("acpi_video_bus_write_DOS"); 1130 1156 1131 1157 if (!video || count + 1 > sizeof str) 1132 - return_VALUE(-EINVAL); 1158 + return -EINVAL; 1133 1159 1134 1160 if (copy_from_user(str, buffer, count)) 1135 - return_VALUE(-EFAULT); 1161 + return -EFAULT; 1136 1162 1137 1163 str[count] = 0; 1138 1164 opt = strtoul(str, NULL, 0); 1139 1165 if (opt > 7) 1140 - return_VALUE(-EFAULT); 1166 + return -EFAULT; 1141 1167 1142 1168 status = acpi_video_bus_DOS(video, opt & 0x3, (opt & 0x4) >> 2); 1143 1169 1144 1170 if (!ACPI_SUCCESS(status)) 1145 - return_VALUE(-EFAULT); 1171 + return -EFAULT; 1146 1172 1147 - return_VALUE(count); 1173 + return count; 1148 1174 } 1149 1175 1150 1176 static int acpi_video_bus_add_fs(struct acpi_device *device) ··· 1151 1179 struct proc_dir_entry *entry = NULL; 1152 1180 struct acpi_video_bus *video; 1153 1181 1154 - ACPI_FUNCTION_TRACE("acpi_video_bus_add_fs"); 1155 1182 1156 1183 video = (struct acpi_video_bus *)acpi_driver_data(device); 1157 1184 ··· 1158 1187 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), 1159 1188 acpi_video_dir); 1160 1189 if (!acpi_device_dir(device)) 1161 - return_VALUE(-ENODEV); 1190 + return -ENODEV; 1162 1191 video->dir = acpi_device_dir(device); 1163 1192 acpi_device_dir(device)->owner = THIS_MODULE; 1164 1193 } ··· 1166 1195 /* 'info' [R] */ 1167 1196 entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device)); 1168 1197 if (!entry) 1169 - return_VALUE(-ENODEV); 1198 + return -ENODEV; 1170 1199 else { 1171 1200 entry->proc_fops = &acpi_video_bus_info_fops; 1172 1201 entry->data = acpi_driver_data(device); ··· 1176 1205 /* 'ROM' [R] */ 1177 1206 entry = create_proc_entry("ROM", S_IRUGO, acpi_device_dir(device)); 1178 1207 if (!entry) 1179 - return_VALUE(-ENODEV); 1208 + return -ENODEV; 1180 1209 else { 1181 1210 entry->proc_fops = &acpi_video_bus_ROM_fops; 1182 1211 entry->data = acpi_driver_data(device); ··· 1187 1216 entry = 1188 1217 create_proc_entry("POST_info", S_IRUGO, acpi_device_dir(device)); 1189 1218 if (!entry) 1190 - return_VALUE(-ENODEV); 1219 + return -ENODEV; 1191 1220 else { 1192 1221 entry->proc_fops = &acpi_video_bus_POST_info_fops; 1193 1222 entry->data = acpi_driver_data(device); ··· 1199 1228 create_proc_entry("POST", S_IFREG | S_IRUGO | S_IRUSR, 1200 1229 acpi_device_dir(device)); 1201 1230 if (!entry) 1202 - return_VALUE(-ENODEV); 1231 + return -ENODEV; 1203 1232 else { 1204 1233 acpi_video_bus_POST_fops.write = acpi_video_bus_write_POST; 1205 1234 entry->proc_fops = &acpi_video_bus_POST_fops; ··· 1212 1241 create_proc_entry("DOS", S_IFREG | S_IRUGO | S_IRUSR, 1213 1242 acpi_device_dir(device)); 1214 1243 if (!entry) 1215 - return_VALUE(-ENODEV); 1244 + return -ENODEV; 1216 1245 else { 1217 1246 acpi_video_bus_DOS_fops.write = acpi_video_bus_write_DOS; 1218 1247 entry->proc_fops = &acpi_video_bus_DOS_fops; ··· 1220 1249 entry->owner = THIS_MODULE; 1221 1250 } 1222 1251 1223 - return_VALUE(0); 1252 + return 0; 1224 1253 } 1225 1254 1226 1255 static int acpi_video_bus_remove_fs(struct acpi_device *device) 1227 1256 { 1228 1257 struct acpi_video_bus *video; 1229 1258 1230 - ACPI_FUNCTION_TRACE("acpi_video_bus_remove_fs"); 1231 1259 1232 1260 video = (struct acpi_video_bus *)acpi_driver_data(device); 1233 1261 ··· 1240 1270 acpi_device_dir(device) = NULL; 1241 1271 } 1242 1272 1243 - return_VALUE(0); 1273 + return 0; 1244 1274 } 1245 1275 1246 1276 /* -------------------------------------------------------------------------- ··· 1257 1287 int status; 1258 1288 struct acpi_video_device *data; 1259 1289 1260 - ACPI_FUNCTION_TRACE("acpi_video_bus_get_one_device"); 1261 1290 1262 1291 if (!device || !video) 1263 - return_VALUE(-EINVAL); 1292 + return -EINVAL; 1264 1293 1265 1294 status = 1266 1295 acpi_evaluate_integer(device->handle, "_ADR", NULL, &device_id); ··· 1267 1298 1268 1299 data = kmalloc(sizeof(struct acpi_video_device), GFP_KERNEL); 1269 1300 if (!data) 1270 - return_VALUE(-ENOMEM); 1301 + return -ENOMEM; 1271 1302 1272 1303 memset(data, 0, sizeof(struct acpi_video_device)); 1273 1304 ··· 1318 1349 1319 1350 acpi_video_device_add_fs(device); 1320 1351 1321 - return_VALUE(0); 1352 + return 0; 1322 1353 } 1323 1354 1324 - return_VALUE(-ENOENT); 1355 + return -ENOENT; 1325 1356 } 1326 1357 1327 1358 /* ··· 1364 1395 struct acpi_video_device *device) 1365 1396 { 1366 1397 int i; 1367 - ACPI_FUNCTION_TRACE("acpi_video_device_bind"); 1368 1398 1369 1399 #define IDS_VAL(i) video->attached_array[i].value.int_val 1370 1400 #define IDS_BIND(i) video->attached_array[i].bind_info ··· 1400 1432 union acpi_object *dod = NULL; 1401 1433 union acpi_object *obj; 1402 1434 1403 - ACPI_FUNCTION_TRACE("acpi_video_device_enumerate"); 1404 1435 1405 1436 status = acpi_evaluate_object(video->handle, "_DOD", NULL, &buffer); 1406 1437 if (!ACPI_SUCCESS(status)) { 1407 1438 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _DOD")); 1408 - return_VALUE(status); 1439 + return status; 1409 1440 } 1410 1441 1411 1442 dod = (union acpi_object *)buffer.pointer; ··· 1451 1484 video->attached_count = count; 1452 1485 out: 1453 1486 acpi_os_free(buffer.pointer); 1454 - return_VALUE(status); 1487 + return status; 1455 1488 } 1456 1489 1457 1490 /* ··· 1476 1509 unsigned long state; 1477 1510 int status = 0; 1478 1511 1479 - ACPI_FUNCTION_TRACE("acpi_video_switch_output"); 1480 1512 1481 1513 list_for_each_safe(node, next, &video->video_device_list) { 1482 1514 dev = container_of(node, struct acpi_video_device, entry); ··· 1506 1540 break; 1507 1541 } 1508 1542 1509 - return_VALUE(status); 1543 + return status; 1510 1544 } 1511 1545 1512 1546 static int ··· 1533 1567 int status = 0; 1534 1568 struct list_head *node, *next; 1535 1569 1536 - ACPI_FUNCTION_TRACE("acpi_video_get_devices"); 1537 1570 1538 1571 acpi_video_device_enumerate(video); 1539 1572 ··· 1550 1585 } 1551 1586 1552 1587 } 1553 - return_VALUE(status); 1588 + return status; 1554 1589 } 1555 1590 1556 1591 static int acpi_video_bus_put_one_device(struct acpi_video_device *device) ··· 1558 1593 acpi_status status; 1559 1594 struct acpi_video_bus *video; 1560 1595 1561 - ACPI_FUNCTION_TRACE("acpi_video_bus_put_one_device"); 1562 1596 1563 1597 if (!device || !device->video) 1564 - return_VALUE(-ENOENT); 1598 + return -ENOENT; 1565 1599 1566 1600 video = device->video; 1567 1601 ··· 1573 1609 ACPI_DEVICE_NOTIFY, 1574 1610 acpi_video_device_notify); 1575 1611 1576 - return_VALUE(0); 1612 + return 0; 1577 1613 } 1578 1614 1579 1615 static int acpi_video_bus_put_devices(struct acpi_video_bus *video) ··· 1581 1617 int status; 1582 1618 struct list_head *node, *next; 1583 1619 1584 - ACPI_FUNCTION_TRACE("acpi_video_bus_put_devices"); 1585 1620 1586 1621 list_for_each_safe(node, next, &video->video_device_list) { 1587 1622 struct acpi_video_device *data = ··· 1599 1636 kfree(data); 1600 1637 } 1601 1638 1602 - return_VALUE(0); 1639 + return 0; 1603 1640 } 1604 1641 1605 1642 /* acpi_video interface */ ··· 1619 1656 struct acpi_video_bus *video = (struct acpi_video_bus *)data; 1620 1657 struct acpi_device *device = NULL; 1621 1658 1622 - ACPI_FUNCTION_TRACE("acpi_video_bus_notify"); 1623 1659 printk("video bus notify\n"); 1624 1660 1625 1661 if (!video) 1626 - return_VOID; 1662 + return; 1627 1663 1628 1664 if (acpi_bus_get_device(handle, &device)) 1629 - return_VOID; 1665 + return; 1630 1666 1631 1667 switch (event) { 1632 1668 case ACPI_VIDEO_NOTIFY_SWITCH: /* User request that a switch occur, ··· 1654 1692 break; 1655 1693 } 1656 1694 1657 - return_VOID; 1695 + return; 1658 1696 } 1659 1697 1660 1698 static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) ··· 1663 1701 (struct acpi_video_device *)data; 1664 1702 struct acpi_device *device = NULL; 1665 1703 1666 - ACPI_FUNCTION_TRACE("acpi_video_device_notify"); 1667 1704 1668 1705 printk("video device notify\n"); 1669 1706 if (!video_device) 1670 - return_VOID; 1707 + return; 1671 1708 1672 1709 if (acpi_bus_get_device(handle, &device)) 1673 - return_VOID; 1710 + return; 1674 1711 1675 1712 switch (event) { 1676 1713 case ACPI_VIDEO_NOTIFY_SWITCH: /* change in status (cycle output device) */ ··· 1689 1728 "Unsupported event [0x%x]\n", event)); 1690 1729 break; 1691 1730 } 1692 - return_VOID; 1731 + return; 1693 1732 } 1694 1733 1695 1734 static int acpi_video_bus_add(struct acpi_device *device) ··· 1698 1737 acpi_status status = 0; 1699 1738 struct acpi_video_bus *video = NULL; 1700 1739 1701 - ACPI_FUNCTION_TRACE("acpi_video_bus_add"); 1702 1740 1703 1741 if (!device) 1704 - return_VALUE(-EINVAL); 1742 + return -EINVAL; 1705 1743 1706 1744 video = kmalloc(sizeof(struct acpi_video_bus), GFP_KERNEL); 1707 1745 if (!video) 1708 - return_VALUE(-ENOMEM); 1746 + return -ENOMEM; 1709 1747 memset(video, 0, sizeof(struct acpi_video_bus)); 1710 1748 1711 1749 video->handle = device->handle; ··· 1751 1791 if (result) 1752 1792 kfree(video); 1753 1793 1754 - return_VALUE(result); 1794 + return result; 1755 1795 } 1756 1796 1757 1797 static int acpi_video_bus_remove(struct acpi_device *device, int type) ··· 1759 1799 acpi_status status = 0; 1760 1800 struct acpi_video_bus *video = NULL; 1761 1801 1762 - ACPI_FUNCTION_TRACE("acpi_video_bus_remove"); 1763 1802 1764 1803 if (!device || !acpi_driver_data(device)) 1765 - return_VALUE(-EINVAL); 1804 + return -EINVAL; 1766 1805 1767 1806 video = (struct acpi_video_bus *)acpi_driver_data(device); 1768 1807 ··· 1777 1818 kfree(video->attached_array); 1778 1819 kfree(video); 1779 1820 1780 - return_VALUE(0); 1821 + return 0; 1781 1822 } 1782 1823 1783 1824 static int ··· 1787 1828 acpi_handle h_dummy2; 1788 1829 acpi_handle h_dummy3; 1789 1830 1790 - ACPI_FUNCTION_TRACE("acpi_video_bus_match"); 1791 1831 1792 1832 if (!device || !driver) 1793 - return_VALUE(-EINVAL); 1833 + return -EINVAL; 1794 1834 1795 1835 /* Since there is no HID, CID for ACPI Video drivers, we have 1796 1836 * to check well known required nodes for each feature we support. ··· 1798 1840 /* Does this device able to support video switching ? */ 1799 1841 if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy1)) && 1800 1842 ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOS", &h_dummy2))) 1801 - return_VALUE(0); 1843 + return 0; 1802 1844 1803 1845 /* Does this device able to retrieve a video ROM ? */ 1804 1846 if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_ROM", &h_dummy1))) 1805 - return_VALUE(0); 1847 + return 0; 1806 1848 1807 1849 /* Does this device able to configure which video head to be POSTed ? */ 1808 1850 if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_VPO", &h_dummy1)) && 1809 1851 ACPI_SUCCESS(acpi_get_handle(device->handle, "_GPD", &h_dummy2)) && 1810 1852 ACPI_SUCCESS(acpi_get_handle(device->handle, "_SPD", &h_dummy3))) 1811 - return_VALUE(0); 1853 + return 0; 1812 1854 1813 - return_VALUE(-ENODEV); 1855 + return -ENODEV; 1814 1856 } 1815 1857 1816 1858 static int __init acpi_video_init(void) 1817 1859 { 1818 1860 int result = 0; 1819 1861 1820 - ACPI_FUNCTION_TRACE("acpi_video_init"); 1821 1862 1822 1863 /* 1823 1864 acpi_dbg_level = 0xFFFFFFFF; ··· 1825 1868 1826 1869 acpi_video_dir = proc_mkdir(ACPI_VIDEO_CLASS, acpi_root_dir); 1827 1870 if (!acpi_video_dir) 1828 - return_VALUE(-ENODEV); 1871 + return -ENODEV; 1829 1872 acpi_video_dir->owner = THIS_MODULE; 1830 1873 1831 1874 result = acpi_bus_register_driver(&acpi_video_bus); 1832 1875 if (result < 0) { 1833 1876 remove_proc_entry(ACPI_VIDEO_CLASS, acpi_root_dir); 1834 - return_VALUE(-ENODEV); 1877 + return -ENODEV; 1835 1878 } 1836 1879 1837 - return_VALUE(0); 1880 + return 0; 1838 1881 } 1839 1882 1840 1883 static void __exit acpi_video_exit(void) 1841 1884 { 1842 - ACPI_FUNCTION_TRACE("acpi_video_exit"); 1843 1885 1844 1886 acpi_bus_unregister_driver(&acpi_video_bus); 1845 1887 1846 1888 remove_proc_entry(ACPI_VIDEO_CLASS, acpi_root_dir); 1847 1889 1848 - return_VOID; 1890 + return; 1849 1891 } 1850 1892 1851 1893 module_init(acpi_video_init);