Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp908420pxb; Thu, 19 Nov 2020 17:30:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzG7JqyPaIGGPAPQpKFkN7SHbfdfe9Ez3UgZDKdUpkz0yGd+NofAmTLcMfBKv5vJixQSt6p X-Received: by 2002:a17:906:3087:: with SMTP id 7mr30121958ejv.375.1605835852248; Thu, 19 Nov 2020 17:30:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605835852; cv=none; d=google.com; s=arc-20160816; b=tg8x1rsu2sebXrMfOJ0r6upC6/xC/uSNK+cS4DdJGvbXbLaM/HwKAVHXR8rDS7Py2B fWK7fEBNz7ztwNr37fpymZuo/BetGZvffDPr9X3vmh1pxH7OgOZxWUIbVJK3nuaDkJ4D 2t9gtaaaSYbdwGPRnBrTvBvGOaM6sx8ZGZx4cyr5C3p1Sc3ZpW2oOmgusT3AwGU6Bz3V K9RiZaURfNEu6Elhk8ABDRm6gA+mdy63Tjv8uJFR+Ml7s198SWMIRzYG7zfZ/SCnNqHY CU0zRw+Dx9J9Xg8nKC0JvuKKVDCXLfQALWv0LleSvDLN5zxfSeXKFxxPhsHlApzC7Rlo /toQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:to:from; bh=P6VMRYVNFxH9vtnN5I7zJGwvL0cdKiWhDU+0JTZjmpM=; b=DbC99utHkXLoe7HviNu7KIGS5At+4g2ImVy/JdFPAvZWKfHAyAt29g60d4cJKmmRw9 T+8jcb6O+26kLWklLTgEiTnIhDZ2ixLvVzqjnhIP4s7H2DYIkwxd/YYDrF+ElIek4aKb Apo3Bu+ntLP339O1hrLfPXVx48F7kUzGq37+mhFNHY0C5EbO6vvOrD3Zm2VJZGw6/+il elyzpMNwYAfZpJ5v3kXg7ox4vOyJJsw6DoFW82Xe4UnGVbopbsyUonwXnMQ67TZLU/Kr +7AVSsb8PSqB7gJpio/XzvjXpzYBvKfN+P7gbi14KEKht5bTvpIJOOzOaHY0HByI0wiM mgiQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 12si953476edv.200.2020.11.19.17.30.29; Thu, 19 Nov 2020 17:30:52 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726392AbgKTB0f (ORCPT + 99 others); Thu, 19 Nov 2020 20:26:35 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:8004 "EHLO szxga05-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726295AbgKTB0f (ORCPT ); Thu, 19 Nov 2020 20:26:35 -0500 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4Ccf5P0kYFzhbYS; Fri, 20 Nov 2020 09:26:17 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.487.0; Fri, 20 Nov 2020 09:26:28 +0800 From: Tian Tao To: , , , , , Subject: [PATCH] tty: serial: rad-uart: replace spin_lock_irqsave by spin_lock in hard IRQ Date: Fri, 20 Nov 2020 09:26:53 +0800 Message-ID: <1605835613-28359-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The code has been in a irq-disabled context since it is hard IRQ. There is no necessity to do it again. Signed-off-by: Tian Tao --- drivers/tty/serial/rda-uart.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/rda-uart.c b/drivers/tty/serial/rda-uart.c index 85366e0..d6705a0 100644 --- a/drivers/tty/serial/rda-uart.c +++ b/drivers/tty/serial/rda-uart.c @@ -406,10 +406,9 @@ static void rda_uart_receive_chars(struct uart_port *port) static irqreturn_t rda_interrupt(int irq, void *dev_id) { struct uart_port *port = dev_id; - unsigned long flags; u32 val, irq_mask; - spin_lock_irqsave(&port->lock, flags); + spin_lock(&port->lock); /* Clear IRQ cause */ val = rda_uart_read(port, RDA_UART_IRQ_CAUSE); @@ -426,7 +425,7 @@ static irqreturn_t rda_interrupt(int irq, void *dev_id) rda_uart_send_chars(port); } - spin_unlock_irqrestore(&port->lock, flags); + spin_unlock(&port->lock); return IRQ_HANDLED; } -- 2.7.4