From patchwork Wed Dec 18 17:19:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 11301471 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A6E4C14F6 for ; Wed, 18 Dec 2019 17:19:44 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7B2032064B for ; Wed, 18 Dec 2019 17:19:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mDEfCi3Z"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="GIpbN7R+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B2032064B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Z4Fe0ogxPwlXsYuv+TX4QClqZz6BAwZTob35XgyIyS4=; b=mDEfCi3Zio//Qa SaIJ/wzO2UcZW8jTfFWXRIi+Q0Dtal9P0TgjnYPbCsiTjN7FssK3KfJlBk3RuNHuXbC1qh5hoAQCv xq+xDF77uy7zqyN7GFsCYf+1a45nAF/bniKZXKb/uL+KvzM0ISSw77NEugPBlZPnli85GkpTfUhVy +UNneCyLijPsBnMfPxTK4KdW4m3cL/tzwXxE8vtzVMbRnsId6Hd33DocpJoXjQPE26H8+SMk4OBI8 9S06Qg9hSqde4hMkdHxbXPHLT5bMSdM/3bYWIPsPa56wJy1yDYHscMZ+Tj+gQ9BK4X5zkTRP9+28h 2Lgzh+qSHCp3gnRXLYzw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihcz8-0005DJ-IS; Wed, 18 Dec 2019 17:19:42 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihcz4-0005CK-KF for ath11k@lists.infradead.org; Wed, 18 Dec 2019 17:19:39 +0000 Received: by mail-pg1-x542.google.com with SMTP id b137so1612046pga.6 for ; Wed, 18 Dec 2019 09:19:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=H/hEuD7eWbjzcqhNaznrQpD/OcKDfv3itQBijN/o1Lk=; b=GIpbN7R+81t4ErlQljsRQyxaVLa3w4wV27QCc4PnyQ6ibdiyiThB89Y0zWclSKBVUS XaaBZwZozPK6vPEfUN58I4aqyrTEIIa9E7o9tUA37SXHSV8KfifXtFSzTrYyBktzxKym dUqZtg4Kna/7O0NK1DSDq3X3cgP5cC5M/raxE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=H/hEuD7eWbjzcqhNaznrQpD/OcKDfv3itQBijN/o1Lk=; b=C5lPOemyqHQskt2XR5zfsqNISCfcJORp5F9nht3kTXqJgSgcLdv/kaL+QO1hBmFLf7 DKpwOQ6KJMkfAcFXi8piXnwgLK76pv1WAC1atwF6d57QbNMSJrU6+fz4QDZ56NEk4i5d PSD4qU/zim30enVfn9ik7EdiEh3wvqWBXQcl0XfSlylj5f5/JZIBt8NTMVte8skgt7/l Ug2hjJrNPuMiad8S1Z5g6zW3Oeu+us/cf9AyTHSqn2ehTCuzFHfceZbJZe54IePJ7XL+ 3ZaQC0bUZYj8sJ3Hn2cq8SsROOeMI3oFjjMB8KahpZRU4ow4ZViUhA+wxiDqIwJV2biy hZVQ== X-Gm-Message-State: APjAAAW1ttxjNOCqKU4mX2hT//xdu3Xhq9Zq9YoJYrYpeAsuyJnmA5mY zqXMi4wlHd2NklzM+bsqSkZK9w== X-Google-Smtp-Source: APXvYqy1bwshCedLsN4foC5mYKqDnmIuppMB2bZZ9cqKw0d6z0v+8dti5oLQMl7Ij9J3/zU55OwI4Q== X-Received: by 2002:a63:551a:: with SMTP id j26mr4215527pgb.370.1576689577665; Wed, 18 Dec 2019 09:19:37 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id b15sm3883901pft.58.2019.12.18.09.19.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 09:19:36 -0800 (PST) Date: Wed, 18 Dec 2019 09:19:35 -0800 From: Kees Cook To: Kalle Valo Subject: [PATCH] ath11k: Use sizeof_field() instead of FIELD_SIZEOF() Message-ID: <201912180919.2A471217@keescook> MIME-Version: 1.0 Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191218_091938_665491_076CDE61 X-CRM114-Status: UNSURE ( 9.62 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:542 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, ath11k@lists.infradead.org Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org The FIELD_SIZEOF() macro was redundant, and is being removed from the kernel. Since commit c593642c8be0 ("treewide: Use sizeof_field() macro") this is one of the last users of the old macro, so replace it. Signed-off-by: Kees Cook --- drivers/net/wireless/ath/ath11k/wmi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/wmi.h b/drivers/net/wireless/ath/ath11k/wmi.h index 4a518d406bc5..fd7cb07a9940 100644 --- a/drivers/net/wireless/ath/ath11k/wmi.h +++ b/drivers/net/wireless/ath/ath11k/wmi.h @@ -44,7 +44,7 @@ struct wmi_tlv { #define WMI_TLV_LEN GENMASK(15, 0) #define WMI_TLV_TAG GENMASK(31, 16) -#define TLV_HDR_SIZE FIELD_SIZEOF(struct wmi_tlv, header) +#define TLV_HDR_SIZE sizeof_field(struct wmi_tlv, header) #define WMI_CMD_HDR_CMD_ID GENMASK(23, 0) #define WMI_MAX_MEM_REQS 32