Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i2c-iop3xx: add iomem annotation

Eliminate unnecessary casts and the following sparse warnings:

drivers/i2c/busses/i2c-iop3xx.c:65:9: warning: incorrect type in argument 1 (different base types)
drivers/i2c/busses/i2c-iop3xx.c:65:9: expected void const volatile [noderef] <asn:2>*<noident>
drivers/i2c/busses/i2c-iop3xx.c:65:9: got unsigned int

[ the previous warning is repeated 18 times ]

drivers/i2c/busses/i2c-iop3xx.c:456:33: warning: cast removes address space of expression

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>

authored by

Aaro Koskinen and committed by
Ben Dooks
747fcc91 03ed6a3a

+4 -4
+3 -3
drivers/i2c/busses/i2c-iop3xx.c
··· 409 409 IOP3XX_ICR_RXFULL_IE | IOP3XX_ICR_TXEMPTY_IE); 410 410 __raw_writel(cr, adapter_data->ioaddr + CR_OFFSET); 411 411 412 - iounmap((void __iomem*)adapter_data->ioaddr); 412 + iounmap(adapter_data->ioaddr); 413 413 release_mem_region(res->start, IOP3XX_I2C_IO_SIZE); 414 414 kfree(adapter_data); 415 415 kfree(padapter); ··· 453 453 /* set the adapter enumeration # */ 454 454 adapter_data->id = i2c_id++; 455 455 456 - adapter_data->ioaddr = (u32)ioremap(res->start, IOP3XX_I2C_IO_SIZE); 456 + adapter_data->ioaddr = ioremap(res->start, IOP3XX_I2C_IO_SIZE); 457 457 if (!adapter_data->ioaddr) { 458 458 ret = -ENOMEM; 459 459 goto release_region; ··· 498 498 return 0; 499 499 500 500 unmap: 501 - iounmap((void __iomem*)adapter_data->ioaddr); 501 + iounmap(adapter_data->ioaddr); 502 502 503 503 release_region: 504 504 release_mem_region(res->start, IOP3XX_I2C_IO_SIZE);
+1 -1
drivers/i2c/busses/i2c-iop3xx.h
··· 97 97 #define IOP3XX_I2C_IO_SIZE 0x18 98 98 99 99 struct i2c_algo_iop3xx_data { 100 - u32 ioaddr; 100 + void __iomem *ioaddr; 101 101 wait_queue_head_t waitq; 102 102 spinlock_t lock; 103 103 u32 SR_enabled, SR_received;