From patchwork Thu Dec 19 00:58:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 11302535 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 F0B94138C for ; Thu, 19 Dec 2019 00:58:09 +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 CDCE3218AC for ; Thu, 19 Dec 2019 00:58:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Nbha0FP+"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="nx7gphMj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CDCE3218AC 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=OifWRiF4BI5pEwdvIEGHNaxO0P38KUPl4dCAmohoP2o=; b=Nbha0FP+JhsWhh kVaT28mHv5zHBOzTHxbH//fTxHgMgJ4eiEMIOtUWCghOYlzpnUxjspPUofjisk5FYBdEbea6VCvyB Q5IBKI1vaVCY8/W3Odwt9cNE1qVBFCdRpRNz1nW0QwQRHCZ2DWShOTT6WxZvxfTGVo3AywSOrUjGD kvfsF9GUgvSa4TZX+DDFWjbEMcYIPV+R+CWF+dsn+lAoYzKFaM35qIOexhDiyJLsZwJsfmDjpyDdp YU0dscH2aTS4jtxoRjSQEhN62xToJciYerkOXqLYdQ5dwCucyyb537zdzIcLwznlZ9KWuLraSRYVj upSqrmwI3K9DeFsYNhBA==; 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 1ihk8m-0000vV-8T; Thu, 19 Dec 2019 00:58:08 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihk8j-0000v0-2T for ath11k@lists.infradead.org; Thu, 19 Dec 2019 00:58:06 +0000 Received: by mail-pf1-x444.google.com with SMTP id 2so2169377pfg.12 for ; Wed, 18 Dec 2019 16:58:05 -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=yOH7ELVRGRHpc5yc+mhaOVn02IC0gb5hZs9FIFXbe9M=; b=nx7gphMj/8rKg9wjNACwYtnulIZ6Z8xrg7ko+Bj8Q4Goa9SMGAoBSjEbCjgcisRPZz 94RNOJQzTVei6D1ksrt+NFqvHYe6qpB7kXp5ddvzZmtYECJDiqIz/mLjmbL5pJopdi/8 YpYDwZcEXU8rsPmhRDAYFBKDYrIKY7rBgBZkI= 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=yOH7ELVRGRHpc5yc+mhaOVn02IC0gb5hZs9FIFXbe9M=; b=umhIIr4GoQzSoech1O0ftYHPT+GfAubS1FV/JmisF0xQ/PVD95l5NAc+HbIub/gSVr x+lIEPR/M/+t5LhJasEHq3rl2JA72VIIi0v30FvcpfbDkzpsQXXmV9Oj8HUF1J9uNFMD zJ8K5DDHDKtafJRe7UT42JRQwEYPkuRzgM2OGThw99MuZmnq1YY8G7zIEGeXE0LauZHy LTKe3Kpe1oy7IcGspHfdD+9RK6y+NtL3P888Oc/M91Crkll/zLUJqSix1V9vDNInwqOH lSAvyfuxqUQ+UX21GDmhf6v9/vfxcRS1mvgghDup83gJDA+oXFl+vhY2Wj9IJ+XUa12F L78g== X-Gm-Message-State: APjAAAXfpWQQEOvWaJKpL1EvfWrc19bPLEqJTtV0xLAZQ4C6dXgXxFC4 SsfI+jYsBesULRAL3pJdtvU4kQ== X-Google-Smtp-Source: APXvYqyEyAYA+swFuBfwD7jDeGcbH7mn+r/8mhydPwx0i9i1OR3DvHQExZunnygp3gx8B2+525aKYg== X-Received: by 2002:a63:234f:: with SMTP id u15mr6106045pgm.88.1576717084567; Wed, 18 Dec 2019 16:58:04 -0800 (PST) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id z130sm4704185pgz.6.2019.12.18.16.58.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 16:58:03 -0800 (PST) Date: Wed, 18 Dec 2019 16:58:02 -0800 From: Kees Cook To: Kalle Valo Subject: [PATCH] ath11k: Use sizeof_field() instead of FIELD_SIZEOF() Message-ID: <201912181657.CE7D3CE33@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_165805_116150_C883240A X-CRM114-Status: UNSURE ( 9.71 ) 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:444 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-wireless@vger.kernel.org, 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 --- resend: https://lore.kernel.org/lkml/87d0cl8q46.fsf@kamboji.qca.qualcomm.com --- 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