* [PATCH 00/13] trivial: Remove unnecessary casts of private_data
@ 2010-09-05 1:52 Joe Perches
2010-09-05 1:52 ` [PATCH 03/13] drivers/net/wireless/iwlwifi: " Joe Perches
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Joe Perches @ 2010-09-05 1:52 UTC (permalink / raw)
To: Jiri Kosina
Cc: alsa-devel, David Airlie, Heiko Carstens, dri-devel,
Jaroslav Kysela, J. Bruce Fields, Adaptec OEM Raid Solutions,
Wey-Yi Guy, Sean Hefty, devel, linux-s390, Pekka Savola (ipv6),
linux-scsi, linux-rdma, James Morris, Intel Linux Wireless,
Neil Brown, Ingo Molnar, Doug Gilbert, Alexey Kuznetsov,
Roland Dreier, Hal Rosenstock, Trond Myklebust, ecryptfs-devel,
"John W.
Resend removal of remaining casts of private_data
Joe Perches (13):
drivers/gpu/drm: Remove unnecessary casts of private_data
drivers/infiniband: Remove unnecessary casts of private_data
drivers/net/wireless/iwlwifi: Remove unnecessary casts of private_data
drivers/s390: Remove unnecessary casts of private_data
drivers/scsi: Remove unnecessary casts of private_data
drivers/staging/lirc: Remove unnecessary casts of private_data
fs/ecryptfs: Remove unnecessary casts of private_data
fs/seq_file.c: Remove unnecessary casts of private_data
kernel/pm_qos_params.c: Remove unnecessary casts of private_data
kernel/trace: Remove unnecessary casts of private_data
net/ipv4: Remove unnecessary casts of private_data
net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
sound: Remove unnecessary casts of private_data
drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c | 2 +-
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c | 2 +-
drivers/infiniband/hw/qib/qib_file_ops.c | 4 ++--
drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-debugfs.c | 4 ++--
drivers/s390/char/vmcp.c | 6 +++---
drivers/scsi/aacraid/linit.c | 2 +-
drivers/scsi/sg.c | 2 +-
drivers/staging/lirc/lirc_imon.c | 4 ++--
drivers/staging/lirc/lirc_zilog.c | 10 +++++-----
fs/ecryptfs/ecryptfs_kernel.h | 2 +-
fs/seq_file.c | 6 +++---
kernel/pm_qos_params.c | 2 +-
kernel/trace/ftrace.c | 4 ++--
kernel/trace/trace.c | 2 +-
net/ipv4/raw.c | 2 +-
net/sunrpc/rpc_pipe.c | 4 ++--
sound/core/oss/mixer_oss.c | 22 +++++++++++-----------
sound/core/pcm.c | 3 +--
sound/drivers/virmidi.c | 2 +-
sound/i2c/other/ak4xxx-adda.c | 2 +-
sound/isa/ad1816a/ad1816a.c | 2 +-
sound/isa/azt2320.c | 2 +-
sound/isa/gus/gusmax.c | 4 ++--
sound/isa/sb/sb8.c | 2 +-
sound/oss/au1550_ac97.c | 18 +++++++++---------
sound/pci/emu10k1/emumpu401.c | 2 +-
sound/pci/ice1712/pontis.c | 6 +++---
sound/pci/ice1712/prodigy192.c | 2 +-
sound/pci/rme96.c | 8 ++++----
sound/pci/rme9652/hdsp.c | 8 ++++----
32 files changed, 72 insertions(+), 73 deletions(-)
--
1.7.2.19.g9a302
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 03/13] drivers/net/wireless/iwlwifi: Remove unnecessary casts of private_data
2010-09-05 1:52 [PATCH 00/13] trivial: Remove unnecessary casts of private_data Joe Perches
@ 2010-09-05 1:52 ` Joe Perches
2010-09-05 1:52 ` [PATCH 11/13] net/ipv4: " Joe Perches
2010-09-05 1:52 ` [PATCH 12/13] net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data Joe Perches
2 siblings, 0 replies; 11+ messages in thread
From: Joe Perches @ 2010-09-05 1:52 UTC (permalink / raw)
To: Jiri Kosina
Cc: Reinette Chatre, Wey-Yi Guy, Intel Linux Wireless,
John W. Linville, linux-wireless, netdev, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c | 2 +-
drivers/net/wireless/iwlwifi/iwl-debugfs.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
index d706b8a..215d29e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c
@@ -929,7 +929,7 @@ ssize_t iwl_ucode_bt_stats_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;
int bufsz = (sizeof(struct statistics_bt_activity) * 24) + 200;
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
index 0ee8f51..85e5ad4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c
@@ -1528,7 +1528,7 @@ static ssize_t iwl_dbgfs_ucode_bt_stats_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;
return priv->cfg->ops->lib->debugfs_ops.bt_stats_read(file,
user_buf, count, ppos);
@@ -1566,7 +1566,7 @@ static ssize_t iwl_dbgfs_bt_traffic_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[200];
const size_t bufsz = sizeof(buf);
--
1.7.2.19.g9a302
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 11/13] net/ipv4: Remove unnecessary casts of private_data
2010-09-05 1:52 [PATCH 00/13] trivial: Remove unnecessary casts of private_data Joe Perches
2010-09-05 1:52 ` [PATCH 03/13] drivers/net/wireless/iwlwifi: " Joe Perches
@ 2010-09-05 1:52 ` Joe Perches
2010-09-07 1:30 ` David Miller
2010-09-05 1:52 ` [PATCH 12/13] net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data Joe Perches
2 siblings, 1 reply; 11+ messages in thread
From: Joe Perches @ 2010-09-05 1:52 UTC (permalink / raw)
To: Jiri Kosina
Cc: David S. Miller, Alexey Kuznetsov, Pekka Savola (ipv6),
James Morris, Hideaki YOSHIFUJI, Patrick McHardy, netdev,
linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
net/ipv4/raw.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 1f85ef2..ea9aa9b 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -985,7 +985,7 @@ int raw_seq_open(struct inode *ino, struct file *file,
if (err < 0)
return err;
- i = raw_seq_private((struct seq_file *)file->private_data);
+ i = raw_seq_private(file->private_data);
i->h = h;
return 0;
}
--
1.7.2.19.g9a302
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH 12/13] net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
2010-09-05 1:52 [PATCH 00/13] trivial: Remove unnecessary casts of private_data Joe Perches
2010-09-05 1:52 ` [PATCH 03/13] drivers/net/wireless/iwlwifi: " Joe Perches
2010-09-05 1:52 ` [PATCH 11/13] net/ipv4: " Joe Perches
@ 2010-09-05 1:52 ` Joe Perches
[not found] ` <dda96f0e94bd038179ae11dab4d73a7ab704276b.1283650107.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2 siblings, 1 reply; 11+ messages in thread
From: Joe Perches @ 2010-09-05 1:52 UTC (permalink / raw)
To: Jiri Kosina
Cc: J. Bruce Fields, Neil Brown, Trond Myklebust, David S. Miller,
linux-nfs, netdev, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
net/sunrpc/rpc_pipe.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 95ccbcf..1f7fc50 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -204,7 +204,7 @@ rpc_pipe_release(struct inode *inode, struct file *filp)
mutex_lock(&inode->i_mutex);
if (rpci->ops == NULL)
goto out;
- msg = (struct rpc_pipe_msg *)filp->private_data;
+ msg = filp->private_data;
if (msg != NULL) {
spin_lock(&inode->i_lock);
msg->errno = -EAGAIN;
@@ -322,7 +322,7 @@ rpc_pipe_ioctl_unlocked(struct file *filp, unsigned int cmd, unsigned long arg)
len = rpci->pipelen;
if (filp->private_data) {
struct rpc_pipe_msg *msg;
- msg = (struct rpc_pipe_msg *)filp->private_data;
+ msg = filp->private_data;
len += msg->len - msg->copied;
}
return put_user(len, (int __user *)arg);
--
1.7.2.19.g9a302
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 11/13] net/ipv4: Remove unnecessary casts of private_data
2010-09-05 1:52 ` [PATCH 11/13] net/ipv4: " Joe Perches
@ 2010-09-07 1:30 ` David Miller
2010-09-07 1:47 ` David Miller
0 siblings, 1 reply; 11+ messages in thread
From: David Miller @ 2010-09-07 1:30 UTC (permalink / raw)
To: joe; +Cc: trivial, kuznet, pekkas, jmorris, yoshfuji, kaber, netdev,
linux-kernel
From: Joe Perches <joe@perches.com>
Date: Sat, 4 Sep 2010 18:52:52 -0700
> Signed-off-by: Joe Perches <joe@perches.com>
Applied.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 11/13] net/ipv4: Remove unnecessary casts of private_data
2010-09-07 1:30 ` David Miller
@ 2010-09-07 1:47 ` David Miller
2010-09-07 5:01 ` [PATCH net-next] include/net/raw.h: Convert raw_seq_private macro to inline Joe Perches
0 siblings, 1 reply; 11+ messages in thread
From: David Miller @ 2010-09-07 1:47 UTC (permalink / raw)
To: joe; +Cc: trivial, kuznet, pekkas, jmorris, yoshfuji, kaber, netdev,
linux-kernel
From: David Miller <davem@davemloft.net>
Date: Mon, 06 Sep 2010 18:30:36 -0700 (PDT)
> From: Joe Perches <joe@perches.com>
> Date: Sat, 4 Sep 2010 18:52:52 -0700
>
>> Signed-off-by: Joe Perches <joe@perches.com>
>
> Applied.
So Joe, did you even friggin' build test this?
raw_seq_private() expands to something which dereferences the pointer,
which you've now made void, which is illegal and breaks the build.
Reverted.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH net-next] include/net/raw.h: Convert raw_seq_private macro to inline
2010-09-07 1:47 ` David Miller
@ 2010-09-07 5:01 ` Joe Perches
2010-09-07 15:37 ` Nick Bowler
0 siblings, 1 reply; 11+ messages in thread
From: Joe Perches @ 2010-09-07 5:01 UTC (permalink / raw)
To: David Miller
Cc: trivial, kuznet, pekkas, jmorris, yoshfuji, kaber, netdev,
linux-kernel
On Mon, 2010-09-06 at 18:47 -0700, David Miller wrote:
> raw_seq_private() expands to something which dereferences the pointer,
> which you've now made void, which is illegal and breaks the build.
> Reverted.
Apologies, I had this in my tree which I didn't send
because it wasn't a private_data cast removal.
Signed-off-by: Joe Perches <joe@perches.com>
---
include/net/raw.h | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/include/net/raw.h b/include/net/raw.h
index 43c5750..c621200 100644
--- a/include/net/raw.h
+++ b/include/net/raw.h
@@ -45,7 +45,10 @@ struct raw_iter_state {
struct raw_hashinfo *h;
};
-#define raw_seq_private(seq) ((struct raw_iter_state *)(seq)->private)
+inline struct raw_iter_state *raw_seq_private(struct seq_file *seq)
+{
+ return seq->private;
+}
void *raw_seq_start(struct seq_file *seq, loff_t *pos);
void *raw_seq_next(struct seq_file *seq, void *v, loff_t *pos);
void raw_seq_stop(struct seq_file *seq, void *v);
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH net-next] include/net/raw.h: Convert raw_seq_private macro to inline
2010-09-07 5:01 ` [PATCH net-next] include/net/raw.h: Convert raw_seq_private macro to inline Joe Perches
@ 2010-09-07 15:37 ` Nick Bowler
2010-09-07 15:55 ` [PATCH V2 " Joe Perches
0 siblings, 1 reply; 11+ messages in thread
From: Nick Bowler @ 2010-09-07 15:37 UTC (permalink / raw)
To: Joe Perches
Cc: David Miller, trivial, kuznet, pekkas, jmorris, yoshfuji, kaber,
netdev, linux-kernel
On 2010-09-06 22:01 -0700, Joe Perches wrote:
> diff --git a/include/net/raw.h b/include/net/raw.h
> index 43c5750..c621200 100644
> --- a/include/net/raw.h
> +++ b/include/net/raw.h
> @@ -45,7 +45,10 @@ struct raw_iter_state {
> struct raw_hashinfo *h;
> };
>
> -#define raw_seq_private(seq) ((struct raw_iter_state *)(seq)->private)
> +inline struct raw_iter_state *raw_seq_private(struct seq_file *seq)
This needs to be declared static.
> +{
> + return seq->private;
> +}
> void *raw_seq_start(struct seq_file *seq, loff_t *pos);
> void *raw_seq_next(struct seq_file *seq, void *v, loff_t *pos);
> void raw_seq_stop(struct seq_file *seq, void *v);
--
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH V2 net-next] include/net/raw.h: Convert raw_seq_private macro to inline
2010-09-07 15:37 ` Nick Bowler
@ 2010-09-07 15:55 ` Joe Perches
2010-09-08 20:42 ` David Miller
0 siblings, 1 reply; 11+ messages in thread
From: Joe Perches @ 2010-09-07 15:55 UTC (permalink / raw)
To: Nick Bowler
Cc: David Miller, trivial, kuznet, pekkas, jmorris, yoshfuji, kaber,
netdev, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
include/net/raw.h | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/include/net/raw.h b/include/net/raw.h
index 43c5750..42ce6fe 100644
--- a/include/net/raw.h
+++ b/include/net/raw.h
@@ -45,7 +45,10 @@ struct raw_iter_state {
struct raw_hashinfo *h;
};
-#define raw_seq_private(seq) ((struct raw_iter_state *)(seq)->private)
+static inline struct raw_iter_state *raw_seq_private(struct seq_file *seq)
+{
+ return seq->private;
+}
void *raw_seq_start(struct seq_file *seq, loff_t *pos);
void *raw_seq_next(struct seq_file *seq, void *v, loff_t *pos);
void raw_seq_stop(struct seq_file *seq, void *v);
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH V2 net-next] include/net/raw.h: Convert raw_seq_private macro to inline
2010-09-07 15:55 ` [PATCH V2 " Joe Perches
@ 2010-09-08 20:42 ` David Miller
0 siblings, 0 replies; 11+ messages in thread
From: David Miller @ 2010-09-08 20:42 UTC (permalink / raw)
To: joe
Cc: nbowler, trivial, kuznet, pekkas, jmorris, yoshfuji, kaber,
netdev, linux-kernel
From: Joe Perches <joe@perches.com>
Date: Tue, 07 Sep 2010 08:55:38 -0700
> Signed-off-by: Joe Perches <joe@perches.com>
Applied.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 12/13] net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
[not found] ` <dda96f0e94bd038179ae11dab4d73a7ab704276b.1283650107.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
@ 2010-09-23 11:40 ` Jiri Kosina
0 siblings, 0 replies; 11+ messages in thread
From: Jiri Kosina @ 2010-09-23 11:40 UTC (permalink / raw)
To: Joe Perches
Cc: J. Bruce Fields, Neil Brown, Trond Myklebust, David S. Miller,
linux-nfs-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Sat, 4 Sep 2010, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
> ---
> net/sunrpc/rpc_pipe.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
> index 95ccbcf..1f7fc50 100644
> --- a/net/sunrpc/rpc_pipe.c
> +++ b/net/sunrpc/rpc_pipe.c
> @@ -204,7 +204,7 @@ rpc_pipe_release(struct inode *inode, struct file *filp)
> mutex_lock(&inode->i_mutex);
> if (rpci->ops == NULL)
> goto out;
> - msg = (struct rpc_pipe_msg *)filp->private_data;
> + msg = filp->private_data;
> if (msg != NULL) {
> spin_lock(&inode->i_lock);
> msg->errno = -EAGAIN;
> @@ -322,7 +322,7 @@ rpc_pipe_ioctl_unlocked(struct file *filp, unsigned int cmd, unsigned long arg)
> len = rpci->pipelen;
> if (filp->private_data) {
> struct rpc_pipe_msg *msg;
> - msg = (struct rpc_pipe_msg *)filp->private_data;
> + msg = filp->private_data;
> len += msg->len - msg->copied;
> }
> return put_user(len, (int __user *)arg);
Not present in linux-next as of today. Applying to trivial queue.
--
Jiri Kosina
SUSE Labs, Novell Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-09-23 11:40 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-05 1:52 [PATCH 00/13] trivial: Remove unnecessary casts of private_data Joe Perches
2010-09-05 1:52 ` [PATCH 03/13] drivers/net/wireless/iwlwifi: " Joe Perches
2010-09-05 1:52 ` [PATCH 11/13] net/ipv4: " Joe Perches
2010-09-07 1:30 ` David Miller
2010-09-07 1:47 ` David Miller
2010-09-07 5:01 ` [PATCH net-next] include/net/raw.h: Convert raw_seq_private macro to inline Joe Perches
2010-09-07 15:37 ` Nick Bowler
2010-09-07 15:55 ` [PATCH V2 " Joe Perches
2010-09-08 20:42 ` David Miller
2010-09-05 1:52 ` [PATCH 12/13] net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data Joe Perches
[not found] ` <dda96f0e94bd038179ae11dab4d73a7ab704276b.1283650107.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2010-09-23 11:40 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).