From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lilium.sigma-star.at ([109.75.188.150]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1elMCu-00024K-9k for linux-mtd@lists.infradead.org; Mon, 12 Feb 2018 22:04:17 +0000 From: Richard Weinberger To: Boris Brezillon Cc: David Woodhouse , Brian Norris , Marek Vasut , Cyrille Pitchen , linux-mtd@lists.infradead.org, Joern Engel , Robert Jarzmik , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Kyungmin Park , Artem Bityutskiy , Solarflare linux maintainers , Edward Cree , Bert Kenward , Greg Kroah-Hartman , linuxppc-dev@lists.ozlabs.org, netdev@vger.kernel.org, devel@driverdev.osuosl.org, Miquel Raynal Subject: Re: [PATCH 4/5] mtd: Unconditionally update ->fail_addr and ->addr in part_erase() Date: Mon, 12 Feb 2018 23:05:19 +0100 Message-ID: <1548497.hsdsyCj9Tz@blindfold> In-Reply-To: <20180212210311.23244-5-boris.brezillon@bootlin.com> References: <20180212210311.23244-1-boris.brezillon@bootlin.com> <20180212210311.23244-5-boris.brezillon@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Am Montag, 12. Februar 2018, 22:03:10 CET schrieb Boris Brezillon: > ->fail_addr and ->addr can be updated no matter the result of > parent->_erase(), we just need to remove the code doing the same thing > in mtd_erase_callback() to avoid adjusting those fields twice. > > Note that this can be done because all MTD users have been converted to > not pass an erase_info->callback() and are thus only taking the > ->addr_fail and ->addr fields into account after part_erase() has > returned. > > While we're at it, get rid of the erase_info->mtd field which was only > needed to let mtd_erase_callback() get the partition device back. > > Signed-off-by: Boris Brezillon Reviewed-by: Richard Weinberger Thanks, //richard