Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp898982imm; Wed, 1 Aug 2018 07:06:58 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfPfM6cwekDOKcYnoX1HnWpBYE0yUEHuUZRroxG6kDyH148i12hCNBGLeyuoh0gaP2cHiZb X-Received: by 2002:a62:2983:: with SMTP id p125-v6mr27232859pfp.128.1533132418418; Wed, 01 Aug 2018 07:06:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533132418; cv=none; d=google.com; s=arc-20160816; b=uWh/mb559PVJMSZ4kBq1Kq3UdqrOBcKCA2YbvnO/l7mTJ97315vuaSgz6t4xZUrG5q NNNoDvPlgH3Ql7JVMQ4zj/pATIf9A+P3tLPg1JB8hshV6ghxKo3xqKTcavIfNEHTmq9Q FLvRYpjasMKmDOULzXm6rxY4HBr6Ije22UzBNUy5LwdErlL+0K8c43qW+voB7o9ct05g /+4tb7Iv2EZChJ85s1WM5cCyZu3xRZMf5JOdqdRmeZ1iggQq+fMnsgeDQniyhYFjYX4R F8UUxskd/OxUEOlkCDfxOJdgsFEG96rrtxeR+kwSIjKsf/eAQuWNh6O+syanoXQ+lgmA pQmg== 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=a9zpVG17XnXJUag+LHh0QIvRYfKJI6tsgxrEl3HKypk=; b=LhbRdChEwui7ZwnVbIH+sdyRETm5wmAyVqIWzHHYVgEoIgUjDl6bu3R5hRAr3MNfRZ mVGht2GZ54qPbK8YAzWKKJmdYsKCdaYCaTMcs2a3PiX53v4qfWghk2OhCwweujFLVyoF ifdMcPV/G49Dhcy6sm6WvfVlYtCx8Pg/A5LdDxCqdGF4+yddu3jERkBWvpo7VWboGZhR GW6chaBaL7EJpmsH7xq/aDMV4RurcXYl7gBojBmYyKmDGpi8jqYz7fjF6iJeJ/rK+5HV DRutNiOVvDiip7hQ9jDR7vMmHZukq4Ej/iOppnpc2DwwWuvtuqwpabIL72ZiZNYGIIoS klBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=YuqUnLWJ; 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 l26-v6si16670078pfj.188.2018.08.01.07.06.43; Wed, 01 Aug 2018 07:06:58 -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=YuqUnLWJ; 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 S2389518AbeHAPvG (ORCPT + 99 others); Wed, 1 Aug 2018 11:51:06 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:34124 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389419AbeHAPvG (ORCPT ); Wed, 1 Aug 2018 11:51:06 -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 w71Dwdo6098991; Wed, 1 Aug 2018 14:04:59 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=a9zpVG17XnXJUag+LHh0QIvRYfKJI6tsgxrEl3HKypk=; b=YuqUnLWJTLUxA9wAc1BK3jx1EVViW0aK22oPLxeHTIgVKoP9zO2KUNQhfFfcXFOyCF9q 0rA5MNKzBnMoS45Wd4X4ToC3NYj+uNnkuJWlFB4JmqmiDjBa9WVgN0FMU5y/hwPSHEsx ll7kt3K6bJc1h87O9h97spxx6dtwJvZPJuuFOcekql0jAA88W+rDn4R1P5yiNR58yY5s 43dYI92fPPAA/eXs2yVQy8yI33EvN8B4OLJdr0Lk1fb9oChUVrQ8eyq/TgLbvwaLVQtf q3pquHxIryMMPWVwzzKoFB/gAGWC0pNeaI2lnu/VJo9zvBV0BdE+vA+d0aNpJF4ZemNA Pw== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2kgh4q5r2r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 01 Aug 2018 14:04:59 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w71E4w1h012109 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 1 Aug 2018 14:04:58 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w71E4uWM018213; Wed, 1 Aug 2018 14:04:57 GMT Received: from mwanda (/197.232.248.111) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 01 Aug 2018 07:04:56 -0700 Date: Wed, 1 Aug 2018 17:04:47 +0300 From: Dan Carpenter To: Miquel Raynal Cc: Jheng-Jhong Wu , Palle Christensen , devel@driverdev.osuosl.org, Boris Brezillon , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Masahiro Yamada , Arun Nagendran Subject: Re: [PATCH] staging:mt29f_spinand: MT29F2G failing as only 16-bit arguments and variables used for addressing. Message-ID: <20180801140447.yw47ynz7bsgfbwb3@mwanda> References: <1533093861-9761-1-git-send-email-goodwater.wu@gmail.com> <20180801120551.ju6zhxhoef6w5zim@mwanda> <20180801155530.6e824927@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180801155530.6e824927@xps13> User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8971 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-1806210000 definitions=main-1808010146 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 01, 2018 at 03:55:30PM +0200, Miquel Raynal wrote: > Hi Dan, > > Dan Carpenter wrote on Wed, 1 Aug 2018 > 15:05:51 +0300: > > > 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: > > I guess you missed Boris' comment: this driver is very likely to be > removed. A SPI-NAND framework has been added. It does not use the raw > NAND framework anymore, which was wrong anyway. > We should probably revert commit 6efb21d6d0e7 ("staging:mt29f_spinand: MT29F2G failing as only 16 bits used for addressing.") in that case if all it does is add static checker warnings... regards, dan carpenter