[SCSI] libfc: rport debug messages were printing pointer values
authorJoe Eykholt <jeykholt@cisco.com>
Tue, 25 Aug 2009 21:01:39 +0000 (14:01 -0700)
committerJames Bottomley <James.Bottomley@suse.de>
Thu, 10 Sep 2009 17:07:45 +0000 (12:07 -0500)
Don't print large negative decimal numbers for frame pointers in
the debug messages from fc_rport_error().  Just print 0 if its a
frame pointer, and print the error numbers as positive.

Signed-off-by: Joe Eykholt <jeykholt@cisco.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/libfc/fc_rport.c

index cbf6c9f233cae65eefe320feeeaef7bdeffd5c07..6ecf36d4708c0a8cc2623f3c6bc37b23cd535830 100644 (file)
@@ -436,7 +436,8 @@ static void fc_rport_timeout(struct work_struct *work)
 static void fc_rport_error(struct fc_rport_priv *rdata, struct fc_frame *fp)
 {
        FC_RPORT_DBG(rdata, "Error %ld in state %s, retries %d\n",
-                    PTR_ERR(fp), fc_rport_state(rdata), rdata->retries);
+                    IS_ERR(fp) ? -PTR_ERR(fp) : 0,
+                    fc_rport_state(rdata), rdata->retries);
 
        switch (rdata->rp_state) {
        case RPORT_ST_PLOGI: