Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1930235ybv; Fri, 14 Feb 2020 08:24:52 -0800 (PST) X-Google-Smtp-Source: APXvYqyn0Qm6mYmZhvSPNxr0MKxDMIvft+dGvvx6vNheyZMVbz6K6IQN4JsfDNGLlmrSg5QKwkJp X-Received: by 2002:a9d:7509:: with SMTP id r9mr2839817otk.270.1581697492644; Fri, 14 Feb 2020 08:24:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581697492; cv=none; d=google.com; s=arc-20160816; b=Yy+ruF9voNaFwpaFlBQ4IEtC1CRjIHGvQ2TjsnIBtgZrmbjVwXpjEI5PTDN4VZ07u/ RJjt0Rs24i1cdmkASAdXIdaYyWVRSb6YGtwNbhkUeR0LEc2i3FDcgTEsoFCfUZs1hoxb y2Uiq+pB5RhGgDlBc1rxTRZWnsfMt1tj+Lnlhw0Ttu9GqZVFfvNRt0JdnnulkhLzNE76 lUS7y5nSIyGYbs4XjB2qZybPeX3u1x7saMKvhEtypQkPPOLFBEC1A1gO+1aQ3jnPNKua YQkN6hnX9jA6zWfv5mP2ikAcZ75YeLwzj8FOxWnxQknsZDtoDxzO+y0U7gQmFO0rLzFf sBiA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=uFbe829Pi49+cQNwmfPm9DUKGlCgyIMabjkiQLTIUGw=; b=WH3GCzHriosa7JKoKEob0Yk2X0RfgT4G0RizLyqhJzKzCouKB/umVdGBe5bbA65xcf qVsb25RJtK02s4AhdJBVp+DMQvKLBZBuzjhabhHXJlNbDCws/UQgMnynrG0VfPH5oVAo lidlcXzGNyUScYmMBAHAH12jOo0e0tK9HTsZ0lwyS6S58E4a99D36Zm9ftPKKg2kV1zz 23i7XwiZCyaPV189hZNUO2TYrDJisSJCipiF2hqJ1sFal2sxenFmYCNzxmzVb3BHiFOp P9htGqu3HgjKkKXB6vQTvBIWRC7RawGk6yhIdIUKhUsMRfwORzNrgKV//H1bIalXzVmV YHOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="H/2GqUGH"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o18si2757194oic.18.2020.02.14.08.24.40; Fri, 14 Feb 2020 08:24:52 -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="H/2GqUGH"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391544AbgBNQYL (ORCPT + 99 others); Fri, 14 Feb 2020 11:24:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:57970 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405449AbgBNQW1 (ORCPT ); Fri, 14 Feb 2020 11:22:27 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5AC8B24747; Fri, 14 Feb 2020 16:22:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581697347; bh=Y3rmB0n2Bwds4vY+xXhnHcjSIlguK30yVGX2AiFZnUc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H/2GqUGHOnXfQTO5GIXDVgBXNoIcnNnvKFr/rA3pDUwIp9vOqYOEEWwD0TOlcaTHw vg8kYJJbsLsjoRnYT+rK5mmQp4kqiJ4fkeW48MYw1qockq1fvHN0webu8XjND0/NR8 qgKHU0x/AlhPllVT2j/bPhtRua3BmZkOsqKOBo8g= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mao Wenan , Hulk Robot , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.9 051/141] NFC: port100: Convert cpu_to_le16(le16_to_cpu(E1) + E2) to use le16_add_cpu(). Date: Fri, 14 Feb 2020 11:19:51 -0500 Message-Id: <20200214162122.19794-51-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200214162122.19794-1-sashal@kernel.org> References: <20200214162122.19794-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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 3cd995de1bbb5..151b220381f95 100644 --- a/drivers/nfc/port100.c +++ b/drivers/nfc/port100.c @@ -573,7 +573,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