diff mbox series

scsi: target: Remove unused argument of some functions

Message ID 20210913083045.3670648-1-fengli@smartx.com (mailing list archive)
State Accepted
Commit 7e642ca0375b95072ab6240c8eb9f0b4f013fb24
Headers show
Series scsi: target: Remove unused argument of some functions | expand

Commit Message

Li Feng Sept. 13, 2021, 8:30 a.m. UTC
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(-)

Comments

Himanshu Madhani Sept. 13, 2021, 2:56 p.m. UTC | #1
> 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
Martin K. Petersen Sept. 15, 2021, 3:41 a.m. UTC | #2
Li,

> The se_cmd is unused in these functions, just remove it.

Applied to 5.16/scsi-staging, thanks!
Martin K. Petersen Sept. 22, 2021, 4:45 a.m. UTC | #3
On Mon, 13 Sep 2021 16:30:45 +0800, Li Feng wrote:

> The se_cmd is unused in these functions, just remove it.
> 
> 

Applied to 5.16/scsi-queue, thanks!

[1/1] scsi: target: Remove unused argument of some functions
      https://git.kernel.org/mkp/scsi/c/7e642ca0375b
diff mbox series

Patch

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;