[PATCH] mtd: nand: remove unused and buggy get_platform_nandchip() helper function

Brian Norris computersforpeace at gmail.com
Fri Dec 18 14:33:32 PST 2015


On Mon, Dec 14, 2015 at 04:13:31PM +0100, Boris Brezillon wrote:
> Nobody uses the get_platform_nandchip() helper function which is supposed
> to return a pointer to a platform_nand_chip struct from an mtd_info
> pointer.
> Moreover, this function is buggy since the introduction of the plat_nand
> layer (chip->priv is now storing a pointer to an intermediate
> plat_nand_data structure allocated in plat_nand_probe(), and we have no
> way to retrieve a pointer to the provided platform_nand_chip struct from
> this plat_nand_data pointer).
> 
> While we are at it, remove the useless (and buggy, since it's pointing to
> something stored on the stack) data->chip.priv assignment.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
> Fixes: 711fdf627ce1 ("[MTD] [NAND] platform NAND driver: add driver")
> Cc: Vitaly Wool <vitalywool at gmail.com>

Applied to l2-mtd.git



More information about the linux-mtd mailing list