public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <hermes@gibson.dropbear.id.au>
To: Jeff Garzik <jgarzik@pobox.com>,
	Francois Romieu <romieu@fr.zoreil.com>,
	Linux kernel mailing list <linux-kernel@vger.kernel.org>,
	jt@hpl.hp.com, Dan Williams <dcbw@redhat.com>,
	Pavel Roskin <proski@gnu.org>,
	Orinoco Development List <orinoco-devel@lists.sourceforge.net>
Subject: [4/15] orinoco merge preliminaries - use ALIGN()
Date: Wed, 28 Jul 2004 16:54:50 +1000	[thread overview]
Message-ID: <20040728065450.GG16908@zax> (raw)
In-Reply-To: <20040728065418.GF16908@zax>

Use the kernel's ALIGN macro instead of our own dodgy version for
rounding things up to an even number.

Signed-off-by: David Gibson <hermes@gibson.dropbear.id.au>

Index: working-2.6/drivers/net/wireless/orinoco.c
===================================================================
--- working-2.6.orig/drivers/net/wireless/orinoco.c	2004-07-28 15:05:31.213900600 +1000
+++ working-2.6/drivers/net/wireless/orinoco.c	2004-07-28 15:05:34.768360240 +1000
@@ -490,8 +490,6 @@
 
 #define DUMMY_FID		0xFFFF
 
-#define RUP_EVEN(a) (((a) + 1) & (~1))
-
 /*#define MAX_MULTICAST(priv)	(priv->firmware_type == FIRMWARE_TYPE_AGERE ? \
   HERMES_MAX_MULTICAST : 0)*/
 #define MAX_MULTICAST(priv)	(HERMES_MAX_MULTICAST)
@@ -847,7 +845,7 @@
 	}
 
 	/* Round up for odd length packets */
-	err = hermes_bap_pwrite(hw, USER_BAP, p, RUP_EVEN(data_len), txfid, data_off);
+	err = hermes_bap_pwrite(hw, USER_BAP, p, ALIGN(data_len, 2), txfid, data_off);
 	if (err) {
 		printk(KERN_ERR "%s: Error %d writing packet to BAP\n",
 		       dev->name, err);
@@ -1132,7 +1130,7 @@
 	}
 
 	p = skb_put(skb, data_len);
-	err = hermes_bap_pread(hw, IRQ_BAP, p, RUP_EVEN(data_len),
+	err = hermes_bap_pread(hw, IRQ_BAP, p, ALIGN(data_len, 2),
 			       rxfid, data_off);
 	if (err) {
 		printk(KERN_ERR "%s: error %d reading frame. "


-- 
David Gibson			| For every complex problem there is a
david AT gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.
http://www.ozlabs.org/people/dgibson

  reply	other threads:[~2004-07-28  7:13 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-12 19:33 [PATCH] Slowly update in-kernel orinoco drivers to upstream current CVS Francois Romieu
2004-07-14 18:37 ` Jeff Garzik
2004-07-15  1:01   ` David Gibson
2004-07-17 11:45     ` Francois Romieu
2004-07-27 17:18     ` Jeff Garzik
2004-07-28  6:51       ` [0/15] orinoco merge preliminaries David Gibson
2004-07-28  6:53         ` [1/15] orinoco merge preliminaries - squash backwards compatibility David Gibson
2004-07-28  6:53           ` [2/15] orinoco merge preliminaries - rearrange code David Gibson
2004-07-28  6:54             ` [3/15] orinoco merge preliminaries - use netdev_priv() David Gibson
2004-07-28  6:54               ` David Gibson [this message]
2004-07-28  6:55                 ` [5/15] orinoco merge preliminaries - use ARRAY_SIZE() David Gibson
2004-07-28  6:55                   ` [6/15] orinoco merge preliminaries - spam stoppers David Gibson
2004-07-28  6:56                     ` [7/15] orinoco merge preliminaries - comment/whitespace/spelling updates David Gibson
2004-07-28  6:57                       ` [8/15] orinoco merge preliminaries - use BUG_ON() David Gibson
2004-07-28  6:58                         ` [9/15] orinoco merge preliminaries - make things static David Gibson
2004-07-28  6:58                           ` [10/15] orinoco merge preliminaries - miscelaneous David Gibson
2004-07-28  6:59                             ` [11/15] orinoco merge preliminaries - use name/version macros David Gibson
2004-07-28  6:59                               ` [12/15] orinoco merge preliminaries - remove unneeded #includes David Gibson
2004-07-28  7:00                                 ` [13/15] orinoco merge preliminaries - don't typedef structs David Gibson
2004-07-28  7:00                                   ` [14/15] orinoco merge preliminaries - more HW data David Gibson
2004-07-28  7:01                                     ` [15/15] orinoco merge preliminaries - update authorship information David Gibson
2004-07-28 16:55                                       ` Jeff Garzik
2004-07-28 17:36                     ` [6/15] orinoco merge preliminaries - spam stoppers Matt Mackall
2004-07-28 22:50         ` [0/15] orinoco merge preliminaries Francois Romieu
2004-07-29  0:19           ` David Gibson
2004-07-29 23:19             ` Francois Romieu
2004-09-08 15:18               ` Dan Williams
2004-09-09  3:13                 ` Jeff Garzik
2004-09-09 19:51                   ` Francois Romieu
2004-07-14 20:15 ` [PATCH] Slowly update in-kernel orinoco drivers to upstream current CVS Pavel Roskin
2004-07-15  1:26   ` David Gibson

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=20040728065450.GG16908@zax \
    --to=hermes@gibson.dropbear.id.au \
    --cc=dcbw@redhat.com \
    --cc=jgarzik@pobox.com \
    --cc=jt@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=orinoco-devel@lists.sourceforge.net \
    --cc=proski@gnu.org \
    --cc=romieu@fr.zoreil.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox