public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remove INT_GET and friends
@ 2008-04-11 14:44 Eric Sandeen
  2008-04-11 16:05 ` Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Eric Sandeen @ 2008-04-11 14:44 UTC (permalink / raw)
  To: xfs-oss

Thanks to hch's endian work, INT_GET etc are no longer used,
and may as well be removed.  INT_SET is still used in
the acl code, though.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---

 xfs_arch.h |   68 ---------------------------------
 1 files changed, 68 deletions(-)



Index: linux-2.6-xfs/fs/xfs/xfs_arch.h
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/xfs_arch.h
+++ linux-2.6-xfs/fs/xfs/xfs_arch.h
@@ -92,16 +92,6 @@
 	((__u8*)(pointer))[1] = (((value)     ) & 0xff); \
     }
 
-/* define generic INT_ macros */
-
-#define INT_GET(reference,arch) \
-    (((arch) == ARCH_NOCONVERT) \
-	? \
-	    (reference) \
-	: \
-	    INT_SWAP((reference),(reference)) \
-    )
-
 /* does not return a value */
 #define INT_SET(reference,arch,valueref) \
     (__builtin_constant_p(valueref) ? \
@@ -112,64 +102,6 @@
 	) \
     )
 
-/* does not return a value */
-#define INT_MOD_EXPR(reference,arch,code) \
-    (((arch) == ARCH_NOCONVERT) \
-	? \
-	    (void)((reference) code) \
-	: \
-	    (void)( \
-		(reference) = INT_GET((reference),arch) , \
-		((reference) code), \
-		INT_SET(reference, arch, reference) \
-	    ) \
-    )
-
-/* does not return a value */
-#define INT_MOD(reference,arch,delta) \
-    (void)( \
-	INT_MOD_EXPR(reference,arch,+=(delta)) \
-    )
-
-/*
- * INT_COPY - copy a value between two locations with the
- *	      _same architecture_ but _potentially different sizes_
- *
- *	    if the types of the two parameters are equal or they are
- *		in native architecture, a simple copy is done
- *
- *	    otherwise, architecture conversions are done
- *
- */
-
-/* does not return a value */
-#define INT_COPY(dst,src,arch) \
-    ( \
-	((sizeof(dst) == sizeof(src)) || ((arch) == ARCH_NOCONVERT)) \
-	    ? \
-		(void)((dst) = (src)) \
-	    : \
-		INT_SET(dst, arch, INT_GET(src, arch)) \
-    )
-
-/*
- * INT_XLATE - copy a value in either direction between two locations
- *	       with different architectures
- *
- *		    dir < 0	- copy from memory to buffer (native to arch)
- *		    dir > 0	- copy from buffer to memory (arch to native)
- */
-
-/* does not return a value */
-#define INT_XLATE(buf,mem,dir,arch) {\
-    ASSERT(dir); \
-    if (dir>0) { \
-	(mem)=INT_GET(buf, arch); \
-    } else { \
-	INT_SET(buf, arch, mem); \
-    } \
-}
-
 static inline void be16_add(__be16 *a, __s16 b)
 {
 	*a = cpu_to_be16(be16_to_cpu(*a) + b);

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] remove INT_GET and friends
  2008-04-11 14:44 [PATCH] remove INT_GET and friends Eric Sandeen
@ 2008-04-11 16:05 ` Christoph Hellwig
  2008-07-08  3:05 ` Eric Sandeen
  2008-07-24  8:16 ` Niv Sardi
  2 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2008-04-11 16:05 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs-oss

On Fri, Apr 11, 2008 at 09:44:28AM -0500, Eric Sandeen wrote:
> Thanks to hch's endian work, INT_GET etc are no longer used,
> and may as well be removed.  INT_SET is still used in
> the acl code, though.

Looks good.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] remove INT_GET and friends
  2008-04-11 14:44 [PATCH] remove INT_GET and friends Eric Sandeen
  2008-04-11 16:05 ` Christoph Hellwig
@ 2008-07-08  3:05 ` Eric Sandeen
  2008-07-08  8:02   ` Christoph Hellwig
  2008-07-24  8:16 ` Niv Sardi
  2 siblings, 1 reply; 5+ messages in thread
From: Eric Sandeen @ 2008-07-08  3:05 UTC (permalink / raw)
  To: xfs-oss

Eric Sandeen wrote:
> Thanks to hch's endian work, INT_GET etc are no longer used,
> and may as well be removed.  INT_SET is still used in
> the acl code, though.
> 
> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
> ---
> 
>  xfs_arch.h |   68 ---------------------------------
>  1 files changed, 68 deletions(-)
> 

Ping?  these are just unused macros.

-Eric

> 
> Index: linux-2.6-xfs/fs/xfs/xfs_arch.h
> ===================================================================
> --- linux-2.6-xfs.orig/fs/xfs/xfs_arch.h
> +++ linux-2.6-xfs/fs/xfs/xfs_arch.h
> @@ -92,16 +92,6 @@
>  	((__u8*)(pointer))[1] = (((value)     ) & 0xff); \
>      }
>  
> -/* define generic INT_ macros */
> -
> -#define INT_GET(reference,arch) \
> -    (((arch) == ARCH_NOCONVERT) \
> -	? \
> -	    (reference) \
> -	: \
> -	    INT_SWAP((reference),(reference)) \
> -    )
> -
>  /* does not return a value */
>  #define INT_SET(reference,arch,valueref) \
>      (__builtin_constant_p(valueref) ? \
> @@ -112,64 +102,6 @@
>  	) \
>      )
>  
> -/* does not return a value */
> -#define INT_MOD_EXPR(reference,arch,code) \
> -    (((arch) == ARCH_NOCONVERT) \
> -	? \
> -	    (void)((reference) code) \
> -	: \
> -	    (void)( \
> -		(reference) = INT_GET((reference),arch) , \
> -		((reference) code), \
> -		INT_SET(reference, arch, reference) \
> -	    ) \
> -    )
> -
> -/* does not return a value */
> -#define INT_MOD(reference,arch,delta) \
> -    (void)( \
> -	INT_MOD_EXPR(reference,arch,+=(delta)) \
> -    )
> -
> -/*
> - * INT_COPY - copy a value between two locations with the
> - *	      _same architecture_ but _potentially different sizes_
> - *
> - *	    if the types of the two parameters are equal or they are
> - *		in native architecture, a simple copy is done
> - *
> - *	    otherwise, architecture conversions are done
> - *
> - */
> -
> -/* does not return a value */
> -#define INT_COPY(dst,src,arch) \
> -    ( \
> -	((sizeof(dst) == sizeof(src)) || ((arch) == ARCH_NOCONVERT)) \
> -	    ? \
> -		(void)((dst) = (src)) \
> -	    : \
> -		INT_SET(dst, arch, INT_GET(src, arch)) \
> -    )
> -
> -/*
> - * INT_XLATE - copy a value in either direction between two locations
> - *	       with different architectures
> - *
> - *		    dir < 0	- copy from memory to buffer (native to arch)
> - *		    dir > 0	- copy from buffer to memory (arch to native)
> - */
> -
> -/* does not return a value */
> -#define INT_XLATE(buf,mem,dir,arch) {\
> -    ASSERT(dir); \
> -    if (dir>0) { \
> -	(mem)=INT_GET(buf, arch); \
> -    } else { \
> -	INT_SET(buf, arch, mem); \
> -    } \
> -}
> -
>  static inline void be16_add(__be16 *a, __s16 b)
>  {
>  	*a = cpu_to_be16(be16_to_cpu(*a) + b);
> 
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] remove INT_GET and friends
  2008-07-08  3:05 ` Eric Sandeen
@ 2008-07-08  8:02   ` Christoph Hellwig
  0 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2008-07-08  8:02 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs-oss

On Mon, Jul 07, 2008 at 10:05:14PM -0500, Eric Sandeen wrote:
> Eric Sandeen wrote:
> > Thanks to hch's endian work, INT_GET etc are no longer used,
> > and may as well be removed.  INT_SET is still used in
> > the acl code, though.
> > 
> > Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
> > ---
> > 
> >  xfs_arch.h |   68 ---------------------------------
> >  1 files changed, 68 deletions(-)
> > 
> 
> Ping?  these are just unused macros.

You might want to wait until the generic ACL code goes in, because then
we can kill the remaining macros, too.  Or just put this in now, I don't
really care :)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] remove INT_GET and friends
  2008-04-11 14:44 [PATCH] remove INT_GET and friends Eric Sandeen
  2008-04-11 16:05 ` Christoph Hellwig
  2008-07-08  3:05 ` Eric Sandeen
@ 2008-07-24  8:16 ` Niv Sardi
  2 siblings, 0 replies; 5+ messages in thread
From: Niv Sardi @ 2008-07-24  8:16 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs-oss

in
-- 
Niv Sardi

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-07-24  8:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-11 14:44 [PATCH] remove INT_GET and friends Eric Sandeen
2008-04-11 16:05 ` Christoph Hellwig
2008-07-08  3:05 ` Eric Sandeen
2008-07-08  8:02   ` Christoph Hellwig
2008-07-24  8:16 ` Niv Sardi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox