Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4513308pxj; Wed, 12 May 2021 07:15:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4B8/YI/M2dJJn7nHhaelPZvbOZYwA0dIgBd7yFn2LGjU0jSfFfAWgmltRa48AUafA0XX+ X-Received: by 2002:a05:6000:144:: with SMTP id r4mr45057533wrx.128.1620828923742; Wed, 12 May 2021 07:15:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620828923; cv=none; d=google.com; s=arc-20160816; b=ILU2ZZbOiZKIXngSaizmuCH5t2tDn46Hy0rQk53KloFn3I9fpzNz48JbFUnPUjLJgp 0R4s3AOZhWrXJ3k2o6seETyni3UE5cHUGy0tWUpJa0deFoLRnY6pf9w8SE+bc/o0zVZm 21obEoy2P5fZH043tF3iIn/vlw4rgmnMn6gcaBB/g+fMQpLfgM3tCe3J1448MvlKQ3J/ t+0xyB6J3P7+l0pBeFH7Fxhs6zSmNqYL6ALOAN+qZ6vEZ5hwsBmArvdixwBWxlWGcuOJ lZfUQXvSNVt+PmjB0SLFAjGbsc0PO+5N0fz1ltNsc82loRCWpGCB6iZnZD6mriJS3kD0 VlEg== 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=q/emhId86zbAHjEJsMybyTp09UAQsC5xXOrReMl0QlrJtbky930vapKPE0aqUUkbBf uokvUr0al3FiMKatF+ob3jLBI2BBniHClJvvqPnXvwB0iJbLyeDW4EIeOI1tdeGDOXeH 7c5/zwneEe1mR2nZ7fJHMsWWwym9pwfm9+fjztPuLHbR+/tdnIhAjFPSrfkxxq3/pIl4 mLH3YGXmj/FxoxN1gVRbZ17dGsaH7+eiIQ3Tkg/8nbPJ1Fe1tneiLI/YRxCJRVhHgiFQ 24xP+ABXAeGFdz/sINSLa5Eh39Lw4TanaJXvGc2z0uE3CujFyHlO+nYurMmXgtIKTg70 HHjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b="W/k9dzuT"; 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 x4si92323wrq.527.2021.05.12.07.14.58; Wed, 12 May 2021 07:15:23 -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="W/k9dzuT"; 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 S231259AbhELOOj (ORCPT + 99 others); Wed, 12 May 2021 10:14:39 -0400 Received: from ssl.serverraum.org ([176.9.125.105]:58517 "EHLO ssl.serverraum.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231338AbhELOOP (ORCPT ); Wed, 12 May 2021 10:14:15 -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 31C0A2225D; Wed, 12 May 2021 16:13:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1620828786; 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=W/k9dzuTkeFAerVNrFdOyWmRZEF6+C//qJcbtWp/JHq/pr4XeQURHyRrw0iijlCohZToGD uqXiIPMFjkRYzNcFwufa6XskwqvRIHY/z2hFh9anjQp9vAnYa0vrtR0H6iq3uh0c4RscaQ cdo+J6IfIU1SHQ5jw88xq1hOET+Ox48= From: Michael Walle To: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , Angelo Dureghello , Johan Hovold , Philippe Schenker , Michael Walle Subject: [PATCH v2 2/9] serial: fsl_lpuart: use UARTDATA_MASK macro Date: Wed, 12 May 2021 16:12:48 +0200 Message-Id: <20210512141255.18277-3-michael@walle.cc> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210512141255.18277-1-michael@walle.cc> References: <20210512141255.18277-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