Commit eb1765c4 authored by Corentin Labbe's avatar Corentin Labbe Committed by Miquel Raynal
Browse files

mtd: partitions: redboot: fix style issues

parent 23796088
Loading
Loading
Loading
Loading
+34 −35
Original line number Diff line number Diff line
@@ -18,14 +18,14 @@

struct fis_image_desc {
	unsigned char name[16];      // Null terminated name
    uint32_t	  flash_base;    // Address within FLASH of image
    uint32_t	  mem_base;      // Address in memory where it executes
    uint32_t	  size;          // Length of image
    uint32_t	  entry_point;   // Execution entry point
    uint32_t	  data_length;   // Length of actual data
    unsigned char _pad[256-(16+7*sizeof(uint32_t))];
    uint32_t	  desc_cksum;    // Checksum over image descriptor
    uint32_t	  file_cksum;    // Checksum over image data
	u32	  flash_base;    // Address within FLASH of image
	u32	  mem_base;      // Address in memory where it executes
	u32	  size;          // Length of image
	u32	  entry_point;   // Execution entry point
	u32	  data_length;   // Length of actual data
	unsigned char _pad[256 - (16 + 7 * sizeof(u32))];
	u32	  desc_cksum;    // Checksum over image descriptor
	u32	  file_cksum;    // Checksum over image data
};

struct fis_list {
@@ -95,7 +95,7 @@ static int parse_redboot_partitions(struct mtd_info *master,
		while (mtd_block_isbad(master, offset)) {
			if (!offset) {
nogood:
				printk(KERN_NOTICE "Failed to find a non-bad block to check for RedBoot partition table\n");
				pr_notice("Failed to find a non-bad block to check for RedBoot partition table\n");
				return -EIO;
			}
			offset -= master->erasesize;
@@ -113,7 +113,7 @@ static int parse_redboot_partitions(struct mtd_info *master,
	if (!buf)
		return -ENOMEM;

	printk(KERN_NOTICE "Searching for RedBoot partition table in %s at offset 0x%lx\n",
	pr_notice("Searching for RedBoot partition table in %s at offset 0x%lx\n",
		  master->name, offset);

	ret = mtd_read(master, offset, master->erasesize, &retlen,
@@ -152,7 +152,6 @@ static int parse_redboot_partitions(struct mtd_info *master,
				/* Update numslots based on actual FIS directory size */
				numslots = swab32(buf[i].size) / sizeof(struct fis_image_desc);
				for (j = 0; j < numslots; ++j) {

					/* A single 0xff denotes a deleted entry.
					 * Two of them in a row is the end of the table.
					 */
@@ -184,7 +183,7 @@ static int parse_redboot_partitions(struct mtd_info *master,
	}
	if (i == numslots) {
		/* Didn't find it */
		printk(KERN_NOTICE "No RedBoot partition table detected in %s\n",
		pr_notice("No RedBoot partition table detected in %s\n",
			  master->name);
		ret = 0;
		goto out;
@@ -248,9 +247,8 @@ static int parse_redboot_partitions(struct mtd_info *master,

	nullname = (char *)&parts[nrparts];
#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
	if (nulllen > 0) {
	if (nulllen > 0)
		strcpy(nullname, nullstring);
	}
#endif
	names = nullname + nulllen;

@@ -296,6 +294,7 @@ static int parse_redboot_partitions(struct mtd_info *master,
 out:
	while (fl) {
		struct fis_list *old = fl;

		fl = fl->next;
		kfree(old);
	}