Message ID | 1491388344-13521-18-git-send-email-amit.pundir@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp196369qgd; Wed, 5 Apr 2017 03:34:28 -0700 (PDT) X-Received: by 10.84.238.139 with SMTP id v11mr34756754plk.189.1491388468116; Wed, 05 Apr 2017 03:34:28 -0700 (PDT) Return-Path: <stable-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9si20203815pfi.300.2017.04.05.03.34.27; Wed, 05 Apr 2017 03:34:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933535AbdDEKe0 (ORCPT <rfc822;amit.pundir@linaro.org> + 6 others); Wed, 5 Apr 2017 06:34:26 -0400 Received: from mail-pf0-f169.google.com ([209.85.192.169]:36860 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933475AbdDEKdZ (ORCPT <rfc822;stable@vger.kernel.org>); Wed, 5 Apr 2017 06:33:25 -0400 Received: by mail-pf0-f169.google.com with SMTP id o126so5587386pfb.3 for <stable@vger.kernel.org>; Wed, 05 Apr 2017 03:33:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ReFQDEBKfMl7fxZkhWSQqvrSiHRA2Q5zEjurGWC4ahQ=; b=ksM11rRx9TQi9WgSQC7SP7SiDkxoct2Da9sqwlfUxxnISYM78aA9DTpOKHIXdF2QRW xsbK+kJXI+0WB191/rGIuZrq0abl86VdX+bVOYSk2258ZfT9UGlxMRfsdK9gKEJeQ8yI r4zjV151illqgiA6a0CwGP2VJNXknfhBfh++4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ReFQDEBKfMl7fxZkhWSQqvrSiHRA2Q5zEjurGWC4ahQ=; b=XlUw7sWpAKNGoGWl86qAsmOTvOy5kgVuqNAiNVNRPsZbkaJ/K/zZJAbD+MjCEzmBxq 2hc9B8QWgj7laHHCFKKeOaQfGtBTvq6mJx1EonT2mg2Bneetp6Fpdft0g17tbnzCIkaO IqQLOfX8bR2qTdye+d6/f9eqAjKFqChofv+93bTgQ02q/p4IxJ30KGMCeVZ/wxxpr6e/ +Yqc6xzj4hsybvjZVdCCm1MdfVnUcPAPvxhq5RWCcd7d9juHgkShtXp+kEL2vLzMLFBc oTuGZSXBtNMQb+oMZBzExXUtZFsAImDOBhU6WpGm+ztNr5QkRSKbn4piRVSQAHCici9C xsbg== X-Gm-Message-State: AFeK/H0NQ1uGYSeI3u3GshAyB6eH1cvVMfou6jh6f5mKgMUrIZmpphu0ZuUvtSyQeVKVTmIM X-Received: by 10.84.173.228 with SMTP id p91mr35157950plb.18.1491388384084; Wed, 05 Apr 2017 03:33:04 -0700 (PDT) Received: from localhost.localdomain ([106.51.240.246]) by smtp.gmail.com with ESMTPSA id a62sm36732075pgc.60.2017.04.05.03.33.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Apr 2017 03:33:03 -0700 (PDT) From: Amit Pundir <amit.pundir@linaro.org> To: stable@vger.kernel.org Cc: gregkh@linuxfoundation.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= <rafal@milecki.pl>, Brian Norris <computersforpeace@gmail.com> Subject: [PATCH v2 for-4.9 17/32] mtd: bcm47xxpart: fix parsing first block after aligned TRX Date: Wed, 5 Apr 2017 16:02:09 +0530 Message-Id: <1491388344-13521-18-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491388344-13521-1-git-send-email-amit.pundir@linaro.org> References: <1491388344-13521-1-git-send-email-amit.pundir@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
Stable commits picked up from lede project
|
expand
|
diff --git a/drivers/mtd/bcm47xxpart.c b/drivers/mtd/bcm47xxpart.c index 3779475..283ff7e 100644 --- a/drivers/mtd/bcm47xxpart.c +++ b/drivers/mtd/bcm47xxpart.c @@ -229,12 +229,10 @@ static int bcm47xxpart_parse(struct mtd_info *master, last_trx_part = curr_part - 1; - /* - * We have whole TRX scanned, skip to the next part. Use - * roundown (not roundup), as the loop will increase - * offset in next step. - */ - offset = rounddown(offset + trx->length, blocksize); + /* Jump to the end of TRX */ + offset = roundup(offset + trx->length, blocksize); + /* Next loop iteration will increase the offset */ + offset -= blocksize; continue; }