From patchwork Wed Jun 15 20:54:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102193 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp50370qgf; Wed, 15 Jun 2016 13:53:38 -0700 (PDT) X-Received: by 10.66.25.133 with SMTP id c5mr724227pag.103.1466024018453; Wed, 15 Jun 2016 13:53:38 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v4si8849578pax.72.2016.06.15.13.53.38 for ; Wed, 15 Jun 2016 13:53:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-scsi-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-scsi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161044AbcFOUxV (ORCPT ); Wed, 15 Jun 2016 16:53:21 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:61193 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752739AbcFOUxS (ORCPT ); Wed, 15 Jun 2016 16:53:18 -0400 Received: from wuerfel.localnet ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue104) with ESMTPSA (Nemesis) id 0LpNe1-1bratt34VR-00fEeU; Wed, 15 Jun 2016 22:53:08 +0200 From: Arnd Bergmann To: "James E.J. Bottomley" , linux-scsi@vger.kernel.org Cc: "Martin K. Petersen" , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] scsi: wd7000: print sector number as 64-bit Date: Wed, 15 Jun 2016 22:54:49 +0200 Message-ID: <4878482.cSGU6mK9NX@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-22-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20160615204231.3784044-1-arnd@arndb.de> References: <20160615204231.3784044-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K0:xVIWmtIDRDVSPHtlToQieGg7ncwEwWlnEC6AgTlUXdBK3tVoz+o y5Bg+XPAxo2SBXVhd/uhoyOhRACVJH8iPmfJ2Yi2DecQSWIHSYorompv9lMTnwmyiFx78cf F8tI8BMy6dpoEwu49WP9euOnuCH7T3KJ4gSmdzpaKKptRs/aoUOeg+TOcNczdC2evTqWgDu wjRP5LLT4/L4v/E4hV/yA== X-UI-Out-Filterresults: notjunk:1; V01:K0:V1OVhINkweQ=:pOauKA5SmwGwrtfd6eiUrD HBvqtoh0JgDvLu/JrCkA54KddPVtsYbuwapXUVE4tU82kELE2Dnv5JJUaRDjQro+N+U4fUvYd WbkHU5xuBJK7TbnIR5tCMRH2cWhmayZJw9RjliLaR27lroUcciAuEXm5BQl75zPfgFmYqDDIm dZvRiXyF2X03X5LRnx1K2F3/uva+s9mYrxfHFxre6fhps9L9d+OcukDhIjboAbCyBAFU0i+yq V+5d3FMzcM/oclku+0yWtaI/HQKZZIb1JIbnXNXNQfxh1tFryuqZ0tmAjYrtStE21IQGwnjK1 K7u7b3FPmUFnDWx/+iGy2FXkSj7D6AA2trl/xKZ4O2xdsPMnIpq5QU+/hrk4kDkmihN3ej01n f4IrLeTrXt4Vz7Y3NcCxyRbft5Vl7sleyUHHw7EURNbaEzk3mSfmCvHTaK9dTHKJuxEl+mMAK vtBhagP/4jj3kUhZVPuR4hgE5YKJT4obYAiqr2Gxo+LVeyLzUNPeGeHmS6qZZ+TeD+tMJl4A5 8W1ZEa+QLHADRE2W2g8i/4F7n4i+ALoKV73KB0/iZvRPJ4vg1eA+cutRrkUYQD/wk2cDpTOAp UXjD1GakMRrhsu3hGlo3/bDVAtMffD/xs5Ult09lxxBp7oPU1QBjpYEqA8PInTgTO8UR/RNxw o62O00QKwVfWL9Y1Fxvj0TwtVspp1k0J4uOrnSktp6h7B+wQhGH+PkbcqCMyjQBjD1edwvayw wYJ8Jk2GxMvdmH28 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Enabling format checking in dprintk() shows that wd7000_biosparam uses an incorrect format string for sector_t: drivers/scsi/wd7000.c: In function 'wd7000_biosparam': drivers/scsi/wd7000.c:1594:21: error: format '%d' expects argument of type 'int', but argument 3 has type 'sector_t {aka long long unsigned int}' [-Werror=format=] As sector_t can be 32-bit wide, this adds a cast to 'u64' and prints that with the correct format. The change to use no_printk() generally helps with finding this kind of hidden format string bug, and I found that when building with "-Wextra", which warned about an empty else clause in } else dprintk("ok!\n"); Signed-off-by: Arnd Bergmann --- Not Cc'ing Miroslav Zagorac , that address bounces with "Requested action not taken: mailbox unavailable invalid DNS MX or A/AAAA resource record" -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/scsi/wd7000.c b/drivers/scsi/wd7000.c index 0c0f17b9a3eb..39a3b5333bd6 100644 --- a/drivers/scsi/wd7000.c +++ b/drivers/scsi/wd7000.c @@ -192,7 +192,7 @@ #ifdef WD7000_DEBUG #define dprintk printk #else -#define dprintk(format,args...) +#define dprintk no_printk #endif /* @@ -1591,8 +1591,8 @@ static int wd7000_biosparam(struct scsi_device *sdev, { char b[BDEVNAME_SIZE]; - dprintk("wd7000_biosparam: dev=%s, size=%d, ", - bdevname(bdev, b), capacity); + dprintk("wd7000_biosparam: dev=%s, size=%lld, ", + bdevname(bdev, b), (s64)capacity); (void)b; /* unused var warning? */ /*