public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Barnhart <sbarn03@softhome.net>
To: Andrew Morton <akpm@digeo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.5] Enable ALIGN #undef for drivers/net/defxx.c
Date: 29 Dec 2002 19:10:35 -0500	[thread overview]
Message-ID: <1041207040.23398.1.camel@sbarn.net> (raw)
In-Reply-To: <3E0F8DEA.A84FB662@digeo.com>

On Sun, 2002-12-29 at 19:06, Andrew Morton wrote:

> But they're identical.  It would be better to formalise the kernel-wideness
> of ALIGN() and just use it in defxx?

I agree. At least the bug has a chance of getting fixed.
> 
>  drivers/net/defxx.h    |    7 -------
>  include/linux/cache.h  |    3 +--
>  include/linux/kernel.h |    1 +
>  3 files changed, 2 insertions(+), 9 deletions(-)
> 
> --- 25/include/linux/cache.h~align	Sun Dec 29 16:02:54 2002
> +++ 25-akpm/include/linux/cache.h	Sun Dec 29 16:03:13 2002
> @@ -1,11 +1,10 @@
>  #ifndef __LINUX_CACHE_H
>  #define __LINUX_CACHE_H
>  
> +#include <linux/kernel.h>
>  #include <linux/config.h>
>  #include <asm/cache.h>
>  
> -#define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
> -
>  #ifndef L1_CACHE_ALIGN
>  #define L1_CACHE_ALIGN(x) ALIGN(x, L1_CACHE_BYTES)
>  #endif
> --- 25/drivers/net/defxx.h~align	Sun Dec 29 16:02:54 2002
> +++ 25-akpm/drivers/net/defxx.h	Sun Dec 29 16:05:17 2002
> @@ -1669,13 +1669,6 @@ typedef union
>  #define XMT_BUFF_K_SA		7				/* six byte source address */
>  #define XMT_BUFF_K_DATA		13				/* offset to start of packet data */
>  
> -/*
> - * Macro evaluates to "value" aligned to "size" bytes.  Make sure that
> - * "size" is greater than 0 bytes.
> - */
> -
> -#define ALIGN(value,size) ((value + (size - 1)) & ~(size - 1))
> -
>  /* Macro for checking a "value" is within a specific range */
>  
>  #define IN_RANGE(value,low,high) ((value >= low) && (value <= high))
> --- 25/include/linux/kernel.h~align	Sun Dec 29 16:02:54 2002
> +++ 25-akpm/include/linux/kernel.h	Sun Dec 29 16:03:55 2002
> @@ -28,6 +28,7 @@
>  #define STACK_MAGIC	0xdeadbeef
>  
>  #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
> +#define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
>  
>  #define	KERN_EMERG	"<0>"	/* system is unusable			*/
>  #define	KERN_ALERT	"<1>"	/* action must be taken immediately	*/
> 
> _



      reply	other threads:[~2002-12-30  0:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-29 22:59 [PATCH 2.5] Enable ALIGN #undef for drivers/net/defxx.c Steven Barnhart
2002-12-30  0:06 ` Andrew Morton
2002-12-30  0:10   ` Steven Barnhart [this message]

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=1041207040.23398.1.camel@sbarn.net \
    --to=sbarn03@softhome.net \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox