Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9462140 authored by Vasyl Gomonovych's avatar Vasyl Gomonovych Committed by Martin K. Petersen
Browse files

scsi: fnic: Fix coccinelle warnings



Remove the duplicate copies of this simple function and use an
open-coded version.

drivers/scsi/fnic/fnic_debugfs.c:122:11-31: WARNING opportunity for simple_open, see also structure on line 223

Generated by: coccinelle/api/simple_open.cocci

Signed-off-by: default avatarVasyl Gomonovych <gomonovych@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 9c0a5002
Loading
Loading
Loading
Loading
+1 −19
Original line number Diff line number Diff line
@@ -107,24 +107,6 @@ void fnic_debugfs_terminate(void)
		vfree(fc_trc_flag);
}

/*
 * fnic_trace_ctrl_open - Open the trace_enable file for fnic_trace
 *               Or Open fc_trace_enable file for fc_trace
 * @inode: The inode pointer.
 * @file: The file pointer to attach the trace enable/disable flag.
 *
 * Description:
 * This routine opens a debugsfs file trace_enable or fc_trace_enable.
 *
 * Returns:
 * This function returns zero if successful.
 */
static int fnic_trace_ctrl_open(struct inode *inode, struct file *filp)
{
	filp->private_data = inode->i_private;
	return 0;
}

/*
 * fnic_trace_ctrl_read -
 *          Read  trace_enable ,fc_trace_enable
@@ -220,7 +202,7 @@ static ssize_t fnic_trace_ctrl_write(struct file *filp,

static const struct file_operations fnic_trace_ctrl_fops = {
	.owner = THIS_MODULE,
	.open = fnic_trace_ctrl_open,
	.open = simple_open,
	.read = fnic_trace_ctrl_read,
	.write = fnic_trace_ctrl_write,
};