* [PATCH 00/13] trivial: Remove unnecessary casts of private_data
@ 2010-09-05 1:52 ` Joe Perches
0 siblings, 0 replies; 39+ 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,
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] 39+ messages in thread
* [PATCH 01/13] drivers/gpu/drm: Remove unnecessary casts of private_data
2010-09-05 1:52 ` Joe Perches
@ 2010-09-05 1:52 ` Joe Perches
-1 siblings, 0 replies; 39+ messages in thread
From: Joe Perches @ 2010-09-05 1:52 UTC (permalink / raw)
To: Jiri Kosina; +Cc: David Airlie, dri-devel, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
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 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 84c53e4..a823d8f 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -631,7 +631,7 @@ int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
return drm_mmap(filp, vma);
}
- file_priv = (struct drm_file *)filp->private_data;
+ file_priv = filp->private_data;
rdev = file_priv->minor->dev->dev_private;
if (rdev == NULL) {
return -EINVAL;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
index e6a1eb7..dc043c3 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
@@ -542,7 +542,7 @@ int vmw_fifo_mmap(struct file *filp, struct vm_area_struct *vma)
struct drm_file *file_priv;
struct vmw_private *dev_priv;
- file_priv = (struct drm_file *)filp->private_data;
+ file_priv = filp->private_data;
dev_priv = vmw_priv(file_priv->minor->dev);
if (vma->vm_pgoff != (dev_priv->mmio_start >> PAGE_SHIFT) ||
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c
index 8312328..1e8eedd 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c
@@ -39,7 +39,7 @@ int vmw_mmap(struct file *filp, struct vm_area_struct *vma)
return drm_mmap(filp, vma);
}
- file_priv = (struct drm_file *)filp->private_data;
+ file_priv = filp->private_data;
dev_priv = vmw_priv(file_priv->minor->dev);
return ttm_bo_mmap(filp, vma, &dev_priv->bdev);
}
--
1.7.2.19.g9a302
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 01/13] drivers/gpu/drm: Remove unnecessary casts of private_data
@ 2010-09-05 1:52 ` Joe Perches
0 siblings, 0 replies; 39+ messages in thread
From: Joe Perches @ 2010-09-05 1:52 UTC (permalink / raw)
To: Jiri Kosina; +Cc: linux-kernel, dri-devel
Signed-off-by: Joe Perches <joe@perches.com>
---
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 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index 84c53e4..a823d8f 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -631,7 +631,7 @@ int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
return drm_mmap(filp, vma);
}
- file_priv = (struct drm_file *)filp->private_data;
+ file_priv = filp->private_data;
rdev = file_priv->minor->dev->dev_private;
if (rdev == NULL) {
return -EINVAL;
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
index e6a1eb7..dc043c3 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
@@ -542,7 +542,7 @@ int vmw_fifo_mmap(struct file *filp, struct vm_area_struct *vma)
struct drm_file *file_priv;
struct vmw_private *dev_priv;
- file_priv = (struct drm_file *)filp->private_data;
+ file_priv = filp->private_data;
dev_priv = vmw_priv(file_priv->minor->dev);
if (vma->vm_pgoff != (dev_priv->mmio_start >> PAGE_SHIFT) ||
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c
index 8312328..1e8eedd 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c
@@ -39,7 +39,7 @@ int vmw_mmap(struct file *filp, struct vm_area_struct *vma)
return drm_mmap(filp, vma);
}
- file_priv = (struct drm_file *)filp->private_data;
+ file_priv = filp->private_data;
dev_priv = vmw_priv(file_priv->minor->dev);
return ttm_bo_mmap(filp, vma, &dev_priv->bdev);
}
--
1.7.2.19.g9a302
^ permalink raw reply related [flat|nested] 39+ messages in thread
* Re: [PATCH 01/13] drivers/gpu/drm: Remove unnecessary casts of private_data
2010-09-05 1:52 ` Joe Perches
(?)
@ 2010-09-23 11:36 ` Jiri Kosina
-1 siblings, 0 replies; 39+ messages in thread
From: Jiri Kosina @ 2010-09-23 11:36 UTC (permalink / raw)
To: Joe Perches; +Cc: David Airlie, dri-devel, linux-kernel
On Sat, 4 Sep 2010, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> 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 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
> index 84c53e4..a823d8f 100644
> --- a/drivers/gpu/drm/radeon/radeon_ttm.c
> +++ b/drivers/gpu/drm/radeon/radeon_ttm.c
> @@ -631,7 +631,7 @@ int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
> return drm_mmap(filp, vma);
> }
>
> - file_priv = (struct drm_file *)filp->private_data;
> + file_priv = filp->private_data;
> rdev = file_priv->minor->dev->dev_private;
> if (rdev == NULL) {
> return -EINVAL;
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
> index e6a1eb7..dc043c3 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c
> @@ -542,7 +542,7 @@ int vmw_fifo_mmap(struct file *filp, struct vm_area_struct *vma)
> struct drm_file *file_priv;
> struct vmw_private *dev_priv;
>
> - file_priv = (struct drm_file *)filp->private_data;
> + file_priv = filp->private_data;
> dev_priv = vmw_priv(file_priv->minor->dev);
>
> if (vma->vm_pgoff != (dev_priv->mmio_start >> PAGE_SHIFT) ||
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c
> index 8312328..1e8eedd 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c
> @@ -39,7 +39,7 @@ int vmw_mmap(struct file *filp, struct vm_area_struct *vma)
> return drm_mmap(filp, vma);
> }
>
> - file_priv = (struct drm_file *)filp->private_data;
> + file_priv = filp->private_data;
> dev_priv = vmw_priv(file_priv->minor->dev);
> return ttm_bo_mmap(filp, vma, &dev_priv->bdev);
> }
This patch isn't present in linux-next as of today. Taking through trivial
queue.
Thanks,
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 02/13] drivers/infiniband: Remove unnecessary casts of private_data
2010-09-05 1:52 ` Joe Perches
(?)
(?)
@ 2010-09-05 1:52 ` Joe Perches
[not found] ` <a13edeb14cc926b71e21daff892acbe2d76313ab.1283650107.git.joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
-1 siblings, 1 reply; 39+ messages in thread
From: Joe Perches @ 2010-09-05 1:52 UTC (permalink / raw)
To: Jiri Kosina
Cc: Roland Dreier, Sean Hefty, Hal Rosenstock, linux-rdma, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/infiniband/hw/qib/qib_file_ops.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/qib/qib_file_ops.c b/drivers/infiniband/hw/qib/qib_file_ops.c
index 6b11645..cef5d67 100644
--- a/drivers/infiniband/hw/qib/qib_file_ops.c
+++ b/drivers/infiniband/hw/qib/qib_file_ops.c
@@ -1722,7 +1722,7 @@ static int qib_close(struct inode *in, struct file *fp)
mutex_lock(&qib_mutex);
- fd = (struct qib_filedata *) fp->private_data;
+ fd = fp->private_data;
fp->private_data = NULL;
rcd = fd->rcd;
if (!rcd) {
@@ -1808,7 +1808,7 @@ static int qib_ctxt_info(struct file *fp, struct qib_ctxt_info __user *uinfo)
struct qib_ctxtdata *rcd = ctxt_fp(fp);
struct qib_filedata *fd;
- fd = (struct qib_filedata *) fp->private_data;
+ fd = fp->private_data;
info.num_active = qib_count_active_units();
info.unit = rcd->dd->unit;
--
1.7.2.19.g9a302
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 03/13] drivers/net/wireless/iwlwifi: Remove unnecessary casts of private_data
2010-09-05 1:52 ` Joe Perches
` (2 preceding siblings ...)
(?)
@ 2010-09-05 1:52 ` Joe Perches
-1 siblings, 0 replies; 39+ 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] 39+ messages in thread
* [PATCH 04/13] drivers/s390: Remove unnecessary casts of private_data
2010-09-05 1:52 ` Joe Perches
` (3 preceding siblings ...)
(?)
@ 2010-09-05 1:52 ` Joe Perches
2010-09-23 11:42 ` Jiri Kosina
-1 siblings, 1 reply; 39+ messages in thread
From: Joe Perches @ 2010-09-05 1:52 UTC (permalink / raw)
To: Jiri Kosina
Cc: Martin Schwidefsky, Heiko Carstens, linux390, linux-s390, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/s390/char/vmcp.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c
index 04e532e..19a14d9 100644
--- a/drivers/s390/char/vmcp.c
+++ b/drivers/s390/char/vmcp.c
@@ -47,7 +47,7 @@ static int vmcp_release(struct inode *inode, struct file *file)
{
struct vmcp_session *session;
- session = (struct vmcp_session *)file->private_data;
+ session = file->private_data;
file->private_data = NULL;
free_pages((unsigned long)session->response, get_order(session->bufsize));
kfree(session);
@@ -94,7 +94,7 @@ vmcp_write(struct file *file, const char __user *buff, size_t count,
return -EFAULT;
}
cmd[count] = '\0';
- session = (struct vmcp_session *)file->private_data;
+ session = file->private_data;
if (mutex_lock_interruptible(&session->mutex)) {
kfree(cmd);
return -ERESTARTSYS;
@@ -136,7 +136,7 @@ static long vmcp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
int __user *argp;
int temp;
- session = (struct vmcp_session *)file->private_data;
+ session = file->private_data;
if (is_compat_task())
argp = compat_ptr(arg);
else
--
1.7.2.19.g9a302
^ permalink raw reply related [flat|nested] 39+ messages in thread
* Re: [PATCH 04/13] drivers/s390: Remove unnecessary casts of private_data
2010-09-05 1:52 ` [PATCH 04/13] drivers/s390: " Joe Perches
@ 2010-09-23 11:42 ` Jiri Kosina
0 siblings, 0 replies; 39+ messages in thread
From: Jiri Kosina @ 2010-09-23 11:42 UTC (permalink / raw)
To: Joe Perches
Cc: Martin Schwidefsky, Heiko Carstens, linux390, linux-s390, linux-kernel
On Sat, 4 Sep 2010, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/s390/char/vmcp.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/s390/char/vmcp.c b/drivers/s390/char/vmcp.c
> index 04e532e..19a14d9 100644
> --- a/drivers/s390/char/vmcp.c
> +++ b/drivers/s390/char/vmcp.c
> @@ -47,7 +47,7 @@ static int vmcp_release(struct inode *inode, struct file *file)
> {
> struct vmcp_session *session;
>
> - session = (struct vmcp_session *)file->private_data;
> + session = file->private_data;
> file->private_data = NULL;
> free_pages((unsigned long)session->response, get_order(session->bufsize));
> kfree(session);
> @@ -94,7 +94,7 @@ vmcp_write(struct file *file, const char __user *buff, size_t count,
> return -EFAULT;
> }
> cmd[count] = '\0';
> - session = (struct vmcp_session *)file->private_data;
> + session = file->private_data;
> if (mutex_lock_interruptible(&session->mutex)) {
> kfree(cmd);
> return -ERESTARTSYS;
> @@ -136,7 +136,7 @@ static long vmcp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> int __user *argp;
> int temp;
>
> - session = (struct vmcp_session *)file->private_data;
> + session = file->private_data;
> if (is_compat_task())
> argp = compat_ptr(arg);
> else
Not present in linux-next as of today. Applied, thanks.
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 05/13] drivers/scsi: Remove unnecessary casts of private_data
2010-09-05 1:52 ` Joe Perches
` (4 preceding siblings ...)
(?)
@ 2010-09-05 1:52 ` Joe Perches
2010-09-23 11:45 ` Jiri Kosina
-1 siblings, 1 reply; 39+ messages in thread
From: Joe Perches @ 2010-09-05 1:52 UTC (permalink / raw)
To: Jiri Kosina
Cc: Adaptec OEM Raid Solutions, James E.J. Bottomley, Doug Gilbert,
linux-scsi, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/scsi/aacraid/linit.c | 2 +-
drivers/scsi/sg.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index cad6f9a..aa40036 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -770,7 +770,7 @@ static long aac_compat_cfg_ioctl(struct file *file, unsigned cmd, unsigned long
{
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
- return aac_compat_do_ioctl((struct aac_dev *)file->private_data, cmd, arg);
+ return aac_compat_do_ioctl(file->private_data, cmd, arg);
}
#endif
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 78d6163..6efa8dd 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -210,7 +210,7 @@ static void sg_put_dev(Sg_device *sdp);
static int sg_allow_access(struct file *filp, unsigned char *cmd)
{
- struct sg_fd *sfp = (struct sg_fd *)filp->private_data;
+ struct sg_fd *sfp = filp->private_data;
if (sfp->parentdp->device->type == TYPE_SCANNER)
return 0;
--
1.7.2.19.g9a302
^ permalink raw reply related [flat|nested] 39+ messages in thread
* Re: [PATCH 05/13] drivers/scsi: Remove unnecessary casts of private_data
2010-09-05 1:52 ` [PATCH 05/13] drivers/scsi: " Joe Perches
@ 2010-09-23 11:45 ` Jiri Kosina
0 siblings, 0 replies; 39+ messages in thread
From: Jiri Kosina @ 2010-09-23 11:45 UTC (permalink / raw)
To: Joe Perches
Cc: Adaptec OEM Raid Solutions, James E.J. Bottomley, Doug Gilbert,
linux-scsi, linux-kernel
On Sat, 4 Sep 2010, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> drivers/scsi/aacraid/linit.c | 2 +-
> drivers/scsi/sg.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
> index cad6f9a..aa40036 100644
> --- a/drivers/scsi/aacraid/linit.c
> +++ b/drivers/scsi/aacraid/linit.c
> @@ -770,7 +770,7 @@ static long aac_compat_cfg_ioctl(struct file *file, unsigned cmd, unsigned long
> {
> if (!capable(CAP_SYS_RAWIO))
> return -EPERM;
> - return aac_compat_do_ioctl((struct aac_dev *)file->private_data, cmd, arg);
> + return aac_compat_do_ioctl(file->private_data, cmd, arg);
> }
> #endif
>
> diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
> index 78d6163..6efa8dd 100644
> --- a/drivers/scsi/sg.c
> +++ b/drivers/scsi/sg.c
> @@ -210,7 +210,7 @@ static void sg_put_dev(Sg_device *sdp);
>
> static int sg_allow_access(struct file *filp, unsigned char *cmd)
> {
> - struct sg_fd *sfp = (struct sg_fd *)filp->private_data;
> + struct sg_fd *sfp = filp->private_data;
>
> if (sfp->parentdp->device->type == TYPE_SCANNER)
> return 0;
This patch isn't present in linux-next as of today. Applying to my tree
now.
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 06/13] drivers/staging/lirc: Remove unnecessary casts of private_data
2010-09-05 1:52 ` Joe Perches
` (5 preceding siblings ...)
(?)
@ 2010-09-05 1:52 ` Joe Perches
-1 siblings, 0 replies; 39+ messages in thread
From: Joe Perches @ 2010-09-05 1:52 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Greg Kroah-Hartman, devel, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/staging/lirc/lirc_imon.c | 4 ++--
drivers/staging/lirc/lirc_zilog.c | 10 +++++-----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/lirc/lirc_imon.c b/drivers/staging/lirc/lirc_imon.c
index 818bec0..9949dfa 100644
--- a/drivers/staging/lirc/lirc_imon.c
+++ b/drivers/staging/lirc/lirc_imon.c
@@ -277,7 +277,7 @@ static int display_close(struct inode *inode, struct file *file)
struct imon_context *context = NULL;
int retval = 0;
- context = (struct imon_context *)file->private_data;
+ context = file->private_data;
if (!context) {
err("%s: no context for device", __func__);
@@ -380,7 +380,7 @@ static ssize_t vfd_write(struct file *file, const char *buf,
0x01, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF };
int *data_buf;
- context = (struct imon_context *)file->private_data;
+ context = file->private_data;
if (!context) {
err("%s: no context for device", __func__);
return -ENODEV;
diff --git a/drivers/staging/lirc/lirc_zilog.c b/drivers/staging/lirc/lirc_zilog.c
index 100caab..9b77552 100644
--- a/drivers/staging/lirc/lirc_zilog.c
+++ b/drivers/staging/lirc/lirc_zilog.c
@@ -716,7 +716,7 @@ static loff_t lseek(struct file *filep, loff_t offset, int orig)
/* copied from lirc_dev */
static ssize_t read(struct file *filep, char *outbuf, size_t n, loff_t *ppos)
{
- struct IR *ir = (struct IR *)filep->private_data;
+ struct IR *ir = filep->private_data;
unsigned char buf[ir->buf.chunk_size];
int ret = 0, written = 0;
DECLARE_WAITQUEUE(wait, current);
@@ -898,7 +898,7 @@ done:
static ssize_t write(struct file *filep, const char *buf, size_t n,
loff_t *ppos)
{
- struct IR *ir = (struct IR *)filep->private_data;
+ struct IR *ir = filep->private_data;
size_t i;
int failures = 0;
@@ -972,7 +972,7 @@ static ssize_t write(struct file *filep, const char *buf, size_t n,
/* copied from lirc_dev */
static unsigned int poll(struct file *filep, poll_table *wait)
{
- struct IR *ir = (struct IR *)filep->private_data;
+ struct IR *ir = filep->private_data;
unsigned int ret;
dprintk("poll called\n");
@@ -994,7 +994,7 @@ static unsigned int poll(struct file *filep, poll_table *wait)
static long ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
{
- struct IR *ir = (struct IR *)filep->private_data;
+ struct IR *ir = filep->private_data;
int result;
unsigned long mode, features = 0;
@@ -1086,7 +1086,7 @@ static int open(struct inode *node, struct file *filep)
static int close(struct inode *node, struct file *filep)
{
/* find our IR struct */
- struct IR *ir = (struct IR *)filep->private_data;
+ struct IR *ir = filep->private_data;
if (ir == NULL) {
zilog_error("close: no private_data attached to the file!\n");
return -ENODEV;
--
1.7.2.19.g9a302
^ permalink raw reply related [flat|nested] 39+ messages in thread
* [PATCH 07/13] fs/ecryptfs: Remove unnecessary casts of private_data
2010-09-05 1:52 ` Joe Perches
` (6 preceding siblings ...)
(?)
@ 2010-09-05 1:52 ` Joe Perches
2010-09-23 11:31 ` Jiri Kosina
-1 siblings, 1 reply; 39+ messages in thread
From: Joe Perches @ 2010-09-05 1:52 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Tyler Hicks, Dustin Kirkland, ecryptfs-devel, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
fs/ecryptfs/ecryptfs_kernel.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h
index 0032a9f..40186b9 100644
--- a/fs/ecryptfs/ecryptfs_kernel.h
+++ b/fs/ecryptfs/ecryptfs_kernel.h
@@ -477,7 +477,7 @@ ecryptfs_lower_header_size(struct ecryptfs_crypt_stat *crypt_stat)
static inline struct ecryptfs_file_info *
ecryptfs_file_to_private(struct file *file)
{
- return (struct ecryptfs_file_info *)file->private_data;
+ return file->private_data;
}
static inline void
--
1.7.2.19.g9a302
^ permalink raw reply related [flat|nested] 39+ messages in thread
* Re: [PATCH 07/13] fs/ecryptfs: Remove unnecessary casts of private_data
2010-09-05 1:52 ` [PATCH 07/13] fs/ecryptfs: " Joe Perches
@ 2010-09-23 11:31 ` Jiri Kosina
0 siblings, 0 replies; 39+ messages in thread
From: Jiri Kosina @ 2010-09-23 11:31 UTC (permalink / raw)
To: Joe Perches; +Cc: Tyler Hicks, Dustin Kirkland, ecryptfs-devel, linux-kernel
On Sat, 4 Sep 2010, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> fs/ecryptfs/ecryptfs_kernel.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h
> index 0032a9f..40186b9 100644
> --- a/fs/ecryptfs/ecryptfs_kernel.h
> +++ b/fs/ecryptfs/ecryptfs_kernel.h
> @@ -477,7 +477,7 @@ ecryptfs_lower_header_size(struct ecryptfs_crypt_stat *crypt_stat)
> static inline struct ecryptfs_file_info *
> ecryptfs_file_to_private(struct file *file)
> {
> - return (struct ecryptfs_file_info *)file->private_data;
> + return file->private_data;
> }
>
> static inline void
Applied, thanks.
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 08/13] fs/seq_file.c: Remove unnecessary casts of private_data
2010-09-05 1:52 ` Joe Perches
` (7 preceding siblings ...)
(?)
@ 2010-09-05 1:52 ` Joe Perches
2010-09-23 11:29 ` Jiri Kosina
-1 siblings, 1 reply; 39+ messages in thread
From: Joe Perches @ 2010-09-05 1:52 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Alexander Viro, linux-fsdevel, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
fs/seq_file.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/seq_file.c b/fs/seq_file.c
index e1f437b..0e7cb13 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -131,7 +131,7 @@ Eoverflow:
*/
ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos)
{
- struct seq_file *m = (struct seq_file *)file->private_data;
+ struct seq_file *m = file->private_data;
size_t copied = 0;
loff_t pos;
size_t n;
@@ -280,7 +280,7 @@ EXPORT_SYMBOL(seq_read);
*/
loff_t seq_lseek(struct file *file, loff_t offset, int origin)
{
- struct seq_file *m = (struct seq_file *)file->private_data;
+ struct seq_file *m = file->private_data;
loff_t retval = -EINVAL;
mutex_lock(&m->lock);
@@ -324,7 +324,7 @@ EXPORT_SYMBOL(seq_lseek);
*/
int seq_release(struct inode *inode, struct file *file)
{
- struct seq_file *m = (struct seq_file *)file->private_data;
+ struct seq_file *m = file->private_data;
kfree(m->buf);
kfree(m);
return 0;
--
1.7.2.19.g9a302
^ permalink raw reply related [flat|nested] 39+ messages in thread
* Re: [PATCH 08/13] fs/seq_file.c: Remove unnecessary casts of private_data
2010-09-05 1:52 ` [PATCH 08/13] fs/seq_file.c: " Joe Perches
@ 2010-09-23 11:29 ` Jiri Kosina
0 siblings, 0 replies; 39+ messages in thread
From: Jiri Kosina @ 2010-09-23 11:29 UTC (permalink / raw)
To: Joe Perches; +Cc: Alexander Viro, linux-fsdevel, linux-kernel
On Sat, 4 Sep 2010, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> fs/seq_file.c | 6 +++---
> 1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/seq_file.c b/fs/seq_file.c
> index e1f437b..0e7cb13 100644
> --- a/fs/seq_file.c
> +++ b/fs/seq_file.c
> @@ -131,7 +131,7 @@ Eoverflow:
> */
> ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos)
> {
> - struct seq_file *m = (struct seq_file *)file->private_data;
> + struct seq_file *m = file->private_data;
> size_t copied = 0;
> loff_t pos;
> size_t n;
> @@ -280,7 +280,7 @@ EXPORT_SYMBOL(seq_read);
> */
> loff_t seq_lseek(struct file *file, loff_t offset, int origin)
> {
> - struct seq_file *m = (struct seq_file *)file->private_data;
> + struct seq_file *m = file->private_data;
> loff_t retval = -EINVAL;
>
> mutex_lock(&m->lock);
> @@ -324,7 +324,7 @@ EXPORT_SYMBOL(seq_lseek);
> */
> int seq_release(struct inode *inode, struct file *file)
> {
> - struct seq_file *m = (struct seq_file *)file->private_data;
> + struct seq_file *m = file->private_data;
> kfree(m->buf);
> kfree(m);
> return 0;
Doesn't seem to be present in linux-next as of today. I am going to fold
it into trivial queue, if anyone has any objections, shout now.
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 09/13] kernel/pm_qos_params.c: Remove unnecessary casts of private_data
2010-09-05 1:52 ` Joe Perches
` (8 preceding siblings ...)
(?)
@ 2010-09-05 1:52 ` Joe Perches
2010-09-23 11:34 ` Jiri Kosina
-1 siblings, 1 reply; 39+ messages in thread
From: Joe Perches @ 2010-09-05 1:52 UTC (permalink / raw)
To: Jiri Kosina; +Cc: linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
kernel/pm_qos_params.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kernel/pm_qos_params.c b/kernel/pm_qos_params.c
index b7e4c36..8414e51 100644
--- a/kernel/pm_qos_params.c
+++ b/kernel/pm_qos_params.c
@@ -396,7 +396,7 @@ static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf,
} else
return -EINVAL;
- pm_qos_req = (struct pm_qos_request_list *)filp->private_data;
+ pm_qos_req = filp->private_data;
pm_qos_update_request(pm_qos_req, value);
return count;
--
1.7.2.19.g9a302
^ permalink raw reply related [flat|nested] 39+ messages in thread
* Re: [PATCH 09/13] kernel/pm_qos_params.c: Remove unnecessary casts of private_data
2010-09-05 1:52 ` [PATCH 09/13] kernel/pm_qos_params.c: " Joe Perches
@ 2010-09-23 11:34 ` Jiri Kosina
0 siblings, 0 replies; 39+ messages in thread
From: Jiri Kosina @ 2010-09-23 11:34 UTC (permalink / raw)
To: Joe Perches; +Cc: linux-kernel
On Sat, 4 Sep 2010, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> kernel/pm_qos_params.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/pm_qos_params.c b/kernel/pm_qos_params.c
> index b7e4c36..8414e51 100644
> --- a/kernel/pm_qos_params.c
> +++ b/kernel/pm_qos_params.c
> @@ -396,7 +396,7 @@ static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf,
> } else
> return -EINVAL;
>
> - pm_qos_req = (struct pm_qos_request_list *)filp->private_data;
> + pm_qos_req = filp->private_data;
> pm_qos_update_request(pm_qos_req, value);
>
> return count;
Applied.
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 10/13] kernel/trace: Remove unnecessary casts of private_data
2010-09-05 1:52 ` Joe Perches
` (9 preceding siblings ...)
(?)
@ 2010-09-05 1:52 ` Joe Perches
2010-09-23 11:37 ` Jiri Kosina
-1 siblings, 1 reply; 39+ messages in thread
From: Joe Perches @ 2010-09-05 1:52 UTC (permalink / raw)
To: Jiri Kosina
Cc: Steven Rostedt, Frederic Weisbecker, Ingo Molnar, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
kernel/trace/ftrace.c | 4 ++--
kernel/trace/trace.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 7cb1f45..fc9ee37 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1599,7 +1599,7 @@ ftrace_failures_open(struct inode *inode, struct file *file)
ret = ftrace_avail_open(inode, file);
if (!ret) {
- m = (struct seq_file *)file->private_data;
+ m = file->private_data;
iter = (struct ftrace_iterator *)m->private;
iter->flags = FTRACE_ITER_FAILURES;
}
@@ -2356,7 +2356,7 @@ static void __init set_ftrace_early_filters(void)
static int
ftrace_regex_release(struct inode *inode, struct file *file, int enable)
{
- struct seq_file *m = (struct seq_file *)file->private_data;
+ struct seq_file *m = file->private_data;
struct ftrace_iterator *iter;
struct trace_parser *parser;
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 9ec59f5..001bcd2 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2196,7 +2196,7 @@ int tracing_open_generic(struct inode *inode, struct file *filp)
static int tracing_release(struct inode *inode, struct file *file)
{
- struct seq_file *m = (struct seq_file *)file->private_data;
+ struct seq_file *m = file->private_data;
struct trace_iterator *iter;
int cpu;
--
1.7.2.19.g9a302
^ permalink raw reply related [flat|nested] 39+ messages in thread
* Re: [PATCH 10/13] kernel/trace: Remove unnecessary casts of private_data
2010-09-05 1:52 ` [PATCH 10/13] kernel/trace: " Joe Perches
@ 2010-09-23 11:37 ` Jiri Kosina
0 siblings, 0 replies; 39+ messages in thread
From: Jiri Kosina @ 2010-09-23 11:37 UTC (permalink / raw)
To: Joe Perches
Cc: Steven Rostedt, Frederic Weisbecker, Ingo Molnar, linux-kernel
On Sat, 4 Sep 2010, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> kernel/trace/ftrace.c | 4 ++--
> kernel/trace/trace.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 7cb1f45..fc9ee37 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -1599,7 +1599,7 @@ ftrace_failures_open(struct inode *inode, struct file *file)
>
> ret = ftrace_avail_open(inode, file);
> if (!ret) {
> - m = (struct seq_file *)file->private_data;
> + m = file->private_data;
> iter = (struct ftrace_iterator *)m->private;
How about m->private here?
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 39+ messages in thread
* [PATCH 11/13] net/ipv4: Remove unnecessary casts of private_data
2010-09-05 1:52 ` Joe Perches
` (10 preceding siblings ...)
(?)
@ 2010-09-05 1:52 ` Joe Perches
2010-09-07 1:30 ` David Miller
-1 siblings, 1 reply; 39+ 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] 39+ 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; 39+ 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] 39+ 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; 39+ 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] 39+ 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; 39+ 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] 39+ 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; 39+ 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] 39+ 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; 39+ 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] 39+ 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; 39+ 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] 39+ messages in thread
* [PATCH 12/13] net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
2010-09-05 1:52 ` Joe Perches
` (11 preceding siblings ...)
(?)
@ 2010-09-05 1:52 ` Joe Perches
2010-09-23 11:40 ` Jiri Kosina
-1 siblings, 1 reply; 39+ 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] 39+ messages in thread
* Re: [PATCH 12/13] net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
@ 2010-09-23 11:40 ` Jiri Kosina
0 siblings, 0 replies; 39+ 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, netdev, linux-kernel
On Sat, 4 Sep 2010, Joe Perches wrote:
> 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);
Not present in linux-next as of today. Applying to trivial queue.
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 12/13] net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
@ 2010-09-23 11:40 ` Jiri Kosina
0 siblings, 0 replies; 39+ 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] 39+ messages in thread
* [PATCH 13/13] sound: Remove unnecessary casts of private_data
2010-09-05 1:52 ` Joe Perches
` (12 preceding siblings ...)
(?)
@ 2010-09-05 1:52 ` Joe Perches
2010-09-07 6:10 ` Takashi Iwai
-1 siblings, 1 reply; 39+ messages in thread
From: Joe Perches @ 2010-09-05 1:52 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel
Signed-off-by: Joe Perches <joe@perches.com>
---
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 ++++----
14 files changed, 41 insertions(+), 42 deletions(-)
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
index f50ebf2..86afb13 100644
--- a/sound/core/oss/mixer_oss.c
+++ b/sound/core/oss/mixer_oss.c
@@ -77,7 +77,7 @@ static int snd_mixer_oss_release(struct inode *inode, struct file *file)
struct snd_mixer_oss_file *fmixer;
if (file->private_data) {
- fmixer = (struct snd_mixer_oss_file *) file->private_data;
+ fmixer = file->private_data;
module_put(fmixer->card->module);
snd_card_file_remove(fmixer->card, file);
kfree(fmixer);
@@ -368,7 +368,7 @@ static int snd_mixer_oss_ioctl1(struct snd_mixer_oss_file *fmixer, unsigned int
static long snd_mixer_oss_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
- return snd_mixer_oss_ioctl1((struct snd_mixer_oss_file *) file->private_data, cmd, arg);
+ return snd_mixer_oss_ioctl1(file->private_data, cmd, arg);
}
int snd_mixer_oss_ioctl_card(struct snd_card *card, unsigned int cmd, unsigned long arg)
@@ -582,7 +582,7 @@ static int snd_mixer_oss_get_volume1(struct snd_mixer_oss_file *fmixer,
struct snd_mixer_oss_slot *pslot,
int *left, int *right)
{
- struct slot *slot = (struct slot *)pslot->private_data;
+ struct slot *slot = pslot->private_data;
*left = *right = 100;
if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) {
@@ -691,7 +691,7 @@ static int snd_mixer_oss_put_volume1(struct snd_mixer_oss_file *fmixer,
struct snd_mixer_oss_slot *pslot,
int left, int right)
{
- struct slot *slot = (struct slot *)pslot->private_data;
+ struct slot *slot = pslot->private_data;
if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) {
snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PVOLUME], left, right);
@@ -740,7 +740,7 @@ static int snd_mixer_oss_get_recsrc1_sw(struct snd_mixer_oss_file *fmixer,
struct snd_mixer_oss_slot *pslot,
int *active)
{
- struct slot *slot = (struct slot *)pslot->private_data;
+ struct slot *slot = pslot->private_data;
int left, right;
left = right = 1;
@@ -753,7 +753,7 @@ static int snd_mixer_oss_get_recsrc1_route(struct snd_mixer_oss_file *fmixer,
struct snd_mixer_oss_slot *pslot,
int *active)
{
- struct slot *slot = (struct slot *)pslot->private_data;
+ struct slot *slot = pslot->private_data;
int left, right;
left = right = 1;
@@ -766,7 +766,7 @@ static int snd_mixer_oss_put_recsrc1_sw(struct snd_mixer_oss_file *fmixer,
struct snd_mixer_oss_slot *pslot,
int active)
{
- struct slot *slot = (struct slot *)pslot->private_data;
+ struct slot *slot = pslot->private_data;
snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], active, active, 0);
return 0;
@@ -776,7 +776,7 @@ static int snd_mixer_oss_put_recsrc1_route(struct snd_mixer_oss_file *fmixer,
struct snd_mixer_oss_slot *pslot,
int active)
{
- struct slot *slot = (struct slot *)pslot->private_data;
+ struct slot *slot = pslot->private_data;
snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], active, active, 1);
return 0;
@@ -813,7 +813,7 @@ static int snd_mixer_oss_get_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned
if (!(mixer->mask_recsrc & (1 << idx)))
continue;
pslot = &mixer->slots[idx];
- slot = (struct slot *)pslot->private_data;
+ slot = pslot->private_data;
if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE)
continue;
if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE))
@@ -861,7 +861,7 @@ static int snd_mixer_oss_put_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned
if (!(mixer->mask_recsrc & (1 << idx)))
continue;
pslot = &mixer->slots[idx];
- slot = (struct slot *)pslot->private_data;
+ slot = pslot->private_data;
if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE)
continue;
if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE))
@@ -925,7 +925,7 @@ static int snd_mixer_oss_build_test(struct snd_mixer_oss *mixer, struct slot *sl
static void snd_mixer_oss_slot_free(struct snd_mixer_oss_slot *chn)
{
- struct slot *p = (struct slot *)chn->private_data;
+ struct slot *p = chn->private_data;
if (p) {
if (p->allocated && p->assigned) {
kfree(p->assigned->name);
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 204af48..88525a9 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -364,8 +364,7 @@ static void snd_pcm_stream_proc_info_read(struct snd_info_entry *entry,
static void snd_pcm_substream_proc_info_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
- snd_pcm_proc_info_read((struct snd_pcm_substream *)entry->private_data,
- buffer);
+ snd_pcm_proc_info_read(entry->private_data, buffer);
}
static void snd_pcm_substream_proc_hw_params_read(struct snd_info_entry *entry,
diff --git a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c
index 0e631c3..f4cd493 100644
--- a/sound/drivers/virmidi.c
+++ b/sound/drivers/virmidi.c
@@ -94,7 +94,7 @@ static int __devinit snd_virmidi_probe(struct platform_device *devptr)
sizeof(struct snd_card_virmidi), &card);
if (err < 0)
return err;
- vmidi = (struct snd_card_virmidi *)card->private_data;
+ vmidi = card->private_data;
vmidi->card = card;
if (midi_devs[dev] > MAX_MIDI_DEVICES) {
diff --git a/sound/i2c/other/ak4xxx-adda.c b/sound/i2c/other/ak4xxx-adda.c
index 1adb8a3..ebab6c7 100644
--- a/sound/i2c/other/ak4xxx-adda.c
+++ b/sound/i2c/other/ak4xxx-adda.c
@@ -878,7 +878,7 @@ static int build_deemphasis(struct snd_akm4xxx *ak, int num_emphs)
static void proc_regs_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
- struct snd_akm4xxx *ak = (struct snd_akm4xxx *)entry->private_data;
+ struct snd_akm4xxx *ak = entry->private_data;
int reg, val, chip;
for (chip = 0; chip < ak->num_chips; chip++) {
for (reg = 0; reg < ak->total_regs; reg++) {
diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c
index bbcbf92..3cb75bc 100644
--- a/sound/isa/ad1816a/ad1816a.c
+++ b/sound/isa/ad1816a/ad1816a.c
@@ -162,7 +162,7 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard
sizeof(struct snd_card_ad1816a), &card);
if (error < 0)
return error;
- acard = (struct snd_card_ad1816a *)card->private_data;
+ acard = card->private_data;
if ((error = snd_card_ad1816a_pnp(dev, acard, pcard, pid))) {
snd_card_free(card);
diff --git a/sound/isa/azt2320.c b/sound/isa/azt2320.c
index f7aa637..aac8dc1 100644
--- a/sound/isa/azt2320.c
+++ b/sound/isa/azt2320.c
@@ -188,7 +188,7 @@ static int __devinit snd_card_azt2320_probe(int dev,
sizeof(struct snd_card_azt2320), &card);
if (error < 0)
return error;
- acard = (struct snd_card_azt2320 *)card->private_data;
+ acard = card->private_data;
if ((error = snd_card_azt2320_pnp(dev, acard, pcard, pid))) {
snd_card_free(card);
diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c
index f26eac8..3e4a58b 100644
--- a/sound/isa/gus/gusmax.c
+++ b/sound/isa/gus/gusmax.c
@@ -191,7 +191,7 @@ static int __devinit snd_gusmax_mixer(struct snd_wss *chip)
static void snd_gusmax_free(struct snd_card *card)
{
- struct snd_gusmax *maxcard = (struct snd_gusmax *)card->private_data;
+ struct snd_gusmax *maxcard = card->private_data;
if (maxcard == NULL)
return;
@@ -219,7 +219,7 @@ static int __devinit snd_gusmax_probe(struct device *pdev, unsigned int dev)
if (err < 0)
return err;
card->private_free = snd_gusmax_free;
- maxcard = (struct snd_gusmax *)card->private_data;
+ maxcard = card->private_data;
maxcard->card = card;
maxcard->irq = -1;
diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c
index 81284a8..2259e3f 100644
--- a/sound/isa/sb/sb8.c
+++ b/sound/isa/sb/sb8.c
@@ -72,7 +72,7 @@ static irqreturn_t snd_sb8_interrupt(int irq, void *dev_id)
static void snd_sb8_free(struct snd_card *card)
{
- struct snd_sb8 *acard = (struct snd_sb8 *)card->private_data;
+ struct snd_sb8 *acard = card->private_data;
if (acard == NULL)
return;
diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c
index c6f2621..8a12621 100644
--- a/sound/oss/au1550_ac97.c
+++ b/sound/oss/au1550_ac97.c
@@ -171,7 +171,7 @@ au1550_delay(int msec)
static u16
rdcodec(struct ac97_codec *codec, u8 addr)
{
- struct au1550_state *s = (struct au1550_state *)codec->private_data;
+ struct au1550_state *s = codec->private_data;
unsigned long flags;
u32 cmd, val;
u16 data;
@@ -239,7 +239,7 @@ rdcodec(struct ac97_codec *codec, u8 addr)
static void
wrcodec(struct ac97_codec *codec, u8 addr, u16 data)
{
- struct au1550_state *s = (struct au1550_state *)codec->private_data;
+ struct au1550_state *s = codec->private_data;
unsigned long flags;
u32 cmd, val;
int i;
@@ -820,7 +820,7 @@ mixdev_ioctl(struct ac97_codec *codec, unsigned int cmd,
static long
au1550_ioctl_mixdev(struct file *file, unsigned int cmd, unsigned long arg)
{
- struct au1550_state *s = (struct au1550_state *)file->private_data;
+ struct au1550_state *s = file->private_data;
struct ac97_codec *codec = s->codec;
int ret;
@@ -1031,7 +1031,7 @@ copy_dmabuf_user(struct dmabuf *db, char* userbuf, int count, int to_user)
static ssize_t
au1550_read(struct file *file, char *buffer, size_t count, loff_t *ppos)
{
- struct au1550_state *s = (struct au1550_state *)file->private_data;
+ struct au1550_state *s = file->private_data;
struct dmabuf *db = &s->dma_adc;
DECLARE_WAITQUEUE(wait, current);
ssize_t ret;
@@ -1111,7 +1111,7 @@ out2:
static ssize_t
au1550_write(struct file *file, const char *buffer, size_t count, loff_t * ppos)
{
- struct au1550_state *s = (struct au1550_state *)file->private_data;
+ struct au1550_state *s = file->private_data;
struct dmabuf *db = &s->dma_dac;
DECLARE_WAITQUEUE(wait, current);
ssize_t ret = 0;
@@ -1211,7 +1211,7 @@ out2:
static unsigned int
au1550_poll(struct file *file, struct poll_table_struct *wait)
{
- struct au1550_state *s = (struct au1550_state *)file->private_data;
+ struct au1550_state *s = file->private_data;
unsigned long flags;
unsigned int mask = 0;
@@ -1250,7 +1250,7 @@ au1550_poll(struct file *file, struct poll_table_struct *wait)
static int
au1550_mmap(struct file *file, struct vm_area_struct *vma)
{
- struct au1550_state *s = (struct au1550_state *)file->private_data;
+ struct au1550_state *s = file->private_data;
struct dmabuf *db;
unsigned long size;
int ret = 0;
@@ -1342,7 +1342,7 @@ dma_count_done(struct dmabuf *db)
static int
au1550_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
- struct au1550_state *s = (struct au1550_state *)file->private_data;
+ struct au1550_state *s = file->private_data;
unsigned long flags;
audio_buf_info abinfo;
count_info cinfo;
@@ -1868,7 +1868,7 @@ out2:
static int
au1550_release(struct inode *inode, struct file *file)
{
- struct au1550_state *s = (struct au1550_state *)file->private_data;
+ struct au1550_state *s = file->private_data;
lock_kernel();
diff --git a/sound/pci/emu10k1/emumpu401.c b/sound/pci/emu10k1/emumpu401.c
index 8578c70..bab5648 100644
--- a/sound/pci/emu10k1/emumpu401.c
+++ b/sound/pci/emu10k1/emumpu401.c
@@ -321,7 +321,7 @@ static struct snd_rawmidi_ops snd_emu10k1_midi_input =
static void snd_emu10k1_midi_free(struct snd_rawmidi *rmidi)
{
- struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)rmidi->private_data;
+ struct snd_emu10k1_midi *midi = rmidi->private_data;
midi->interrupt = NULL;
midi->rmidi = NULL;
}
diff --git a/sound/pci/ice1712/pontis.c b/sound/pci/ice1712/pontis.c
index 6bc3f91..cdb873f 100644
--- a/sound/pci/ice1712/pontis.c
+++ b/sound/pci/ice1712/pontis.c
@@ -638,7 +638,7 @@ static struct snd_kcontrol_new pontis_controls[] __devinitdata = {
*/
static void wm_proc_regs_write(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
{
- struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data;
+ struct snd_ice1712 *ice = entry->private_data;
char line[64];
unsigned int reg, val;
mutex_lock(&ice->gpio_mutex);
@@ -653,7 +653,7 @@ static void wm_proc_regs_write(struct snd_info_entry *entry, struct snd_info_buf
static void wm_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
{
- struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data;
+ struct snd_ice1712 *ice = entry->private_data;
int reg, val;
mutex_lock(&ice->gpio_mutex);
@@ -676,7 +676,7 @@ static void wm_proc_init(struct snd_ice1712 *ice)
static void cs_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
{
- struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data;
+ struct snd_ice1712 *ice = entry->private_data;
int reg, val;
mutex_lock(&ice->gpio_mutex);
diff --git a/sound/pci/ice1712/prodigy192.c b/sound/pci/ice1712/prodigy192.c
index 2a8e5cd..e36ddb9 100644
--- a/sound/pci/ice1712/prodigy192.c
+++ b/sound/pci/ice1712/prodigy192.c
@@ -654,7 +654,7 @@ static int prodigy192_ak4114_init(struct snd_ice1712 *ice)
static void stac9460_proc_regs_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
- struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data;
+ struct snd_ice1712 *ice = entry->private_data;
int reg, val;
/* registers 0x0 - 0x14 */
for (reg = 0; reg <= 0x15; reg++) {
diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c
index d19dc05..d5f5b44 100644
--- a/sound/pci/rme96.c
+++ b/sound/pci/rme96.c
@@ -1527,14 +1527,14 @@ snd_rme96_free(void *private_data)
static void
snd_rme96_free_spdif_pcm(struct snd_pcm *pcm)
{
- struct rme96 *rme96 = (struct rme96 *) pcm->private_data;
+ struct rme96 *rme96 = pcm->private_data;
rme96->spdif_pcm = NULL;
}
static void
snd_rme96_free_adat_pcm(struct snd_pcm *pcm)
{
- struct rme96 *rme96 = (struct rme96 *) pcm->private_data;
+ struct rme96 *rme96 = pcm->private_data;
rme96->adat_pcm = NULL;
}
@@ -1661,7 +1661,7 @@ static void
snd_rme96_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
{
int n;
- struct rme96 *rme96 = (struct rme96 *)entry->private_data;
+ struct rme96 *rme96 = entry->private_data;
rme96->rcreg = readl(rme96->iobase + RME96_IO_CONTROL_REGISTER);
@@ -2348,7 +2348,7 @@ snd_rme96_probe(struct pci_dev *pci,
if (err < 0)
return err;
card->private_free = snd_rme96_card_free;
- rme96 = (struct rme96 *)card->private_data;
+ rme96 = card->private_data;
rme96->card = card;
rme96->pci = pci;
snd_card_set_dev(card, &pci->dev);
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
index b92adef..599e090 100644
--- a/sound/pci/rme9652/hdsp.c
+++ b/sound/pci/rme9652/hdsp.c
@@ -3284,7 +3284,7 @@ static int snd_hdsp_create_controls(struct snd_card *card, struct hdsp *hdsp)
static void
snd_hdsp_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
{
- struct hdsp *hdsp = (struct hdsp *) entry->private_data;
+ struct hdsp *hdsp = entry->private_data;
unsigned int status;
unsigned int status2;
char *pref_sync_ref;
@@ -4566,7 +4566,7 @@ static int hdsp_get_peak(struct hdsp *hdsp, struct hdsp_peak_rms __user *peak_rm
static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigned int cmd, unsigned long arg)
{
- struct hdsp *hdsp = (struct hdsp *)hw->private_data;
+ struct hdsp *hdsp = hw->private_data;
void __user *argp = (void __user *)arg;
int err;
@@ -5155,7 +5155,7 @@ static int snd_hdsp_free(struct hdsp *hdsp)
static void snd_hdsp_card_free(struct snd_card *card)
{
- struct hdsp *hdsp = (struct hdsp *) card->private_data;
+ struct hdsp *hdsp = card->private_data;
if (hdsp)
snd_hdsp_free(hdsp);
@@ -5181,7 +5181,7 @@ static int __devinit snd_hdsp_probe(struct pci_dev *pci,
if (err < 0)
return err;
- hdsp = (struct hdsp *) card->private_data;
+ hdsp = card->private_data;
card->private_free = snd_hdsp_card_free;
hdsp->dev = dev;
hdsp->pci = pci;
--
1.7.2.19.g9a302
^ permalink raw reply related [flat|nested] 39+ messages in thread
* Re: [PATCH 13/13] sound: Remove unnecessary casts of private_data
2010-09-05 1:52 ` [PATCH 13/13] sound: " Joe Perches
@ 2010-09-07 6:10 ` Takashi Iwai
0 siblings, 0 replies; 39+ messages in thread
From: Takashi Iwai @ 2010-09-07 6:10 UTC (permalink / raw)
To: Joe Perches; +Cc: Jiri Kosina, Jaroslav Kysela, alsa-devel, linux-kernel
At Sat, 4 Sep 2010 18:52:54 -0700,
Joe Perches wrote:
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied now. Thanks.
Takashi
> ---
> 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 ++++----
> 14 files changed, 41 insertions(+), 42 deletions(-)
>
> diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
> index f50ebf2..86afb13 100644
> --- a/sound/core/oss/mixer_oss.c
> +++ b/sound/core/oss/mixer_oss.c
> @@ -77,7 +77,7 @@ static int snd_mixer_oss_release(struct inode *inode, struct file *file)
> struct snd_mixer_oss_file *fmixer;
>
> if (file->private_data) {
> - fmixer = (struct snd_mixer_oss_file *) file->private_data;
> + fmixer = file->private_data;
> module_put(fmixer->card->module);
> snd_card_file_remove(fmixer->card, file);
> kfree(fmixer);
> @@ -368,7 +368,7 @@ static int snd_mixer_oss_ioctl1(struct snd_mixer_oss_file *fmixer, unsigned int
>
> static long snd_mixer_oss_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> {
> - return snd_mixer_oss_ioctl1((struct snd_mixer_oss_file *) file->private_data, cmd, arg);
> + return snd_mixer_oss_ioctl1(file->private_data, cmd, arg);
> }
>
> int snd_mixer_oss_ioctl_card(struct snd_card *card, unsigned int cmd, unsigned long arg)
> @@ -582,7 +582,7 @@ static int snd_mixer_oss_get_volume1(struct snd_mixer_oss_file *fmixer,
> struct snd_mixer_oss_slot *pslot,
> int *left, int *right)
> {
> - struct slot *slot = (struct slot *)pslot->private_data;
> + struct slot *slot = pslot->private_data;
>
> *left = *right = 100;
> if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) {
> @@ -691,7 +691,7 @@ static int snd_mixer_oss_put_volume1(struct snd_mixer_oss_file *fmixer,
> struct snd_mixer_oss_slot *pslot,
> int left, int right)
> {
> - struct slot *slot = (struct slot *)pslot->private_data;
> + struct slot *slot = pslot->private_data;
>
> if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) {
> snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PVOLUME], left, right);
> @@ -740,7 +740,7 @@ static int snd_mixer_oss_get_recsrc1_sw(struct snd_mixer_oss_file *fmixer,
> struct snd_mixer_oss_slot *pslot,
> int *active)
> {
> - struct slot *slot = (struct slot *)pslot->private_data;
> + struct slot *slot = pslot->private_data;
> int left, right;
>
> left = right = 1;
> @@ -753,7 +753,7 @@ static int snd_mixer_oss_get_recsrc1_route(struct snd_mixer_oss_file *fmixer,
> struct snd_mixer_oss_slot *pslot,
> int *active)
> {
> - struct slot *slot = (struct slot *)pslot->private_data;
> + struct slot *slot = pslot->private_data;
> int left, right;
>
> left = right = 1;
> @@ -766,7 +766,7 @@ static int snd_mixer_oss_put_recsrc1_sw(struct snd_mixer_oss_file *fmixer,
> struct snd_mixer_oss_slot *pslot,
> int active)
> {
> - struct slot *slot = (struct slot *)pslot->private_data;
> + struct slot *slot = pslot->private_data;
>
> snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], active, active, 0);
> return 0;
> @@ -776,7 +776,7 @@ static int snd_mixer_oss_put_recsrc1_route(struct snd_mixer_oss_file *fmixer,
> struct snd_mixer_oss_slot *pslot,
> int active)
> {
> - struct slot *slot = (struct slot *)pslot->private_data;
> + struct slot *slot = pslot->private_data;
>
> snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], active, active, 1);
> return 0;
> @@ -813,7 +813,7 @@ static int snd_mixer_oss_get_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned
> if (!(mixer->mask_recsrc & (1 << idx)))
> continue;
> pslot = &mixer->slots[idx];
> - slot = (struct slot *)pslot->private_data;
> + slot = pslot->private_data;
> if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE)
> continue;
> if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE))
> @@ -861,7 +861,7 @@ static int snd_mixer_oss_put_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned
> if (!(mixer->mask_recsrc & (1 << idx)))
> continue;
> pslot = &mixer->slots[idx];
> - slot = (struct slot *)pslot->private_data;
> + slot = pslot->private_data;
> if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE)
> continue;
> if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE))
> @@ -925,7 +925,7 @@ static int snd_mixer_oss_build_test(struct snd_mixer_oss *mixer, struct slot *sl
>
> static void snd_mixer_oss_slot_free(struct snd_mixer_oss_slot *chn)
> {
> - struct slot *p = (struct slot *)chn->private_data;
> + struct slot *p = chn->private_data;
> if (p) {
> if (p->allocated && p->assigned) {
> kfree(p->assigned->name);
> diff --git a/sound/core/pcm.c b/sound/core/pcm.c
> index 204af48..88525a9 100644
> --- a/sound/core/pcm.c
> +++ b/sound/core/pcm.c
> @@ -364,8 +364,7 @@ static void snd_pcm_stream_proc_info_read(struct snd_info_entry *entry,
> static void snd_pcm_substream_proc_info_read(struct snd_info_entry *entry,
> struct snd_info_buffer *buffer)
> {
> - snd_pcm_proc_info_read((struct snd_pcm_substream *)entry->private_data,
> - buffer);
> + snd_pcm_proc_info_read(entry->private_data, buffer);
> }
>
> static void snd_pcm_substream_proc_hw_params_read(struct snd_info_entry *entry,
> diff --git a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c
> index 0e631c3..f4cd493 100644
> --- a/sound/drivers/virmidi.c
> +++ b/sound/drivers/virmidi.c
> @@ -94,7 +94,7 @@ static int __devinit snd_virmidi_probe(struct platform_device *devptr)
> sizeof(struct snd_card_virmidi), &card);
> if (err < 0)
> return err;
> - vmidi = (struct snd_card_virmidi *)card->private_data;
> + vmidi = card->private_data;
> vmidi->card = card;
>
> if (midi_devs[dev] > MAX_MIDI_DEVICES) {
> diff --git a/sound/i2c/other/ak4xxx-adda.c b/sound/i2c/other/ak4xxx-adda.c
> index 1adb8a3..ebab6c7 100644
> --- a/sound/i2c/other/ak4xxx-adda.c
> +++ b/sound/i2c/other/ak4xxx-adda.c
> @@ -878,7 +878,7 @@ static int build_deemphasis(struct snd_akm4xxx *ak, int num_emphs)
> static void proc_regs_read(struct snd_info_entry *entry,
> struct snd_info_buffer *buffer)
> {
> - struct snd_akm4xxx *ak = (struct snd_akm4xxx *)entry->private_data;
> + struct snd_akm4xxx *ak = entry->private_data;
> int reg, val, chip;
> for (chip = 0; chip < ak->num_chips; chip++) {
> for (reg = 0; reg < ak->total_regs; reg++) {
> diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c
> index bbcbf92..3cb75bc 100644
> --- a/sound/isa/ad1816a/ad1816a.c
> +++ b/sound/isa/ad1816a/ad1816a.c
> @@ -162,7 +162,7 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard
> sizeof(struct snd_card_ad1816a), &card);
> if (error < 0)
> return error;
> - acard = (struct snd_card_ad1816a *)card->private_data;
> + acard = card->private_data;
>
> if ((error = snd_card_ad1816a_pnp(dev, acard, pcard, pid))) {
> snd_card_free(card);
> diff --git a/sound/isa/azt2320.c b/sound/isa/azt2320.c
> index f7aa637..aac8dc1 100644
> --- a/sound/isa/azt2320.c
> +++ b/sound/isa/azt2320.c
> @@ -188,7 +188,7 @@ static int __devinit snd_card_azt2320_probe(int dev,
> sizeof(struct snd_card_azt2320), &card);
> if (error < 0)
> return error;
> - acard = (struct snd_card_azt2320 *)card->private_data;
> + acard = card->private_data;
>
> if ((error = snd_card_azt2320_pnp(dev, acard, pcard, pid))) {
> snd_card_free(card);
> diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c
> index f26eac8..3e4a58b 100644
> --- a/sound/isa/gus/gusmax.c
> +++ b/sound/isa/gus/gusmax.c
> @@ -191,7 +191,7 @@ static int __devinit snd_gusmax_mixer(struct snd_wss *chip)
>
> static void snd_gusmax_free(struct snd_card *card)
> {
> - struct snd_gusmax *maxcard = (struct snd_gusmax *)card->private_data;
> + struct snd_gusmax *maxcard = card->private_data;
>
> if (maxcard == NULL)
> return;
> @@ -219,7 +219,7 @@ static int __devinit snd_gusmax_probe(struct device *pdev, unsigned int dev)
> if (err < 0)
> return err;
> card->private_free = snd_gusmax_free;
> - maxcard = (struct snd_gusmax *)card->private_data;
> + maxcard = card->private_data;
> maxcard->card = card;
> maxcard->irq = -1;
>
> diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c
> index 81284a8..2259e3f 100644
> --- a/sound/isa/sb/sb8.c
> +++ b/sound/isa/sb/sb8.c
> @@ -72,7 +72,7 @@ static irqreturn_t snd_sb8_interrupt(int irq, void *dev_id)
>
> static void snd_sb8_free(struct snd_card *card)
> {
> - struct snd_sb8 *acard = (struct snd_sb8 *)card->private_data;
> + struct snd_sb8 *acard = card->private_data;
>
> if (acard == NULL)
> return;
> diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c
> index c6f2621..8a12621 100644
> --- a/sound/oss/au1550_ac97.c
> +++ b/sound/oss/au1550_ac97.c
> @@ -171,7 +171,7 @@ au1550_delay(int msec)
> static u16
> rdcodec(struct ac97_codec *codec, u8 addr)
> {
> - struct au1550_state *s = (struct au1550_state *)codec->private_data;
> + struct au1550_state *s = codec->private_data;
> unsigned long flags;
> u32 cmd, val;
> u16 data;
> @@ -239,7 +239,7 @@ rdcodec(struct ac97_codec *codec, u8 addr)
> static void
> wrcodec(struct ac97_codec *codec, u8 addr, u16 data)
> {
> - struct au1550_state *s = (struct au1550_state *)codec->private_data;
> + struct au1550_state *s = codec->private_data;
> unsigned long flags;
> u32 cmd, val;
> int i;
> @@ -820,7 +820,7 @@ mixdev_ioctl(struct ac97_codec *codec, unsigned int cmd,
> static long
> au1550_ioctl_mixdev(struct file *file, unsigned int cmd, unsigned long arg)
> {
> - struct au1550_state *s = (struct au1550_state *)file->private_data;
> + struct au1550_state *s = file->private_data;
> struct ac97_codec *codec = s->codec;
> int ret;
>
> @@ -1031,7 +1031,7 @@ copy_dmabuf_user(struct dmabuf *db, char* userbuf, int count, int to_user)
> static ssize_t
> au1550_read(struct file *file, char *buffer, size_t count, loff_t *ppos)
> {
> - struct au1550_state *s = (struct au1550_state *)file->private_data;
> + struct au1550_state *s = file->private_data;
> struct dmabuf *db = &s->dma_adc;
> DECLARE_WAITQUEUE(wait, current);
> ssize_t ret;
> @@ -1111,7 +1111,7 @@ out2:
> static ssize_t
> au1550_write(struct file *file, const char *buffer, size_t count, loff_t * ppos)
> {
> - struct au1550_state *s = (struct au1550_state *)file->private_data;
> + struct au1550_state *s = file->private_data;
> struct dmabuf *db = &s->dma_dac;
> DECLARE_WAITQUEUE(wait, current);
> ssize_t ret = 0;
> @@ -1211,7 +1211,7 @@ out2:
> static unsigned int
> au1550_poll(struct file *file, struct poll_table_struct *wait)
> {
> - struct au1550_state *s = (struct au1550_state *)file->private_data;
> + struct au1550_state *s = file->private_data;
> unsigned long flags;
> unsigned int mask = 0;
>
> @@ -1250,7 +1250,7 @@ au1550_poll(struct file *file, struct poll_table_struct *wait)
> static int
> au1550_mmap(struct file *file, struct vm_area_struct *vma)
> {
> - struct au1550_state *s = (struct au1550_state *)file->private_data;
> + struct au1550_state *s = file->private_data;
> struct dmabuf *db;
> unsigned long size;
> int ret = 0;
> @@ -1342,7 +1342,7 @@ dma_count_done(struct dmabuf *db)
> static int
> au1550_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> {
> - struct au1550_state *s = (struct au1550_state *)file->private_data;
> + struct au1550_state *s = file->private_data;
> unsigned long flags;
> audio_buf_info abinfo;
> count_info cinfo;
> @@ -1868,7 +1868,7 @@ out2:
> static int
> au1550_release(struct inode *inode, struct file *file)
> {
> - struct au1550_state *s = (struct au1550_state *)file->private_data;
> + struct au1550_state *s = file->private_data;
>
> lock_kernel();
>
> diff --git a/sound/pci/emu10k1/emumpu401.c b/sound/pci/emu10k1/emumpu401.c
> index 8578c70..bab5648 100644
> --- a/sound/pci/emu10k1/emumpu401.c
> +++ b/sound/pci/emu10k1/emumpu401.c
> @@ -321,7 +321,7 @@ static struct snd_rawmidi_ops snd_emu10k1_midi_input =
>
> static void snd_emu10k1_midi_free(struct snd_rawmidi *rmidi)
> {
> - struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)rmidi->private_data;
> + struct snd_emu10k1_midi *midi = rmidi->private_data;
> midi->interrupt = NULL;
> midi->rmidi = NULL;
> }
> diff --git a/sound/pci/ice1712/pontis.c b/sound/pci/ice1712/pontis.c
> index 6bc3f91..cdb873f 100644
> --- a/sound/pci/ice1712/pontis.c
> +++ b/sound/pci/ice1712/pontis.c
> @@ -638,7 +638,7 @@ static struct snd_kcontrol_new pontis_controls[] __devinitdata = {
> */
> static void wm_proc_regs_write(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
> {
> - struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data;
> + struct snd_ice1712 *ice = entry->private_data;
> char line[64];
> unsigned int reg, val;
> mutex_lock(&ice->gpio_mutex);
> @@ -653,7 +653,7 @@ static void wm_proc_regs_write(struct snd_info_entry *entry, struct snd_info_buf
>
> static void wm_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
> {
> - struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data;
> + struct snd_ice1712 *ice = entry->private_data;
> int reg, val;
>
> mutex_lock(&ice->gpio_mutex);
> @@ -676,7 +676,7 @@ static void wm_proc_init(struct snd_ice1712 *ice)
>
> static void cs_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
> {
> - struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data;
> + struct snd_ice1712 *ice = entry->private_data;
> int reg, val;
>
> mutex_lock(&ice->gpio_mutex);
> diff --git a/sound/pci/ice1712/prodigy192.c b/sound/pci/ice1712/prodigy192.c
> index 2a8e5cd..e36ddb9 100644
> --- a/sound/pci/ice1712/prodigy192.c
> +++ b/sound/pci/ice1712/prodigy192.c
> @@ -654,7 +654,7 @@ static int prodigy192_ak4114_init(struct snd_ice1712 *ice)
> static void stac9460_proc_regs_read(struct snd_info_entry *entry,
> struct snd_info_buffer *buffer)
> {
> - struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data;
> + struct snd_ice1712 *ice = entry->private_data;
> int reg, val;
> /* registers 0x0 - 0x14 */
> for (reg = 0; reg <= 0x15; reg++) {
> diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c
> index d19dc05..d5f5b44 100644
> --- a/sound/pci/rme96.c
> +++ b/sound/pci/rme96.c
> @@ -1527,14 +1527,14 @@ snd_rme96_free(void *private_data)
> static void
> snd_rme96_free_spdif_pcm(struct snd_pcm *pcm)
> {
> - struct rme96 *rme96 = (struct rme96 *) pcm->private_data;
> + struct rme96 *rme96 = pcm->private_data;
> rme96->spdif_pcm = NULL;
> }
>
> static void
> snd_rme96_free_adat_pcm(struct snd_pcm *pcm)
> {
> - struct rme96 *rme96 = (struct rme96 *) pcm->private_data;
> + struct rme96 *rme96 = pcm->private_data;
> rme96->adat_pcm = NULL;
> }
>
> @@ -1661,7 +1661,7 @@ static void
> snd_rme96_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
> {
> int n;
> - struct rme96 *rme96 = (struct rme96 *)entry->private_data;
> + struct rme96 *rme96 = entry->private_data;
>
> rme96->rcreg = readl(rme96->iobase + RME96_IO_CONTROL_REGISTER);
>
> @@ -2348,7 +2348,7 @@ snd_rme96_probe(struct pci_dev *pci,
> if (err < 0)
> return err;
> card->private_free = snd_rme96_card_free;
> - rme96 = (struct rme96 *)card->private_data;
> + rme96 = card->private_data;
> rme96->card = card;
> rme96->pci = pci;
> snd_card_set_dev(card, &pci->dev);
> diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
> index b92adef..599e090 100644
> --- a/sound/pci/rme9652/hdsp.c
> +++ b/sound/pci/rme9652/hdsp.c
> @@ -3284,7 +3284,7 @@ static int snd_hdsp_create_controls(struct snd_card *card, struct hdsp *hdsp)
> static void
> snd_hdsp_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
> {
> - struct hdsp *hdsp = (struct hdsp *) entry->private_data;
> + struct hdsp *hdsp = entry->private_data;
> unsigned int status;
> unsigned int status2;
> char *pref_sync_ref;
> @@ -4566,7 +4566,7 @@ static int hdsp_get_peak(struct hdsp *hdsp, struct hdsp_peak_rms __user *peak_rm
>
> static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigned int cmd, unsigned long arg)
> {
> - struct hdsp *hdsp = (struct hdsp *)hw->private_data;
> + struct hdsp *hdsp = hw->private_data;
> void __user *argp = (void __user *)arg;
> int err;
>
> @@ -5155,7 +5155,7 @@ static int snd_hdsp_free(struct hdsp *hdsp)
>
> static void snd_hdsp_card_free(struct snd_card *card)
> {
> - struct hdsp *hdsp = (struct hdsp *) card->private_data;
> + struct hdsp *hdsp = card->private_data;
>
> if (hdsp)
> snd_hdsp_free(hdsp);
> @@ -5181,7 +5181,7 @@ static int __devinit snd_hdsp_probe(struct pci_dev *pci,
> if (err < 0)
> return err;
>
> - hdsp = (struct hdsp *) card->private_data;
> + hdsp = card->private_data;
> card->private_free = snd_hdsp_card_free;
> hdsp->dev = dev;
> hdsp->pci = pci;
> --
> 1.7.2.19.g9a302
>
^ permalink raw reply [flat|nested] 39+ messages in thread
* Re: [PATCH 13/13] sound: Remove unnecessary casts of private_data
@ 2010-09-07 6:10 ` Takashi Iwai
0 siblings, 0 replies; 39+ messages in thread
From: Takashi Iwai @ 2010-09-07 6:10 UTC (permalink / raw)
To: Joe Perches; +Cc: alsa-devel, Jiri Kosina, linux-kernel
At Sat, 4 Sep 2010 18:52:54 -0700,
Joe Perches wrote:
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied now. Thanks.
Takashi
> ---
> 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 ++++----
> 14 files changed, 41 insertions(+), 42 deletions(-)
>
> diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
> index f50ebf2..86afb13 100644
> --- a/sound/core/oss/mixer_oss.c
> +++ b/sound/core/oss/mixer_oss.c
> @@ -77,7 +77,7 @@ static int snd_mixer_oss_release(struct inode *inode, struct file *file)
> struct snd_mixer_oss_file *fmixer;
>
> if (file->private_data) {
> - fmixer = (struct snd_mixer_oss_file *) file->private_data;
> + fmixer = file->private_data;
> module_put(fmixer->card->module);
> snd_card_file_remove(fmixer->card, file);
> kfree(fmixer);
> @@ -368,7 +368,7 @@ static int snd_mixer_oss_ioctl1(struct snd_mixer_oss_file *fmixer, unsigned int
>
> static long snd_mixer_oss_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> {
> - return snd_mixer_oss_ioctl1((struct snd_mixer_oss_file *) file->private_data, cmd, arg);
> + return snd_mixer_oss_ioctl1(file->private_data, cmd, arg);
> }
>
> int snd_mixer_oss_ioctl_card(struct snd_card *card, unsigned int cmd, unsigned long arg)
> @@ -582,7 +582,7 @@ static int snd_mixer_oss_get_volume1(struct snd_mixer_oss_file *fmixer,
> struct snd_mixer_oss_slot *pslot,
> int *left, int *right)
> {
> - struct slot *slot = (struct slot *)pslot->private_data;
> + struct slot *slot = pslot->private_data;
>
> *left = *right = 100;
> if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) {
> @@ -691,7 +691,7 @@ static int snd_mixer_oss_put_volume1(struct snd_mixer_oss_file *fmixer,
> struct snd_mixer_oss_slot *pslot,
> int left, int right)
> {
> - struct slot *slot = (struct slot *)pslot->private_data;
> + struct slot *slot = pslot->private_data;
>
> if (slot->present & SNDRV_MIXER_OSS_PRESENT_PVOLUME) {
> snd_mixer_oss_put_volume1_vol(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_PVOLUME], left, right);
> @@ -740,7 +740,7 @@ static int snd_mixer_oss_get_recsrc1_sw(struct snd_mixer_oss_file *fmixer,
> struct snd_mixer_oss_slot *pslot,
> int *active)
> {
> - struct slot *slot = (struct slot *)pslot->private_data;
> + struct slot *slot = pslot->private_data;
> int left, right;
>
> left = right = 1;
> @@ -753,7 +753,7 @@ static int snd_mixer_oss_get_recsrc1_route(struct snd_mixer_oss_file *fmixer,
> struct snd_mixer_oss_slot *pslot,
> int *active)
> {
> - struct slot *slot = (struct slot *)pslot->private_data;
> + struct slot *slot = pslot->private_data;
> int left, right;
>
> left = right = 1;
> @@ -766,7 +766,7 @@ static int snd_mixer_oss_put_recsrc1_sw(struct snd_mixer_oss_file *fmixer,
> struct snd_mixer_oss_slot *pslot,
> int active)
> {
> - struct slot *slot = (struct slot *)pslot->private_data;
> + struct slot *slot = pslot->private_data;
>
> snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CSWITCH], active, active, 0);
> return 0;
> @@ -776,7 +776,7 @@ static int snd_mixer_oss_put_recsrc1_route(struct snd_mixer_oss_file *fmixer,
> struct snd_mixer_oss_slot *pslot,
> int active)
> {
> - struct slot *slot = (struct slot *)pslot->private_data;
> + struct slot *slot = pslot->private_data;
>
> snd_mixer_oss_put_volume1_sw(fmixer, pslot, slot->numid[SNDRV_MIXER_OSS_ITEM_CROUTE], active, active, 1);
> return 0;
> @@ -813,7 +813,7 @@ static int snd_mixer_oss_get_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned
> if (!(mixer->mask_recsrc & (1 << idx)))
> continue;
> pslot = &mixer->slots[idx];
> - slot = (struct slot *)pslot->private_data;
> + slot = pslot->private_data;
> if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE)
> continue;
> if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE))
> @@ -861,7 +861,7 @@ static int snd_mixer_oss_put_recsrc2(struct snd_mixer_oss_file *fmixer, unsigned
> if (!(mixer->mask_recsrc & (1 << idx)))
> continue;
> pslot = &mixer->slots[idx];
> - slot = (struct slot *)pslot->private_data;
> + slot = pslot->private_data;
> if (slot->signature != SNDRV_MIXER_OSS_SIGNATURE)
> continue;
> if (!(slot->present & SNDRV_MIXER_OSS_PRESENT_CAPTURE))
> @@ -925,7 +925,7 @@ static int snd_mixer_oss_build_test(struct snd_mixer_oss *mixer, struct slot *sl
>
> static void snd_mixer_oss_slot_free(struct snd_mixer_oss_slot *chn)
> {
> - struct slot *p = (struct slot *)chn->private_data;
> + struct slot *p = chn->private_data;
> if (p) {
> if (p->allocated && p->assigned) {
> kfree(p->assigned->name);
> diff --git a/sound/core/pcm.c b/sound/core/pcm.c
> index 204af48..88525a9 100644
> --- a/sound/core/pcm.c
> +++ b/sound/core/pcm.c
> @@ -364,8 +364,7 @@ static void snd_pcm_stream_proc_info_read(struct snd_info_entry *entry,
> static void snd_pcm_substream_proc_info_read(struct snd_info_entry *entry,
> struct snd_info_buffer *buffer)
> {
> - snd_pcm_proc_info_read((struct snd_pcm_substream *)entry->private_data,
> - buffer);
> + snd_pcm_proc_info_read(entry->private_data, buffer);
> }
>
> static void snd_pcm_substream_proc_hw_params_read(struct snd_info_entry *entry,
> diff --git a/sound/drivers/virmidi.c b/sound/drivers/virmidi.c
> index 0e631c3..f4cd493 100644
> --- a/sound/drivers/virmidi.c
> +++ b/sound/drivers/virmidi.c
> @@ -94,7 +94,7 @@ static int __devinit snd_virmidi_probe(struct platform_device *devptr)
> sizeof(struct snd_card_virmidi), &card);
> if (err < 0)
> return err;
> - vmidi = (struct snd_card_virmidi *)card->private_data;
> + vmidi = card->private_data;
> vmidi->card = card;
>
> if (midi_devs[dev] > MAX_MIDI_DEVICES) {
> diff --git a/sound/i2c/other/ak4xxx-adda.c b/sound/i2c/other/ak4xxx-adda.c
> index 1adb8a3..ebab6c7 100644
> --- a/sound/i2c/other/ak4xxx-adda.c
> +++ b/sound/i2c/other/ak4xxx-adda.c
> @@ -878,7 +878,7 @@ static int build_deemphasis(struct snd_akm4xxx *ak, int num_emphs)
> static void proc_regs_read(struct snd_info_entry *entry,
> struct snd_info_buffer *buffer)
> {
> - struct snd_akm4xxx *ak = (struct snd_akm4xxx *)entry->private_data;
> + struct snd_akm4xxx *ak = entry->private_data;
> int reg, val, chip;
> for (chip = 0; chip < ak->num_chips; chip++) {
> for (reg = 0; reg < ak->total_regs; reg++) {
> diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c
> index bbcbf92..3cb75bc 100644
> --- a/sound/isa/ad1816a/ad1816a.c
> +++ b/sound/isa/ad1816a/ad1816a.c
> @@ -162,7 +162,7 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard
> sizeof(struct snd_card_ad1816a), &card);
> if (error < 0)
> return error;
> - acard = (struct snd_card_ad1816a *)card->private_data;
> + acard = card->private_data;
>
> if ((error = snd_card_ad1816a_pnp(dev, acard, pcard, pid))) {
> snd_card_free(card);
> diff --git a/sound/isa/azt2320.c b/sound/isa/azt2320.c
> index f7aa637..aac8dc1 100644
> --- a/sound/isa/azt2320.c
> +++ b/sound/isa/azt2320.c
> @@ -188,7 +188,7 @@ static int __devinit snd_card_azt2320_probe(int dev,
> sizeof(struct snd_card_azt2320), &card);
> if (error < 0)
> return error;
> - acard = (struct snd_card_azt2320 *)card->private_data;
> + acard = card->private_data;
>
> if ((error = snd_card_azt2320_pnp(dev, acard, pcard, pid))) {
> snd_card_free(card);
> diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c
> index f26eac8..3e4a58b 100644
> --- a/sound/isa/gus/gusmax.c
> +++ b/sound/isa/gus/gusmax.c
> @@ -191,7 +191,7 @@ static int __devinit snd_gusmax_mixer(struct snd_wss *chip)
>
> static void snd_gusmax_free(struct snd_card *card)
> {
> - struct snd_gusmax *maxcard = (struct snd_gusmax *)card->private_data;
> + struct snd_gusmax *maxcard = card->private_data;
>
> if (maxcard == NULL)
> return;
> @@ -219,7 +219,7 @@ static int __devinit snd_gusmax_probe(struct device *pdev, unsigned int dev)
> if (err < 0)
> return err;
> card->private_free = snd_gusmax_free;
> - maxcard = (struct snd_gusmax *)card->private_data;
> + maxcard = card->private_data;
> maxcard->card = card;
> maxcard->irq = -1;
>
> diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c
> index 81284a8..2259e3f 100644
> --- a/sound/isa/sb/sb8.c
> +++ b/sound/isa/sb/sb8.c
> @@ -72,7 +72,7 @@ static irqreturn_t snd_sb8_interrupt(int irq, void *dev_id)
>
> static void snd_sb8_free(struct snd_card *card)
> {
> - struct snd_sb8 *acard = (struct snd_sb8 *)card->private_data;
> + struct snd_sb8 *acard = card->private_data;
>
> if (acard == NULL)
> return;
> diff --git a/sound/oss/au1550_ac97.c b/sound/oss/au1550_ac97.c
> index c6f2621..8a12621 100644
> --- a/sound/oss/au1550_ac97.c
> +++ b/sound/oss/au1550_ac97.c
> @@ -171,7 +171,7 @@ au1550_delay(int msec)
> static u16
> rdcodec(struct ac97_codec *codec, u8 addr)
> {
> - struct au1550_state *s = (struct au1550_state *)codec->private_data;
> + struct au1550_state *s = codec->private_data;
> unsigned long flags;
> u32 cmd, val;
> u16 data;
> @@ -239,7 +239,7 @@ rdcodec(struct ac97_codec *codec, u8 addr)
> static void
> wrcodec(struct ac97_codec *codec, u8 addr, u16 data)
> {
> - struct au1550_state *s = (struct au1550_state *)codec->private_data;
> + struct au1550_state *s = codec->private_data;
> unsigned long flags;
> u32 cmd, val;
> int i;
> @@ -820,7 +820,7 @@ mixdev_ioctl(struct ac97_codec *codec, unsigned int cmd,
> static long
> au1550_ioctl_mixdev(struct file *file, unsigned int cmd, unsigned long arg)
> {
> - struct au1550_state *s = (struct au1550_state *)file->private_data;
> + struct au1550_state *s = file->private_data;
> struct ac97_codec *codec = s->codec;
> int ret;
>
> @@ -1031,7 +1031,7 @@ copy_dmabuf_user(struct dmabuf *db, char* userbuf, int count, int to_user)
> static ssize_t
> au1550_read(struct file *file, char *buffer, size_t count, loff_t *ppos)
> {
> - struct au1550_state *s = (struct au1550_state *)file->private_data;
> + struct au1550_state *s = file->private_data;
> struct dmabuf *db = &s->dma_adc;
> DECLARE_WAITQUEUE(wait, current);
> ssize_t ret;
> @@ -1111,7 +1111,7 @@ out2:
> static ssize_t
> au1550_write(struct file *file, const char *buffer, size_t count, loff_t * ppos)
> {
> - struct au1550_state *s = (struct au1550_state *)file->private_data;
> + struct au1550_state *s = file->private_data;
> struct dmabuf *db = &s->dma_dac;
> DECLARE_WAITQUEUE(wait, current);
> ssize_t ret = 0;
> @@ -1211,7 +1211,7 @@ out2:
> static unsigned int
> au1550_poll(struct file *file, struct poll_table_struct *wait)
> {
> - struct au1550_state *s = (struct au1550_state *)file->private_data;
> + struct au1550_state *s = file->private_data;
> unsigned long flags;
> unsigned int mask = 0;
>
> @@ -1250,7 +1250,7 @@ au1550_poll(struct file *file, struct poll_table_struct *wait)
> static int
> au1550_mmap(struct file *file, struct vm_area_struct *vma)
> {
> - struct au1550_state *s = (struct au1550_state *)file->private_data;
> + struct au1550_state *s = file->private_data;
> struct dmabuf *db;
> unsigned long size;
> int ret = 0;
> @@ -1342,7 +1342,7 @@ dma_count_done(struct dmabuf *db)
> static int
> au1550_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
> {
> - struct au1550_state *s = (struct au1550_state *)file->private_data;
> + struct au1550_state *s = file->private_data;
> unsigned long flags;
> audio_buf_info abinfo;
> count_info cinfo;
> @@ -1868,7 +1868,7 @@ out2:
> static int
> au1550_release(struct inode *inode, struct file *file)
> {
> - struct au1550_state *s = (struct au1550_state *)file->private_data;
> + struct au1550_state *s = file->private_data;
>
> lock_kernel();
>
> diff --git a/sound/pci/emu10k1/emumpu401.c b/sound/pci/emu10k1/emumpu401.c
> index 8578c70..bab5648 100644
> --- a/sound/pci/emu10k1/emumpu401.c
> +++ b/sound/pci/emu10k1/emumpu401.c
> @@ -321,7 +321,7 @@ static struct snd_rawmidi_ops snd_emu10k1_midi_input =
>
> static void snd_emu10k1_midi_free(struct snd_rawmidi *rmidi)
> {
> - struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)rmidi->private_data;
> + struct snd_emu10k1_midi *midi = rmidi->private_data;
> midi->interrupt = NULL;
> midi->rmidi = NULL;
> }
> diff --git a/sound/pci/ice1712/pontis.c b/sound/pci/ice1712/pontis.c
> index 6bc3f91..cdb873f 100644
> --- a/sound/pci/ice1712/pontis.c
> +++ b/sound/pci/ice1712/pontis.c
> @@ -638,7 +638,7 @@ static struct snd_kcontrol_new pontis_controls[] __devinitdata = {
> */
> static void wm_proc_regs_write(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
> {
> - struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data;
> + struct snd_ice1712 *ice = entry->private_data;
> char line[64];
> unsigned int reg, val;
> mutex_lock(&ice->gpio_mutex);
> @@ -653,7 +653,7 @@ static void wm_proc_regs_write(struct snd_info_entry *entry, struct snd_info_buf
>
> static void wm_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
> {
> - struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data;
> + struct snd_ice1712 *ice = entry->private_data;
> int reg, val;
>
> mutex_lock(&ice->gpio_mutex);
> @@ -676,7 +676,7 @@ static void wm_proc_init(struct snd_ice1712 *ice)
>
> static void cs_proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
> {
> - struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data;
> + struct snd_ice1712 *ice = entry->private_data;
> int reg, val;
>
> mutex_lock(&ice->gpio_mutex);
> diff --git a/sound/pci/ice1712/prodigy192.c b/sound/pci/ice1712/prodigy192.c
> index 2a8e5cd..e36ddb9 100644
> --- a/sound/pci/ice1712/prodigy192.c
> +++ b/sound/pci/ice1712/prodigy192.c
> @@ -654,7 +654,7 @@ static int prodigy192_ak4114_init(struct snd_ice1712 *ice)
> static void stac9460_proc_regs_read(struct snd_info_entry *entry,
> struct snd_info_buffer *buffer)
> {
> - struct snd_ice1712 *ice = (struct snd_ice1712 *)entry->private_data;
> + struct snd_ice1712 *ice = entry->private_data;
> int reg, val;
> /* registers 0x0 - 0x14 */
> for (reg = 0; reg <= 0x15; reg++) {
> diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c
> index d19dc05..d5f5b44 100644
> --- a/sound/pci/rme96.c
> +++ b/sound/pci/rme96.c
> @@ -1527,14 +1527,14 @@ snd_rme96_free(void *private_data)
> static void
> snd_rme96_free_spdif_pcm(struct snd_pcm *pcm)
> {
> - struct rme96 *rme96 = (struct rme96 *) pcm->private_data;
> + struct rme96 *rme96 = pcm->private_data;
> rme96->spdif_pcm = NULL;
> }
>
> static void
> snd_rme96_free_adat_pcm(struct snd_pcm *pcm)
> {
> - struct rme96 *rme96 = (struct rme96 *) pcm->private_data;
> + struct rme96 *rme96 = pcm->private_data;
> rme96->adat_pcm = NULL;
> }
>
> @@ -1661,7 +1661,7 @@ static void
> snd_rme96_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
> {
> int n;
> - struct rme96 *rme96 = (struct rme96 *)entry->private_data;
> + struct rme96 *rme96 = entry->private_data;
>
> rme96->rcreg = readl(rme96->iobase + RME96_IO_CONTROL_REGISTER);
>
> @@ -2348,7 +2348,7 @@ snd_rme96_probe(struct pci_dev *pci,
> if (err < 0)
> return err;
> card->private_free = snd_rme96_card_free;
> - rme96 = (struct rme96 *)card->private_data;
> + rme96 = card->private_data;
> rme96->card = card;
> rme96->pci = pci;
> snd_card_set_dev(card, &pci->dev);
> diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
> index b92adef..599e090 100644
> --- a/sound/pci/rme9652/hdsp.c
> +++ b/sound/pci/rme9652/hdsp.c
> @@ -3284,7 +3284,7 @@ static int snd_hdsp_create_controls(struct snd_card *card, struct hdsp *hdsp)
> static void
> snd_hdsp_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
> {
> - struct hdsp *hdsp = (struct hdsp *) entry->private_data;
> + struct hdsp *hdsp = entry->private_data;
> unsigned int status;
> unsigned int status2;
> char *pref_sync_ref;
> @@ -4566,7 +4566,7 @@ static int hdsp_get_peak(struct hdsp *hdsp, struct hdsp_peak_rms __user *peak_rm
>
> static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigned int cmd, unsigned long arg)
> {
> - struct hdsp *hdsp = (struct hdsp *)hw->private_data;
> + struct hdsp *hdsp = hw->private_data;
> void __user *argp = (void __user *)arg;
> int err;
>
> @@ -5155,7 +5155,7 @@ static int snd_hdsp_free(struct hdsp *hdsp)
>
> static void snd_hdsp_card_free(struct snd_card *card)
> {
> - struct hdsp *hdsp = (struct hdsp *) card->private_data;
> + struct hdsp *hdsp = card->private_data;
>
> if (hdsp)
> snd_hdsp_free(hdsp);
> @@ -5181,7 +5181,7 @@ static int __devinit snd_hdsp_probe(struct pci_dev *pci,
> if (err < 0)
> return err;
>
> - hdsp = (struct hdsp *) card->private_data;
> + hdsp = card->private_data;
> card->private_free = snd_hdsp_card_free;
> hdsp->dev = dev;
> hdsp->pci = pci;
> --
> 1.7.2.19.g9a302
>
^ permalink raw reply [flat|nested] 39+ messages in thread