Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1327977lqh; Mon, 6 May 2024 04:41:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX80bCd0vlYbLVRid9MhDdRiEszAcrXn1jurGny1rgXg+82YMXW2UsLlxR9rgFBaxwL2AEuoNraPcpOxrATUUVyJsVgOtB1cyPtnvEc4Q== X-Google-Smtp-Source: AGHT+IGnxRbx+fqfJD6H5ARSTggcLy/9xcb5TDJ1tay+5v6Yp6880NCHfIhdqTGT8rhMe6IRtxWY X-Received: by 2002:a54:418e:0:b0:3c9:6abd:3e06 with SMTP id 14-20020a54418e000000b003c96abd3e06mr3322695oiy.39.1714995660785; Mon, 06 May 2024 04:41:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714995660; cv=pass; d=google.com; s=arc-20160816; b=h1UWUgm8JXz+hOrUkqPbHPQrZB+tWqNjvGtEsq8ICMAm4EM7uUH8RbaJlGL7TypICw qcp1g2haidTIIHZxJtIqoHSszg0z4yM9GT6bdhNlbVA0xNM/+oYdQs/V3ux9jlVCaToU 2E+xZUXmXku89hUFCsRfXMPRSuWgWGjElLvMXUMH5T2ZzeLjSp4AqJZU/78CYC8wxhkm oOgFMaWc3uiy+bhWENo4WkhEZCO8k9k19DZIyvI9voBFllPPYcw9wpNxbO/4FA0bzd8c pJz2L6UjHRzkFFREkj/4HNYeR5AvEhwkWS4Bfboe73bK9ECSetblE98e5D00AZdqJOFN 27Vg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=b0eZn/5/l2EZquZuG8Vtq1BaQMNdvpMDot1jtzd3GNg=; fh=aG7hBLBmw1l015ofgK5wdSVNBW5CuCZaxxDB1+c/8fI=; b=EAqsfXOWHBQPJWf/zWwskC04q6qQRCxtNZOzXNVfkD79ouKsqJ4xY5FmcUJeM/py5/ IFqAfGazpZtFbfnAXxBrA2iXdG6GS7PFhwLJWqLSSEf6yXUTcXtv5O3lBhtyvL4xr8BR ZGZf5bMN8BEv8xePxIu/vtU261T4/ajfN707lfRjiFJ5B3bt1HTM7pcchOWIJ98j74v7 +SQRa3me1kv1G8RYUiLlNKmQUz+9mkHwkX5x/CKh2CYMUo0AiMdU/mPGV3mH9nRQ2Doi +xDOqEcm3Dyg56dGEMIbrScJRAbOSMaNEJd2JI57c/mfyqmPux1knR7BHM48PKIUSMlo gbUw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=HD4MITfX; arc=pass (i=1 spf=pass spfdomain=sang-engineering.com dkim=pass dkdomain=sang-engineering.com); spf=pass (google.com: domain of linux-kernel+bounces-169747-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169747-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id dv6-20020a05620a1b8600b0078ee090bd9csi9320402qkb.488.2024.05.06.04.41.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 04:41:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169747-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@sang-engineering.com header.s=k1 header.b=HD4MITfX; arc=pass (i=1 spf=pass spfdomain=sang-engineering.com dkim=pass dkdomain=sang-engineering.com); spf=pass (google.com: domain of linux-kernel+bounces-169747-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169747-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7F4871C211B0 for ; Mon, 6 May 2024 11:41:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DD6BA143C52; Mon, 6 May 2024 11:40:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="HD4MITfX" Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E340414386D for ; Mon, 6 May 2024 11:40:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714995636; cv=none; b=j5f0VHm9MEyNsLqSn4u3LvoOMU74X+mQmPctdQNGenWli84GbJkHPZu4OuSJJLluPnVgtFRypd0L4sDYr1RYAiUi+g64II3fitLb/NYKsmsHWpPrYsilz3XRFl2KBrUo5c+58GcdnD7pVnqXSTfNUSU+OxXUzSu+RzqD65UOiDQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714995636; c=relaxed/simple; bh=tZekCqwesM0TH7zbeTcT2ilFSjF/za++SpAUFY+hRMU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ml+ZqnBHVaO2Gzg0aoVG+OonK5yvuUvibq5ep44stwybAXgzdEl6qN7ML+zhZ7O+dPy7/tJgwADz0PEut8d3QiZ7t9/QcBe3V8VCYjTV5zZKsp7lB/t78q113kHz6QMjzvHuUE+HqqawjGGEAYA0llE/1+HODRzJwMK+4jl00xI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=HD4MITfX; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=b0eZn/5/l2EZquZuG8Vtq1BaQMNdvpMDot1jtzd3GNg=; b=HD4MIT fXtOLqSvs5hTbA609YvGcnRMuFmzuICm/BtAj+c7CFjQ+FcgZvTdguYi26x4Gx5x aUwskDia3s9CmBxlYF0vK4tcwVMJWYq0JGmpBQetCLRpJ3MBZMmLR/xejuf7j8iL JLURDLYzEnAFWI2iDSS2dfOzdaAThty39XSG33dTBxgL7IndmgVjAUsw2jsrXVNo O6P7ChA2KzQZQpEuNb0JzAl8IRzJS4viA2Foado0LN/0QR5Uqinl6a32202excsa va0+l5ivdZgiLfM/pFxO+I/0EmdqzX9hH0wL9YoiFQQlUNAn42T1GEteyK6X9oDQ exAdH/P/YqpZfaeA== Received: (qmail 172901 invoked from network); 6 May 2024 13:40:32 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 6 May 2024 13:40:32 +0200 X-UD-Smtp-Session: l3s3148p1@fa5riccXlLYgAwDPX0CuAO+oYiCi4tWm From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , Greg Kroah-Hartman , Jiri Slaby , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH 4/4] serial: sh-sci: simplify locking when re-issuing RXDMA fails Date: Mon, 6 May 2024 13:40:20 +0200 Message-ID: <20240506114016.30498-10-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240506114016.30498-6-wsa+renesas@sang-engineering.com> References: <20240506114016.30498-6-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Avoid a superfluous unlock/lock-pair by simply moving the printout to the end of bailing out. Signed-off-by: Wolfram Sang --- drivers/tty/serial/sh-sci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 7cc354ee6305..4dc9c142690a 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1361,14 +1361,12 @@ static void sci_dma_rx_complete(void *arg) return; fail: - uart_port_unlock_irqrestore(port, flags); - dev_warn(port->dev, "Failed submitting Rx DMA descriptor\n"); /* Switch to PIO */ - uart_port_lock_irqsave(port, &flags); dmaengine_terminate_async(chan); sci_dma_rx_chan_invalidate(s); sci_dma_rx_reenable_irq(s); uart_port_unlock_irqrestore(port, flags); + dev_warn(port->dev, "Failed submitting Rx DMA descriptor\n"); } static void sci_dma_tx_release(struct sci_port *s) -- 2.43.0