From patchwork Mon Mar 4 19:39:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 159571 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp4138467jad; Mon, 4 Mar 2019 11:39:41 -0800 (PST) X-Google-Smtp-Source: APXvYqxtqly1CRXjEvBfSmN6LEWtsivKftH15Uu+pCejHuNIP+FQi91/JXCX5LEss8ZMu7cIuHYC X-Received: by 2002:a63:7503:: with SMTP id q3mr18712802pgc.98.1551728381450; Mon, 04 Mar 2019 11:39:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551728381; cv=none; d=google.com; s=arc-20160816; b=ixeUSLxvUpPGCJuwVDMO/KNPnpIZqOigSR7lxn9aylj2WyiK+kbDCclH3JR4zjZnCa hTlQmgBzvtAw80ZvS7EZUMvO5KTuIk3Q3KsXn1jcbYEhBKOak1tFAGy82DKNmLMMoAI7 gZkeGyhCrmbu0m/OSIjTuJUdo5Mw7iUaEA3gczAoOka7lGxw9ujEe33esrZUflI2GWwU RGTLkXLjh0849sviRNDnpGpVS3o1XHtYp9hCAdlUZQWr7b306hbMgHhZf5Upw0KMsKO9 IajMeeJaxukvID6duYPk1BDMLdmb1i7UXNN+riLu+qW02czCb+OJ/q1eBKdlpOFPieWI Eiaw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=FeF9bEXXNtpkTRZ5ze2bFpQtsbEKTskqLiMX7ONdOes=; b=mMu3fPDtSl0WmjcyWGqPykGSjIuNQPzQjX9qrOHS0WzcXnpQAn/Y/ckaIL7tRdJyPM mNfe+dNiz9g5gZQDOmrPQFZ4tm836dMq4ChjHRepdD79mAtofAt5U1+GCCpaKy77hbt9 cVQ5qpVvOVtcTwKiLMrIKbt9UECrIDQCkyUkM8BLWqDujG0Gxc/6syCVtQiRJ+3/1oaG 5ZDB1f/7+/nY9Y53XJnENOYXn6FtIuDWwHoEjpILAHbeW91n1NmRxQzhCBGTvI6PC26J sEze889lfBexnh4WYsYB0hOZcUVVmyUOtewygPTUwN2IEYxCH+iWppsf28Y7IL8a7qvF XejQ== 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 g1si6066253plo.418.2019.03.04.11.39.41; Mon, 04 Mar 2019 11:39:41 -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 S1726318AbfCDTjj (ORCPT + 31 others); Mon, 4 Mar 2019 14:39:39 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:45461 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726249AbfCDTji (ORCPT ); Mon, 4 Mar 2019 14:39:38 -0500 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.129]) with ESMTPA (Nemesis) id 1MI5YN-1gmoP211Xz-00FBn2; Mon, 04 Mar 2019 20:39:27 +0100 From: Arnd Bergmann To: James Smart , Dick Kennedy , "James E.J. Bottomley" , "Martin K. Petersen" Cc: Arnd Bergmann , Hannes Reinecke , Colin Ian King , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] scsi: lpfc: fix 32-bit format string warning Date: Mon, 4 Mar 2019 20:39:09 +0100 Message-Id: <20190304193917.702601-2-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190304193917.702601-1-arnd@arndb.de> References: <20190304193917.702601-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:+fIGMcSmqHKn1OJVorNl9fjA9KSVkCozrlL8TIyirlZAvTTYnSj cfEhuN3COW99I6N5vqKXi5KIfpO2EQA69ich3mmlE10eK35IiKrXLRH1rKhUj/lWELLbTYR QusSilWesSP3fD4Mx17r71YWl8EUoqNqffqTze8Sa4dY4HwDjdRD9nb03zEtH+sGeQTd+Sd xkTwx6wwSvVz1+OxM3ahg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:edIvNvmKp6E=:htxy/QU3Lu5H+T3ONDZ9HK q+TbU7E9zmz0/ltpDOf36LqeWjJmM0THO6N9Wxf2CHTyqCnNk229s5plNlhyHnrJCJXueC44D zb09c+wU/zZvNIHaTVMEbGM1swr/UgjJ4XM/7ZsJcIszl3KxarV02lwwKCC1v4KZxz04/QJpR MpyU9xMPJy0TX9eec3BFAFb3emk0pddcWw+SZvUbjxcY0GVtwascEtwN9TTGa6Q6+fb+4bscY BlgEz+NjJstt+7qZQ4qhXIDrr3iIL9y3BBL1g969nFZIAtPUoQw/dlJb/WJN3LDVFPHLwumFh meIKKxd90l112sVk4e+5l7pDHDLvE3vq1CWlBE1ZaoC0zcqdlZBm1FLHue4tTvZHV/2d0CjZa DKY8DIog1ox4wHHg4qtShueu4QTD6sW/H+WHsucokM1SKPcMJ277Fkhx6B1L8e7/cgJMXoK49 Wz3EMt8dPacZdTEKj8UuHW9OHt3lKNhdoOPkoDDXM0NNmm9xY9dhcFmRkzBUKDNEj6ZT1rgs1 iKSLG968fOqHqZ+oSk9ttAjy0N5op8YHSq6KtILAT/wInP4eS7PTg789LY+r2QXARtv9/VMm5 VqD+ve9tmEtx92vFmTGh/RAzeTYwwkG8q6dWZRj49WH0LbXHz+R1L9xSjJWLD0s1lwRa2gBIZ 8wa9943LxehbeC9Cl4E3q/aVJn9pREl+M2m0hVCD7boybp41PJ5XpU6a5aZTsXS+HeF6BN36o q43QO6B+SGKpjoUZyKTRkZAS1F9SCiC2QdQ++A== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 32-bit architectures, we see a warning when %ld is used to print a size_t: In file included from drivers/scsi/lpfc/lpfc_init.c:62: drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_new_io_buf': drivers/scsi/lpfc/lpfc_logmsg.h:62:45: error: format '%ld' expects argument of type 'long int', but argument 5 has type 'unsigned int' [-Werror=format=] This is harmless, but portable code should just use %zd to avoid the warning. Fixes: 0794d601d174 ("scsi: lpfc: Implement common IO buffers between NVME and SCSI") Signed-off-by: Arnd Bergmann --- drivers/scsi/lpfc/lpfc_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0 diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c index 3b5873f6751e..6e6bd1b3237d 100644 --- a/drivers/scsi/lpfc/lpfc_init.c +++ b/drivers/scsi/lpfc/lpfc_init.c @@ -4090,7 +4090,7 @@ lpfc_new_io_buf(struct lpfc_hba *phba, int num_to_alloc) /* Sanity check to ensure our sizing is right for both SCSI and NVME */ if (sizeof(struct lpfc_io_buf) > LPFC_COMMON_IO_BUF_SZ) { lpfc_printf_log(phba, KERN_ERR, LOG_FCP, - "6426 Common buffer size %ld exceeds %d\n", + "6426 Common buffer size %zd exceeds %d\n", sizeof(struct lpfc_io_buf), LPFC_COMMON_IO_BUF_SZ); return 0;