Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3838408pxj; Tue, 11 May 2021 13:03:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2/Gvcr9E8+/+UZcscj+9w2WVHXg36nH0QUG3MuYCJRZRJgsVbGxHAGYaxzoNNxXFrVziF X-Received: by 2002:a50:ff08:: with SMTP id a8mr6920598edu.46.1620763420656; Tue, 11 May 2021 13:03:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620763420; cv=none; d=google.com; s=arc-20160816; b=ZZkwU0GtEx3wQTfs9adF5rBgimSufPZHIyWrKIELe8QBjpd7wSAPcoYp32ek37zFxJ UOSta9ClJou1EtwNSmD+HlXs9vtQrpC8QnDApCcsldoAUxexTujsQUMBtCiRZcIEoU5B 7D6Q+ErKBjpvQiVAsTCDwmPhZo4G+g4R9n62jjykyDtvHGQIkxE4/D7t2EIUpNRk5ceS XZzWC0poK+xmCjRRSgpv5kfdwRESllACZ75ONu1j7FXZDviuaLn8JdNibTeXRJJN277s HAtBcARQ6EuT6EALXrQVX84aVeKL4yV8aA0r5tnIX/OOkMcqG+3wvEQ14TB6aGbBTlmi nzYA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uFF3464Ov8Z2ChbvZV2eQ/PAASkGDOipVGOpBK/usRA=; b=wHhv54j3Nvx9GjvzA71+OCKsUIwY2tI6+PHuYxXh04jvMYmDPiPhpusGn+sA97AJvT AOgZ9ScNhn2IfPfyjNhQZXMsTvofBRzOtmFRTS+aoMUn3yaKXJ2EufE7oZILBh502xoc GzFTtbFAndHy2819Cqzz3ZOOLgYb3OnVP6+J5ZJ2620ePo1qfZLuJwDuYNsyqjYciGG3 AVyUVeaB/vLm+xo9ZLWOzgIbOS3bmz+/eRpMbRX40wjEuycwDaUGDpR9XdP0HJ1YD1LL xF8ebpqXKSMfFruiNbz5Gu010vzPHdZZtRZgpx3CJHdeB9SYf3LI309EQYsZyx7TXfFt 4QxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=jbD1ZW0Q; 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 ch7si17615748ejb.164.2021.05.11.13.03.17; Tue, 11 May 2021 13:03:40 -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; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=jbD1ZW0Q; 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 S229548AbhEKUDN (ORCPT + 99 others); Tue, 11 May 2021 16:03:13 -0400 Received: from ssl.serverraum.org ([176.9.125.105]:51999 "EHLO ssl.serverraum.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229970AbhEKUDK (ORCPT ); Tue, 11 May 2021 16:03:10 -0400 Received: from mwalle01.fritz.box (unknown [IPv6:2a02:810c:c200:2e91:fa59:71ff:fe9b:b851]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 0733122260; Tue, 11 May 2021 22:02:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1620763322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uFF3464Ov8Z2ChbvZV2eQ/PAASkGDOipVGOpBK/usRA=; b=jbD1ZW0QbIcCQJfMQ3C4R/nzr7yTNjStcdQ4WkdtYMo+ncOvGTTIHQMCLVUp/VDeqmOeOh K/1V3ufzM39ovv1+1ghTGqF/AiA44Ad7N09mVcOwwygxCB63+VnAf3keQis60XY6kI6drM vbuP5/rmRKbtenBe7IBxAeI7Eum3WmI= From: Michael Walle To: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , Angelo Dureghello , Fugang Duan , Philippe Schenker , Michael Walle Subject: [PATCH 2/8] serial: fsl_lpuart: use UARTDATA_MASK macro Date: Tue, 11 May 2021 22:01:42 +0200 Message-Id: <20210511200148.11934-3-michael@walle.cc> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210511200148.11934-1-michael@walle.cc> References: <20210511200148.11934-1-michael@walle.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the corresponding macro instead of the magic number. While at it, drop the useless cast to "unsigned char". Signed-off-by: Michael Walle --- drivers/tty/serial/fsl_lpuart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index fbf2e4d2d22b..b76ddc0d8edc 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -928,9 +928,9 @@ static void lpuart32_rxint(struct lpuart_port *sport) */ sr = lpuart32_read(&sport->port, UARTSTAT); rx = lpuart32_read(&sport->port, UARTDATA); - rx &= 0x3ff; + rx &= UARTDATA_MASK; - if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx)) + if (uart_handle_sysrq_char(&sport->port, rx)) continue; if (sr & (UARTSTAT_PE | UARTSTAT_OR | UARTSTAT_FE)) { -- 2.20.1