]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
misc: xilinx_trafgen: Fix warnings in the driver
authorNava kishore Manne <nava.manne@xilinx.com>
Wed, 19 Apr 2017 12:11:23 +0000 (17:41 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 20 Jun 2017 12:13:25 +0000 (14:13 +0200)
This patch fixes the below warning
        --> Missing a blank line after declarations.
        --> Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred.
            Consider using octal permissions '0644'.
        --> struct of_device_id should normally be const.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/misc/xilinx_trafgen.c

index 5a8f19cd77914d46a7424b8a2a219086ff029401..a90da6e115f6a778330690d05cfae680750db535 100644 (file)
@@ -882,6 +882,7 @@ static ssize_t reset_static_transferdone_show(struct device *dev,
                struct device_attribute *attr, char *buf)
 {
        ssize_t rdval = xtg_sysfs_ioctl(dev, buf, XTG_GET_STATIC_TRANSFERDONE);
+
        if (rdval == XTG_STATIC_CNTL_RESET_MASK)
                rdval = 1;
        else
@@ -1020,7 +1021,7 @@ static ssize_t xtg_pram_mmap(struct file *filp, struct kobject *kobj,
 static struct bin_attribute xtg_pram_attr = {
        .attr = {
                .name = "parameter_ram",
-               .mode = S_IRUGO | S_IWUSR,
+               .mode = 0644,
        },
        .size = XTG_PARAM_RAM_SIZE,
        .read = xtg_pram_read,
@@ -1118,7 +1119,7 @@ static ssize_t xtg_cram_mmap(struct file *filp, struct kobject *kobj,
 static struct bin_attribute xtg_cram_attr = {
        .attr = {
                .name = "command_ram",
-               .mode = S_IRUGO | S_IWUSR,
+               .mode = 0644,
        },
        .size = XTG_COMMAND_RAM_SIZE,
        .read = xtg_cram_read,
@@ -1178,7 +1179,7 @@ static ssize_t xtg_mram_mmap(struct file *filp, struct kobject *kobj,
 static struct bin_attribute xtg_mram_attr = {
        .attr = {
                .name = "master_ram",
-               .mode = S_IRUGO | S_IWUSR,
+               .mode = 0644,
        },
        .size = XTG_MASTER_RAM_SIZE,
        .read = xtg_mram_read,
@@ -1380,7 +1381,7 @@ static int xtg_remove(struct platform_device *pdev)
        return 0;
 }
 
-static struct of_device_id xtg_of_match[] = {
+static const struct of_device_id xtg_of_match[] = {
        { .compatible = "xlnx,axi-traffic-gen", },
        { /* end of table */ }
 };