[BIONIC/linux-raspi2][PATCH] mtd: nand: bcm2835-smi-nand: Pass a nand_chip object to nand_release()

Stefan Bader stefan.bader at canonical.com
Fri Aug 14 06:38:43 UTC 2020


On 13.08.20 21:34, William Breathitt Gray wrote:
> BugLink: https://bugs.launchpad.net/bugs/1886710
> 
> The nand_release() function takes a nand_chip object instead of a
> mtd_info one.
> 
> Signed-off-by: William Breathitt Gray <william.gray at canonical.com>
> ---

Wait a bit, let me understand this. This is not a normal change. If I understand
this right, there was a stable patch which was applied without backport and
missed in the test builds? In that case I would rather like to have the subject
something like "UBUNTU: SAUCE: Fix argument to nand_release()" and refer to the
stable patch in a "Fixes:" line in the sob area. Also explaining how this ended
up being needed and why there is no upstream pick/backport.
Right now this all looks more like a random patch without reason. And we also
should apply this to the primary tree if it is wrong there. Though maybe it is
something that is a clash between the upstream code and the vendor tree
backport. In any case one wants to have more background info because in half a
year nobody remembers.

-Stefan

>  drivers/mtd/nand/bcm2835_smi_nand.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mtd/nand/bcm2835_smi_nand.c b/drivers/mtd/nand/bcm2835_smi_nand.c
> index c4826ea1c2ba..4962cc743439 100644
> --- a/drivers/mtd/nand/bcm2835_smi_nand.c
> +++ b/drivers/mtd/nand/bcm2835_smi_nand.c
> @@ -222,7 +222,7 @@ static int bcm2835_smi_nand_probe(struct platform_device *pdev)
>  	if (!ret)
>  		return 0;
>  
> -	nand_release(mtd);
> +	nand_release(mtd_to_nand(mtd));
>  	return -EINVAL;
>  }
>  
> @@ -230,7 +230,7 @@ static int bcm2835_smi_nand_remove(struct platform_device *pdev)
>  {
>  	struct bcm2835_smi_nand_host *host = platform_get_drvdata(pdev);
>  
> -	nand_release(&host->mtd);
> +	nand_release(mtd_to_nand(&host->mtd));
>  
>  	return 0;
>  }
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20200814/106d871f/attachment.sig>


More information about the kernel-team mailing list