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: [PATCH 05/12] staging: et131x: Remove some forward declarations
Date: Sun, 23 Oct 2011 10:22:47 +0100	[thread overview]
Message-ID: <1319361774-3148-6-git-send-email-mark.einon@gmail.com> (raw)
In-Reply-To: <1319361774-3148-1-git-send-email-mark.einon@gmail.com>

Moved functions in et131x.c file to remove the following forward
declarations:

et131x_align_allocated_memory
et131x_disable_interrupts
et131x_enable_interrupts
et131x_error_timer_handler

Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
 drivers/staging/et131x/et131x.c |  126 ++++++++++++++++++--------------------
 1 files changed, 60 insertions(+), 66 deletions(-)

diff --git a/drivers/staging/et131x/et131x.c b/drivers/staging/et131x/et131x.c
index cf6f7a2..8048d67 100644
--- a/drivers/staging/et131x/et131x.c
+++ b/drivers/staging/et131x/et131x.c
@@ -576,12 +576,6 @@ struct et131x_adapter {
 	struct net_device_stats net_stats;
 };
 
-void et131x_error_timer_handler(unsigned long data);
-void et131x_enable_interrupts(struct et131x_adapter *adapter);
-void et131x_disable_interrupts(struct et131x_adapter *adapter);
-void et131x_align_allocated_memory(struct et131x_adapter *adapter,
-				   u64 *phys_addr,
-				   u64 *offset, u64 mask);
 void et131x_adapter_setup(struct et131x_adapter *adapter);
 void et131x_soft_reset(struct et131x_adapter *adapter);
 void et131x_isr_handler(struct work_struct *work);
@@ -1872,6 +1866,33 @@ static inline u32 bump_free_buff_ring(u32 *free_buff_ring, u32 limit)
 }
 
 /**
+ * et131x_align_allocated_memory - Align allocated memory on a given boundary
+ * @adapter: pointer to our adapter structure
+ * @phys_addr: pointer to Physical address
+ * @offset: pointer to the offset variable
+ * @mask: correct mask
+ */
+void et131x_align_allocated_memory(struct et131x_adapter *adapter,
+				   uint64_t *phys_addr,
+				   uint64_t *offset, uint64_t mask)
+{
+	uint64_t new_addr;
+
+	*offset = 0;
+
+	new_addr = *phys_addr & ~mask;
+
+	if (new_addr != *phys_addr) {
+		/* Move to next aligned block */
+		new_addr += mask + 1;
+		/* Return offset for adjusting virt addr */
+		*offset = new_addr - *phys_addr;
+		/* Return new physical address */
+		*phys_addr = new_addr;
+	}
+}
+
+/**
  * et131x_rx_dma_memory_alloc
  * @adapter: pointer to our private adapter structure
  *
@@ -3938,6 +3959,27 @@ static int et131x_pci_init(struct et131x_adapter *adapter,
 }
 
 /**
+ *	et131x_enable_interrupts	-	enable interrupt
+ *	@adapter: et131x device
+ *
+ *	Enable the appropriate interrupts on the ET131x according to our
+ *	configuration
+ */
+void et131x_enable_interrupts(struct et131x_adapter *adapter)
+{
+	u32 mask;
+
+	/* Enable all global interrupts */
+	if (adapter->flowcontrol == FLOW_TXONLY ||
+			    adapter->flowcontrol == FLOW_BOTH)
+		mask = INT_MASK_ENABLE;
+	else
+		mask = INT_MASK_ENABLE_NO_FLOW;
+
+	writel(mask, &adapter->regs->global.int_mask);
+}
+
+/**
  * et131x_error_timer_handler
  * @data: timer-specific variable; here a pointer to our adapter structure
  *
@@ -4071,33 +4113,6 @@ void et131x_soft_reset(struct et131x_adapter *adapter)
 }
 
 /**
- * et131x_align_allocated_memory - Align allocated memory on a given boundary
- * @adapter: pointer to our adapter structure
- * @phys_addr: pointer to Physical address
- * @offset: pointer to the offset variable
- * @mask: correct mask
- */
-void et131x_align_allocated_memory(struct et131x_adapter *adapter,
-				   uint64_t *phys_addr,
-				   uint64_t *offset, uint64_t mask)
-{
-	uint64_t new_addr;
-
-	*offset = 0;
-
-	new_addr = *phys_addr & ~mask;
-
-	if (new_addr != *phys_addr) {
-		/* Move to next aligned block */
-		new_addr += mask + 1;
-		/* Return offset for adjusting virt addr */
-		*offset = new_addr - *phys_addr;
-		/* Return new physical address */
-		*phys_addr = new_addr;
-	}
-}
-
-/**
  * et131x_adapter_memory_alloc
  * @adapter: pointer to our private adapter structure
  *
@@ -4339,6 +4354,18 @@ static struct et131x_adapter *et131x_adapter_init(struct net_device *netdev,
 }
 
 /**
+ *	et131x_disable_interrupts	-	interrupt disable
+ *	@adapter: et131x device
+ *
+ *	Block all interrupts from the et131x device at the device itself
+ */
+void et131x_disable_interrupts(struct et131x_adapter *adapter)
+{
+	/* Disable all global interrupts */
+	writel(INT_MASK_DISABLE, &adapter->regs->global.int_mask);
+}
+
+/**
  * et131x_pci_setup - Perform device initialization
  * @pdev: a pointer to the device's pci_dev structure
  * @ent: this device's entry in the pci_device_id table
@@ -4633,39 +4660,6 @@ module_exit(et131x_cleanup_module);
 /* ISR functions */
 
 /**
- *	et131x_enable_interrupts	-	enable interrupt
- *	@adapter: et131x device
- *
- *	Enable the appropriate interrupts on the ET131x according to our
- *	configuration
- */
-void et131x_enable_interrupts(struct et131x_adapter *adapter)
-{
-	u32 mask;
-
-	/* Enable all global interrupts */
-	if (adapter->flowcontrol == FLOW_TXONLY ||
-			    adapter->flowcontrol == FLOW_BOTH)
-		mask = INT_MASK_ENABLE;
-	else
-		mask = INT_MASK_ENABLE_NO_FLOW;
-
-	writel(mask, &adapter->regs->global.int_mask);
-}
-
-/**
- *	et131x_disable_interrupts	-	interrupt disable
- *	@adapter: et131x device
- *
- *	Block all interrupts from the et131x device at the device itself
- */
-void et131x_disable_interrupts(struct et131x_adapter *adapter)
-{
-	/* Disable all global interrupts */
-	writel(INT_MASK_DISABLE, &adapter->regs->global.int_mask);
-}
-
-/**
  * et131x_isr - The Interrupt Service Routine for the driver.
  * @irq: the IRQ on which the interrupt was received.
  * @dev_id: device-specific info (here a pointer to a net_device struct)
-- 
1.7.6.4


  parent reply	other threads:[~2011-10-23  9:24 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-23  9:22 [PATCH 00/12 RESEND] Mainly checkpatch fixes Mark Einon
2011-10-23  9:22 ` [PATCH 01/12] staging: et131x: Remove unused rx_ring.recv_buffer_pool Mark Einon
2011-10-23  9:22 ` [PATCH 02/12] staging: et131x: Remove redundant et131x_reset_recv() call Mark Einon
2011-10-23  9:22 ` [PATCH 03/12] staging: et131x: Remove call to find pci pm capability Mark Einon
2011-10-23  9:22 ` [PATCH 04/12] staging: et131x: Remove unused rx_ring.recv_packet_pool Mark Einon
2011-10-23  9:22 ` Mark Einon [this message]
2011-10-23  9:22 ` [PATCH 06/12] staging: et131x: Remove forward declaration of et131x_adapter_setup Mark Einon
2011-10-23  9:22 ` [PATCH 07/12] staging: et131x: Remove more forward declarations Mark Einon
2011-10-23  9:22 ` [PATCH 08/12] staging: et131x: Remove yet " Mark Einon
2011-10-23  9:22 ` [PATCH 09/12] staging: et131x: Remove even " Mark Einon
2011-10-23  9:22 ` [PATCH 10/12] staging: et131x: Remove last of the " Mark Einon
2011-10-23  9:22 ` [PATCH 11/12] staging: et131x: Mainly whitespace changes to appease checkpatch Mark Einon
2011-10-23  9:22 ` [PATCH 12/12] staging: et131x: Remove redundant check and return statement Mark Einon
2011-10-23  9:36 ` [PATCH 00/12 RESEND] Mainly checkpatch fixes Greg KH
2011-10-23  9:42   ` Mark Einon
2011-10-23 17:11     ` [PATCH staging 1/6] et131x: add static qualifiers Francois Romieu
2011-10-24 20:34       ` Mark Einon
2011-10-23 17:11     ` [PATCH staging 2/6] et131x: uintxy_t removal Francois Romieu
2011-10-24 20:33       ` Mark Einon
2011-10-25 15:58         ` Francois Romieu
2011-10-23 17:11     ` [PATCH staging 3/6] et131x: fix error paths in et131x_pci_setup Francois Romieu
2011-10-24 20:21       ` Mark Einon
2011-10-25 15:59         ` Francois Romieu
2011-10-25 17:53       ` Mark Einon
2011-10-23 17:11     ` [PATCH staging 4/6] et131x: remove extraneous pci_save_state Francois Romieu
2011-10-24 20:17       ` Mark Einon
2011-10-23 17:12     ` [PATCH staging 5/6] et131x: kiss netdev.{base_addr, irq} goodbye Francois Romieu
2011-10-24 20:16       ` Mark Einon
2011-10-23 17:12     ` [PATCH staging 6/6] et131x: uncloak PCIe capabilities Francois Romieu
2011-10-24 19:56       ` Mark Einon
2011-10-25 15:59         ` Francois Romieu
2011-10-25 17:42           ` Mark Einon
2011-10-25 17:54       ` 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=1319361774-3148-6-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