netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: yevgenyp@mellanox.co.il, netdev@vger.kernel.org, eli@mellanox.co.il
Subject: [PATCH net-next-2.6] mlx4: make functions local and remove dead code.
Date: Thu, 21 Oct 2010 09:59:20 -0700	[thread overview]
Message-ID: <20101021095920.17bd21f1@nehalam> (raw)
In-Reply-To: <20101021.031356.115939257.davem@davemloft.net>

Make the following function static: mlx4_UNMAP_ICM
Remove the following unused function:  mlx4_MAP_ICM_page

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

---
Leave the vlan functions alone, since patch using them is pending.

 drivers/net/mlx4/icm.c |   28 +---------------------------
 drivers/net/mlx4/icm.h |    2 --
 2 files changed, 1 insertion(+), 29 deletions(-)

--- a/drivers/net/mlx4/icm.c	2010-10-21 08:59:30.921914839 -0700
+++ b/drivers/net/mlx4/icm.c	2010-10-21 09:03:31.034200443 -0700
@@ -210,38 +210,12 @@ static int mlx4_MAP_ICM(struct mlx4_dev
 	return mlx4_map_cmd(dev, MLX4_CMD_MAP_ICM, icm, virt);
 }
 
-int mlx4_UNMAP_ICM(struct mlx4_dev *dev, u64 virt, u32 page_count)
+static int mlx4_UNMAP_ICM(struct mlx4_dev *dev, u64 virt, u32 page_count)
 {
 	return mlx4_cmd(dev, virt, page_count, 0, MLX4_CMD_UNMAP_ICM,
 			MLX4_CMD_TIME_CLASS_B);
 }
 
-int mlx4_MAP_ICM_page(struct mlx4_dev *dev, u64 dma_addr, u64 virt)
-{
-	struct mlx4_cmd_mailbox *mailbox;
-	__be64 *inbox;
-	int err;
-
-	mailbox = mlx4_alloc_cmd_mailbox(dev);
-	if (IS_ERR(mailbox))
-		return PTR_ERR(mailbox);
-	inbox = mailbox->buf;
-
-	inbox[0] = cpu_to_be64(virt);
-	inbox[1] = cpu_to_be64(dma_addr);
-
-	err = mlx4_cmd(dev, mailbox->dma, 1, 0, MLX4_CMD_MAP_ICM,
-		       MLX4_CMD_TIME_CLASS_B);
-
-	mlx4_free_cmd_mailbox(dev, mailbox);
-
-	if (!err)
-		mlx4_dbg(dev, "Mapped page at %llx to %llx for ICM.\n",
-			  (unsigned long long) dma_addr, (unsigned long long) virt);
-
-	return err;
-}
-
 int mlx4_MAP_ICM_AUX(struct mlx4_dev *dev, struct mlx4_icm *icm)
 {
 	return mlx4_map_cmd(dev, MLX4_CMD_MAP_ICM_AUX, icm, -1);
--- a/drivers/net/mlx4/icm.h	2010-10-21 08:59:30.937916493 -0700
+++ b/drivers/net/mlx4/icm.h	2010-10-21 09:03:31.034200443 -0700
@@ -128,8 +128,6 @@ static inline unsigned long mlx4_icm_siz
 	return sg_dma_len(&iter->chunk->mem[iter->page_idx]);
 }
 
-int mlx4_UNMAP_ICM(struct mlx4_dev *dev, u64 virt, u32 page_count);
-int mlx4_MAP_ICM_page(struct mlx4_dev *dev, u64 dma_addr, u64 virt);
 int mlx4_MAP_ICM_AUX(struct mlx4_dev *dev, struct mlx4_icm *icm);
 int mlx4_UNMAP_ICM_AUX(struct mlx4_dev *dev);
 

  reply	other threads:[~2010-10-21 16:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-18 15:30 [PATCH net-next-2.6] mlx4: make functions local and remove dead code Stephen Hemminger
2010-10-19  7:37 ` Yevgeny Petrilin
2010-10-21 10:13   ` David Miller
2010-10-21 16:59     ` Stephen Hemminger [this message]
2010-10-24 22:19       ` David Miller

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=20101021095920.17bd21f1@nehalam \
    --to=shemminger@vyatta.com \
    --cc=davem@davemloft.net \
    --cc=eli@mellanox.co.il \
    --cc=netdev@vger.kernel.org \
    --cc=yevgenyp@mellanox.co.il \
    /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;
as well as URLs for NNTP newsgroup(s).