Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3336343imu; Sun, 11 Nov 2018 12:39:26 -0800 (PST) X-Google-Smtp-Source: AJdET5cpzbMu4Frcsr99F6QIy0p5QyZtCNfV3qhEqxlH3f3hr3Ic6pZHdHkV5RTujYDkbaU/FS8W X-Received: by 2002:aa7:8719:: with SMTP id b25-v6mr17258190pfo.250.1541968766753; Sun, 11 Nov 2018 12:39:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541968766; cv=none; d=google.com; s=arc-20160816; b=cado+U4SWKxDX/KwhD13K5T5hY8JMGeyUie5/12blhVx+7iOVckYV1fqE2C3W1qTyM 9x6mTFBVJnUv5EHMr3CPZHwmKwwOICpfwDvGYF9gCaOJJw/KcxO2RaRDRHqnDTHzMkS1 lnL4kLrIXoNOreKvrNdV0OjSPynCY9PLv6/ZRh7fXbQWUluA4P2LMgF+W91LG+PdfWuJ l740XhcBfoiP7zJzas681w/qIRJaxkqu3ozrATmm5wim47AfeAXEMcamaI+ZR8a+az/l ZfKSXuVp1ZFn9VZdUIvJuT7BV94QqIoPJjY+2ZSc3Fe3ztN937J7oosOosR89M7+kWXm y2Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=yCvOC7fl5YQFuz+FETryueaTQu2qvEHz1F3HSN4c0mY=; b=J/Eg/vTqYngMTTGOe65EgUWiLWLLaV1HHGRj8208tqw97iebhfssG8xCdwuc8gp9o4 wsmBoE/HS0qX4IUZFniQUNs4bBbJpmsPiuX8EDW2ViNr9b2SaI8oRIByDLiClVetfZBB Hq750St2IcO/OSXkirpVQeNUaMa4b8n2R4AUS/NsqOOJKXNfkixoIO/9Q5gA0S6FL0TA lYBKwFAVOgAlcmylxEyRKQmB1G0VFoX2QcU5dJBwrAM2IIg6iF6cB5cH4wZLYh3tOIw1 4q8EVWw79SgcoCXJvHroevHCOo6/QsjP8eBArYAJX1zlImITwxLNXe6/xbO/RHay4i8f TBmg== 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 j6-v6si13159639pgi.218.2018.11.11.12.39.11; Sun, 11 Nov 2018 12:39:26 -0800 (PST) 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 S1731277AbeKLG14 (ORCPT + 99 others); Mon, 12 Nov 2018 01:27:56 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:49610 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730015AbeKLFsJ (ORCPT ); Mon, 12 Nov 2018 00:48:09 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvsT-0000l7-A9; Sun, 11 Nov 2018 19:58:37 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsQ-0001UZ-JL; Sun, 11 Nov 2018 19:58:34 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Boris Brezillon" , "Tokunori Ikegami" , linux-mtd@lists.infradead.org, "Marek Vasut" , "Boris Brezillon" , "Chris Packham" , "Brian Norris" , "Cyrille Pitchen" , "David Woodhouse" , "Joakim Tjernlund" , "Richard Weinberger" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 097/366] mtd: cfi_cmdset_0002: Change definition naming to retry write operation In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Tokunori Ikegami commit 85a82e28b023de9b259a86824afbd6ba07bd6475 upstream. The definition can be used for other program and erase operations also. So change the naming to MAX_RETRIES from MAX_WORD_RETRIES. Signed-off-by: Tokunori Ikegami Reviewed-by: Joakim Tjernlund Cc: Chris Packham Cc: Brian Norris Cc: David Woodhouse Cc: Boris Brezillon Cc: Marek Vasut Cc: Richard Weinberger Cc: Cyrille Pitchen Cc: linux-mtd@lists.infradead.org Signed-off-by: Boris Brezillon Signed-off-by: Ben Hutchings --- drivers/mtd/chips/cfi_cmdset_0002.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/mtd/chips/cfi_cmdset_0002.c +++ b/drivers/mtd/chips/cfi_cmdset_0002.c @@ -42,7 +42,7 @@ #define AMD_BOOTLOC_BUG #define FORCE_WORD_WRITE 0 -#define MAX_WORD_RETRIES 3 +#define MAX_RETRIES 3 #define SST49LF004B 0x0060 #define SST49LF040B 0x0050 @@ -1314,7 +1314,7 @@ static int __xipram do_write_oneword(str map_write( map, CMD(0xF0), chip->start ); /* FIXME - should have reset delay before continuing */ - if (++retry_cnt <= MAX_WORD_RETRIES) + if (++retry_cnt <= MAX_RETRIES) goto retry; ret = -EIO; @@ -1765,7 +1765,7 @@ retry: map_write(map, CMD(0xF0), chip->start); /* FIXME - should have reset delay before continuing */ - if (++retry_cnt <= MAX_WORD_RETRIES) + if (++retry_cnt <= MAX_RETRIES) goto retry; ret = -EIO;