Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752674AbbGWJgc (ORCPT ); Thu, 23 Jul 2015 05:36:32 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:36592 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751173AbbGWJgY (ORCPT ); Thu, 23 Jul 2015 05:36:24 -0400 Date: Thu, 23 Jul 2015 02:36:18 -0700 From: Christoph Hellwig To: Spencer Baugh Cc: "Nicholas A. Bellinger" , "open list:TARGET SUBSYSTEM" , "open list:TARGET SUBSYSTEM" , open list , Joern Engel , Spencer Baugh , Brian Bunker Subject: Re: [PATCH] target: add support for START_STOP_UNIT SCSI opcode Message-ID: <20150723093618.GA5382@infradead.org> References: <1437516477-30554-1-git-send-email-sbaugh@catern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437516477-30554-1-git-send-email-sbaugh@catern.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1332 Lines: 40 On Tue, Jul 21, 2015 at 03:07:53PM -0700, Spencer Baugh wrote: > +static sense_reason_t > +sbc_emulate_startstop(struct se_cmd *cmd) > +{ > + unsigned char *cdb = cmd->t_task_cdb; > + > + /* From SBC-3: > + * Immediate bit should be set since there is nothing to complete > + * POWER CONDITION MODIFIER 0h > + */ Mot of the target code mentions the exact document and section, e.g. drivers/target/target_core_alua.c: * See sbc3r35 section 5.23 drivers/target/target_core_sbc.c: * Set Thin Provisioning Enable bit following sbc3r22 in section drivers/target/target_core_sbc.c: * From sbc3r22.pdf section 5.48 XDWRITEREAD (10) command Also if you fix thing up anyway the Linux style is to keep the opening "/*" on a separate line. > + if (!(cdb[1] & 1) || (cdb[2] | cdb[3])) > + return TCM_INVALID_CDB_FIELD; The mix of || and | here is odd, why not just: if (!(cdb[1] & 1) || cdb[2] || cdb[3]) > + if (!(cdb[4] & 1) || ((cdb[4] & 2) | (cdb[4] & 4))) Same here. But except for this nitpicking the patch looks good: Reviewed-by: Christoph Hellwig -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/