On Thu, 2014-02-20 at 12:27 +0300, Dan Carpenter wrote: > Hi Sagi, > > FYI, there are new smatch warnings show up in > > tree: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git rdma-dif > head: d6fde573f3945ea505afa8bdd962e3f29912190d > commit: 395e9836ce88d45757f862779d630f6aacae4a31 [21/31] Target/sbc: Set protection operation and relevant checks > > drivers/target/target_core_sbc.c:585 sbc_set_prot_op_checks() warn: missing break? reassigning 'cmd->prot_checks' > > git remote add target git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git > git remote update target > git checkout 395e9836ce88d45757f862779d630f6aacae4a31 > vim +585 drivers/target/target_core_sbc.c > > 68ff9b9b Nicholas Bellinger 2013-08-19 569 return TCM_NO_SENSE; > 68ff9b9b Nicholas Bellinger 2013-08-19 570 } > 68ff9b9b Nicholas Bellinger 2013-08-19 571 > 395e9836 Sagi Grimberg 2014-02-19 572 static int > 395e9836 Sagi Grimberg 2014-02-19 573 sbc_set_prot_op_checks(u8 protect, enum target_prot_type prot_type, > 395e9836 Sagi Grimberg 2014-02-19 574 bool is_write, struct se_cmd *cmd) > 395e9836 Sagi Grimberg 2014-02-19 575 { > 395e9836 Sagi Grimberg 2014-02-19 576 if (is_write) { > 395e9836 Sagi Grimberg 2014-02-19 577 cmd->prot_op = protect ? TARGET_PROT_DOUT_PASS : > 395e9836 Sagi Grimberg 2014-02-19 578 TARGET_PROT_DOUT_INSERT; > 395e9836 Sagi Grimberg 2014-02-19 579 switch (protect) { > 395e9836 Sagi Grimberg 2014-02-19 580 case 0x0: > 395e9836 Sagi Grimberg 2014-02-19 581 case 0x3: > 395e9836 Sagi Grimberg 2014-02-19 582 cmd->prot_checks = 0; > 395e9836 Sagi Grimberg 2014-02-19 583 case 0x1: > 395e9836 Sagi Grimberg 2014-02-19 584 case 0x5: > 395e9836 Sagi Grimberg 2014-02-19 @585 cmd->prot_checks = TARGET_DIF_CHECK_GUARD; > 395e9836 Sagi Grimberg 2014-02-19 586 if (prot_type == TARGET_DIF_TYPE1_PROT) > 395e9836 Sagi Grimberg 2014-02-19 587 cmd->prot_checks |= TARGET_DIF_CHECK_REFTAG; > 395e9836 Sagi Grimberg 2014-02-19 588 break; > 395e9836 Sagi Grimberg 2014-02-19 589 case 0x2: > 395e9836 Sagi Grimberg 2014-02-19 590 if (prot_type == TARGET_DIF_TYPE1_PROT) > 395e9836 Sagi Grimberg 2014-02-19 591 cmd->prot_checks = TARGET_DIF_CHECK_REFTAG; > 395e9836 Sagi Grimberg 2014-02-19 592 break; > 395e9836 Sagi Grimberg 2014-02-19 593 case 0x4: > Fixed by Sagi + squashed into the original commit. Thanks DanC! --nab -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html