From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.bootlin.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fqfsp-0004NU-97 for linux-mtd@lists.infradead.org; Fri, 17 Aug 2018 14:37:48 +0000 Date: Fri, 17 Aug 2018 16:37:33 +0200 From: Miquel Raynal To: Naga Sureshkumar Relli Cc: , , , , , , , , , , , , Subject: Re: [LINUX PATCH v10 2/2] mtd: rawnand: arasan: Add support for Arasan NAND Flash Controller Message-ID: <20180817163733.34d3199c@xps13> In-Reply-To: <1534511964-20342-3-git-send-email-naga.sureshkumar.relli@xilinx.com> References: <1534511964-20342-1-git-send-email-naga.sureshkumar.relli@xilinx.com> <1534511964-20342-3-git-send-email-naga.sureshkumar.relli@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Naga, A user of Xilinx BSP reported a problem with lockdep that I can see is not yet fixed in this code: Naga Sureshkumar Relli wrote on Fri, 17 Aug 2018 18:49:24 +0530: > +static int anfc_probe(struct platform_device *pdev) > +{ > + struct anfc_nand_controller *nfc; > + struct anfc_nand_chip *anand_chip; > + struct device_node *np =3D pdev->dev.of_node, *child; > + struct resource *res; > + int err; > + > + nfc =3D devm_kzalloc(&pdev->dev, sizeof(*nfc), GFP_KERNEL); > + if (!nfc) > + return -ENOMEM; > + > + init_waitqueue_head(&nfc->controller.wq); The controller structure has a lock which is not initialized here. You should not initialize the waitqueue manually neither and instead use nand_controller_init(&nfc->controller). > + INIT_LIST_HEAD(&nfc->chips); > + init_completion(&nfc->event); > + nfc->dev =3D &pdev->dev; > + platform_set_drvdata(pdev, nfc); > + nfc->csnum =3D -1; > + nfc->controller.ops =3D &anfc_nand_controller_ops; More to come. Thanks, Miqu=C3=A8l