@@ -19,14 +19,6 @@ enum {
#define offsetof(TYPE, MEMBER) ((size_t)&((TYPE *)0)->MEMBER)
#endif
-/**
- * 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)
*
@@ -34,6 +26,6 @@ enum {
* @MEMBER: The member within the structure to get the end offset of
*/
#define offsetofend(TYPE, MEMBER) \
- (offsetof(TYPE, MEMBER) + sizeof_field(TYPE, MEMBER))
+ (offsetof(TYPE, MEMBER) + sizeof(((TYPE *)0)->MEMBER))
#endif
Now we have sizeof_member macro to find the size of a member of a struct. sizeof_field macro is not getting used any more hence remove it. Also modify the offsetofend macro to get rid of it. Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com> --- include/linux/stddef.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)