eeprom: idt_89hpesx: remove unneeded csr_file variable
Greg Kroah-Hartman
maintainerPATCH 1/1 eeprom: idt_89hpesx: remove unneeded csr_file variable
The csr_file variable was only ever set, never read. So remove it from struct idt_89hpesx_dev as it is pointless to keep around.
Cc Arnd Bergmann <[email protected]>
Cc Dan Carpenter <[email protected]>
Cc Kees Cook <[email protected]>
Cc Colin Ian King <[email protected]>
Signed-off-by Greg Kroah-Hartman <[email protected]>
--- drivers/misc/eeprom/idt_89hpesx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/misc/eeprom/idt_89hpesx.c +2 -4
@@ -115,7 +115,6 @@ static struct dentry *csr_dbgdir;* @client: i2c client used to perform IO operations * * @ee_file: EEPROM read/write sysfs-file -* @csr_file: CSR read/write debugfs-node */ struct idt_smb_seq ;struct idt_89hpesx_dev {
@@ -137,7 +136,6 @@ struct idt_89hpesx_dev {struct bin_attribute *ee_file;struct dentry *csr_dir; -struct dentry *csr_file; };/*
@@ -1378,8 +1376,8 @@ static void idt_create_dbgfs_files(struct idt_89hpesx_dev *pdev) pdev->csr_dir =debugfs_create_dir (fname, csr_dbgdir);/* Create Debugfs file for CSR read/write operations */ - pdev->csr_file =debugfs_create_file (cli->name,0600 , - pdev->csr_dir, pdev, &csr_dbgfs_ops); +debugfs_create_file (cli->name,0600 , pdev->csr_dir, pdev, + &csr_dbgfs_ops); }/*
Signature · 1 line
2.22.0
Quoted 9 lines · Greg Kroah-Hartman
The
csr_filevariable was only ever set, never read. So remove it from structidt_89hpesx_devas it is pointless to keep around.Cc Arnd Bergmann <[email protected]>Cc Dan Carpenter <[email protected]>Cc Kees Cook <[email protected]>Cc Colin Ian King <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>
Reviewed-by Kees Cook <[email protected]>
-Kees
Quoted 38 lines
--- drivers/misc/eeprom/idt_89hpesx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/misc/eeprom/idt_89hpesx.c +2
-4@@ -115,7 +115,6 @@ static struct dentry *csr_dbgdir;* @client: i2c client used to perform IO operations * * @ee_file: EEPROM read/write sysfs-file -* @csr_file: CSR read/write debugfs-node */ struct idt_smb_seq ;struct idt_89hpesx_dev {@@ -137,7 +136,6 @@ struct idt_89hpesx_dev {struct bin_attribute *ee_file;struct dentry *csr_dir; -struct dentry *csr_file; };/* @@ -1378,8 +1376,8 @@ static void idt_create_dbgfs_files(struct idt_89hpesx_dev *pdev) pdev->csr_dir =debugfs_create_dir (fname, csr_dbgdir);/* Create Debugfs file for CSR read/write operations */ - pdev->csr_file =debugfs_create_file (cli->name,0600 , - pdev->csr_dir, pdev, &csr_dbgfs_ops); +debugfs_create_file (cli->name,0600 , pdev->csr_dir, pdev, + &csr_dbgfs_ops); }/* Signature · 1 line
2.22.0
Signature · 1 line
Kees Cook