Skip to content

Commit

Permalink
target: Change sbc_emulate_noop to return sense_reason_t
Browse files Browse the repository at this point in the history
As reported by Fengguang Wu + 0 day build team, the sense_reason_t conversion
in for-next did not catch the recent sbc_emulate_noop() addition in mainline,
producing the following build warning in auto-next:

drivers/target/target_core_sbc.c: In function ‘sbc_parse_cdb’:
drivers/target/target_core_sbc.c:555: warning: assignment from incompatible pointer type

Go ahead and remove duplicate sbc_emulate_verify(), and change VERIFY to
use sbc_emulate_noop() as well.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
Nicholas Bellinger committed Nov 8, 2012
1 parent 314da1a commit 1920ed6
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/target/target_core_sbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,7 @@ int spc_get_write_same_sectors(struct se_cmd *cmd)
EXPORT_SYMBOL(spc_get_write_same_sectors);

static sense_reason_t
sbc_emulate_verify(struct se_cmd *cmd)
{
target_complete_cmd(cmd, GOOD);
return 0;
}

static int sbc_emulate_noop(struct se_cmd *cmd)
sbc_emulate_noop(struct se_cmd *cmd)
{
target_complete_cmd(cmd, GOOD);
return 0;
Expand Down Expand Up @@ -540,7 +534,7 @@ sbc_parse_cdb(struct se_cmd *cmd, struct sbc_ops *ops)
break;
case VERIFY:
size = 0;
cmd->execute_cmd = sbc_emulate_verify;
cmd->execute_cmd = sbc_emulate_noop;
break;
case REZERO_UNIT:
case SEEK_6:
Expand Down

0 comments on commit 1920ed6

Please sign in to comment.