From patchwork Wed Apr 19 17:39:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9688411 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B8035602DC for ; Wed, 19 Apr 2017 17:39:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADE5E28354 for ; Wed, 19 Apr 2017 17:39:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A28E02841F; Wed, 19 Apr 2017 17:39:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 689F428354 for ; Wed, 19 Apr 2017 17:39:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968501AbdDSRji (ORCPT ); Wed, 19 Apr 2017 13:39:38 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:60262 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966065AbdDSRjh (ORCPT ); Wed, 19 Apr 2017 13:39:37 -0400 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue104 [212.227.15.145]) with ESMTPA (Nemesis) id 0MfIB0-1cgdvx44QU-00OppV; Wed, 19 Apr 2017 19:39:28 +0200 From: Arnd Bergmann To: Matias Bjorling Cc: Arnd Bergmann , =?UTF-8?q?Matias=20Bj=C3=B8rling?= , =?UTF-8?q?Javier=20Gonz=C3=A1lez?= , Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] lightnvm: assume 64-bit lba numbers Date: Wed, 19 Apr 2017 19:39:13 +0200 Message-Id: <20170419173931.3902058-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:HDp2X6iTakL8hOxJL0W9pztbjpHDUghTHbWJIIKri037slQuRGL TtO1NMECG/fVm0kO2ygqVUqOFWw+zulyV/kqvVpNUvz5KqICvOyjDWwFpZyjL07Md2k9m0a kkTByBIfLNXMuZOVgHUnBFg+SGs8JcIhbOwaEYVD2z98s3oPs6Dj1SI/xrZJDsBIKZl/DBP piAqABpbLx5B9zzXcrnIw== X-UI-Out-Filterresults: notjunk:1; V01:K0:4zaTeh/Zwes=:XONZjQpeS9FN8ew57k5IJQ wz4GF16qxtdmDgSDAcZr0vePcURLER0JhpJ2jH46AM4byXQJkOWvWXJ4b8XOx+ho6M3PzQ8G1 bBEsoHnyWAhGVqIkt7MdZg+6LmtI/FdOrjg59qiEbOj6eIWdygV2OBaY9HkQiHAFyrzJTvdH4 zihWq/y8QJkmGfn5LEikrNAR6VQw7/vuqm/u8sN6mm42S7sEMlqw6Lp4xAMeOXV9013Zn+CnN t8MgRgmYU/a7ylg4W5Vy0WNfyy80KZ1FKVBLWC4oCDQtSXrK2bRXja6bJu9j/88bG9oSfX/YB BVrqve+6cu8JxI+ZwApXEe9sbkGjoiiS9/2hqYHPQoBHw+wux3lDKMMtZjqfhrPeUKefHTU3j etoa8Qvlg/inUsQtLZWpbFFMnYT0cguHou19P7FkeGf3ox5l08ag4L7QhpGJ9QRVd1j0/OHet iJc4ZrxmX1eo6AAeNZ3jbj4yUdJGMKkygFa2qywKP9nd/moOaiVefSmwc3h2H7vMU1vSOBpNM TOD2+FaPa3lPLpAtgd/J3o0n9bQI5E68QvHCFGF53tRnmnBALZnBJIU72Aiv7JSaD3qq3EZTd +b3fTsovbazxLS9fj4qaZNS49pt0jZjQtlUVjrVdxByANO/86i60O9TesZfPqiHXmpoE6HBl7 m3c3aaZ1EGb8V6F4zBsBa607fYsovRtuvAxulra69JywnX+Hpkwlqr6sVgbGk3F8ViXM= Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The driver uses both u64 and sector_t to refer to offsets, and assigns between the two. This causes one harmless warning when sector_t is 32-bit: drivers/lightnvm/pblk-rb.c: In function 'pblk_rb_write_entry_gc': include/linux/lightnvm.h:215:20: error: large integer implicitly truncated to unsigned type [-Werror=overflow] drivers/lightnvm/pblk-rb.c:324:22: note: in expansion of macro 'ADDR_EMPTY' As the driver is already doing this inconsistently, changing the type won't make it worse and is an easy way to avoid the warning. Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target") Signed-off-by: Arnd Bergmann --- drivers/lightnvm/pblk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lightnvm/pblk.h b/drivers/lightnvm/pblk.h index c82120ce3be5..11ed7d83f572 100644 --- a/drivers/lightnvm/pblk.h +++ b/drivers/lightnvm/pblk.h @@ -119,7 +119,7 @@ struct pblk_w_ctx { struct bio_list bios; /* Original bios - used for completion * in REQ_FUA, REQ_FLUSH case */ - sector_t lba; /* Logic addr. associated with entry */ + u64 lba; /* Logic addr. associated with entry */ struct ppa_addr ppa; /* Physic addr. associated with entry */ int flags; /* Write context flags */ };