From 70630a843be439dd0aeecce747352c5519cdcc9d Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Mon, 30 Jun 2008 09:50:27 +0000 Subject: [PATCH] Fixes few harmless issues: 1. The #define on line 228 of iscsi-scst/usr/isns.c triggers a compiler warning on ppc. 2. make iscsi && sudo make iscsi_install triggers the following error message (2.6.22.17 kernel, ppc), but doesn't break installation: ... install: cannot stat `usr/iscsi-scst-adm': No such file or directory ... 3. Unneeded "unlikely" removed Issues 1 and 2 reported by Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@425 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/Makefile | 2 +- iscsi-scst/usr/isns.c | 6 +++--- scst/src/scst_lib.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/iscsi-scst/Makefile b/iscsi-scst/Makefile index 245ae74d9..c406b2f99 100644 --- a/iscsi-scst/Makefile +++ b/iscsi-scst/Makefile @@ -35,7 +35,7 @@ include/iscsi_scst_itf_ver.h: include/iscsi_scst.h install: all @install -vD usr/iscsi-scstd $(DISTDIR)/usr/local/sbin/iscsi-scstd - -@install -vD usr/iscsi-scst-adm $(DISTDIR)/usr/local/sbin/iscsi-scst-adm +# -@install -vD usr/iscsi-scst-adm $(DISTDIR)/usr/local/sbin/iscsi-scst-adm if [ -f /etc/debian_version ]; then \ install -vD -m 755 etc/initd/initd.debian $(DISTDIR)/etc/init.d/iscsi-scst; \ elif [ -f /etc/redhat-release ]; then \ diff --git a/iscsi-scst/usr/isns.c b/iscsi-scst/usr/isns.c index 62091bea9..039d8d9ca 100644 --- a/iscsi-scst/usr/isns.c +++ b/iscsi-scst/usr/isns.c @@ -216,7 +216,7 @@ static int isns_scn_deregister(char *name) } #if __BYTE_ORDER == __LITTLE_ENDIAN -#define set_scn_flag(x) \ +#define correct_scn_flag_endiannes(x) \ { \ x = (x & 0x55555555) << 1 | (x & 0xaaaaaaaa) >> 1; \ x = (x & 0x33333333) << 2 | (x & 0xcccccccc) >> 2; \ @@ -225,7 +225,7 @@ static int isns_scn_deregister(char *name) x = (x & 0x0000ffff) << 16 | (x & 0xffff0000) >> 16; \ } #else -#define set_scn_flag(x) (x) +#define correct_scn_flag_endiannes(x) { } #endif static int isns_scn_register(void) @@ -258,7 +258,7 @@ static int isns_scn_register(void) scn_flags = ISNS_SCN_FLAG_INITIATOR | ISNS_SCN_FLAG_OBJECT_REMOVE | ISNS_SCN_FLAG_OBJECT_ADDED | ISNS_SCN_FLAG_OBJECT_UPDATED; - set_scn_flag(scn_flags); + correct_scn_flag_endiannes(scn_flags); scn_flags = htonl(scn_flags); length += isns_tlv_set(&tlv, ISNS_ATTR_ISCSI_SCN_BITMAP, diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 619d747b8..a1da67ac9 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -1902,7 +1902,7 @@ int scst_get_cdb_info(struct scst_cmd *cmd) cmd->op_flags = ptr->flags; res = (*ptr->get_trans_len)(cmd, ptr->off); - if (unlikely(cmd->bufflen == 0)) { + if (cmd->bufflen == 0) { /* * According to SPC bufflen 0 for data transfer commands isn't * an error, so we need to fix the transfer direction.