drivers/net/wireless: Remove unnecessary casts of private_data
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
447a42c2fe
commit
57674308d0
@ -4657,7 +4657,7 @@ static ssize_t proc_write( struct file *file,
|
||||
loff_t *offset )
|
||||
{
|
||||
loff_t pos = *offset;
|
||||
struct proc_data *priv = (struct proc_data*)file->private_data;
|
||||
struct proc_data *priv = file->private_data;
|
||||
|
||||
if (!priv->wbuffer)
|
||||
return -EINVAL;
|
||||
@ -4689,7 +4689,7 @@ static int proc_status_open(struct inode *inode, struct file *file)
|
||||
|
||||
if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
|
||||
return -ENOMEM;
|
||||
data = (struct proc_data *)file->private_data;
|
||||
data = file->private_data;
|
||||
if ((data->rbuffer = kmalloc( 2048, GFP_KERNEL )) == NULL) {
|
||||
kfree (file->private_data);
|
||||
return -ENOMEM;
|
||||
@ -4772,7 +4772,7 @@ static int proc_stats_rid_open( struct inode *inode,
|
||||
|
||||
if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
|
||||
return -ENOMEM;
|
||||
data = (struct proc_data *)file->private_data;
|
||||
data = file->private_data;
|
||||
if ((data->rbuffer = kmalloc( 4096, GFP_KERNEL )) == NULL) {
|
||||
kfree (file->private_data);
|
||||
return -ENOMEM;
|
||||
@ -5045,7 +5045,7 @@ static int proc_config_open(struct inode *inode, struct file *file)
|
||||
|
||||
if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
|
||||
return -ENOMEM;
|
||||
data = (struct proc_data *)file->private_data;
|
||||
data = file->private_data;
|
||||
if ((data->rbuffer = kmalloc( 2048, GFP_KERNEL )) == NULL) {
|
||||
kfree (file->private_data);
|
||||
return -ENOMEM;
|
||||
@ -5127,7 +5127,7 @@ static int proc_config_open(struct inode *inode, struct file *file)
|
||||
|
||||
static void proc_SSID_on_close(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct proc_data *data = (struct proc_data *)file->private_data;
|
||||
struct proc_data *data = file->private_data;
|
||||
struct proc_dir_entry *dp = PDE(inode);
|
||||
struct net_device *dev = dp->data;
|
||||
struct airo_info *ai = dev->ml_priv;
|
||||
@ -5170,7 +5170,7 @@ static inline u8 hexVal(char c) {
|
||||
}
|
||||
|
||||
static void proc_APList_on_close( struct inode *inode, struct file *file ) {
|
||||
struct proc_data *data = (struct proc_data *)file->private_data;
|
||||
struct proc_data *data = file->private_data;
|
||||
struct proc_dir_entry *dp = PDE(inode);
|
||||
struct net_device *dev = dp->data;
|
||||
struct airo_info *ai = dev->ml_priv;
|
||||
@ -5316,7 +5316,7 @@ static void proc_wepkey_on_close( struct inode *inode, struct file *file ) {
|
||||
|
||||
memset(key, 0, sizeof(key));
|
||||
|
||||
data = (struct proc_data *)file->private_data;
|
||||
data = file->private_data;
|
||||
if ( !data->writelen ) return;
|
||||
|
||||
if (data->wbuffer[0] >= '0' && data->wbuffer[0] <= '3' &&
|
||||
@ -5370,7 +5370,7 @@ static int proc_wepkey_open( struct inode *inode, struct file *file )
|
||||
if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
|
||||
return -ENOMEM;
|
||||
memset(&wkr, 0, sizeof(wkr));
|
||||
data = (struct proc_data *)file->private_data;
|
||||
data = file->private_data;
|
||||
if ((data->rbuffer = kzalloc( 180, GFP_KERNEL )) == NULL) {
|
||||
kfree (file->private_data);
|
||||
return -ENOMEM;
|
||||
@ -5416,7 +5416,7 @@ static int proc_SSID_open(struct inode *inode, struct file *file)
|
||||
|
||||
if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
|
||||
return -ENOMEM;
|
||||
data = (struct proc_data *)file->private_data;
|
||||
data = file->private_data;
|
||||
if ((data->rbuffer = kmalloc( 104, GFP_KERNEL )) == NULL) {
|
||||
kfree (file->private_data);
|
||||
return -ENOMEM;
|
||||
@ -5460,7 +5460,7 @@ static int proc_APList_open( struct inode *inode, struct file *file ) {
|
||||
|
||||
if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
|
||||
return -ENOMEM;
|
||||
data = (struct proc_data *)file->private_data;
|
||||
data = file->private_data;
|
||||
if ((data->rbuffer = kmalloc( 104, GFP_KERNEL )) == NULL) {
|
||||
kfree (file->private_data);
|
||||
return -ENOMEM;
|
||||
@ -5502,7 +5502,7 @@ static int proc_BSSList_open( struct inode *inode, struct file *file ) {
|
||||
|
||||
if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL)) == NULL)
|
||||
return -ENOMEM;
|
||||
data = (struct proc_data *)file->private_data;
|
||||
data = file->private_data;
|
||||
if ((data->rbuffer = kmalloc( 1024, GFP_KERNEL )) == NULL) {
|
||||
kfree (file->private_data);
|
||||
return -ENOMEM;
|
||||
|
@ -492,8 +492,7 @@ static int ath9k_debugfs_open(struct inode *inode, struct file *file)
|
||||
static ssize_t read_file_tgt_stats(struct file *file, char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct ath9k_htc_priv *priv =
|
||||
(struct ath9k_htc_priv *) file->private_data;
|
||||
struct ath9k_htc_priv *priv = file->private_data;
|
||||
struct ath9k_htc_target_stats cmd_rsp;
|
||||
char buf[512];
|
||||
unsigned int len = 0;
|
||||
@ -536,8 +535,7 @@ static const struct file_operations fops_tgt_stats = {
|
||||
static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct ath9k_htc_priv *priv =
|
||||
(struct ath9k_htc_priv *) file->private_data;
|
||||
struct ath9k_htc_priv *priv = file->private_data;
|
||||
char buf[512];
|
||||
unsigned int len = 0;
|
||||
|
||||
@ -582,8 +580,7 @@ static const struct file_operations fops_xmit = {
|
||||
static ssize_t read_file_recv(struct file *file, char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct ath9k_htc_priv *priv =
|
||||
(struct ath9k_htc_priv *) file->private_data;
|
||||
struct ath9k_htc_priv *priv = file->private_data;
|
||||
char buf[512];
|
||||
unsigned int len = 0;
|
||||
|
||||
|
@ -1267,7 +1267,7 @@ static ssize_t iwl_dbgfs_ucode_tracing_read(struct file *file,
|
||||
char __user *user_buf,
|
||||
size_t count, loff_t *ppos) {
|
||||
|
||||
struct iwl_priv *priv = (struct iwl_priv *)file->private_data;
|
||||
struct iwl_priv *priv = file->private_data;
|
||||
int pos = 0;
|
||||
char buf[128];
|
||||
const size_t bufsz = sizeof(buf);
|
||||
@ -1317,7 +1317,7 @@ static ssize_t iwl_dbgfs_rxon_flags_read(struct file *file,
|
||||
char __user *user_buf,
|
||||
size_t count, loff_t *ppos) {
|
||||
|
||||
struct iwl_priv *priv = (struct iwl_priv *)file->private_data;
|
||||
struct iwl_priv *priv = file->private_data;
|
||||
int len = 0;
|
||||
char buf[20];
|
||||
|
||||
@ -1329,7 +1329,7 @@ static ssize_t iwl_dbgfs_rxon_filter_flags_read(struct file *file,
|
||||
char __user *user_buf,
|
||||
size_t count, loff_t *ppos) {
|
||||
|
||||
struct iwl_priv *priv = (struct iwl_priv *)file->private_data;
|
||||
struct iwl_priv *priv = file->private_data;
|
||||
int len = 0;
|
||||
char buf[20];
|
||||
|
||||
@ -1342,7 +1342,7 @@ static ssize_t iwl_dbgfs_fh_reg_read(struct file *file,
|
||||
char __user *user_buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
struct iwl_priv *priv = (struct iwl_priv *)file->private_data;
|
||||
struct iwl_priv *priv = file->private_data;
|
||||
char *buf;
|
||||
int pos = 0;
|
||||
ssize_t ret = -EFAULT;
|
||||
@ -1404,7 +1404,7 @@ static ssize_t iwl_dbgfs_plcp_delta_read(struct file *file,
|
||||
char __user *user_buf,
|
||||
size_t count, loff_t *ppos) {
|
||||
|
||||
struct iwl_priv *priv = (struct iwl_priv *)file->private_data;
|
||||
struct iwl_priv *priv = file->private_data;
|
||||
int pos = 0;
|
||||
char buf[12];
|
||||
const size_t bufsz = sizeof(buf);
|
||||
|
@ -905,7 +905,7 @@ static ssize_t lbs_debugfs_read(struct file *file, char __user *userbuf,
|
||||
|
||||
p = buf;
|
||||
|
||||
d = (struct debug_data *)file->private_data;
|
||||
d = file->private_data;
|
||||
|
||||
for (i = 0; i < num_of_items; i++) {
|
||||
if (d[i].size == 1)
|
||||
@ -944,7 +944,7 @@ static ssize_t lbs_debugfs_write(struct file *f, const char __user *buf,
|
||||
char *p0;
|
||||
char *p1;
|
||||
char *p2;
|
||||
struct debug_data *d = (struct debug_data *)f->private_data;
|
||||
struct debug_data *d = f->private_data;
|
||||
|
||||
pdata = kmalloc(cnt, GFP_KERNEL);
|
||||
if (pdata == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user