]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/powerpc/kernel/nvram_64.c
Merge tag 'powerpc-4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
[linux.git] / arch / powerpc / kernel / nvram_64.c
index 496d6393bd41824b565c66b731e1b4147c7e3923..ba681dac7b467be703dee435260e9e2e7a72ef19 100644 (file)
@@ -207,8 +207,7 @@ int nvram_write_os_partition(struct nvram_os_partition *part,
 
        tmp_index = part->index;
 
-       rc = ppc_md.nvram_write((char *)&info, sizeof(struct err_log_info),
-                               &tmp_index);
+       rc = ppc_md.nvram_write((char *)&info, sizeof(info), &tmp_index);
        if (rc <= 0) {
                pr_err("%s: Failed nvram_write (%d)\n", __func__, rc);
                return rc;
@@ -244,9 +243,7 @@ int nvram_read_partition(struct nvram_os_partition *part, char *buff,
        tmp_index = part->index;
 
        if (part->os_partition) {
-               rc = ppc_md.nvram_read((char *)&info,
-                                       sizeof(struct err_log_info),
-                                       &tmp_index);
+               rc = ppc_md.nvram_read((char *)&info, sizeof(info), &tmp_index);
                if (rc <= 0) {
                        pr_err("%s: Failed nvram_read (%d)\n", __func__, rc);
                        return rc;
@@ -1173,7 +1170,7 @@ int __init nvram_scan_partitions(void)
                               "detected: 0-length partition\n");
                        goto out;
                }
-               tmp_part = kmalloc(sizeof(struct nvram_partition), GFP_KERNEL);
+               tmp_part = kmalloc(sizeof(*tmp_part), GFP_KERNEL);
                err = -ENOMEM;
                if (!tmp_part) {
                        printk(KERN_ERR "nvram_scan_partitions: kmalloc failed\n");