linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Himanshu Madhani <himanshu.madhani@oracle.com>
To: Li Feng <fengli@smartx.com>
Cc: Martin Petersen <martin.petersen@oracle.com>,
	"open list:SCSI TARGET SUBSYSTEM" <linux-scsi@vger.kernel.org>,
	"open list:SCSI TARGET SUBSYSTEM" <target-devel@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scsi: target: Remove unused argument of some functions
Date: Mon, 13 Sep 2021 14:56:54 +0000	[thread overview]
Message-ID: <A621E579-9D72-4C26-9F40-BB132CCD5A90@oracle.com> (raw)
In-Reply-To: <20210913083045.3670648-1-fengli@smartx.com>



> On Sep 13, 2021, at 3:30 AM, Li Feng <fengli@smartx.com> wrote:
> 
> The se_cmd is unused in these functions, just remove it.
> Signed-off-by: Li Feng <fengli@smartx.com>
> ---
> drivers/target/target_core_xcopy.c | 14 ++++++--------
> 1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/target/target_core_xcopy.c b/drivers/target/target_core_xcopy.c
> index d4fe7cb2bd00..6bb20aa9c5bc 100644
> --- a/drivers/target/target_core_xcopy.c
> +++ b/drivers/target/target_core_xcopy.c
> @@ -295,8 +295,7 @@ static int target_xcopy_parse_target_descriptors(struct se_cmd *se_cmd,
> 	return -EINVAL;
> }
> 
> -static int target_xcopy_parse_segdesc_02(struct se_cmd *se_cmd, struct xcopy_op *xop,
> -					unsigned char *p)
> +static int target_xcopy_parse_segdesc_02(struct xcopy_op *xop, unsigned char *p)
> {
> 	unsigned char *desc = p;
> 	int dc = (desc[1] & 0x02);
> @@ -332,9 +331,9 @@ static int target_xcopy_parse_segdesc_02(struct se_cmd *se_cmd, struct xcopy_op
> 	return 0;
> }
> 
> -static int target_xcopy_parse_segment_descriptors(struct se_cmd *se_cmd,
> -				struct xcopy_op *xop, unsigned char *p,
> -				unsigned int sdll, sense_reason_t *sense_ret)
> +static int target_xcopy_parse_segment_descriptors(struct xcopy_op *xop,
> +				unsigned char *p, unsigned int sdll,
> +				sense_reason_t *sense_ret)
> {
> 	unsigned char *desc = p;
> 	unsigned int start = 0;
> @@ -362,7 +361,7 @@ static int target_xcopy_parse_segment_descriptors(struct se_cmd *se_cmd,
> 		 */
> 		switch (desc[0]) {
> 		case 0x02:
> -			rc = target_xcopy_parse_segdesc_02(se_cmd, xop, desc);
> +			rc = target_xcopy_parse_segdesc_02(xop, desc);
> 			if (rc < 0)
> 				goto out;
> 
> @@ -840,8 +839,7 @@ static sense_reason_t target_parse_xcopy_cmd(struct xcopy_op *xop)
> 	 */
> 	seg_desc = &p[16] + tdll;
> 
> -	rc = target_xcopy_parse_segment_descriptors(se_cmd, xop, seg_desc,
> -						    sdll, &ret);
> +	rc = target_xcopy_parse_segment_descriptors(xop, seg_desc, sdll, &ret);
> 	if (rc <= 0)
> 		goto out;
> 
> -- 
> 2.31.1
> 

Looks fine. 

Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>

--
Himanshu Madhani	 Oracle Linux Engineering


  reply	other threads:[~2021-09-13 14:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13  8:30 [PATCH] scsi: target: Remove unused argument of some functions Li Feng
2021-09-13 14:56 ` Himanshu Madhani [this message]
2021-09-15  3:41 ` Martin K. Petersen
2021-09-22  4:45 ` Martin K. Petersen

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=A621E579-9D72-4C26-9F40-BB132CCD5A90@oracle.com \
    --to=himanshu.madhani@oracle.com \
    --cc=fengli@smartx.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=target-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).