From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.bootlin.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ffh9y-0003qS-Dc for linux-mtd@lists.infradead.org; Wed, 18 Jul 2018 07:46:07 +0000 Date: Wed, 18 Jul 2018 09:45:44 +0200 From: Miquel Raynal To: Marcel Ziswiler Cc: linux-mtd@lists.infradead.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, Stefan Agner , boris.brezillon@bootlin.com, dev@lynxeye.de, mirza.krak@gmail.com, benjamin.lindqvist@endian.se, krzk@kernel.org, marek.vasut@gmail.com, richard@nod.at, digetx@gmail.com, computersforpeace@gmail.com, dwmw2@infradead.org, dan.carpenter@oracle.com, Marcel Ziswiler , Thierry Reding , Jonathan Hunter Subject: Re: [PATCH v2] mtd: rawnand: tegra: check bounds of die_nr properly Message-ID: <20180718094544.76607c0f@xps13> In-Reply-To: <20180717084618.25249-1-marcel@ziswiler.com> References: <20180717084618.25249-1-marcel@ziswiler.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi Marcel, Marcel Ziswiler wrote on Tue, 17 Jul 2018 10:46:18 +0200: > From: Stefan Agner >=20 > The Tegra driver currently only support a single chip select, hence > check boundaries accordingly. This fixes a off by one issue catched > with Smatch: > drivers/mtd/nand/raw/tegra_nand.c:476 tegra_nand_select_chip() > warn: array off by one? 'nand->cs[die_nr]' >=20 > Also warn in case the stack asks for a chip select we currently do > not support. >=20 > Reported-by: Dan Carpenter > Signed-off-by: Stefan Agner > Signed-off-by: Miquel Raynal > Signed-off-by: Marcel Ziswiler Applied on nand/next in place of the previous one (with my SoB after yours). Thanks, Miqu=C3=A8l