Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] libosd: osd_dev_is_ver1 - Minor API cleanup

define a new osd_dev_is_ver1 that operates on devices
and the old osd_req_is_ver1 uses that new API.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>

authored by

Boaz Harrosh and committed by
James Bottomley
d531b379 0d48fcca

+10 -6
+10 -6
include/scsi/osd_initiator.h
··· 84 84 #endif 85 85 } 86 86 87 + static inline bool osd_dev_is_ver1(struct osd_dev *od) 88 + { 89 + #ifdef OSD_VER1_SUPPORT 90 + return od->version == OSD_VER1; 91 + #else 92 + return false; 93 + #endif 94 + } 95 + 87 96 struct osd_request; 88 97 typedef void (osd_req_done_fn)(struct osd_request *or, void *private); 89 98 ··· 129 120 int async_error; 130 121 }; 131 122 132 - /* OSD Version control */ 133 123 static inline bool osd_req_is_ver1(struct osd_request *or) 134 124 { 135 - #ifdef OSD_VER1_SUPPORT 136 - return or->osd_dev->version == OSD_VER1; 137 - #else 138 - return false; 139 - #endif 125 + return osd_dev_is_ver1(or->osd_dev); 140 126 } 141 127 142 128 /*