All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
To: pankaj.bharadiya@gmail.com, andriy.shevchenko@linux.intel.com,
	kernel-hardening@lists.openwall.com, keescook@chromium.org,
	akpm@linux-foundation.org, mayhs11saini@gmail.com,
	linux-kernel@vger.kernel.org
Cc: pankaj.laxminarayan.bharadiya@intel.com
Subject: [PATCH 4/5] linux/kernel.h: Remove FIELD_SIZEOF macro
Date: Tue, 24 Sep 2019 16:28:38 +0530	[thread overview]
Message-ID: <20190924105839.110713-5-pankaj.laxminarayan.bharadiya@intel.com> (raw)
In-Reply-To: <20190924105839.110713-1-pankaj.laxminarayan.bharadiya@intel.com>

Now we have sizeof_member macro to find the size of a member of a struct.

FIELD_SIZEOF macro is not getting used any more hence remove it.

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 include/linux/kernel.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 0b80d8bb3978..064497792c70 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -88,15 +88,6 @@
  */
 #define sizeof_member(T, m) (sizeof(((T *)0)->m))
 
-/**
- * FIELD_SIZEOF - get the size of a struct's field
- * @t: the target struct
- * @f: the target struct's field
- * Return: the size of @f in the struct definition without having a
- * declared instance of @t.
- */
-#define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f))
-
 #define typeof_member(T, m)	typeof(((T*)0)->m)
 
 #define DIV_ROUND_UP __KERNEL_DIV_ROUND_UP
-- 
2.17.1


  parent reply	other threads:[~2019-09-24 11:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 10:58 [PATCH 0/5] Add and use sizeof_member macro to bring uniformity Pankaj Bharadiya
2019-09-24 10:58 ` [PATCH 1/5] linux/kernel.h: Add sizeof_member macro Pankaj Bharadiya
2019-09-24 16:22   ` Kees Cook
2019-09-25  4:29     ` Bharadiya,Pankaj
2019-09-24 10:58 ` [PATCH 2/5] treewide: Use " Pankaj Bharadiya
2019-09-24 10:58 ` [PATCH 3/5] MIPS: OCTEON: use sizeof_member macro instead of SIZEOF_FIELD Pankaj Bharadiya
2019-09-24 10:58 ` Pankaj Bharadiya [this message]
2019-09-24 10:58 ` [PATCH 5/5] stddef.h: Remove sizeof_field macro Pankaj Bharadiya
2019-09-24 16:28 ` [PATCH 0/5] Add and use sizeof_member macro to bring uniformity Kees Cook
2019-09-24 17:07   ` Kees Cook
  -- strict thread matches above, loose matches on Subject: below --
2019-09-24 10:51 Pankaj Bharadiya
2019-09-24 10:51 ` [PATCH 4/5] linux/kernel.h: Remove FIELD_SIZEOF macro Pankaj Bharadiya
2019-09-24  8:14 [PATCH 0/5] Add and use sizeof_member macro to bring uniformity Pankaj Bharadiya
2019-09-24  8:14 ` [PATCH 4/5] linux/kernel.h: Remove FIELD_SIZEOF macro Pankaj Bharadiya

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190924105839.110713-5-pankaj.laxminarayan.bharadiya@intel.com \
    --to=pankaj.laxminarayan.bharadiya@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=keescook@chromium.org \
    --cc=kernel-hardening@lists.openwall.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mayhs11saini@gmail.com \
    --cc=pankaj.bharadiya@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.