From patchwork Wed Mar 19 12:35:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Finn Thain X-Patchwork-Id: 3862271 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B3E2C9F334 for ; Wed, 19 Mar 2014 23:30:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B3647201ED for ; Wed, 19 Mar 2014 23:30:56 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 94B2B201DE for ; Wed, 19 Mar 2014 23:30:55 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQPv7-0006Iv-5p; Wed, 19 Mar 2014 23:29:14 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQPua-0004yf-QQ; Wed, 19 Mar 2014 23:28:40 +0000 Received: from kvm5.telegraphics.com.au ([98.124.60.144]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQPtt-0004rE-Fb for linux-arm-kernel@lists.infradead.org; Wed, 19 Mar 2014 23:27:59 +0000 Received: by kvm5.telegraphics.com.au (Postfix, from userid 502) id 69EA1286E5; Wed, 19 Mar 2014 19:27:39 -0400 (EDT) Message-Id: <20140319123518.052427772@telegraphics.com.au> User-Agent: quilt/0.50-1 Date: Wed, 19 Mar 2014 23:35:21 +1100 From: Finn Thain To: "James E.J. Bottomley" , Subject: [PATCH v2 05/12] scsi/NCR5380: fix build failures when debugging is enabled References: <20140319123516.542623278@telegraphics.com.au> Content-Disposition: inline; filename=ncr5380-debug-macros-build-failures X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140319_192757_585865_473F14E1 X-CRM114-Status: GOOD ( 10.62 ) X-Spam-Score: -0.4 (/) Cc: Sam Creasey , linux-m68k@vger.kernel.org, Russell King , Michael Schmitz , linux-kernel@vger.kernel.org, Joe Perches , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, DATE_IN_PAST_06_12, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The change from cmd->target to cmd->device->id was apparently the purpose of commit a7f251228390e87d86c5e3846f99a455517fdd8e in kernel/git/tglx/history.git but some instances have been missed. Also fix the "NDEBUG_LAST_WRITE_SENT" and "NDEBUG_ALL" typo's. Also fix some format strings (%ul becomes %lu) that caused compiler warnings. Signed-off-by: Finn Thain --- Changes since v1: - Fixed a build failure in sun3_NCR5380.c with NDEBUG_LISTS. --- drivers/scsi/NCR5380.c | 14 +++++++------- drivers/scsi/sun3_NCR5380.c | 10 +++------- 2 files changed, 10 insertions(+), 14 deletions(-) Index: linux-m68k/drivers/scsi/sun3_NCR5380.c =================================================================== --- linux-m68k.orig/drivers/scsi/sun3_NCR5380.c 2014-03-19 23:23:02.000000000 +1100 +++ linux-m68k/drivers/scsi/sun3_NCR5380.c 2014-03-19 23:34:42.000000000 +1100 @@ -1012,12 +1012,8 @@ static void NCR5380_main (struct work_st for (tmp = (struct scsi_cmnd *) hostdata->issue_queue, prev = NULL; tmp; prev = tmp, tmp = NEXT(tmp) ) { -#if (NDEBUG & NDEBUG_LISTS) if (prev != tmp) - printk("MAIN tmp=%p target=%d busy=%d lun=%d\n", - tmp, tmp->target, hostdata->busy[tmp->target], - tmp->lun); -#endif + dprintk(NDEBUG_LISTS, ("MAIN tmp=%p target=%d busy=%d lun=%d\n", tmp, tmp->device->id, hostdata->busy[tmp->device->id], tmp->device->lun)); /* When we find one, remove it from the issue queue. */ /* ++guenther: possible race with Falcon locking */ if ( @@ -1049,7 +1045,7 @@ static void NCR5380_main (struct work_st */ MAIN_PRINTK("scsi%d: main(): command for target %d " "lun %d removed from issue_queue\n", - HOSTNO, tmp->target, tmp->lun); + HOSTNO, tmp->device->id, tmp->device->lun); /* * REQUEST SENSE commands are issued without tagged * queueing, even on SCSI-II devices because the @@ -2587,7 +2583,7 @@ static void NCR5380_reselect (struct Scs hostdata->connected = tmp; RSL_PRINTK("scsi%d: nexus established, target = %d, lun = %d, tag = %d\n", - HOSTNO, tmp->target, tmp->lun, tmp->tag); + HOSTNO, tmp->device->id, tmp->device->lun, tmp->tag); } Index: linux-m68k/drivers/scsi/NCR5380.c =================================================================== --- linux-m68k.orig/drivers/scsi/NCR5380.c 2014-03-19 23:34:41.000000000 +1100 +++ linux-m68k/drivers/scsi/NCR5380.c 2014-03-19 23:34:42.000000000 +1100 @@ -1046,7 +1046,7 @@ static void NCR5380_main(struct work_str for (tmp = (Scsi_Cmnd *) hostdata->issue_queue, prev = NULL; tmp; prev = tmp, tmp = (Scsi_Cmnd *) tmp->host_scribble) { if (prev != tmp) - dprintk(NDEBUG_LISTS, ("MAIN tmp=%p target=%d busy=%d lun=%d\n", tmp, tmp->target, hostdata->busy[tmp->target], tmp->lun)); + dprintk(NDEBUG_LISTS, ("MAIN tmp=%p target=%d busy=%d lun=%d\n", tmp, tmp->device->id, hostdata->busy[tmp->device->id], tmp->device->lun)); /* When we find one, remove it from the issue queue. */ if (!(hostdata->busy[tmp->device->id] & (1 << tmp->device->lun))) { if (prev) { @@ -1064,7 +1064,7 @@ static void NCR5380_main(struct work_str * On failure, we must add the command back to the * issue queue so we can keep trying. */ - dprintk(NDEBUG_MAIN|NDEBUG_QUEUES, ("scsi%d : main() : command for target %d lun %d removed from issue_queue\n", instance->host_no, tmp->target, tmp->lun)); + dprintk(NDEBUG_MAIN|NDEBUG_QUEUES, ("scsi%d : main() : command for target %d lun %d removed from issue_queue\n", instance->host_no, tmp->device->id, tmp->device->lun)); /* * A successful selection is defined as one that @@ -2028,7 +2028,7 @@ static int NCR5380_transfer_dma(struct S hostdata->flags &= ~FLAG_CHECK_LAST_BYTE_SENT; if (NCR5380_read(TARGET_COMMAND_REG) & TCR_LAST_BYTE_SENT) { hostdata->flags |= FLAG_HAS_LAST_BYTE_SENT; - dprintk(NDEBUG_LAST_WRITE_SENT, ("scsi%d : last bit sent works\n", instance->host_no)); + dprintk(NDEBUG_LAST_BYTE_SENT, ("scsi%d : last byte sent works\n", instance->host_no)); } } } else { @@ -2454,7 +2454,7 @@ static void NCR5380_information_transfer NCR5380_transfer_pio(instance, &phase, &len, &data); if (!cmd->device->disconnect && should_disconnect(cmd->cmnd[0])) { NCR5380_set_timer(hostdata, USLEEP_SLEEP); - dprintk(NDEBUG_USLEEP, ("scsi%d : issued command, sleeping until %ul\n", instance->host_no, hostdata->time_expires)); + dprintk(NDEBUG_USLEEP, ("scsi%d : issued command, sleeping until %lu\n", instance->host_no, hostdata->time_expires)); return; } break; @@ -2466,7 +2466,7 @@ static void NCR5380_information_transfer break; default: printk("scsi%d : unknown phase\n", instance->host_no); - NCR5380_dprint(NDEBUG_ALL, instance); + NCR5380_dprint(NDEBUG_ANY, instance); } /* switch(phase) */ } /* if (tmp * SR_REQ) */ else { @@ -2474,7 +2474,7 @@ static void NCR5380_information_transfer */ if (!cmd->device->disconnect && time_after_eq(jiffies, poll_time)) { NCR5380_set_timer(hostdata, USLEEP_SLEEP); - dprintk(NDEBUG_USLEEP, ("scsi%d : poll timed out, sleeping until %ul\n", instance->host_no, hostdata->time_expires)); + dprintk(NDEBUG_USLEEP, ("scsi%d : poll timed out, sleeping until %lu\n", instance->host_no, hostdata->time_expires)); return; } } @@ -2595,7 +2595,7 @@ static void NCR5380_reselect(struct Scsi do_abort(instance); } else { hostdata->connected = tmp; - dprintk(NDEBUG_RESELECTION, ("scsi%d : nexus established, target = %d, lun = %d, tag = %d\n", instance->host_no, tmp->target, tmp->lun, tmp->tag)); + dprintk(NDEBUG_RESELECTION, ("scsi%d : nexus established, target = %d, lun = %d, tag = %d\n", instance->host_no, tmp->device->id, tmp->device->lun, tmp->tag)); } }