Re: [PATCH 3/4] target: Move core_scsi3_check_cdb_abort_and_preempt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 23 November 2011 06:20:53 -0500, Christoph Hellwig wrote:
> 
> > +static int core_scsi3_check_cdb_abort_and_preempt(
> > +	struct list_head *preempt_and_abort_list,
> > +	struct se_cmd *cmd)
> > +{
> 
> Can you renamed it to target_check_cdb_and_preempt, switch it to a
> proper bool return value and normal prototype stye while you're at it?
> 
> Also it doesn't need a _safe list walk.

Will do that in patch 4 - I like to split moving code and functional
changes, so the latter stick out more.

> static bool target_check_cdb_abort_and_preempt(struct list_head *list,
> 		struct se_cmd *cmd)
> {
> 	struct t10_pr_registration *reg;
> 
> 	list_for_each_entry(reg, list, pr_reg_abort_list) {
> 		if (reg->pr_res_key == cmd->pr_res_key)
> 			return false;
> 	}
> 
> 	return true;
> }

Jörn

-- 
Maintenance in other professions and of other articles is concerned with
the return of the item to its original state; in Software, maintenance
is concerned with moving an item away from its original state.
-- Les Belady
--
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


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux