All of lore.kernel.org
 help / color / mirror / Atom feed
From: Naresh Kumar Inna <naresh@chelsio.com>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: "JBottomley@parallels.com" <JBottomley@parallels.com>,
	"yongjun_wei@trendmicro.com.cn" <yongjun_wei@trendmicro.com.cn>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH -next] [SCSI] csiostor: convert to use simple_open()
Date: Mon, 3 Dec 2012 11:44:12 +0530	[thread overview]
Message-ID: <50BC4334.5040706@chelsio.com> (raw)
In-Reply-To: <CAPgLHd93AaLhAxVktx3-PQ8VojVN5AnGfZHFic-hp5O4ceBrxQ@mail.gmail.com>

On 12/2/2012 5:21 PM, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> This removes an open coded simple_open() function and
> replaces file operations references to the function
> with simple_open() instead.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>  drivers/scsi/csiostor/csio_init.c | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/drivers/scsi/csiostor/csio_init.c b/drivers/scsi/csiostor/csio_init.c
> index fdd408f..17cf5e1 100644
> --- a/drivers/scsi/csiostor/csio_init.c
> +++ b/drivers/scsi/csiostor/csio_init.c
> @@ -57,16 +57,6 @@ static struct dentry *csio_debugfs_root;
>  static struct scsi_transport_template *csio_fcoe_transport;
>  static struct scsi_transport_template *csio_fcoe_transport_vport;
>  
> -/*
> - * debugfs support
> - */

Please retain this comment - it is needed for the rest of the debugfs code.

> -static int
> -csio_mem_open(struct inode *inode, struct file *file)
> -{
> -	file->private_data = inode->i_private;
> -	return 0;
> -}
> -
>  static ssize_t
>  csio_mem_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
>  {
> @@ -110,7 +100,7 @@ csio_mem_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
>  
>  static const struct file_operations csio_mem_debugfs_fops = {
>  	.owner   = THIS_MODULE,
> -	.open    = csio_mem_open,
> +	.open = simple_open,

It would be nice if you could indent this per the rest of the structure
members. The patch looks good otherwise.

Thanks!
Naresh.


      reply	other threads:[~2012-12-03  6:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-02 11:51 [PATCH -next] [SCSI] csiostor: convert to use simple_open() Wei Yongjun
2012-12-03  6:14 ` Naresh Kumar Inna [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=50BC4334.5040706@chelsio.com \
    --to=naresh@chelsio.com \
    --cc=JBottomley@parallels.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=weiyj.lk@gmail.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /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.