Skip to content

Commit e976a72

Browse files
Hans Verkuilgregkh
authored andcommitted
carma-fpga-program.c: fix compile errors
drivers/misc/carma/carma-fpga-program.c: In function 'fpga_program_dma': drivers/misc/carma/carma-fpga-program.c:529:2: error: expected ';' before 'if' if (ret) { ^ drivers/misc/carma/carma-fpga-program.c: In function 'fpga_read': drivers/misc/carma/carma-fpga-program.c:752:45: error: 'ppos' undeclared (first use in this function) return simple_read_from_buffer(buf, count, ppos, ^ drivers/misc/carma/carma-fpga-program.c:752:45: note: each undeclared identifier is reported only once for each function it appears in drivers/misc/carma/carma-fpga-program.c: In function 'fpga_llseek': drivers/misc/carma/carma-fpga-program.c:765:27: error: 'file' undeclared (first use in this function) return fixed_size_llseek(file, offset, origin, priv->fw_size); ^ drivers/misc/carma/carma-fpga-program.c:759:9: warning: unused variable 'newpos' [-Wunused-variable] loff_t newpos; ^ drivers/misc/carma/carma-fpga-program.c: In function 'fpga_read': drivers/misc/carma/carma-fpga-program.c:754:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ drivers/misc/carma/carma-fpga-program.c: In function 'fpga_llseek': drivers/misc/carma/carma-fpga-program.c:766:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ scripts/Makefile.build:263: recipe for target 'drivers/misc/carma/carma-fpga-program.o' failed Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 723493c commit e976a72

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/misc/carma/carma-fpga-program.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ static noinline int fpga_program_dma(struct fpga_dev *priv)
525525
goto out_dma_unmap;
526526
}
527527

528-
ret = fsl_dma_external_start(chan, 1)
528+
ret = fsl_dma_external_start(chan, 1);
529529
if (ret) {
530530
dev_err(priv->dev, "DMA external control setup failed\n");
531531
goto out_dma_unmap;
@@ -749,20 +749,19 @@ static ssize_t fpga_read(struct file *filp, char __user *buf, size_t count,
749749
loff_t *f_pos)
750750
{
751751
struct fpga_dev *priv = filp->private_data;
752-
return simple_read_from_buffer(buf, count, ppos,
752+
return simple_read_from_buffer(buf, count, f_pos,
753753
priv->vb.vaddr, priv->bytes);
754754
}
755755

756756
static loff_t fpga_llseek(struct file *filp, loff_t offset, int origin)
757757
{
758758
struct fpga_dev *priv = filp->private_data;
759-
loff_t newpos;
760759

761760
/* only read-only opens are allowed to seek */
762761
if ((filp->f_flags & O_ACCMODE) != O_RDONLY)
763762
return -EINVAL;
764763

765-
return fixed_size_llseek(file, offset, origin, priv->fw_size);
764+
return fixed_size_llseek(filp, offset, origin, priv->fw_size);
766765
}
767766

768767
static const struct file_operations fpga_fops = {

0 commit comments

Comments
 (0)