From patchwork Thu Aug 19 09:32:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 499730 Delivered-To: patch@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp347371jab; Thu, 19 Aug 2021 02:37:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTdAzIz0Gu29aTfsb9e6yf0GFumv8EjO9RWFTk/m5ojMb1GSMvtxLi9K3lcHuCSNqNkDtQ X-Received: by 2002:a02:a999:: with SMTP id q25mr12404580jam.16.1629365844573; Thu, 19 Aug 2021 02:37:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629365844; cv=none; d=google.com; s=arc-20160816; b=CcQ9Iq0ORuVVA0mnnVq3yV+O6UTIJdvpngXShxMLArvRJq7PXtzbqqD0buGuNlTzPj 1Ig8laJzojl9uJNWzMyjnr+MjqbQ91bXgSTfNwJ7lOMP7J7FFMyNaNAu5KoVkosa47x3 7mwXaZYlr3uCQAP88P1XxPWvSEvs10+q6qBJKQooi7AZBO1M46p4jD/+lvZyWK0IWC4Y JPFWlPZPrs5h1OG/3OlmCpA3j7nYcSZEDNuvNTEtC8a6hGBa4s1ZAo2gpZvnTB5Vp0gY oeh7Qrn65ym+lWW0eBitahjXihT/DYjlaDSVG3onZGQ4dlWgl6+B5lbO3lLLTBgZX1ue ts+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=21cuijxNyEPP1UWBgTY7xtelPDTBgtPUklCcVKXP3z4=; b=dQE70LCxCehIIccDOqxRgO6xNi67QY40w7VWYhkYZ5pagJpKWM8nEbkSGWo4dnvl0d rE7Y9UwOXhqeJu4su/D1/D7CFC9EDQX5kpI0l5is6iav36bwezZKmo8cWtexen0zAbja T0L7UDEIMFT/kM+SNrnSt+U6f0GYd/S5RCMrn+1tVtbWlbXdxhuqnT5BZn0kwbCSJpzT zt1C6wvK2Bujp773OLhVehmXk769JTThuD4pL8pHvoov3fWRSbJm/V+ApObxiP0EFjhQ CG/+eyfCHJwXqf05/ZURMgUU2yONO9ABAEuXdTV4pdoEQfdeM9vI6qf7DO6BP16pKtDk 5qug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e123si3180791iof.100.2021.08.19.02.37.24 for ; Thu, 19 Aug 2021 02:37:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237721AbhHSJh7 (ORCPT ); Thu, 19 Aug 2021 05:37:59 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3674 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237404AbhHSJh5 (ORCPT ); Thu, 19 Aug 2021 05:37:57 -0400 Received: from fraeml712-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Gr05H3v7hz6D9CX; Thu, 19 Aug 2021 17:36:19 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml712-chm.china.huawei.com (10.206.15.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Thu, 19 Aug 2021 11:37:20 +0200 Received: from localhost.localdomain (10.69.192.58) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Thu, 19 Aug 2021 10:37:18 +0100 From: John Garry To: , , CC: , , , , John Garry Subject: [PATCH v2 2/2] scsi: qla1280: Fix DEBUG_QLA1280 compilation issues Date: Thu, 19 Aug 2021 17:32:29 +0800 Message-ID: <1629365549-190391-3-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1629365549-190391-1-git-send-email-john.garry@huawei.com> References: <1629365549-190391-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org The driver does not compile under DEBUG_QLA1280 flag: - Debug statements expect an integer for printing a SCSI lun value, but its size is 64b. So change SCSI_LUN_32() to cast to an int, as would be expected from a "_32" function. - lower_32_bits() expects %x, as opposed to %lx, so fix that. Also delete ql1280_dump_device(), which looks to have never been referenced. Signed-off-by: John Garry --- drivers/scsi/qla1280.c | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) -- 2.17.1 Reviewed-by: Hannes Reinecke diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index b4f7d8d7a01c..9a7e84b49d41 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -494,7 +494,7 @@ __setup("qla1280=", qla1280_setup); #define CMD_HOST(Cmnd) Cmnd->device->host #define SCSI_BUS_32(Cmnd) Cmnd->device->channel #define SCSI_TCN_32(Cmnd) Cmnd->device->id -#define SCSI_LUN_32(Cmnd) Cmnd->device->lun +#define SCSI_LUN_32(Cmnd) ((int)Cmnd->device->lun) /*****************************************/ @@ -3126,7 +3126,7 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) *dword_ptr++ = cpu_to_le32(lower_32_bits(sg_dma_address(s))); *dword_ptr++ = cpu_to_le32(sg_dma_len(s)); - dprintk(3, "S/G Segment phys_addr=0x%lx, len=0x%x\n", + dprintk(3, "S/G Segment phys_addr=0x%x, len=0x%x\n", (lower_32_bits(sg_dma_address(s))), (sg_dma_len(s))); remseg--; @@ -3985,29 +3985,6 @@ __qla1280_print_scsi_cmd(struct scsi_cmnd *cmd) printk(" underflow size = 0x%x, direction=0x%x\n", cmd->underflow, cmd->sc_data_direction); } - -/************************************************************************** - * ql1280_dump_device - * - **************************************************************************/ -static void -ql1280_dump_device(struct scsi_qla_host *ha) -{ - - struct scsi_cmnd *cp; - struct srb *sp; - int i; - - printk(KERN_DEBUG "Outstanding Commands on controller:\n"); - - for (i = 0; i < MAX_OUTSTANDING_COMMANDS; i++) { - if ((sp = ha->outstanding_cmds[i]) == NULL) - continue; - if ((cp = sp->cmd) == NULL) - continue; - qla1280_print_scsi_cmd(1, cp); - } -} #endif