From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Weinberger 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> References: <20180212210311.23244-1-boris.brezillon@bootlin.com> <20180212210311.23244-5-boris.brezillon@bootlin.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: devel@driverdev.osuosl.org, Bert Kenward , Solarflare linux maintainers , Benjamin Herrenschmidt , Artem Bityutskiy , Miquel Raynal , Robert Jarzmik , linuxppc-dev@lists.ozlabs.org, Joern Engel , Greg Kroah-Hartman , Marek Vasut , Kyungmin Park , netdev@vger.kernel.org, linux-mtd@lists.infradead.org, Michael Ellerman , Cyrille Pitchen , Edward Cree , Paul Mackerras , Brian Norris , David Woodhouse To: Boris Brezillon Return-path: In-Reply-To: <20180212210311.23244-5-boris.brezillon@bootlin.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: driverdev-devel-bounces@linuxdriverproject.org Sender: "devel" List-Id: netdev.vger.kernel.org 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