mirror of https://lore.kernel.org/lkml/
 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: staging: et131x: Moving two extern inline functions to .c file
Date: Thu, 20 Oct 2011 00:01:00 +0100	[thread overview]
Message-ID: <1319065268-2863-10-git-send-email-mark.einon@gmail.com> (raw)
In-Reply-To: <1319065268-2863-1-git-send-email-mark.einon@gmail.com>

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


  parent reply	other threads:[~2011-10-19 23:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-19 23:00 staging: et131x: Move function declarations from et131x.h to et131x.c Mark Einon
2011-10-19 23:00 ` staging: et131x: Move non-register defines " Mark Einon
2011-10-19 23:00 ` staging: et131x: move et1310_address_map.h contents into et131x.h Mark Einon
2011-10-19 23:00 ` staging: et131x: move et1310_phy.h " Mark Einon
2011-10-19 23:00 ` staging: et131x: move et131x_adapter.h contents into et131x.c Mark Einon
2011-10-19 23:00 ` staging: et131x: move et131x_defs.h " Mark Einon
2011-10-19 23:00 ` staging: et131x: move et1310_rx.h " Mark Einon
2011-10-19 23:00 ` staging: et131x: move et1310_tx.h " Mark Einon
2011-10-19 23:00 ` staging: et131x: Update TODO list - remove 'put driver into single file' Mark Einon
2011-10-19 23:01 ` Mark Einon [this message]
2011-10-19 23:01 ` staging: et131x: Make rx_ring.fbr{0,1} share a common structure Mark Einon
2011-10-19 23:01 ` staging: et131x: Fix issues when USE_FBR0 is not defined Mark Einon
2011-10-19 23:01 ` staging: et131x: use dma_alloc... instead of pci_alloc Mark Einon
2011-10-19 23:01 ` staging: et131x: Match dma_alloc_ calls with dma_free_ calls Mark Einon
2011-10-19 23:01 ` staging: et131x: Tidy up PCI device table definition Mark Einon
2011-10-19 23:01 ` staging: et131x: on transmit, stop the queue if the next packet will fail Mark Einon
2011-10-19 23:01 ` staging: et131x: Convert rest of pci memory management to dma api Mark Einon
2011-10-19 23:01 ` staging: et131x: Remove unused defines 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=1319065268-2863-10-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

Powered by JetHome