Singh, Vimal wrote: >> +static void fun_select_chip(struct mtd_info *mtd, int chip_nr) >> +{ >> + struct nand_chip *chip = mtd->priv; >> + struct fsl_upm_nand *fun = to_fsl_upm_nand(mtd); >> + >> + if (chip_nr == -1) { >> + chip->cmd_ctrl(mtd, NAND_CMD_NONE, 0 | >> NAND_CTRL_CHANGE); >> + } else if (chip_nr >= 0) { >> + fun->chip_number = chip_nr; >> + chip->IO_ADDR_R = chip->IO_ADDR_W = >> + fun->io_base + chip_nr * fun->chip_offset; >> + } else { >> + BUG(); >> + } > braces are not required here...
Really? In the coding style I read: http://lxr.linux.no/linux+v2.6.29/Documentation/CodingStyle#L171 > > >> + prop = of_get_property(ofdev->node, "num-chips", &size); >> + if (prop && size == sizeof(uint32_t)) { >> + fun->num_chips = *prop; >> + if (fun->num_chips >= NAND_MAX_CHIPS) { >> + dev_err(&ofdev->dev, "too much chips"); >> + ret = -EINVAL; >> + goto err1; >> + } >> + } else { >> + fun->num_chips = 1; >> + } > ditto... See above. Wolfgang. _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev