Commit ef57ecaf authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] remove bogus casts of pointers to unsigned int in sound/*

parent bf39d18e
...@@ -1144,9 +1144,9 @@ static void start_dac(struct cs_state *state) ...@@ -1144,9 +1144,9 @@ static void start_dac(struct cs_state *state)
tmp &= 0xFFFF; tmp &= 0xFFFF;
tmp |= card->pctl; tmp |= card->pctl;
CS_DBGOUT(CS_PARMS, 6, printk( CS_DBGOUT(CS_PARMS, 6, printk(
"cs46xx: start_dac() poke card=0x%.08x tmp=0x%.08x addr=0x%.08x \n", "cs46xx: start_dac() poke card=%p tmp=0x%.08x addr=%p \n",
(unsigned)card, (unsigned)tmp, card, (unsigned)tmp,
(unsigned)card->ba1.idx[(BA1_PCTL >> 16) & 3]+(BA1_PCTL&0xffff) ) ); card->ba1.idx[(BA1_PCTL >> 16) & 3]+(BA1_PCTL&0xffff) ) );
cs461x_poke(card, BA1_PCTL, tmp); cs461x_poke(card, BA1_PCTL, tmp);
} }
spin_unlock_irqrestore(&card->lock, flags); spin_unlock_irqrestore(&card->lock, flags);
...@@ -1613,8 +1613,8 @@ static void cs_update_ptr(struct cs_card *card, int wake) ...@@ -1613,8 +1613,8 @@ static void cs_update_ptr(struct cs_card *card, int wake)
memset(dmabuf->rawbuf, memset(dmabuf->rawbuf,
(dmabuf->fmt & CS_FMT_16BIT) ? 0 : 0x80, (dmabuf->fmt & CS_FMT_16BIT) ? 0 : 0x80,
(unsigned)hwptr); (unsigned)hwptr);
memset((void *)((unsigned)dmabuf->rawbuf + memset((char *)dmabuf->rawbuf +
dmabuf->dmasize + hwptr - diff), dmabuf->dmasize + hwptr - diff,
(dmabuf->fmt & CS_FMT_16BIT) ? 0 : 0x80, (dmabuf->fmt & CS_FMT_16BIT) ? 0 : 0x80,
diff - hwptr); diff - hwptr);
} }
...@@ -1970,8 +1970,8 @@ static void CopySamples(char *dst, char *src, int count, unsigned fmt, ...@@ -1970,8 +1970,8 @@ static void CopySamples(char *dst, char *src, int count, unsigned fmt,
CS_DBGOUT(CS_FUNCTION, 2, printk(KERN_INFO "cs46xx: CopySamples()+ ") ); CS_DBGOUT(CS_FUNCTION, 2, printk(KERN_INFO "cs46xx: CopySamples()+ ") );
CS_DBGOUT(CS_WAVE_READ, 8, printk(KERN_INFO CS_DBGOUT(CS_WAVE_READ, 8, printk(KERN_INFO
" dst=0x%x src=0x%x count=%d fmt=0x%x\n", " dst=%p src=%p count=%d fmt=0x%x\n",
(unsigned)dst,(unsigned)src,(unsigned)count,(unsigned)fmt) ); dst,src,count,fmt) );
/* /*
* See if the data should be output as 8-bit unsigned stereo. * See if the data should be output as 8-bit unsigned stereo.
...@@ -2169,7 +2169,7 @@ static ssize_t cs_read(struct file *file, char __user *buffer, size_t count, lof ...@@ -2169,7 +2169,7 @@ static ssize_t cs_read(struct file *file, char __user *buffer, size_t count, lof
dmabuf->dmasize,dmabuf->count,buffer,ret) ); dmabuf->dmasize,dmabuf->count,buffer,ret) );
if (cs_copy_to_user(state, buffer, if (cs_copy_to_user(state, buffer,
(void *)((unsigned)dmabuf->rawbuf + swptr), cnt, &copied)) (char *)dmabuf->rawbuf + swptr, cnt, &copied))
{ {
if (!ret) ret = -EFAULT; if (!ret) ret = -EFAULT;
goto out; goto out;
...@@ -2404,8 +2404,8 @@ static int cs_mmap(struct file *file, struct vm_area_struct *vma) ...@@ -2404,8 +2404,8 @@ static int cs_mmap(struct file *file, struct vm_area_struct *vma)
int ret = 0; int ret = 0;
unsigned long size; unsigned long size;
CS_DBGOUT(CS_FUNCTION | CS_PARMS, 2, printk("cs46xx: cs_mmap()+ file=0x%x %s %s\n", CS_DBGOUT(CS_FUNCTION | CS_PARMS, 2, printk("cs46xx: cs_mmap()+ file=%p %s %s\n",
(unsigned)file, vma->vm_flags & VM_WRITE ? "VM_WRITE" : "", file, vma->vm_flags & VM_WRITE ? "VM_WRITE" : "",
vma->vm_flags & VM_READ ? "VM_READ" : "") ); vma->vm_flags & VM_READ ? "VM_READ" : "") );
if (vma->vm_flags & VM_WRITE) { if (vma->vm_flags & VM_WRITE) {
...@@ -2441,8 +2441,7 @@ static int cs_mmap(struct file *file, struct vm_area_struct *vma) ...@@ -2441,8 +2441,7 @@ static int cs_mmap(struct file *file, struct vm_area_struct *vma)
* use the DAC only. * use the DAC only.
*/ */
state = card->states[1]; state = card->states[1];
if(!(unsigned)state) if (!state) {
{
ret = -EINVAL; ret = -EINVAL;
goto out; goto out;
} }
...@@ -3204,8 +3203,8 @@ static int cs_open(struct inode *inode, struct file *file) ...@@ -3204,8 +3203,8 @@ static int cs_open(struct inode *inode, struct file *file)
int ret=0; int ret=0;
unsigned int tmp; unsigned int tmp;
CS_DBGOUT(CS_OPEN | CS_FUNCTION, 2, printk("cs46xx: cs_open()+ file=0x%x %s %s\n", CS_DBGOUT(CS_OPEN | CS_FUNCTION, 2, printk("cs46xx: cs_open()+ file=%p %s %s\n",
(unsigned)file, file->f_mode & FMODE_WRITE ? "FMODE_WRITE" : "", file, file->f_mode & FMODE_WRITE ? "FMODE_WRITE" : "",
file->f_mode & FMODE_READ ? "FMODE_READ" : "") ); file->f_mode & FMODE_READ ? "FMODE_READ" : "") );
list_for_each(entry, &cs46xx_devs) list_for_each(entry, &cs46xx_devs)
...@@ -3380,8 +3379,8 @@ static int cs_release(struct inode *inode, struct file *file) ...@@ -3380,8 +3379,8 @@ static int cs_release(struct inode *inode, struct file *file)
struct dmabuf *dmabuf; struct dmabuf *dmabuf;
struct cs_state *state; struct cs_state *state;
unsigned int tmp; unsigned int tmp;
CS_DBGOUT(CS_RELEASE | CS_FUNCTION, 2, printk("cs46xx: cs_release()+ file=0x%x %s %s\n", CS_DBGOUT(CS_RELEASE | CS_FUNCTION, 2, printk("cs46xx: cs_release()+ file=%p %s %s\n",
(unsigned)file, file->f_mode & FMODE_WRITE ? "FMODE_WRITE" : "", file, file->f_mode & FMODE_WRITE ? "FMODE_WRITE" : "",
file->f_mode & FMODE_READ ? "FMODE_READ" : "") ); file->f_mode & FMODE_READ ? "FMODE_READ" : "") );
if (!(file->f_mode & (FMODE_WRITE | FMODE_READ))) if (!(file->f_mode & (FMODE_WRITE | FMODE_READ)))
...@@ -3675,8 +3674,8 @@ static int cs46xx_suspend(struct cs_card *card, u32 state) ...@@ -3675,8 +3674,8 @@ static int cs46xx_suspend(struct cs_card *card, u32 state)
{ {
unsigned int tmp; unsigned int tmp;
CS_DBGOUT(CS_PM | CS_FUNCTION, 4, CS_DBGOUT(CS_PM | CS_FUNCTION, 4,
printk("cs46xx: cs46xx_suspend()+ flags=0x%x s=0x%x\n", printk("cs46xx: cs46xx_suspend()+ flags=0x%x s=%p\n",
(unsigned)card->pm.flags,(unsigned)card)); (unsigned)card->pm.flags,card));
/* /*
* check the current state, only suspend if IDLE * check the current state, only suspend if IDLE
*/ */
...@@ -4297,9 +4296,9 @@ static int __init cs_ac97_init(struct cs_card *card) ...@@ -4297,9 +4296,9 @@ static int __init cs_ac97_init(struct cs_card *card)
card->ac97_codec[num_ac97] = codec; card->ac97_codec[num_ac97] = codec;
CS_DBGOUT(CS_FUNCTION | CS_INIT, 2, printk(KERN_INFO CS_DBGOUT(CS_FUNCTION | CS_INIT, 2, printk(KERN_INFO
"cs46xx: cs_ac97_init() ac97_codec[%d] set to 0x%x\n", "cs46xx: cs_ac97_init() ac97_codec[%d] set to %p\n",
(unsigned int)num_ac97, (unsigned int)num_ac97,
(unsigned int)codec)); codec));
/* if there is no secondary codec at all, don't probe any more */ /* if there is no secondary codec at all, don't probe any more */
if (!ready_2nd) if (!ready_2nd)
{ {
...@@ -5489,13 +5488,13 @@ static int __devinit cs46xx_probe(struct pci_dev *pci_dev, ...@@ -5489,13 +5488,13 @@ static int __devinit cs46xx_probe(struct pci_dev *pci_dev,
card->ba1.name.reg = ioremap_nocache(card->ba1_addr + BA1_SP_REG, CS461X_BA1_REG_SIZE); card->ba1.name.reg = ioremap_nocache(card->ba1_addr + BA1_SP_REG, CS461X_BA1_REG_SIZE);
CS_DBGOUT(CS_INIT, 4, printk(KERN_INFO CS_DBGOUT(CS_INIT, 4, printk(KERN_INFO
"cs46xx: card=0x%x card->ba0=0x%.08x\n",(unsigned)card,(unsigned)card->ba0) ); "cs46xx: card=%p card->ba0=%p\n",card,card->ba0) );
CS_DBGOUT(CS_INIT, 4, printk(KERN_INFO CS_DBGOUT(CS_INIT, 4, printk(KERN_INFO
"cs46xx: card->ba1=0x%.08x 0x%.08x 0x%.08x 0x%.08x\n", "cs46xx: card->ba1=%p %p %p %p\n",
(unsigned)card->ba1.name.data0, card->ba1.name.data0,
(unsigned)card->ba1.name.data1, card->ba1.name.data1,
(unsigned)card->ba1.name.pmem, card->ba1.name.pmem,
(unsigned)card->ba1.name.reg) ); card->ba1.name.reg) );
if(card->ba0 == 0 || card->ba1.name.data0 == 0 || if(card->ba0 == 0 || card->ba1.name.data0 == 0 ||
card->ba1.name.data1 == 0 || card->ba1.name.pmem == 0 || card->ba1.name.data1 == 0 || card->ba1.name.pmem == 0 ||
...@@ -5566,20 +5565,20 @@ static int __devinit cs46xx_probe(struct pci_dev *pci_dev, ...@@ -5566,20 +5565,20 @@ static int __devinit cs46xx_probe(struct pci_dev *pci_dev,
if (pmdev) if (pmdev)
{ {
CS_DBGOUT(CS_INIT | CS_PM, 4, printk(KERN_INFO CS_DBGOUT(CS_INIT | CS_PM, 4, printk(KERN_INFO
"cs46xx: probe() pm_register() succeeded (0x%x).\n", "cs46xx: probe() pm_register() succeeded (%p).\n",
(unsigned)pmdev)); pmdev));
pmdev->data = card; pmdev->data = card;
} }
else else
{ {
CS_DBGOUT(CS_INIT | CS_PM | CS_ERROR, 2, printk(KERN_INFO CS_DBGOUT(CS_INIT | CS_PM | CS_ERROR, 2, printk(KERN_INFO
"cs46xx: probe() pm_register() failed (0x%x).\n", "cs46xx: probe() pm_register() failed (%p).\n",
(unsigned)pmdev)); pmdev));
card->pm.flags |= CS46XX_PM_NOT_REGISTERED; card->pm.flags |= CS46XX_PM_NOT_REGISTERED;
} }
CS_DBGOUT(CS_PM, 9, printk(KERN_INFO "cs46xx: pm.flags=0x%x card=0x%x\n", CS_DBGOUT(CS_PM, 9, printk(KERN_INFO "cs46xx: pm.flags=0x%x card=%p\n",
(unsigned)card->pm.flags,(unsigned)card)); (unsigned)card->pm.flags,card));
CS_DBGOUT(CS_INIT | CS_FUNCTION, 2, printk(KERN_INFO CS_DBGOUT(CS_INIT | CS_FUNCTION, 2, printk(KERN_INFO
"cs46xx: probe()- device allocated successfully\n")); "cs46xx: probe()- device allocated successfully\n"));
...@@ -5772,8 +5771,8 @@ int cs46xx_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data) ...@@ -5772,8 +5771,8 @@ int cs46xx_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
struct cs_card *card; struct cs_card *card;
CS_DBGOUT(CS_PM, 2, printk(KERN_INFO CS_DBGOUT(CS_PM, 2, printk(KERN_INFO
"cs46xx: cs46xx_pm_callback dev=0x%x rqst=0x%x card=%d\n", "cs46xx: cs46xx_pm_callback dev=%p rqst=0x%x card=%p\n",
(unsigned)dev,(unsigned)rqst,(unsigned)data)); dev,(unsigned)rqst,data));
card = (struct cs_card *) dev->data; card = (struct cs_card *) dev->data;
if (card) { if (card) {
switch(rqst) { switch(rqst) {
......
...@@ -2365,7 +2365,8 @@ static int ymfpci_memalloc(ymfpci_t *codec) ...@@ -2365,7 +2365,8 @@ static int ymfpci_memalloc(ymfpci_t *codec)
codec->dma_area_ba = pba; codec->dma_area_ba = pba;
codec->dma_area_size = size + 0xff; codec->dma_area_size = size + 0xff;
if ((off = ((uint) ptr) & 0xff) != 0) { off = (unsigned long)ptr & 0xff;
if (off) {
ptr += 0x100 - off; ptr += 0x100 - off;
pba += 0x100 - off; pba += 0x100 - off;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment