Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360260
b: refs/heads/master
c: 4d24834
h: refs/heads/master
v: v3
  • Loading branch information
Martin K. Petersen authored and James Bottomley committed Feb 24, 2013
1 parent 879b03e commit 346587e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9d2696e658ef4f209955ddaa987d43f1a1bd81a1
refs/heads/master: 4d24834dfd25f2dab5977241cd5a6662edde92f7
4 changes: 2 additions & 2 deletions trunk/include/scsi/scsi_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ static inline unsigned int scsi_host_dif_capable(struct Scsi_Host *shost, unsign
SHOST_DIF_TYPE2_PROTECTION,
SHOST_DIF_TYPE3_PROTECTION };

if (target_type > SHOST_DIF_TYPE3_PROTECTION)
if (target_type >= ARRAY_SIZE(cap))
return 0;

return shost->prot_capabilities & cap[target_type] ? target_type : 0;
Expand All @@ -887,7 +887,7 @@ static inline unsigned int scsi_host_dix_capable(struct Scsi_Host *shost, unsign
SHOST_DIX_TYPE2_PROTECTION,
SHOST_DIX_TYPE3_PROTECTION };

if (target_type > SHOST_DIX_TYPE3_PROTECTION)
if (target_type >= ARRAY_SIZE(cap))
return 0;

return shost->prot_capabilities & cap[target_type];
Expand Down

0 comments on commit 346587e

Please sign in to comment.