diff mbox

[19/21] ntb_netdev: declare unused variables and fix missing initializer

Message ID 1358586155-23322-20-git-send-email-jon.mason@intel.com
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Jon Mason Jan. 19, 2013, 9:02 a.m. UTC
Tag qp in ntb_netdev_tx_handler and net_device in ntb_get_settings as
unused function parameters.  Also, correct missing initializer errors
for 'struct device_driver' in ntb_netdev_client.  This corrects issues
found by 'EXTRA_CFLAGS=-W'.

Signed-off-by: Jon Mason <jon.mason@intel.com>
---
 drivers/net/ntb_netdev.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

Comments

gregkh@linuxfoundation.org Jan. 20, 2013, 11:47 p.m. UTC | #1
On Sat, Jan 19, 2013 at 02:02:33AM -0700, Jon Mason wrote:
> Tag qp in ntb_netdev_tx_handler and net_device in ntb_get_settings as
> unused function parameters.  Also, correct missing initializer errors
> for 'struct device_driver' in ntb_netdev_client.  This corrects issues
> found by 'EXTRA_CFLAGS=-W'.

Again, why would you want to ever build the kernel with that option?
This shouldn't be needed.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/ntb_netdev.c b/drivers/net/ntb_netdev.c
index 07c06cd..37173ce 100644
--- a/drivers/net/ntb_netdev.c
+++ b/drivers/net/ntb_netdev.c
@@ -125,8 +125,9 @@  static void ntb_netdev_rx_handler(struct ntb_transport_qp *qp, void *qp_data,
 	}
 }
 
-static void ntb_netdev_tx_handler(struct ntb_transport_qp *qp, void *qp_data,
-				  void *data, int len)
+static void
+ntb_netdev_tx_handler(__attribute__((unused)) struct ntb_transport_qp *qp,
+		      void *qp_data, void *data, int len)
 {
 	struct net_device *ndev = qp_data;
 	struct sk_buff *skb;
@@ -284,7 +285,8 @@  static void ntb_get_drvinfo(struct net_device *ndev,
 	strlcpy(info->bus_info, pci_name(dev->pdev), sizeof(info->bus_info));
 }
 
-static int ntb_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
+static int ntb_get_settings(__attribute__((unused)) struct net_device *dev,
+			    struct ethtool_cmd *cmd)
 {
 	cmd->supported = SUPPORTED_Backplane;
 	cmd->advertising = ADVERTISED_Backplane;
@@ -383,8 +385,10 @@  static void ntb_netdev_remove(struct pci_dev *pdev)
 }
 
 static struct ntb_client ntb_netdev_client = {
-	.driver.name = KBUILD_MODNAME,
-	.driver.owner = THIS_MODULE,
+	.driver = {
+		.name = KBUILD_MODNAME,
+		.owner = THIS_MODULE,
+	},
 	.probe = ntb_netdev_probe,
 	.remove = ntb_netdev_remove,
 };