Re: [PATCH 17/23] scsi_dh_alua: use unique device id

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

 



> +		 * Internal error: TPGS supported by no
> +		 * device identifcation found.
> +		 * Disable ALUA support.

s/by/but/

Also I think the comment could fit into two lines if you try :)

> +	spin_lock(&port_group_lock);
> +	list_for_each_entry(tmp_pg, &port_group_list, node) {
> +		if (tmp_pg->group_id != group_id)
> +			continue;
> +		if (tmp_pg->device_id_size != device_id_size)
> +			continue;
> +		if (strncmp(tmp_pg->device_id_str, device_id_str,
> +			    device_id_size))
> +			continue;
> +		h->pg = tmp_pg;
> +		kref_get(&tmp_pg->kref);
> +		break;
> +	}
> +	spin_unlock(&port_group_lock);

This exact code appears twice in this patch, please factor it into
a helper.

> +	if (device_id_size)
> +		strncpy(pg->device_id_str, device_id_str, 256);
> +	else
> +		pg->device_id_str[0] = '\0';
> +

How could we end up with a zero device ID length?  Shouldn't
have error out earlier on that?

> +	 * Re-check list again to catch
> +	 * concurrent updates
> +	 */

Could fit onto one line..
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux