From patchwork Tue Sep 24 08:14:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Bharadiya X-Patchwork-Id: 11158439 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 A7B2F1747 for ; Tue, 24 Sep 2019 11:09:47 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id 0CCE12146E for ; Tue, 24 Sep 2019 11:09:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0CCE12146E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernel-hardening-return-16911-patchwork-kernel-hardening=patchwork.kernel.org@lists.openwall.com Received: (qmail 19486 invoked by uid 550); 24 Sep 2019 11:09:24 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Delivered-To: moderator for kernel-hardening@lists.openwall.com Received: (qmail 7549 invoked from network); 24 Sep 2019 08:21:14 -0000 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,543,1559545200"; d="scan'208";a="203330031" From: Pankaj Bharadiya To: kernel-hardening@lists.openwall.com, keescook@chromium.org, akpm@linux-foundation.org, mayhs11saini@gmail.com Cc: pankaj.laxminarayan.bharadiya@intel.com Subject: [PATCH 3/5] MIPS: OCTEON: use sizeof_member macro instead of SIZEOF_FIELD Date: Tue, 24 Sep 2019 13:44:37 +0530 Message-Id: <20190924081439.15219-4-pankaj.laxminarayan.bharadiya@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190924081439.15219-1-pankaj.laxminarayan.bharadiya@intel.com> References: <20190924081439.15219-1-pankaj.laxminarayan.bharadiya@intel.com> Now we have a standard sizeof_member macro to find the size of a member of a struct. Remove the SIZEOF_FIELD macro and use sizeof_member instead. Signed-off-by: Pankaj Bharadiya --- arch/mips/cavium-octeon/executive/cvmx-bootmem.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/arch/mips/cavium-octeon/executive/cvmx-bootmem.c b/arch/mips/cavium-octeon/executive/cvmx-bootmem.c index ba8f82a29a81..c2cbb6ca29f9 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-bootmem.c +++ b/arch/mips/cavium-octeon/executive/cvmx-bootmem.c @@ -44,13 +44,6 @@ static struct cvmx_bootmem_desc *cvmx_bootmem_desc; /* See header file for descriptions of functions */ -/** - * This macro returns the size of a member of a structure. - * Logically it is the same as "sizeof(s::field)" in C++, but - * C lacks the "::" operator. - */ -#define SIZEOF_FIELD(s, field) sizeof(((s *)NULL)->field) - /** * This macro returns a member of the * cvmx_bootmem_named_block_desc_t structure. These members can't @@ -65,7 +58,7 @@ static struct cvmx_bootmem_desc *cvmx_bootmem_desc; #define CVMX_BOOTMEM_NAMED_GET_FIELD(addr, field) \ __cvmx_bootmem_desc_get(addr, \ offsetof(struct cvmx_bootmem_named_block_desc, field), \ - SIZEOF_FIELD(struct cvmx_bootmem_named_block_desc, field)) + sizeof_member(struct cvmx_bootmem_named_block_desc, field)) /** * This function is the implementation of the get macros defined