Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1931997imm; Sun, 8 Jul 2018 14:53:27 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfePuH4WAG/EFrtEDMg3puIvaqNW5QMF8bV+hsc86YqCaNS940Z0vBiELx5xtChTUEdczV4 X-Received: by 2002:a62:4141:: with SMTP id o62-v6mr18614545pfa.111.1531086807709; Sun, 08 Jul 2018 14:53:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531086807; cv=none; d=google.com; s=arc-20160816; b=g6tbKk63SUK9Ejpyvpi+uCObg3xqgYSjKDj3k3gOURI8i6VMHg/ih7cq8VJAbbeGJP X8gEUnkxZplAKRDnuv25iRNoM4cNGMxzkiNetFUTj3LQuS5M3aMZOBqyLfFaAKevT7bL 0o/z6kMDvOfR1pwNPdorQcMij1oCikKDkAJPufNVCt7ObNYGp0H7aB1L5VP+rI7mkqer BcuCO++hImSiM1uj5MEtr6437FslexVu4jgnt8VtZ0OPkzSVnkctj1qDC/ABDcIuTOdW kG2pAhT9ElJ/52FGn0A/v3yiRt0DjRRnVJVEgfKPE/lh+wDpivXEtYJXvGGTVQIGsDnm Z7Ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=+lWrLcfo177Eil8cRf/tY7UoFk2fp0pftmajeE0tEP4=; b=xCe12PyZrRzb5ky6xdUS7qFLvnpcKF39ISkkZFELINaguu+nChWlnlouOUfaKR3im2 wHHq0iiTZKIcvDfPxz+a3sHpR96o1KMF+hvULnEuNOpb3JD283NkhdweNzsvRVvIanhM n3lPvg9aoQZuYQyZTmV0vgU4Qj3sAaPAI4RLG0DMCSESaYLyrEBJ/wQdfk/4nX7CCDzM Wb2iV7crt2Ri7Sk0TJoMkFJJDVMtcoLmOBZtNmoM47pIkS6NjyjQlj9P8HbDseAS0sUT l7hQmtSYjlrwtPJYzSY+iUnvI1kr7ZhPGOIJ3HtmKARov5qSyOKW+dCe5kZNSneTmTCS tYxA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n63-v6si12692925pgn.639.2018.07.08.14.53.13; Sun, 08 Jul 2018 14:53:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933306AbeGHVvg convert rfc822-to-8bit (ORCPT + 99 others); Sun, 8 Jul 2018 17:51:36 -0400 Received: from mail.bootlin.com ([62.4.15.54]:38205 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932545AbeGHVvf (ORCPT ); Sun, 8 Jul 2018 17:51:35 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 7893C207DA; Sun, 8 Jul 2018 23:51:32 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from xps13 (unknown [91.224.148.103]) by mail.bootlin.com (Postfix) with ESMTPSA id 903B1203B4; Sun, 8 Jul 2018 23:51:31 +0200 (CEST) Date: Sun, 8 Jul 2018 23:51:31 +0200 From: Miquel Raynal To: Stefan Agner Cc: boris.brezillon@bootlin.com, dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, dan.carpenter@oracle.com, dev@lynxeye.de, richard@nod.at, marcel@ziswiler.com, krzk@kernel.org, digetx@gmail.com, benjamin.lindqvist@endian.se, mirza.krak@gmail.com, gaireg@gaireg.de, linux-mtd@lists.infradead.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mtd: rawnand: tegra: check bounds of die_nr properly Message-ID: <20180708235131.348f95f9@xps13> In-Reply-To: <20180704091310.22003-1-stefan@agner.ch> References: <20180704091310.22003-1-stefan@agner.ch> Organization: Bootlin X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Stefan, Stefan Agner wrote on Wed, 4 Jul 2018 11:13:10 +0200: > 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]' > > Also warn in case the stack asks for a chip select we currently do > not support. > > Reported-by: Dan Carpenter > Signed-off-by: Stefan Agner > --- Applied to nand/next. Thanks, Miquèl