Commit 995dda5f authored by Dirk Behme's avatar Dirk Behme Committed by Tony Lindgren

ARM: OMAP: Fix warnings in N770 build

Fix some warnings in n770_defconfig build:
drivers/mtd/nand/omap-hw.c:390: warning:
'omap_nand_write_byte' defined but not used

tahvo-usb.c, tahvo-user.c and retu-user.c: ignoring return
value of 'xxx', declared with attribute warn_unused_result

Signed-off-by: Dirk Behme <dirk.behme_at_gmail.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent e2f0b012
...@@ -272,6 +272,7 @@ static int retu_ioctl(struct inode *inode, struct file *filp, ...@@ -272,6 +272,7 @@ static int retu_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
struct retu_tahvo_write_parms par; struct retu_tahvo_write_parms par;
int ret;
switch (cmd) { switch (cmd) {
case URT_IOCT_IRQ_SUBSCR: case URT_IOCT_IRQ_SUBSCR:
...@@ -279,9 +280,13 @@ static int retu_ioctl(struct inode *inode, struct file *filp, ...@@ -279,9 +280,13 @@ static int retu_ioctl(struct inode *inode, struct file *filp,
case RETU_IOCH_READ: case RETU_IOCH_READ:
return retu_user_read_with_mask(arg); return retu_user_read_with_mask(arg);
case RETU_IOCX_WRITE: case RETU_IOCX_WRITE:
copy_from_user(&par, (void __user *) arg, sizeof(par)); ret = copy_from_user(&par, (void __user *) arg, sizeof(par));
if (ret)
printk(KERN_ERR "copy_from_user failed: %d\n", ret);
par.result = retu_user_write_with_mask(par.field, par.value); par.result = retu_user_write_with_mask(par.field, par.value);
copy_to_user((void __user *) arg, &par, sizeof(par)); ret = copy_to_user((void __user *) arg, &par, sizeof(par));
if (ret)
printk(KERN_ERR "copy_to_user failed: %d\n", ret);
break; break;
case RETU_IOCH_ADC_READ: case RETU_IOCH_ADC_READ:
return retu_read_adc(arg); return retu_read_adc(arg);
...@@ -326,8 +331,10 @@ static ssize_t retu_read(struct file *filp, char *buf, size_t count, ...@@ -326,8 +331,10 @@ static ssize_t retu_read(struct file *filp, char *buf, size_t count,
list_move(&irq->node, &retu_irqs_reserve); list_move(&irq->node, &retu_irqs_reserve);
spin_unlock_irqrestore(&retu_irqs_lock, flags); spin_unlock_irqrestore(&retu_irqs_lock, flags);
copy_to_user(buf + i * sizeof(irq_id), &irq_id, sizeof(irq_id)); ret = copy_to_user(buf + i * sizeof(irq_id), &irq_id,
sizeof(irq_id));
if (ret)
printk(KERN_ERR "copy_to_user failed: %d\n", ret);
} }
return count; return count;
......
...@@ -648,10 +648,12 @@ static int tahvo_usb_probe(struct device *dev) ...@@ -648,10 +648,12 @@ static int tahvo_usb_probe(struct device *dev)
} }
/* Attributes */ /* Attributes */
device_create_file(dev, &dev_attr_vbus_state); ret = device_create_file(dev, &dev_attr_vbus_state);
#ifdef CONFIG_USB_OTG #ifdef CONFIG_USB_OTG
device_create_file(dev, &dev_attr_otg_mode); ret |= device_create_file(dev, &dev_attr_otg_mode);
#endif #endif
if (ret)
printk(KERN_ERR "attribute creation failed: %d\n", ret);
/* Create OTG interface */ /* Create OTG interface */
tahvo_usb_power_off(tu); tahvo_usb_power_off(tu);
......
...@@ -256,6 +256,7 @@ static int tahvo_ioctl(struct inode *inode, struct file *filp, ...@@ -256,6 +256,7 @@ static int tahvo_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg) unsigned int cmd, unsigned long arg)
{ {
struct retu_tahvo_write_parms par; struct retu_tahvo_write_parms par;
int ret;
switch (cmd) { switch (cmd) {
case URT_IOCT_IRQ_SUBSCR: case URT_IOCT_IRQ_SUBSCR:
...@@ -263,9 +264,13 @@ static int tahvo_ioctl(struct inode *inode, struct file *filp, ...@@ -263,9 +264,13 @@ static int tahvo_ioctl(struct inode *inode, struct file *filp,
case TAHVO_IOCH_READ: case TAHVO_IOCH_READ:
return tahvo_user_read_with_mask(arg); return tahvo_user_read_with_mask(arg);
case TAHVO_IOCX_WRITE: case TAHVO_IOCX_WRITE:
copy_from_user(&par, (void __user *) arg, sizeof(par)); ret = copy_from_user(&par, (void __user *) arg, sizeof(par));
if (ret)
printk(KERN_ERR "copy_from_user failed: %d\n", ret);
par.result = tahvo_user_write_with_mask(par.field, par.value); par.result = tahvo_user_write_with_mask(par.field, par.value);
copy_to_user((void __user *) arg, &par, sizeof(par)); ret = copy_to_user((void __user *) arg, &par, sizeof(par));
if (ret)
printk(KERN_ERR "copy_to_user failed: %d\n", ret);
break; break;
default: default:
return -ENOIOCTLCMD; return -ENOIOCTLCMD;
...@@ -308,7 +313,10 @@ static ssize_t tahvo_read(struct file *filp, char *buf, size_t count, ...@@ -308,7 +313,10 @@ static ssize_t tahvo_read(struct file *filp, char *buf, size_t count,
list_move(&irq->node, &tahvo_irqs_reserve); list_move(&irq->node, &tahvo_irqs_reserve);
spin_unlock_irqrestore(&tahvo_irqs_lock, flags); spin_unlock_irqrestore(&tahvo_irqs_lock, flags);
copy_to_user(buf + i * sizeof(irq_id), &irq_id, sizeof(irq_id)); ret = copy_to_user(buf + i * sizeof(irq_id), &irq_id,
sizeof(irq_id));
if (ret)
printk(KERN_ERR "copy_to_user failed: %d\n", ret);
} }
return count; return count;
......
...@@ -386,11 +386,6 @@ static u_char omap_nand_read_byte(struct mtd_info *mtd) ...@@ -386,11 +386,6 @@ static u_char omap_nand_read_byte(struct mtd_info *mtd)
return nand_read_reg8(NND_ACCESS); return nand_read_reg8(NND_ACCESS);
} }
static void omap_nand_write_byte(struct mtd_info *mtd, u_char byte)
{
nand_write_reg8(NND_ACCESS, byte);
}
static int omap_nand_dev_ready(struct mtd_info *mtd) static int omap_nand_dev_ready(struct mtd_info *mtd)
{ {
u32 l; u32 l;
......
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