From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp.megiteam.pl ([31.186.83.105]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g57iD-00062d-1Y for barebox@lists.infradead.org; Wed, 26 Sep 2018 11:10:43 +0000 References: <20180926081029.28103-1-s.hauer@pengutronix.de> From: Marcin =?utf-8?Q?Niestr=C3=B3j?= In-reply-to: <20180926081029.28103-1-s.hauer@pengutronix.de> Date: Wed, 26 Sep 2018 13:09:55 +0200 Message-ID: <87r2hg3470.fsf@grinn-global.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH] fs: ramfs: make chunk counting in truncate() better readable To: Sascha Hauer Cc: Barebox List ClNhc2NoYSBIYXVlciA8cy5oYXVlckBwZW5ndXRyb25peC5kZT4gd3JpdGVzOgoKPiBJbiByYW1m c190cnVuY2F0ZSgpICJuZXdjaHVua3MiIGRlbm90ZXMgdGhlIG51bWJlciBvZiBjaHVua3Mgd2UK PiB3YW50IHRvIGhhdmUgYWZ0ZXIgdGhlIGNhbGwuIFdlIGRlY3JlYXNlIHRoYXQgbnVtYmVyIHdo aWxlIGl0ZXJhdGluZwo+IG92ZXIgdGhlIGV4aXN0aW5nIGNodW5rcyBhbmQgZGVjcmVhc2UgaXQg ZnVydGhlciB3aXRoIGV2ZXJ5IG5ld2x5Cj4gYWxsb2NhdGVkIGNodW5rIHVudGlsICJuZXdjaHVu a3MiIGlzIHplcm8uCj4gVGhpcyBpcyBhIGJpdCBoYXJkIHRvIHJlYWQuIEluc3RlYWQgd2UgZHJv cCB0aGUgZGVjcmVhc2luZyB3aGlsZQo+IGl0ZXJhdGluZyBvdmVyIGV4aXN0aW5nIGNodW5rcyBh bmQgaW5jcmVhc2UgIm9sZ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