Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1238398pxj; Fri, 18 Jun 2021 02:43:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWWIulx2Uc3kbSyHvFgQTsYuxrYNwXrYbqIAOVWv4+GDjiMbntw9k2+0w+qncR/cx7P1MC X-Received: by 2002:a17:906:29c8:: with SMTP id y8mr10095962eje.312.1624009415469; Fri, 18 Jun 2021 02:43:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624009415; cv=none; d=google.com; s=arc-20160816; b=yH5f8F1+5pjKoc3FxoHAeM8NbCM0ZjqpdBuWJeLfyTa8VjCbjA9cFyjeSJ7i2lJWyf OXd3pG51E+RPQmw5FDWryfmFBxT/d3Q4jGduJO/TSBrUZBqNBH4OxvQIfi1f5bJB3NTO wacXDJCD68k3VShM+yET8stDkuTJN6UOpGPpQgB7ZKEJyIIJUHMiV2eEU/N3h5JzaFEV SZp7OQFjadOs25r6NBTCMAFrhLn7Qo7B/RJQbahFyR7kMtxnB/R1Z3YBX5FRL3B9dM0d h+kZnwzTpSyrpI8xYkZEWaMoXWtvASTkl1O6EIEBcoD3xnm0z6KqxyLemtxbc5/wb7/+ D65w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=IGJpUx0SY3bMQeyW+AAHE/K76X+AwU0vjvEbrDWUIBA=; b=hIq9qEjH4sV4fdHA1sUpAz6G4BOF7Q2QAsqqs17zP4kaX37BDFBg5ckXXZZzGMYobV kg8/fMvS9fPH7Ynh+1XskJWUXfddssDG5FSr1R3qzvn3mn847J4YAvsnQefMAOoce4bM XaaodNPw7r+dBqERZ7sQR3a9ZUrN7nuz9LwUt97pMR8zuunME4TrSK0X3drK+zPVSRsb 8s7k4MqPGaF1oL21beGu7WhHfGk6vLir0smAMD08RwxEDwqlwU3LJUBOHExblxWXfE5F afmNIVmgB1BHmPUZfUjXrN5+R/GndJboYLrDkVpVc01tTt/M0qLwu279FzvH6kOZwGB3 NiGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jl14si1534105ejc.222.2021.06.18.02.43.12; Fri, 18 Jun 2021 02:43:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231617AbhFRJfv (ORCPT + 99 others); Fri, 18 Jun 2021 05:35:51 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:49387 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229915AbhFRJfu (ORCPT ); Fri, 18 Jun 2021 05:35:50 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1luAsV-0004ax-80; Fri, 18 Jun 2021 09:33:31 +0000 From: Colin King To: Tudor Ambarus , Michael Walle , Pratyush Yadav , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , linux-mtd@lists.infradead.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mtd: spi-nor: remove redundant continue statement Date: Fri, 18 Jun 2021 10:33:31 +0100 Message-Id: <20210618093331.100006-1-colin.king@canonical.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King The continue statement at the end of a for-loop has no effect, invert the if expression and remove the continue. Addresses-Coverity: ("Continue has no effect") Signed-off-by: Colin Ian King --- drivers/mtd/spi-nor/core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c index 970ed6e3f3ba..cc08bd707378 100644 --- a/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c @@ -1411,9 +1411,7 @@ spi_nor_find_best_erase_type(const struct spi_nor_erase_map *map, continue; spi_nor_div_by_erase_size(erase, addr, &rem); - if (rem) - continue; - else + if (!rem) return erase; } -- 2.31.1