Commit 79bae42
dmi_scan: refactor dmi_scan_machine(), {smbios,dmi}_present()
Move the calls to memcpy_fromio() up into the loop in
dmi_scan_machine(), and move the signature checks back down into
dmi_decode(). We need to check at 16-byte intervals but keep a 32-byte
buffer for an SMBIOS entry, so shift the buffer after each iteration.
Merge smbios_present() into dmi_present(), so we look for an SMBIOS
signature at the beginning of the given buffer and then for a DMI
signature at an offset of 16 bytes.
[artem.savkov@gmail.com: use proper buf type in dmi_present()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Reported-by: Tim McGrath <tmhikaru@gmail.com>
Tested-by: Tim Mcgrath <tmhikaru@gmail.com>
Cc: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Signed-off-by: Artem Savkov <artem.savkov@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent c1d025e commit 79bae42
1 file changed
+37
-43
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
422 | | - | |
| 422 | + | |
423 | 423 | | |
424 | | - | |
| 424 | + | |
425 | 425 | | |
426 | | - | |
427 | | - | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
428 | 450 | | |
429 | 451 | | |
430 | 452 | | |
431 | 453 | | |
432 | 454 | | |
433 | 455 | | |
434 | | - | |
| 456 | + | |
| 457 | + | |
435 | 458 | | |
436 | 459 | | |
437 | | - | |
| 460 | + | |
438 | 461 | | |
439 | 462 | | |
440 | 463 | | |
| |||
445 | 468 | | |
446 | 469 | | |
447 | 470 | | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | 471 | | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | 472 | | |
476 | 473 | | |
477 | 474 | | |
478 | 475 | | |
479 | 476 | | |
480 | 477 | | |
481 | | - | |
| 478 | + | |
482 | 479 | | |
483 | 480 | | |
484 | 481 | | |
| |||
491 | 488 | | |
492 | 489 | | |
493 | 490 | | |
494 | | - | |
495 | | - | |
| 491 | + | |
496 | 492 | | |
497 | | - | |
| 493 | + | |
| 494 | + | |
498 | 495 | | |
499 | 496 | | |
500 | 497 | | |
| |||
509 | 506 | | |
510 | 507 | | |
511 | 508 | | |
| 509 | + | |
512 | 510 | | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
| 511 | + | |
| 512 | + | |
520 | 513 | | |
521 | 514 | | |
522 | 515 | | |
523 | 516 | | |
| 517 | + | |
524 | 518 | | |
525 | 519 | | |
526 | 520 | | |
| |||
0 commit comments