Received: by 10.223.176.46 with SMTP id f43csp155959wra; Thu, 25 Jan 2018 19:23:40 -0800 (PST) X-Google-Smtp-Source: AH8x22546DM1VGcIk/sm3ezO6rXJWrK3G5prTBhOx8BwSv0MJU+XxhFsa977ikMXmwCSKf0v4t1Z X-Received: by 2002:a17:902:8608:: with SMTP id f8-v6mr13456827plo.366.1516937020085; Thu, 25 Jan 2018 19:23:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516937020; cv=none; d=google.com; s=arc-20160816; b=cLQwb+vtAmexn+R9hDosKt5qw6vUwkDeaMzpRrVYS+76+q7CbF3hsBpiFhokkaETgm mJHTRadUx/4HBYsLltkMhNNKxhKOf8SxFwHfvz57WUZCdZEEOImdn/QfqiPFKBQBLxuE lL6st94kxKAq0oBg3q7wpdW+p9eywhmFDsfQ1fNX1G1k8UHPWdLPM/KxH++Ni1ZRIqWq UM0mSdTDf07ov74wYvPgtT3QGg+lgQ6hJXbIoe+Mm2oD1Lx9eEFvWyXR5o5WMD2HAp+L K8xXo683F7zxIlfwDUEKI5h/WSzPU8Qj2yjqPX1pgcK6DY5q8ylR+wZ4pwtU+mGgIkp7 44Ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:to:references :subject:arc-authentication-results; bh=C/v+wn66cldY3iTJ0AQ3hrQ+PmKwxs5OvLmAep758DI=; b=pOddCjEI7OjX6LVqPEe9WYMrY2H8+3cI/SQG7Wujw9fT6pQxsyeZQDm7n/bQSPypz+ QlZkIJEKsPdCvMna7tj0K6JcqiVcHOPOOQJC3KJuO2Kub51vfkbJU1/iPho8bbhNpmza D/jDD+Y8wxPJi8HuTfRe4SKaCVXDlAsuE2LIl9HeJn+YA/83TZLRzKTbNA0+dYdhQNVL vUq8+A6pM6j9x3JiKtlmGlsxJbBVMonmqTGbF6FwEMuqovePO2bHX5hMKHcsgzKSylpo aXTNsXWOZu4yz/ODFMT0On/mrtq2a+KiPePVE4RU20nMckwoVihaXPNVk5fd7bJxR1I7 yZAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b10si2412932pgr.765.2018.01.25.19.23.25; Thu, 25 Jan 2018 19:23:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751530AbeAZDWM (ORCPT + 99 others); Thu, 25 Jan 2018 22:22:12 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:4704 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751174AbeAZDWK (ORCPT ); Thu, 25 Jan 2018 22:22:10 -0500 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 6ABBB9E5429A4; Fri, 26 Jan 2018 11:21:56 +0800 (CST) Received: from [127.0.0.1] (10.63.195.168) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.361.1; Fri, 26 Jan 2018 11:21:49 +0800 Subject: [PATCH] Fix compile warning with ATA_DEBUG enabled References: <1516936551-20986-1-git-send-email-zhangshaokun@hisilicon.com> To: CC: , "linux-kernel@vger.kernel.org" , Linuxarm From: "dongbo (E)" X-Forwarded-Message-Id: <1516936551-20986-1-git-send-email-zhangshaokun@hisilicon.com> Message-ID: <5be87d13-f9a0-5b12-ced4-cec5d6394da1@huawei.com> Date: Fri, 26 Jan 2018 11:21:49 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <1516936551-20986-1-git-send-email-zhangshaokun@hisilicon.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.63.195.168] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dong Bo This fixs the following comile warnings with ATA_DEBUG enabled, which detected by Linaro GCC 5.2-2015.11: In file included from ./include/linux/printk.h:7:0, from ./include/linux/kernel.h:14, from ./include/asm-generic/bug.h:16, from ./arch/arm64/include/asm/bug.h:37, from ./include/linux/bug.h:5, from ./include/linux/mmdebug.h:5, from ./include/linux/gfp.h:5, from ./include/linux/slab.h:15, from drivers/ata/libata-scsi.c:36: drivers/ata/libata-scsi.c: In function 'ata_scsi_dump_cdb': ./include/linux/kern_levels.h:5:18: warning: format '%d' expects argument of type 'int', but argument 6 has type 'u64 {aka long long unsigned int}' [-Wformat=] #define KERN_SOH "\001" /* ASCII Start Of Header */ ^ ./include/linux/kern_levels.h:11:18: note: in expansion of macro 'KERN_SOH' #define KERN_ERR KERN_SOH "3" /* error conditions */ ^ ./include/linux/libata.h:65:38: note: in expansion of macro 'KERN_ERR' #define DPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ## args) ^ drivers/ata/libata-scsi.c:4284:2: note: in expansion of macro 'DPRINTK' DPRINTK("CDB (%u:%d,%d,%d) %9ph\n", ^ Signed-off-by: Dong Bo --- drivers/ata/libata-scsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 66be961..214ecb6 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -4282,7 +4282,7 @@ static inline void ata_scsi_dump_cdb(struct ata_port *ap, #ifdef ATA_DEBUG struct scsi_device *scsidev = cmd->device; - DPRINTK("CDB (%u:%d,%d,%d) %9ph\n", + DPRINTK("CDB (%u:%u,%u,%lld) %9ph\n", ap->print_id, scsidev->channel, scsidev->id, scsidev->lun, cmd->cmnd); -- 1.9.1 .