Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1614980ybv; Fri, 21 Feb 2020 00:19:37 -0800 (PST) X-Google-Smtp-Source: APXvYqyPNoSAoRxU7bBwdZiRIfdWJjk8L6byVfjW3Z6mV5BWXFMjXqkuqjXWmJWhL+AxIKJSpV1y X-Received: by 2002:aca:f242:: with SMTP id q63mr1044077oih.72.1582273177111; Fri, 21 Feb 2020 00:19:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582273177; cv=none; d=google.com; s=arc-20160816; b=nfZj6rCeawj4WycvTTRBugrlGNJ6M7O59O8eN4st1SrMtXPg1f5y6XX+tgv5xQH/Uw IPZttsjaqHGOMJBIE4bKMj+k9KF6cpd2veSIppCHzQ2XfbhpA0goAJU1TBsw2QJVHgvn BCZwPMz8MR4kTwhZj5V5oBRww3me+5xcv26Ig4N8vF4c+COEMfJorax1ij1SjDz9dCeQ 1EyZKxh00aAWJLigOv9smiKp8Jnc9IF07Yk1KOjZw8WOOabFfFGJ//BCUrmoU2UEY9Et xnW3KXsMKY/w3zYG9SI9RY2AgQVpmkYHy3QNwdbCbQeB0sPyz5DtYN0AP8WAVD2wJoAB Fhzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=xWH3ZqQt/dpPG7/bopE0yrPaOIJKpPOYtibOGtrGjjU=; b=siPWZ7RGf+Z8TkibaU3biZjrjeS27i2C4cWZ+B/MeCT1DUFBcqxdS0kDhsALnPEdVB bDTcrbNhz+8Aa7lJkVDaFyuEBiCvnvxfwng+4ufsPc4TeotJuR8f/xtWVklxm91w0N5s 0NvoU2JV5s35fyWbjG0Fh3gxaSH6KpWeqq9ynYa7lV0LWGj6WA4fwr4/anwSs1UHn6me 1/NrO9ow3BsCSZwCFnL7uwS//44V0Qur+E0E9+drdWLMTzxtJEHQsCS4t5cGFr37H1WT 2Lfeq/8gDTkxTs+ucoiLa3eWfKuJh3ydh4KPRvLPaPrNojMQssl/du549iB2L7MObEtQ 1rJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YMNOm4jJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i11si1091206otc.105.2020.02.21.00.19.25; Fri, 21 Feb 2020 00:19:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YMNOm4jJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733152AbgBUISn (ORCPT + 99 others); Fri, 21 Feb 2020 03:18:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:56726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387881AbgBUISl (ORCPT ); Fri, 21 Feb 2020 03:18:41 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 60D782468E; Fri, 21 Feb 2020 08:18:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582273120; bh=kLNQ+FLQ6O06uqz36zDPUY32MmO6SWt5w1ST1XEDnSM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YMNOm4jJ7KkTefsfwJIreYOX02xtQzBAWT6AG5Ir5dvn5VwEs5GL1ezPiS7qO4phf 3Lkjn0uzCx6M8t2/b19Y2GKtoPlYW3IlREhakgVCYGX6LnKjh2j7itVsIKW2KE14Hm iuEyInjTsmOK8XKKrnABllR/Je99FHBPeQDmgbno= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Mao Wenan , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 055/191] NFC: port100: Convert cpu_to_le16(le16_to_cpu(E1) + E2) to use le16_add_cpu(). Date: Fri, 21 Feb 2020 08:40:28 +0100 Message-Id: <20200221072258.135258927@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072250.732482588@linuxfoundation.org> References: <20200221072250.732482588@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mao Wenan [ Upstream commit 718eae277e62a26e5862eb72a830b5e0fe37b04a ] Convert cpu_to_le16(le16_to_cpu(frame->datalen) + len) to use le16_add_cpu(), which is more concise and does the same thing. Reported-by: Hulk Robot Signed-off-by: Mao Wenan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/nfc/port100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nfc/port100.c b/drivers/nfc/port100.c index 60ae382f50da9..06bb226c62ef4 100644 --- a/drivers/nfc/port100.c +++ b/drivers/nfc/port100.c @@ -574,7 +574,7 @@ static void port100_tx_update_payload_len(void *_frame, int len) { struct port100_frame *frame = _frame; - frame->datalen = cpu_to_le16(le16_to_cpu(frame->datalen) + len); + le16_add_cpu(&frame->datalen, len); } static bool port100_rx_frame_is_valid(void *_frame) -- 2.20.1