ACPI: remove unnecessary sizeof(u8)
authorFabian Frederick <fabf@skynet.be>
Sun, 16 Nov 2014 09:57:00 +0000 (10:57 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 18 Nov 2014 01:01:27 +0000 (02:01 +0100)
sizeof(u8) is always 1.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/utils.c

index 371ac12d25b16ee4c651649a147c7e3e9f9fdc87..dd8ff63ee2b43e255313f973a668e33e5a630ac3 100644 (file)
@@ -136,8 +136,7 @@ acpi_extract_package(union acpi_object *package,
                                break;
                        case 'B':
                                size_required +=
-                                   sizeof(u8 *) +
-                                   (element->buffer.length * sizeof(u8));
+                                   sizeof(u8 *) + element->buffer.length;
                                tail_offset += sizeof(u8 *);
                                break;
                        default:
@@ -255,7 +254,7 @@ acpi_extract_package(union acpi_object *package,
                                memcpy(tail, element->buffer.pointer,
                                       element->buffer.length);
                                head += sizeof(u8 *);
-                               tail += element->buffer.length * sizeof(u8);
+                               tail += element->buffer.length;
                                break;
                        default:
                                /* Should never get here */