From nobody Tue Sep 16 21:45:09 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 493E3C4332F for ; Thu, 29 Dec 2022 18:15:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233749AbiL2SPq (ORCPT ); Thu, 29 Dec 2022 13:15:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233700AbiL2SPg (ORCPT ); Thu, 29 Dec 2022 13:15:36 -0500 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9348215825 for ; Thu, 29 Dec 2022 10:15:35 -0800 (PST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 4F4A332005CA; Thu, 29 Dec 2022 13:15:34 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 29 Dec 2022 13:15:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1672337733; x=1672424133; bh=3a V9z+StwyUFCb1KZIw5zw5sA5TC8rfeKpSt342iQA4=; b=HCBLmtxDaRLWjQ3PmO RVtpnl8hUWpGTShjJs0fljEtjovO6DS8XAT+6ra5CXO2d1PQnu4ZG7pDuXEMnQOq jyEsK6GyqmPM5XDNG38WWYsnkoGUPRIURz0sOil0hRAzPCWUXzX/6hlQ85JwZ5t/ mUjJpvTmCxCHeN+vkBpMYHiUef7i2qoYl4IKVxmlq3aegGxne6zmiuxB5bf3pgGf WbhzSmW0NemXiv4OsGvPe52s3ByQ9o1Y0FoEZpaWl4VgNVEHHWSv56/Vd8BUgazx RmV3zS2PbTXyKRlY2nQW6eK1kzfwV/nTruunpZj2NmBX1o+CzXXPXA3oxDfWve02 U/Hw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1672337733; x=1672424133; bh=3aV9z+StwyUFC b1KZIw5zw5sA5TC8rfeKpSt342iQA4=; b=NQsllsGthY0N7C5kKLbuJsdd3tqax BX6Mn48lGvTqhk+9mYSiSLXTkw+2LpYChus4TU6Tdo/UzbMVJ3CsiT4wyMZNLF9W 5jEsCeWmABfvh5MuyJvx6CBA3OzIrXD2XxjSRFcMLNZOVlb5QFIvRrmXWy/Curgc FrSgLVpYiyA1BOHaPIi+P33YTEC84FV8VaBqv6a0UZAzahRliXwPEgCGeJq5jFuA s4TJNEC9JXWc0G33dzgzIZqJc7nkL/o3xu3aA4MYd+mitKpZYtYgn8WtRrStOev9 VSTjJxiBJg4rVTOD1OwU7alPwXVelFYAq8+F+D/cHUi41eSRATBoTKFrw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrieeggdduudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepudekteeuudehtdelteevgfduvddvjefhfedulefgudevgeeghefg udefiedtveetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepshgrmhhuvghlsehshhholhhlrghnugdrohhrgh X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 29 Dec 2022 13:15:33 -0500 (EST) From: Samuel Holland To: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Chen-Yu Tsai , Jernej Skrabec Cc: Boris Brezillon , Samuel Holland , Brian Norris , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [PATCH 2/7] mtd: rawnand: sunxi: Remove an unnecessary check Date: Thu, 29 Dec 2022 12:15:21 -0600 Message-Id: <20221229181526.53766-3-samuel@sholland.org> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20221229181526.53766-1-samuel@sholland.org> References: <20221229181526.53766-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" sunxi_nand->nsels cannot be zero, so the second check implies the first. Signed-off-by: Samuel Holland --- drivers/mtd/nand/raw/sunxi_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi= _nand.c index 2ee86f7b0905..8b221f9f10a7 100644 --- a/drivers/mtd/nand/raw/sunxi_nand.c +++ b/drivers/mtd/nand/raw/sunxi_nand.c @@ -421,7 +421,7 @@ static void sunxi_nfc_select_chip(struct nand_chip *nan= d, unsigned int cs) struct sunxi_nand_chip_sel *sel; u32 ctl; =20 - if (cs > 0 && cs >=3D sunxi_nand->nsels) + if (cs >=3D sunxi_nand->nsels) return; =20 ctl =3D readl(nfc->regs + NFC_REG_CTL) & --=20 2.37.4