trivial: Remove unnecessary casts of private_data
Subsystems (20)
cover trivial: Remove unnecessary casts of private_data
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(-)
Signature · 1 line
1.7.2.19.g9a302
PATCH 2/13 drivers/infiniband: Remove unnecessary casts of private_data
--- drivers/infiniband/hw/qib/qib_file_ops.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/infiniband/hw/qib/qib_file_ops.c +2 -2
@@ -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;
Signature · 1 line
1.7.2.19.g9a302
PATCH 4/13 drivers/s390: Remove unnecessary casts of private_data
In reply to Joe Perches--- drivers/s390/char/vmcp.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/s390/char/vmcp.c +3 -3
@@ -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
Signature · 1 line
1.7.2.19.g9a302
PATCH 5/13 drivers/scsi: Remove unnecessary casts of private_data
In reply to Joe Perches--- drivers/scsi/aacraid/linit.c | 2 +- drivers/scsi/sg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/aacraid/linit.c +1 -1
@@ -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
drivers/scsi/sg.c +1 -1
@@ -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 ;
Signature · 1 line
1.7.2.19.g9a302
PATCH 8/13 fs/seq_file.c: Remove unnecessary casts of private_data
In reply to Joe Perches--- fs/seq_file.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
fs/seq_file.c +3 -3
@@ -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 ;
Signature · 1 line
1.7.2.19.g9a302
PATCH 12/13 net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
In reply to Joe Perches--- net/sunrpc/rpc_pipe.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
net/sunrpc/rpc_pipe.c +2 -2
@@ -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);
Signature · 1 line
1.7.2.19.g9a302
PATCH 13/13 sound: Remove unnecessary casts of private_data
In reply to Joe Perches--- 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(-)
sound/core/oss/mixer_oss.c +11 -11
@@ -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 intstatic 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, unsignedif (!(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, unsignedif (!(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 *slstatic 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);
sound/core/pcm.c +1 -2
@@ -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,
sound/drivers/virmidi.c +1 -1
@@ -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 ) {
sound/i2c/other/ak4xxx-adda.c +1 -1
@@ -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++) {
sound/isa/ad1816a/ad1816a.c +1 -1
@@ -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);
sound/isa/azt2320.c +1 -1
@@ -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);
sound/isa/gus/gusmax.c +2 -2
@@ -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 ;
sound/isa/sb/sb8.c +1 -1
@@ -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 ;
sound/oss/au1550_ac97.c +9 -9
@@ -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 ();
sound/pci/emu10k1/emumpu401.c +1 -1
@@ -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 ; }
sound/pci/ice1712/pontis.c +3 -3
@@ -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_bufstatic 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);
sound/pci/ice1712/prodigy192.c +1 -1
@@ -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++) {
sound/pci/rme96.c +4 -4
@@ -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);
sound/pci/rme9652/hdsp.c +4 -4
@@ -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_rmstatic 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;
Signature · 1 line
1.7.2.19.g9a302
PATCH 1/13 drivers/gpu/drm: Remove unnecessary casts of private_data
In reply to Joe Perches--- 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(-)
drivers/gpu/drm/radeon/radeon_ttm.c +1 -1
@@ -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 ;
drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c +1 -1
@@ -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) ||
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c +1 -1
@@ -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); }
Signature · 1 line
1.7.2.19.g9a302
PATCH 3/13 drivers/net/wireless/iwlwifi: Remove unnecessary casts of private_data
In reply to Joe Perches--- drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c | 2 +- drivers/net/wireless/iwlwifi/iwl-debugfs.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c +1 -1
@@ -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 ;
drivers/net/wireless/iwlwifi/iwl-debugfs.c +2 -2
@@ -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);
Signature · 1 line
1.7.2.19.g9a302
PATCH 11/13 net/ipv4: Remove unnecessary casts of private_data
In reply to Joe Perches--- net/ipv4/raw.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
net/ipv4/raw.c +1 -1
@@ -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 ; }
Signature · 1 line
1.7.2.19.g9a302
PATCH 10/13 kernel/trace: Remove unnecessary casts of private_data
In reply to Joe Perches--- kernel/trace/ftrace.c | 4 ++-- kernel/trace/trace.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
kernel/trace/ftrace.c +2 -2
@@ -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;
kernel/trace/trace.c +1 -1
@@ -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;
Signature · 1 line
1.7.2.19.g9a302
PATCH 9/13 kernel/pm_qos_params.c: Remove unnecessary casts of private_data
In reply to Joe Perches--- kernel/pm_qos_params.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
kernel/pm_qos_params.c +1 -1
@@ -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;
Signature · 1 line
1.7.2.19.g9a302
PATCH 7/13 fs/ecryptfs: Remove unnecessary casts of private_data
In reply to Joe Perches--- fs/ecryptfs/ecryptfs_kernel.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ecryptfs/ecryptfs_kernel.h +1 -1
@@ -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
Signature · 1 line
1.7.2.19.g9a302
PATCH 6/13 drivers/staging/lirc: Remove unnecessary casts of private_data
In reply to Joe Perches--- drivers/staging/lirc/lirc_imon.c | 4 ++-- drivers/staging/lirc/lirc_zilog.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-)
drivers/staging/lirc/lirc_imon.c +2 -2
@@ -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 ;
drivers/staging/lirc/lirc_zilog.c +5 -5
@@ -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 ;
Signature · 1 line
1.7.2.19.g9a302
Re: [PATCH 11/13] net/ipv4: Remove unnecessary casts of private_data
In reply to Joe PerchesFrom: Joe Perches <[email protected]>
Date: Sat, 4 Sep 2010 18:52:52 -0700
Quoted 1 line
Signed-off-by Joe Perches <[email protected]>
Applied.
David Miller
maintainerRe: [PATCH 11/13] net/ipv4: Remove unnecessary casts of private_data
From: David Miller <[email protected]>
Date: Mon, 06 Sep 2010 18:30:36 -0700 (PDT)
Quoted 6 lines
From: Joe Perches <[email protected]>
Date: Sat, 4 Sep 2010 18:52:52 -0700Quoted 1 line
Signed-off-by Joe Perches <[email protected]>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.
PATCH 1/1 include/net/raw.h: Convert raw_seq_private macro to inline
Quoted 3 lines · David Miller
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.
--- include/net/raw.h | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
include/net/raw.h +4 -1
@@ -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);
Re: [PATCH 13/13] sound: Remove unnecessary casts of private_data
In reply to Joe PerchesAt Sat, 4 Sep 2010 18:52:54 -0700,
Quoted 2 lines · Joe Perches
Signed-off-by Joe Perches <[email protected]>
Applied now. Thanks.
Takashi
Quoted 445 lines
--- 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(-)sound/core/oss/mixer_oss.c +11
-11@@ -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 intstatic 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, unsignedif (!(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, unsignedif (!(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 *slstatic 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);sound/core/pcm.c +1
-2@@ -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,sound/drivers/virmidi.c +1
-1@@ -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 ) {sound/i2c/other/ak4xxx-adda.c +1
-1@@ -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++) {sound/isa/ad1816a/ad1816a.c +1
-1@@ -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);sound/isa/azt2320.c +1
-1@@ -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);sound/isa/gus/gusmax.c +2
-2@@ -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 ;sound/isa/sb/sb8.c +1
-1@@ -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 ;sound/oss/au1550_ac97.c +9
-9@@ -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 ();sound/pci/emu10k1/emumpu401.c +1
-1@@ -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 ; }sound/pci/ice1712/pontis.c +3
-3@@ -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_bufstatic 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);sound/pci/ice1712/prodigy192.c +1
-1@@ -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++) {sound/pci/rme96.c +4
-4@@ -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);sound/pci/rme9652/hdsp.c +4
-4@@ -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_rmstatic 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;Signature · 1 line
1.7.2.19.g9a302
Re: [PATCH net-next] include/net/raw.h: Convert raw_seq_private macro to inline
In reply to Joe Perchesinclude/net/raw.h struct raw_iter_state { · line 48
Quoted 10 lines · Joe Perches
include/net/raw.h +1
-1@@ -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.
Quoted 6 lines
include/net/raw.h +3
-0+{ +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);
Signature · 1 line
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)
PATCH v2 1/1 include/net/raw.h: Convert raw_seq_private macro to inline
--- include/net/raw.h | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
include/net/raw.h +4 -1
@@ -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);
Re: [PATCH 02/13] drivers/infiniband: Remove unnecessary casts of private_data
In reply to Joe PerchesQuoted 19 lines · Joe Perches
Signed-off-by Joe Perches <[email protected]>--- drivers/infiniband/hw/qib/qib_file_ops.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)drivers/infiniband/hw/qib/qib_file_ops.c +1
-1@@ -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) {
drivers/infiniband/hw/qib/qib_file_ops.c static int qib_ctxt_info(struct file *fp, struct qib_ctxt_info __user *uinfo) · line 1814
Quoted 8 lines
drivers/infiniband/hw/qib/qib_file_ops.c +1
-1@@ -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;
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH V2 net-next] include/net/raw.h: Convert raw_seq_private macro to inline
In reply to Joe PerchesFrom: Joe Perches <[email protected]>
Date: Tue, 07 Sep 2010 08:55:38 -0700
Quoted 1 line
Signed-off-by Joe Perches <[email protected]>
Applied.
Re: [PATCH 08/13] fs/seq_file.c: Remove unnecessary casts of private_data
In reply to Joe PerchesQuoted 28 lines · Joe Perches
Signed-off-by Joe Perches <[email protected]>--- fs/seq_file.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)fs/seq_file.c +2
-2@@ -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);
fs/seq_file.c EXPORT_SYMBOL(seq_lseek); · line 330
Quoted 8 lines
fs/seq_file.c +1
-1@@ -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.
Signature · 2 lines
Jiri Kosina SUSE Labs, Novell Inc.
Jiri Kosina
AppliedRe: [PATCH 07/13] fs/ecryptfs: Remove unnecessary casts of private_data
In reply to Joe PerchesQuoted 10 lines · Joe Perches
Signed-off-by Joe Perches <[email protected]>--- fs/ecryptfs/ecryptfs_kernel.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)fs/ecryptfs/ecryptfs_kernel.h +0
-0
fs/ecryptfs/ecryptfs_kernel.h ecryptfs_lower_header_size(struct ecryptfs_crypt_stat *crypt_stat) · line 483
Quoted 8 lines
fs/ecryptfs/ecryptfs_kernel.h +1
-1@@ -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.
Signature · 2 lines
Jiri Kosina SUSE Labs, Novell Inc.
Jiri Kosina
AppliedRe: [PATCH 09/13] kernel/pm_qos_params.c: Remove unnecessary casts of private_data
In reply to Joe PerchesQuoted 10 lines · Joe Perches
Signed-off-by Joe Perches <[email protected]>--- kernel/pm_qos_params.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)kernel/pm_qos_params.c +0
-0
kernel/pm_qos_params.c static ssize_t pm_qos_power_write(struct file *filp, const char __user *buf, · line 402
Quoted 8 lines
kernel/pm_qos_params.c +1
-1@@ -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.
Signature · 2 lines
Jiri Kosina SUSE Labs, Novell Inc.
Re: [PATCH 01/13] drivers/gpu/drm: Remove unnecessary casts of private_data
In reply to Joe PerchesQuoted 38 lines · Joe Perches
Signed-off-by Joe Perches <[email protected]>--- 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(-)drivers/gpu/drm/radeon/radeon_ttm.c +1
-1@@ -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 ;drivers/gpu/drm/vmwgfx/vmwgfx_fifo.c +1
-1@@ -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) ||drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c +0
-0
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c int vmw_mmap(struct file *filp, struct vm_area_struct *vma) · line 45
Quoted 8 lines
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c +1
-1@@ -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,
Signature · 2 lines
Jiri Kosina SUSE Labs, Novell Inc.
Re: [PATCH 10/13] kernel/trace: Remove unnecessary casts of private_data
In reply to Joe PerchesQuoted 11 lines · Joe Perches
Signed-off-by Joe Perches <[email protected]>--- kernel/trace/ftrace.c | 4 ++-- kernel/trace/trace.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)kernel/trace/ftrace.c +0
-0
kernel/trace/ftrace.c ftrace_failures_open(struct inode *inode, struct file *file) · line 1603
Quoted 6 lines
kernel/trace/ftrace.c +1
-1@@ -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?
Signature · 2 lines
Jiri Kosina SUSE Labs, Novell Inc.
Jiri Kosina
AppliedRe: [PATCH 02/13] drivers/infiniband: Remove unnecessary casts of private_data
In reply to Ralph CampbellQuoted 1 line · Ralph Campbell
Acked-by Ralph Campbell <[email protected]>
Applied, thanks.
Quoted 27 lines
Quoted 27 lines
Signed-off-by Joe Perches <[email protected]>--- drivers/infiniband/hw/qib/qib_file_ops.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)drivers/infiniband/hw/qib/qib_file_ops.c +2
-2@@ -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;
Signature · 6 lines
Jiri Kosina SUSE Labs, Novell Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 12/13] net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data
In reply to Joe PerchesQuoted 19 lines · Joe Perches
Signed-off-by Joe Perches <[email protected]>--- net/sunrpc/rpc_pipe.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)net/sunrpc/rpc_pipe.c +1
-1@@ -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 ;
net/sunrpc/rpc_pipe.c rpc_pipe_ioctl_unlocked(struct file *filp, unsigned int cmd, unsigned long arg) · line 328
Quoted 8 lines
net/sunrpc/rpc_pipe.c +1
-1@@ -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.
Signature · 6 lines
Jiri Kosina SUSE Labs, Novell Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 04/13] drivers/s390: Remove unnecessary casts of private_data
In reply to Joe PerchesQuoted 28 lines · Joe Perches
Signed-off-by Joe Perches <[email protected]>--- drivers/s390/char/vmcp.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)drivers/s390/char/vmcp.c +2
-2@@ -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 ;
drivers/s390/char/vmcp.c static long vmcp_ioctl(struct file *file, unsigned int cmd, unsigned long arg) · line 142
Quoted 8 lines
drivers/s390/char/vmcp.c +1
-1@@ -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.
Signature · 2 lines
Jiri Kosina SUSE Labs, Novell Inc.
Re: [PATCH 05/13] drivers/scsi: Remove unnecessary casts of private_data
In reply to Joe PerchesQuoted 24 lines · Joe Perches
Signed-off-by Joe Perches <[email protected]>--- drivers/scsi/aacraid/linit.c | 2 +- drivers/scsi/sg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/scsi/aacraid/linit.c +1
-1@@ -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 drivers/scsi/sg.c +0
-0
drivers/scsi/sg.c static void sg_put_dev(Sg_device *sdp); · line 216
Quoted 8 lines
drivers/scsi/sg.c +1
-1@@ -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.
Signature · 2 lines
Jiri Kosina SUSE Labs, Novell Inc.
Re: [PATCH 02/13] drivers/infiniband: Remove unnecessary casts of private_data
In reply to Joe Perchesthanks, applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html