From patchwork Wed Oct 17 08:26:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 191986 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 C37772C0081 for ; Wed, 17 Oct 2012 19:26:51 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752337Ab2JQI0t (ORCPT ); Wed, 17 Oct 2012 04:26:49 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:33576 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751871Ab2JQI0r (ORCPT ); Wed, 17 Oct 2012 04:26:47 -0400 Received: by mail-qc0-f174.google.com with SMTP id o22so1861295qcr.19 for ; Wed, 17 Oct 2012 01:26:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=oPxG9U/BCU/eaOlMXsXzeWISETg3BktrW7ivCHz6fkE=; b=lAF9Q92TONeGF6PPSs/QZWCcbjwQYC2/sYcPbS+dKRH1lhIAr4YZdKNQjCuYFaf16k EjWpSOkT/gROxqxsUVuoGV0sPpB2KDICSfEoIqCydZWyPsz2ijj7RExOGzxhYocJ18v4 phYXjrhubIlTyQQd9gJ5CgKpo6npoU904/sTX7Z2SX2jlq7reXiDNlqvmhkBlECW8DEN 2JiXF251WZTar/UMSPtoC2JoMyXJiuhbO8ju2sR9yIHIHeBW6wz06DaAbv0IUarceNGU I2/L95k3ZRAuxY0rzhgC1Kn50iEH7RUs0F4/5YZy5SgZ7iM5tMvx+OAqPp8E4S+pIdeu /oOg== MIME-Version: 1.0 Received: by 10.49.104.3 with SMTP id ga3mr41679729qeb.11.1350462406566; Wed, 17 Oct 2012 01:26:46 -0700 (PDT) Received: by 10.229.134.205 with HTTP; Wed, 17 Oct 2012 01:26:46 -0700 (PDT) Date: Wed, 17 Oct 2012 16:26:46 +0800 Message-ID: Subject: [PATCH] ixgbe: convert to use simple_open() From: Wei Yongjun To: jeffrey.t.kirsher@intel.com, jesse.brandeburg@intel.com, bruce.w.allan@intel.com, carolyn.wyborny@intel.com, donald.c.skidmore@intel.com, gregory.v.rose@intel.com, peter.p.waskiewicz.jr@intel.com, alexander.h.duyck@intel.com, john.ronciak@intel.com Cc: yongjun_wei@trendmicro.com.cn, e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Wei Yongjun This removes an open coded simple_open() function and replaces file operations references to the function with simple_open() instead. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c | 32 ++---------------------- 1 file changed, 2 insertions(+), 30 deletions(-) -- 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 --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c index 8d3a218..efaf9a7 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_debugfs.c @@ -37,20 +37,6 @@ static struct dentry *ixgbe_dbg_root; static char ixgbe_dbg_reg_ops_buf[256] = ""; /** - * ixgbe_dbg_reg_ops_open - prep the debugfs pokee data item when opened - * @inode: inode that was opened - * @filp: file info - * - * Stash the adapter pointer hiding in the inode into the file pointer where - * we can find it later in the read and write calls - **/ -static int ixgbe_dbg_reg_ops_open(struct inode *inode, struct file *filp) -{ - filp->private_data = inode->i_private; - return 0; -} - -/** * ixgbe_dbg_reg_ops_read - read for reg_ops datum * @filp: the opened file * @buffer: where to write the data for the user to read @@ -142,7 +128,7 @@ static ssize_t ixgbe_dbg_reg_ops_write(struct file *filp, static const struct file_operations ixgbe_dbg_reg_ops_fops = { .owner = THIS_MODULE, - .open = ixgbe_dbg_reg_ops_open, + .open = simple_open, .read = ixgbe_dbg_reg_ops_read, .write = ixgbe_dbg_reg_ops_write, }; @@ -150,20 +136,6 @@ static const struct file_operations ixgbe_dbg_reg_ops_fops = { static char ixgbe_dbg_netdev_ops_buf[256] = ""; /** - * ixgbe_dbg_netdev_ops_open - prep the debugfs netdev_ops data item - * @inode: inode that was opened - * @filp: file info - * - * Stash the adapter pointer hiding in the inode into the file pointer - * where we can find it later in the read and write calls - **/ -static int ixgbe_dbg_netdev_ops_open(struct inode *inode, struct file *filp) -{ - filp->private_data = inode->i_private; - return 0; -} - -/** * ixgbe_dbg_netdev_ops_read - read for netdev_ops datum * @filp: the opened file * @buffer: where to write the data for the user to read @@ -238,7 +210,7 @@ static ssize_t ixgbe_dbg_netdev_ops_write(struct file *filp, static const struct file_operations ixgbe_dbg_netdev_ops_fops = { .owner = THIS_MODULE, - .open = ixgbe_dbg_netdev_ops_open, + .open = simple_open, .read = ixgbe_dbg_netdev_ops_read, .write = ixgbe_dbg_netdev_ops_write, };