From patchwork Wed Jan 4 21:58:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: stephen hemminger X-Patchwork-Id: 134367 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E9BCC1007D9 for ; Thu, 5 Jan 2012 08:58:20 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757062Ab2ADV6Q (ORCPT ); Wed, 4 Jan 2012 16:58:16 -0500 Received: from mail.vyatta.com ([76.74.103.46]:48793 "EHLO mail.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757052Ab2ADV6P (ORCPT ); Wed, 4 Jan 2012 16:58:15 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.vyatta.com (Postfix) with ESMTP id 64DE8141001A; Wed, 4 Jan 2012 13:58:15 -0800 (PST) X-Virus-Scanned: amavisd-new at tahiti.vyatta.com Received: from mail.vyatta.com ([127.0.0.1]) by localhost (mail.vyatta.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HQwEfsGeQ1C9; Wed, 4 Jan 2012 13:58:14 -0800 (PST) Received: from nehalam.linuxnetplumber.net (static-50-53-80-93.bvtn.or.frontiernet.net [50.53.80.93]) by mail.vyatta.com (Postfix) with ESMTPSA id 68BBC1410015; Wed, 4 Jan 2012 13:58:14 -0800 (PST) Date: Wed, 4 Jan 2012 13:58:13 -0800 From: Stephen Hemminger To: Shreyas Bhatewara Cc: "VMware, Inc." , netdev@vger.kernel.org Subject: [PATCH] vmxnet3" make ethtool ops const Message-ID: <20120104135813.06af6984@nehalam.linuxnetplumber.net> Organization: Vyatta X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.8; x86_64-pc-linux-gnu) Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org All tables of function pointers should be const to make hacks more difficult. Compile tested only. Signed-off-by: Stephen Hemminger Acked-by: Shreyas N Bhatewara --- 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 --- a/drivers/net/vmxnet3/vmxnet3_ethtool.c 2011-12-19 09:53:44.815309363 -0800 +++ b/drivers/net/vmxnet3/vmxnet3_ethtool.c 2012-01-04 13:15:22.773586753 -0800 @@ -608,7 +608,7 @@ vmxnet3_set_rss_indir(struct net_device } #endif -static struct ethtool_ops vmxnet3_ethtool_ops = { +static const struct ethtool_ops vmxnet3_ethtool_ops = { .get_settings = vmxnet3_get_settings, .get_drvinfo = vmxnet3_get_drvinfo, .get_regs_len = vmxnet3_get_regs_len,