From patchwork Sun Apr 14 09:14:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Saini X-Patchwork-Id: 10901139 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 776A614DB for ; Mon, 15 Apr 2019 16:08:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60E882871E for ; Mon, 15 Apr 2019 16:08:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5520428727; Mon, 15 Apr 2019 16:08:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 120432871E for ; Mon, 15 Apr 2019 16:08:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4271A898BC; Mon, 15 Apr 2019 16:08:10 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4E87389218 for ; Sun, 14 Apr 2019 09:15:36 +0000 (UTC) Received: by mail-pf1-x443.google.com with SMTP id 8so7155022pfr.4 for ; Sun, 14 Apr 2019 02:15:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nQJrrbue7c3N84Cd6mFZPA1Y1o7acbXS4cTb2nznlGA=; b=Qfjn5sVguNXdbrirNmP8PAP7p0c/Nb1wP57JxDBTymoESwC762KrmsSfy6vOpYNM9j 3BbIPPMpgZ9J1BUyRoYCrNNjPc4JP1PuzgGIT/4SVTJGnMqNA53EVOjzHz62DTSBTfOa z2fhxQCoN0VaifdvgXj2zHgWJ1LAWj+3JQt8OUJMzQAN90aP2oOjtRAA9+5SZwzunOjl cog+bywDic1lMaKULomojz5XbmUDAhAoLlqf70hWuvvqs6OXA4yP5LoeYdHjevMIrc4I 8+gCrqf5XgiJyzWN3X4LIVTrWNSEJFmK/JaPiR6cqkWtzHyISgUZ1UONEeBOoMIiFoBm K4Lg== X-Gm-Message-State: APjAAAXeNOWDy6xEb7kKrjizcS5IvIApSLcqSzFPIqaqWhM8LxiZcO6t M+9A4HaqvfyGpkfzTACEQJWu2Q== X-Google-Smtp-Source: APXvYqzJvZI8cg4NBQ48Y2+PvRZTxzZuXgdmiA69lcI6ZO8t6W2tPumqwfHBphvyyz1mE1fpT8Y3Og== X-Received: by 2002:a63:3188:: with SMTP id x130mr61423347pgx.64.1555233335889; Sun, 14 Apr 2019 02:15:35 -0700 (PDT) Received: from localhost.localdomain ([42.111.19.105]) by smtp.googlemail.com with ESMTPSA id g10sm31344767pgq.54.2019.04.14.02.15.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Apr 2019 02:15:35 -0700 (PDT) From: Shyam Saini To: kernel-hardening@lists.openwall.com Date: Sun, 14 Apr 2019 14:44:52 +0530 Message-Id: <20190414091452.22275-2-shyam.saini@amarulasolutions.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190414091452.22275-1-shyam.saini@amarulasolutions.com> References: <20190414091452.22275-1-shyam.saini@amarulasolutions.com> X-Mailman-Approved-At: Mon, 15 Apr 2019 16:08:02 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nQJrrbue7c3N84Cd6mFZPA1Y1o7acbXS4cTb2nznlGA=; b=Vx6SC+WBX6kmXBT4OP7H4eDk8pZHoU/6bnBya6zmdqnkmojK/Kyegi8oINArN7IYSn +1/yKPRCgEiPL2mbV0UVrKN/5WOq6lk9U0eM7lknJ/LesMvOvavOIaIHTDuaUm2Sal0B 6L2RJwK2Dz0nII5LmzT4mcUBTnjEOkw+KlIkA= Subject: [Intel-gfx] [PATCH 2/2] include: linux: Remove unused macros and their defination X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: keescook@chromium.org, kvm@vger.kernel.org, netdev@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-mips@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Shyam Saini , linux-mm@kvack.org, linux-sctp@vger.kernel.org, devel@lists.orangefs.org, akpm@linux-foundation.org, linux-ext4@vger.kernel.org, intel-gvt-dev@lists.freedesktop.org, bpf@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mayhs11saini@gmail.com MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP In favour of FIELD_SIZEOF, lets deprecate other two similar macros sizeof_field and SIZEOF_FIELD, and remove them completely. Signed-off-by: Shyam Saini --- arch/mips/cavium-octeon/executive/cvmx-bootmem.c | 7 ------- include/linux/stddef.h | 8 -------- tools/testing/selftests/bpf/bpf_util.h | 4 ---- 3 files changed, 19 deletions(-) diff --git a/arch/mips/cavium-octeon/executive/cvmx-bootmem.c b/arch/mips/cavium-octeon/executive/cvmx-bootmem.c index fc754d155002..44b506a14666 100644 --- a/arch/mips/cavium-octeon/executive/cvmx-bootmem.c +++ b/arch/mips/cavium-octeon/executive/cvmx-bootmem.c @@ -45,13 +45,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 * be directly addressed as they might be in memory not directly diff --git a/include/linux/stddef.h b/include/linux/stddef.h index 63f2302bc406..b888eb7795a1 100644 --- a/include/linux/stddef.h +++ b/include/linux/stddef.h @@ -29,14 +29,6 @@ enum { #define FIELD_SIZEOF(t, f) (sizeof(((t *)0)->f)) /** - * sizeof_field(TYPE, MEMBER) - * - * @TYPE: The structure containing the field of interest - * @MEMBER: The field to return the size of - */ -#define sizeof_field(TYPE, MEMBER) sizeof((((TYPE *)0)->MEMBER)) - -/** * offsetofend(TYPE, MEMBER) * * @TYPE: The type of the structure diff --git a/tools/testing/selftests/bpf/bpf_util.h b/tools/testing/selftests/bpf/bpf_util.h index 2e90a4315b55..815e7b48fa37 100644 --- a/tools/testing/selftests/bpf/bpf_util.h +++ b/tools/testing/selftests/bpf/bpf_util.h @@ -67,10 +67,6 @@ static inline unsigned int bpf_num_possible_cpus(void) */ #define FIELD_SIZEOF(t, f) (sizeof(((t *)0)->f)) -#ifndef sizeof_field -#define sizeof_field(TYPE, MEMBER) sizeof((((TYPE *)0)->MEMBER)) -#endif - #ifndef offsetofend #define offsetofend(TYPE, MEMBER) \ (offsetof(TYPE, MEMBER) + FIELD_SIZEOF(TYPE, MEMBER))