Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3444606imm; Mon, 6 Aug 2018 05:03:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeoy4vUijC5lw7WKkZyeIGKacjEUEPgsLY9iVrKQVLSZU3h418JZAcy2k65GQymncPxYt8y X-Received: by 2002:a62:6a01:: with SMTP id f1-v6mr16968525pfc.156.1533557022926; Mon, 06 Aug 2018 05:03:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533557022; cv=none; d=google.com; s=arc-20160816; b=svDkYXJNv6mCSXYX7Z3LJoWixxWHyuSD/V91Aj3/sFlp5Fwi5+DCq7Vl6Yq4F9rq/1 Efe546Vwp+NFaiLg456KGoLudWqnrhbRdoPLJhCulp/uu1FIQRyDZF29A3HbsVr5Ay1H PFH8ReXEz9R9qo/7GBzMNwLL0R32BfiaRR06FMmEnnju8XLIn6QMk5FnJOcF+mrj0KuA HGKZSHwZz4wZ2QaTM/Gkt0+C5CdgRKeMhJZtaoFOglDLDQpd5qBs5e5jjSriPGi5uqXf CQhlSjl9i/Z5dKwGInF++r5Edkj/0Q5A8NpI9apZuKd8uPwu7P93RNr/2leAy28YYQ95 VpWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=BY16AYDEMF35iWPQ4qSOzxnusS53aZYFVYIxx7cqx9U=; b=jTvTF8G2Hvah/JQjfmqJ1xDMijBob6TE1QR9KqlbSZ8Ua8IMUv3YOp3szeTmd/RZai WsJf0pKRMg0pL3UhOlYvgxzXBbbRRH49IVt1rSEWKnNgjzBhPNWZF2j6t3ULL5tVohS8 mf5UbQJUd958UzetQusDDG9EedeiAmIKyfy2yB2fi5abi7c5EbNSWhzC2F2JlCpiikh4 RSapYIg+2dIavpzhI67LYZCx+Ldkse7biYxSHO4Kqn+eeUKJ81tsaGVktcB17bn8VZNP NtlYnbYXCn33y43noYiSuXdeTE77APU7gso/lB/upuEKroBVU+1Wg1MExCmHUo/gE6Ig xXMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=2vyDTlT2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b12-v6si12731404pgh.264.2018.08.06.05.03.27; Mon, 06 Aug 2018 05:03:42 -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; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=2vyDTlT2; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731331AbeHFOKr (ORCPT + 99 others); Mon, 6 Aug 2018 10:10:47 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:39302 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730846AbeHFOKq (ORCPT ); Mon, 6 Aug 2018 10:10:46 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w76Bx4ai104416; Mon, 6 Aug 2018 12:01:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=BY16AYDEMF35iWPQ4qSOzxnusS53aZYFVYIxx7cqx9U=; b=2vyDTlT2utJUUWJ+zTDIIGrHW8GsMOl8iH07OqciBx02mdUH3C/WjZypkJ4MctO0MZ6a 3dANl+aI/QOm55Ag/Zr0sT7nRCgDmv1p3Xfwc6RIZPZxG5NYnIM/zorSRvpwJg8RU7q9 iHwaFY+8UUKYTnDTm/enCB8lCLQeY5jxm6dkcglpLa//imHTZVkvhH6usFswx49Q/v7t Oa1ec1/S8G1eF/USm+KWIVBkkos7EPqI4twc+h4kWkG4BBEXkYVDht+W3cqPtlV6Ld8B EOX4zmfazz1K2yq8AR7/gGvFl5zYBpN/wC/SaOGs5BLi5vTr7FDE97h6seMLpEDx/ZZA Sw== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2kn4spmf4f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 06 Aug 2018 12:01:48 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w76C1l6M007923 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 6 Aug 2018 12:01:47 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w76C1kUK003092; Mon, 6 Aug 2018 12:01:46 GMT Received: from mwanda (/197.232.248.111) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 06 Aug 2018 05:01:45 -0700 Date: Mon, 6 Aug 2018 15:01:37 +0300 From: Dan Carpenter To: Boris Brezillon Cc: Jheng-Jhong Wu , Palle Christensen , devel@driverdev.osuosl.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Masahiro Yamada , Arun Nagendran , Miquel Raynal Subject: Re: [PATCH] staging:mt29f_spinand: MT29F2G failing as only 16-bit arguments and variables used for addressing. Message-ID: <20180806120137.s2lenmmhynw3zndz@mwanda> References: <1533093861-9761-1-git-send-email-goodwater.wu@gmail.com> <20180801120551.ju6zhxhoef6w5zim@mwanda> <20180806134648.2976de9e@bbrezillon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180806134648.2976de9e@bbrezillon> User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8976 signatures=668707 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808060130 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 06, 2018 at 01:46:48PM +0200, Boris Brezillon wrote: > Hi Dan, > > On Wed, 1 Aug 2018 15:05:51 +0300 > Dan Carpenter wrote: > > > On Wed, Aug 01, 2018 at 11:24:19AM +0800, Jheng-Jhong Wu wrote: > > > For NAND flash chips with more than 1Gbit (e.g. MT29F2G) more than 16 bits > > > are necessary to address the correct page. The driver sets the address for > > > more than 16 bits, but it uses 16-bit arguments and variables (these are > > > page_id, block_id, row) to do address operations. Obviously, these > > > arguments and variables cannot deal with more than 16-bit address. > > > > > > Signed-off-by: Jheng-Jhong Wu > > > > This seems reasonable... It would be needed to make commit 6efb21d6d0e7 > > ("staging:mt29f_spinand: MT29F2G failing as only 16 bits used for > > addressing.") work. It also fixes a static checker warning. > > > > My only concern is that the mtd/nand code seems to use -1 as a magical > > page_id. For example: > > Yes, -1 means "don't issue the row/page address cycles", though I > don't think page can be -1 for NAND_CMD_READ{1,0} commands. > It sure looks like it can be in nand_exit_status_op()... > Anyway, if you want this patch merged to fix a static checker warning, > I'm fine with that. In any case, I still plan to send a patch removing > this driver for v4.20, so, anyone using this driver should start > testing the new SPI NAND driver (drivers/mtd/nand/spi) and tweak/fix > the new implementation if needed. I don't think we should make the code more complicated than necessary just to make static checkers happy. When you say "this driver", you mean the staging driver? In that case, there is no need to revert commit 6efb21d6d0e7 ("staging:mt29f_spinand: MT29F2G failing as only 16 bits used for addressing."). regards, dan carpenter