From patchwork Fri Jul 24 08:38:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 11682641 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 40B7A13A4 for ; Fri, 24 Jul 2020 08:40:11 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 18E4C20674 for ; Fri, 24 Jul 2020 08:40:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="YfJv7sfp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 18E4C20674 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ucw.cz Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:Message-ID:Subject:To:From:Date:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=fKFsBcooBh4cUxTsg2ZyohfNgIJF1Vm+evekpljbIUQ=; b=YfJ v7sfpW2XbUzc9X+OxRRoHvc0VZPGj9nwW4j4lTYCDmLO/K8fXRvfhFyM3iTtQTGNiUY7gHIoyU/LV wL24/QNPNjGEu3D98eSkCRLircfqH/4dpm+nhzW+npEMo4FT1mvPmC3Eg+vtRPlzeO6grkIBAZK9w K+LkwWfRhfx+6NkF6bb2UKVC+WB00eHdSJRJo3c9Gby2DLOLB/aw4RZNZ0+EPnWQIaAxLWQcxPbk2 6tRhheN7Dk/w4eW1u9XzvzHyIhszBIZb0b1fD9AlwAfTTKBz9cuCGJlmrNUZuEUkvw+G2cgAI+9RD VxsdYIOn2s72NSkUrJ4p7Ae6cRMI6VA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jytDt-0000Bk-Jc; Fri, 24 Jul 2020 08:38:33 +0000 Received: from jabberwock.ucw.cz ([46.255.230.98]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jytDq-0000AO-BU; Fri, 24 Jul 2020 08:38:31 +0000 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 614BF1C0BD2; Fri, 24 Jul 2020 10:38:26 +0200 (CEST) Date: Fri, 24 Jul 2020 10:38:25 +0200 From: Pavel Machek To: trivial@kernel.org, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, narmstrong@baylibre.com, nishkadg.linux@gmail.com, linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-oxnas@groups.io, linux-kernel@vger.kernel.org Subject: [PATCH] mtd: rawnand: oxnas: cleanup/simplify code Message-ID: <20200724083825.GA31437@amd> MIME-Version: 1.0 User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200724_043830_517367_28258F4B X-CRM114-Status: UNSURE ( 7.60 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Simplify oxnas_nand_probe. Signed-off-by: Pavel Machek (CIP) Acked-by: Neil Armstrong diff --git a/drivers/mtd/nand/raw/oxnas_nand.c b/drivers/mtd/nand/raw/oxnas_nand.c index 8d0d76ad319d..f44947043e5a 100644 --- a/drivers/mtd/nand/raw/oxnas_nand.c +++ b/drivers/mtd/nand/raw/oxnas_nand.c @@ -144,8 +144,7 @@ static int oxnas_nand_probe(struct platform_device *pdev) if (err) goto err_cleanup_nand; - oxnas->chips[oxnas->nchips] = chip; - ++oxnas->nchips; + oxnas->chips[oxnas->nchips++] = chip; } /* Exit if no chips found */