From patchwork Wed Jun 15 12:46:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Jander X-Patchwork-Id: 583583 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 C4072CCA47E for ; Wed, 15 Jun 2022 12:47:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345740AbiFOMru (ORCPT ); Wed, 15 Jun 2022 08:47:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234307AbiFOMrs (ORCPT ); Wed, 15 Jun 2022 08:47:48 -0400 Received: from smtp16.bhosted.nl (smtp16.bhosted.nl [IPv6:2a02:9e0:8000::27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81E39DF4E for ; Wed, 15 Jun 2022 05:47:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonic.nl; s=202111; h=content-transfer-encoding:mime-version:references:in-reply-to:message-id:date: subject:cc:to:from:from; bh=Rx8m4LW9ySJ0xiERX/MhZmzWCLriIcDzwVdLW/HEd9E=; b=lS8yBClNAU7qTCaBnXDLrUS7sX0w7EST/t0UpwhO7rOmuF7p8QKqzXPWDcW+cbWuGoxidrgDneP7D M3+ENjkhM+1VcpelfSOgDQrxrK6NgrTQB1RGXaiJCgRBqTXY71XwUABsvKPQpLF0e7kwA6iZ+UER/4 rBYxTmiukIAFGcYVbcpxABIdaR7LsOTWOcppnOP+lyKGHUnn9YJdcsXyoNM6W/s8QGpjuFT+ePl5a2 zgitH5cGJWbNOorA86OwbVJcR+4+/bAfRmX98BIaFJuicuZTVTgOhQUXQ+VJs263F7k8zwxEAE5tQC D8ZQQamUZtiqpKc1dcSFmxD2yKOVoEw== X-MSG-ID: 53a3f35d-eca9-11ec-9051-0050569d2c73 From: David Jander To: Mark Brown Cc: linux-spi@vger.kernel.org, Marc Kleine-Budde , Andrew Lunn , David Jander Subject: [RFC] [PATCH v2 05/11] spi: Remove check for controller idling in spi sync path Date: Wed, 15 Jun 2022 14:46:28 +0200 Message-Id: <20220615124634.3302867-6-david@protonic.nl> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220615124634.3302867-1-david@protonic.nl> References: <20220615124634.3302867-1-david@protonic.nl> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org Now that the idling flag is wholly behind the io_mutex, this broken piece of code can be safely removed. Signed-off-by: David Jander --- drivers/spi/spi.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index fa2d091d2854..d8d2b7ac78f2 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -3964,10 +3964,6 @@ static void __spi_transfer_message_noqueue(struct spi_controller *ctlr, struct s mutex_lock(&ctlr->io_mutex); - /* If another context is idling the device then wait */ - while (ctlr->idling) - usleep_range(10000, 11000); - was_busy = READ_ONCE(ctlr->busy); ret = __spi_pump_transfer_message(ctlr, msg, was_busy);