public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Einon <mark.einon@gmail.com>
To: gregkh@suse.de
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Mark Einon <mark.einon@gmail.com>
Subject: [PATCH 1/4] staging: et131x: Moving two extern inline functions to .c file
Date: Thu, 13 Oct 2011 19:11:55 +0100	[thread overview]
Message-ID: <1318529518-4922-1-git-send-email-mark.einon@gmail.com> (raw)

Two helper functions for adding 10bit/12bit umbers with wrapping are
defined in the header. Moved them to the driver .c file.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
 drivers/staging/et131x/et131x.c |   11 +++++++++++
 drivers/staging/et131x/et131x.h |   10 ----------
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index 9596102..14f54e4 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -2666,6 +2666,17 @@ void et131x_rx_dma_enable(struct et131x_adapter *adapter)
 	}
 }
 
+
+static inline void add_10bit(u32 *v, int n)
+{
+	*v = INDEX10(*v + n) | (*v & ET_DMA10_WRAP);
+}
+
+static inline void add_12bit(u32 *v, int n)
+{
+	*v = INDEX12(*v + n) | (*v & ET_DMA12_WRAP);
+}
+
 /**
  * nic_rx_pkts - Checks the hardware for available packets
  * @adapter: pointer to our adapter
diff --git a/drivers/staging/et131x/et131x.h b/drivers/staging/et131x/et131x.h
index 84b274d..7eed3c8 100644
--- a/drivers/staging/et131x/et131x.h
+++ b/drivers/staging/et131x/et131x.h
@@ -230,16 +230,6 @@ struct global_regs {				/* Location: */
 #define INDEX10(x)	((x) & ET_DMA10_MASK)
 #define INDEX4(x)	((x) & ET_DMA4_MASK)
 
-extern inline void add_10bit(u32 *v, int n)
-{
-	*v = INDEX10(*v + n) | (*v & ET_DMA10_WRAP);
-}
-
-extern inline void add_12bit(u32 *v, int n)
-{
-	*v = INDEX12(*v + n) | (*v & ET_DMA12_WRAP);
-}
-
 /*
  * 10bit DMA with wrap
  * txdma tx queue write address reg in txdma address map at 0x1010
-- 
1.7.6.4


             reply	other threads:[~2011-10-13 18:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13 18:11 Mark Einon [this message]
2011-10-13 18:11 ` [PATCH 2/4] staging: et131x: Make rx_ring.fbr{0,1} share a common structure Mark Einon
2011-10-13 18:11 ` [PATCH 3/4] staging: et131x: Fix issues when USE_FBR0 is not defined Mark Einon
2011-10-13 18:11 ` [PATCH 4/4] staging: et131x: use dma_alloc... instead of pci_alloc Mark Einon
2011-10-13 19:25   ` Denis Kirjanov
2011-10-13 19:49     ` [PATCH] staging: et131x: Match dma_alloc_ calls with dma_free_ calls Mark Einon
2011-10-14  7:49       ` Denis Kirjanov
2011-10-14 11:24         ` Mark Einon

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=1318529518-4922-1-git-send-email-mark.einon@gmail.com \
    --to=mark.einon@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --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