Skip to contentSkip to conversation

: scsi_transport_iscsi.c return -EOVERFLOW for Too many iscsi targets

RFC PATCH Superseded Jaswinder Singh Rajput 2 participants 4 messages May 27, 2009 – Jun 21, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 : scsi_transport_iscsi.c return -EOVERFLOW for Too many iscsi targets

setting err as -EOVERFLOW for Too many iscsi targets.

Also fixes compiler warning for gcc < 4.3.3 :

CC drivers/scsi/scsi_transport_iscsi.o
drivers/scsi/scsi_transport_iscsi.c: In function ‘iscsi_add_session’:
drivers/scsi/scsi_transport_iscsi.c:678: warning: ‘err’ may be used uninitialized in this function

---
 drivers/scsi/scsi_transport_iscsi.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/scsi/scsi_transport_iscsi.c +1 -0
index 0947954..fdcda7f 100644
@@ -693,6 +693,7 @@ int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id)
 						 "Too many iscsi targets. Max "
 						 "number of targets is %d.\n",
 						 ISCSI_MAX_TARGET - 1);
+			err = -EOVERFLOW;
 			goto release_host;
 		}
 	}
Signature · 8 lines
1.6.0.6



--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Acked-by on v1 1/1
#1 lore raw
Quoted 18 lines · Jaswinder Singh Rajput

setting err as -EOVERFLOW for Too many iscsi targets.

Also fixes compiler warning for gcc < 4.3.3 :

CC drivers/scsi/scsi_transport_iscsi.o
drivers/scsi/scsi_transport_iscsi.c: In function ‘iscsi_add_session’:
drivers/scsi/scsi_transport_iscsi.c:678: warning: ‘err’ may be used uninitialized in this function

---
 drivers/scsi/scsi_transport_iscsi.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/scsi/scsi_transport_iscsi.c +0 -0
index 0947954..fdcda7f 100644

drivers/scsi/scsi_transport_iscsi.c int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id) · line 699

Quoted 7 lines
drivers/scsi/scsi_transport_iscsi.c +1 -0
@@ -693,6 +693,7 @@ int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id)
 						 "Too many iscsi targets. Max "
 						 "number of targets is %d.\n",
 						 ISCSI_MAX_TARGET - 1);
+			err = -EOVERFLOW;
 			goto release_host;
 		}
 	}

Fine by me. Send it through whatever tree you guys want.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

PATCH RESEND 1/1 scsi_transport_iscsi.c return -EOVERFLOW for Too many iscsi targets

In reply to Jaswinder Singh Rajput

setting err as -EOVERFLOW for Too many iscsi targets.

Also fixes compiler warning for gcc 4.3.3 and gcc 4.4 :

CC drivers/scsi/scsi_transport_iscsi.o
drivers/scsi/scsi_transport_iscsi.c: In function ‘iscsi_add_session’:
drivers/scsi/scsi_transport_iscsi.c:678: warning: ‘err’ may be used uninitialized in this function

---
 drivers/scsi/scsi_transport_iscsi.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/scsi/scsi_transport_iscsi.c +1 -0
index 0947954..fdcda7f 100644
@@ -693,6 +693,7 @@ int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id)
 						 "Too many iscsi targets. Max "
 						 "number of targets is %d.\n",
 						 ISCSI_MAX_TARGET - 1);
+			err = -EOVERFLOW;
 			goto release_host;
 		}
 	}
Signature · 8 lines
1.6.0.6



--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Acked-by on v1 1/1
#3 lore raw

Re: [SCSI RESEND] scsi_transport_iscsi.c return -EOVERFLOW for Too many iscsi targets

Quoted 18 lines · Jaswinder Singh Rajput

setting err as -EOVERFLOW for Too many iscsi targets.

Also fixes compiler warning for gcc 4.3.3 and gcc 4.4 :

CC drivers/scsi/scsi_transport_iscsi.o
drivers/scsi/scsi_transport_iscsi.c: In function ‘iscsi_add_session’:
drivers/scsi/scsi_transport_iscsi.c:678: warning: ‘err’ may be used uninitialized in this function

---
  drivers/scsi/scsi_transport_iscsi.c |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
drivers/scsi/scsi_transport_iscsi.c +0 -0
index 0947954..fdcda7f 100644

drivers/scsi/scsi_transport_iscsi.c int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id) · line 699

Quoted 7 lines
drivers/scsi/scsi_transport_iscsi.c +1 -0
@@ -693,6 +693,7 @@ int iscsi_add_session(struct iscsi_cls_session *session, unsigned int target_id)
  						 "Too many iscsi targets. Max "
  						 "number of targets is %d.\n",
  						 ISCSI_MAX_TARGET - 1);
+			err = -EOVERFLOW;
  			goto release_host;
  		}
  	}

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html