All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kees Cook <keescook@chromium.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Colin Ian King <colin.king@canonical.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] eeprom: idt_89hpesx: remove unneeded csr_file variable
Date: Tue, 11 Jun 2019 11:43:30 -0700	[thread overview]
Message-ID: <201906111143.2A7FDD2B77@keescook> (raw)
In-Reply-To: <20190611181700.GA18599@kroah.com>

On Tue, Jun 11, 2019 at 08:17:00PM +0200, Greg Kroah-Hartman wrote:
> 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 <arnd@arndb.de>
> Cc: Dan Carpenter <dan.carpenter@oracle.com>
> Cc: Kees Cook <keescook@chromium.org>
> Cc: Colin Ian King <colin.king@canonical.com>
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Reviewed-by: Kees Cook <keescook@chromium.org>

-Kees

> ---
>  drivers/misc/eeprom/idt_89hpesx.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/misc/eeprom/idt_89hpesx.c b/drivers/misc/eeprom/idt_89hpesx.c
> index 8a4659518c33..81c70e5bc168 100644
> --- a/drivers/misc/eeprom/idt_89hpesx.c
> +++ b/drivers/misc/eeprom/idt_89hpesx.c
> @@ -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);
>  }
>  
>  /*
> -- 
> 2.22.0
> 

-- 
Kees Cook

      reply	other threads:[~2019-06-11 18:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-11 18:17 [PATCH] eeprom: idt_89hpesx: remove unneeded csr_file variable Greg Kroah-Hartman
2019-06-11 18:43 ` Kees Cook [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201906111143.2A7FDD2B77@keescook \
    --to=keescook@chromium.org \
    --cc=arnd@arndb.de \
    --cc=colin.king@canonical.com \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.