Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp853302imm; Wed, 25 Jul 2018 07:18:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfqRKAO3AVPumEqxF/GyH50p/hLEsKSNP4yDLMXZchQFTpXyIhMT5KylRwNpV44uKCDN3Pa X-Received: by 2002:a62:6cc7:: with SMTP id h190-v6mr22560693pfc.113.1532528328352; Wed, 25 Jul 2018 07:18:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532528328; cv=none; d=google.com; s=arc-20160816; b=LCdVXxWuyUIUxU0+N0O2wdDcOTF5q8KtELlSg3CF55TWa6lkN9DPGImi6P5+d1uXla q/AjsSuUcne7ltoR61/CODSFlFL73+AyV2C22+kONG/hr5LBrt669J/fcwGbgfCwPjL4 S5D+QtDG9ucdkKAgPS5j62wCPO24wlQmprGH3ALrhrkofxY/lqcyFWPPiMlikPj3Gcga gjuMcpaNsYs3cvMoGz0LefHGrZ4a3IVhc7pciZN86ox9Q991EEL5nAKB/NjtBoitznfw QxLY0+JKU3uZMJmAXCHmqE9NnCckEdzKeiqoCvGIgzLCjtPHku8DdnQoHsciI18EUQ9d zwJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:dkim-filter:arc-authentication-results; bh=eN8CwJzALhkb91FU1zpceBAhTpUEfIqrr/L+E9rTR3Y=; b=SR1YQw7f/cZVjmvz+F9LRX5fYQ3AGlb32OcFVQLlhSUqSVZrsUp64CRtwQ3g2hHW5n TlYSe4g+90XDzmhmBgdg/fkrS6Fe5/a28Si1/z4ZP+u5PuAQDsssSYIW/ToUP3LSf+ng wd3SAYtmAqSbmz3RScHwpINpfnw5hgB4Dv+jtqAtddWFCgw0mNclj4H/vBhGxHtedwgv 04gQtl4JvXdIkufEqEHRLKZzxkHPETXNJFQEIEir4wFC//xLpDp1lt036wF0TREaMzt7 4HqrYfkZFCMnta5Fkt3GMOuULD5kMvQW7icVr4nsnad+Fmmm5sTiqd+rx4G1EkenEEt6 1fCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=eOYCMmgn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 78-v6si13084241pfb.204.2018.07.25.07.18.33; Wed, 25 Jul 2018 07:18:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=eOYCMmgn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729059AbeGYP3g (ORCPT + 99 others); Wed, 25 Jul 2018 11:29:36 -0400 Received: from conssluserg-06.nifty.com ([210.131.2.91]:43553 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728486AbeGYP3g (ORCPT ); Wed, 25 Jul 2018 11:29:36 -0400 Received: from mail-ua0-f174.google.com (mail-ua0-f174.google.com [209.85.217.174]) (authenticated) by conssluserg-06.nifty.com with ESMTP id w6PEHLCI027475 for ; Wed, 25 Jul 2018 23:17:22 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com w6PEHLCI027475 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1532528242; bh=eN8CwJzALhkb91FU1zpceBAhTpUEfIqrr/L+E9rTR3Y=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=eOYCMmgnurHieBuc75pLW3RMb03316PJ8Hg2tj1TSDQdfs1Lwepikt7uxqgNujGVE PfesDvQqVJkdprmBi8LQycXZouW967djGy7V4Mzc3j1ApD0+400riMEqQDjfzXrtW6 Tdnsnurv5rUPUudvMv2MyWqYNeao7Un37+HBVw7edG+H0SCkNwpyvikVmeOBmk3s81 oCsxLdGVAPIURuDFA/fcvbBLN4tFK2k6dJ/xwXF7Rr/91GawXvB+ek4o3DbFFWnnnJ YSD3rAguLNCtHebu8aV3cXKihkf3m/RoegQJPUTB4nW1iwAnIw0U4dvmKvPSo862bT v5hGLJBrTSWuA== X-Nifty-SrcIP: [209.85.217.174] Received: by mail-ua0-f174.google.com with SMTP id t14-v6so5148887uao.8 for ; Wed, 25 Jul 2018 07:17:22 -0700 (PDT) X-Gm-Message-State: AOUpUlEf8nmVeLqXv7VuEHdxi5VBbrgi51l6p/M2slIHi0NlCEQN04LG wVLFJ34aQtXrUJn0R5LrsH894BqMspV71hFS0Nk= X-Received: by 2002:ab0:70a9:: with SMTP id q9-v6mr14567740ual.141.1532528241304; Wed, 25 Jul 2018 07:17:21 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:7289:0:0:0:0:0 with HTTP; Wed, 25 Jul 2018 07:16:40 -0700 (PDT) In-Reply-To: <20180725144717.604d3197@xps13> References: <20180720151527.16038-1-miquel.raynal@bootlin.com> <20180720151527.16038-5-miquel.raynal@bootlin.com> <20180725115116.1fb38fe3@bbrezillon> <20180725144717.604d3197@xps13> From: Masahiro Yamada Date: Wed, 25 Jul 2018 23:16:40 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 04/35] mtd: rawnand: denali: convert to nand_scan() To: Miquel Raynal Cc: Boris Brezillon , Alexandre Belloni , Mans Rullgard , Maxime Ripard , Stefan Agner , Nicolas Ferre , linux-mtd , Kamal Dasu , Josh Wu , Tudor Ambarus , Marek Vasut , Chen-Yu Tsai , Broadcom Kernel Feedback List , Sylvain Lemieux , Wenyou Yang , Marc Gonzalez , Vladimir Zapolskiy , Harvey Hunt , "moderated list:ARM/Mediatek SoC support" , Matthias Brugger , Han Xu , Xiaolei Li , linux-arm-kernel , Linux Kernel Mailing List , Richard Weinberger , Brian Norris , David Woodhouse Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-07-25 21:47 GMT+09:00 Miquel Raynal : > Hi Boris, > > Boris Brezillon wrote on Wed, 25 Jul 2018 > 11:51:16 +0200: > >> On Wed, 25 Jul 2018 18:42:44 +0900 >> Masahiro Yamada wrote: >> >> > >> > You need to remove kfree(denali->buf) >> > from denali_remove(), right? >> >> Absolutely. >> >> > >> > void denali_remove(struct denali_nand_info *denali) >> > { >> > struct mtd_info *mtd =3D nand_to_mtd(&denali->nand); >> > >> > nand_release(mtd); >> > kfree(denali->buf); <---- REMOVE !! >> > denali_disable_irq(denali); >> > } >> > >> > >> > Otherwise, denali_remove() will free denali->buf twice >> > because kfree(denali->buf) is called from denali_detach_chip(). >> > > Absolutely, thanks for reviewing! > > I'll apply with this changed. > > Miqu=C3=A8l Assuming you will fix this, Acked-by: Masahiro Yamada --=20 Best Regards Masahiro Yamada