lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1291890413-15255-4-git-send-email-marek.belisko@open-nandra.com>
Date:	Thu,  9 Dec 2010 11:26:48 +0100
From:	Marek Belisko <marek.belisko@...n-nandra.com>
To:	Greg Kroah-Hartman <gregkh@...e.de>
Cc:	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Marek Belisko <marek.belisko@...n-nandra.com>
Subject: [PATCH 3/8] staging: ft1000: Remove unused pdevobj array.

We don't need to store pointer to device in some local
array because we always pass to debugfs correct device pointer.
So remove it.

Signed-off-by: Marek Belisko <marek.belisko@...n-nandra.com>
---
 drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c |   23 ----------------------
 1 files changed, 0 insertions(+), 23 deletions(-)

diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
index 8b735e4..0871e43 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
@@ -51,10 +51,6 @@ static long ft1000_ChIoctl(struct file *File, unsigned int Command,
                            unsigned long Argument);
 static int ft1000_ChRelease (struct inode *Inode, struct file *File);
 
-// Global pointer to device object
-static struct ft1000_device *pdevobj[MAX_NUM_CARDS + 2];
-//static devfs_handle_t ft1000Handle[MAX_NUM_CARDS];
-
 // List to free receive command buffer pool
 struct list_head freercvpool;
 
@@ -165,11 +161,6 @@ int ft1000_CreateDevice(struct ft1000_device *dev)
     DEBUG("ft1000_CreateDevice: number of instance = %d\n", ft1000_flarion_cnt);
     DEBUG("DeviceCreated = %x\n", info->DeviceCreated);
 
-    //save the device info to global array
-    pdevobj[info->CardNumber] = dev;
-
-    DEBUG("ft1000_CreateDevice: ******SAVED pdevobj[%d]=%p\n", info->CardNumber, pdevobj[info->CardNumber]);	//aelias [+] reason:up
-
     if (info->DeviceCreated)
     {
 	DEBUG("ft1000_CreateDevice: \"%s\" already registered\n", info->DeviceName);
@@ -327,8 +318,6 @@ void ft1000_DestroyDevice(struct net_device *dev)
 //        devfs_unregister(ft1000Handle[info->CardNumber]);
 
 		info->DeviceCreated = FALSE;
-
-		pdevobj[info->CardNumber] = NULL;
 	}
 
 
@@ -356,18 +345,6 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File)
 
 	info = File->private_data = netdev_priv(dev->net);
 
-    for (i=0; i<5; i++)
-        DEBUG("pdevobj[%d]=%p\n", i, pdevobj[i]); //aelias [+] reason: down
-
-    if ( pdevobj[num] != NULL )
-        //info = (struct ft1000_info *)(pdevobj[num]->net->priv);
-		info = netdev_priv(pdevobj[num]->net);
-    else
-    {
-        DEBUG("ft1000_ChOpen: can not find device object %d\n", num);
-        return -1;
-    }
-
     DEBUG("f_owner = %p number of application = %d\n", (&File->f_owner), info->appcnt );
 
     // Check if maximum number of application exceeded
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ