From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gn8Zm-0001pf-IX for barebox@lists.infradead.org; Fri, 25 Jan 2019 20:59:48 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Fri, 25 Jan 2019 21:59:34 +0100 Message-Id: <20190125205935.15135-1-u.kleine-koenig@pengutronix.de> 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: [PATCH 1/2] i2c_probe: limit slave addresses to [0x04, 0x77] To: barebox@lists.infradead.org QWRyZXNzZXMgYmVsb3cgMHgwNCBhbmQgYWJvdmUgMHg3NyBhcmUgcmVzZXJ2ZWQgaW4gdGhlIGky YyBidXMKc3BlY2lmaWNhdGlvbiwgc28gZG9uJ3QgcHJvYmUgdGhlc2UgYWRkcmVzc2VzIHVubGVz cyByZXF1ZXN0ZWQKZXhwbGljaXRseS4KCkFsc28gZG8gbW9yZSBzdHJpY3QgYm91bmRhcnkgY2hl Y2tpbmc6CgogLSBlbnN1cmUgc3RhcnQgYWRkcmVzcyBpcyBncmVhdGVyIG9yIGVxdWFsIHRvIHpl cm87CiAtIGRvbid0IGRlY3JlYXNlIHN0b3BhZGRyIGFmdGVyIGNoZWNraW5nIGl0IGJlaW5nIGdy ZWF0ZXIgb3IgZXF1YWwgdG8KICAgc3RhcnRhZGRyLgoKU2lnbmVkLW9mZi1ieTogVXdlIEtsZWlu ZS1Lw7ZuaWcgPHUua2xlaW5lLWtvZW5pZ0BwZW5ndXRyb25peC5kZT4KLS0tCiBjb21tYW5kcy9p MmMuYyB8IDEwICsrKysrKy0tLS0KIDEgZmlsZSBjaGF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