Message ID | 20170415185553.16098-15-matias@cnexlabs.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-block-owner@kernel.org> 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 42A0460138 for <patchwork-linux-block@patchwork.kernel.org>; Sat, 15 Apr 2017 18:59:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3560C25223 for <patchwork-linux-block@patchwork.kernel.org>; Sat, 15 Apr 2017 18:59:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2A26528305; Sat, 15 Apr 2017 18:59:22 +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,DKIM_SIGNED, DKIM_VALID,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 C268325223 for <patchwork-linux-block@patchwork.kernel.org>; Sat, 15 Apr 2017 18:59:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755926AbdDOS7I (ORCPT <rfc822;patchwork-linux-block@patchwork.kernel.org>); Sat, 15 Apr 2017 14:59:08 -0400 Received: from mail-dm3nam03on0041.outbound.protection.outlook.com ([104.47.41.41]:38016 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755634AbdDOS4u (ORCPT <rfc822;linux-block@vger.kernel.org>); Sat, 15 Apr 2017 14:56:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cnexlabs.onmicrosoft.com; s=selector1-cnexlabs-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=B1U14oN1pJM200er8QsCLLNE74Bu586inJMv/2Dejaw=; b=VpyfX4x5BaHjqS/7IroqFov5MeslQ8O1njkOqZ8BMN7q9lw2hZjWEIfHRdUnsipbM9iLTkQmXRxIS4X1p6fkVCb0mXOzCGhyIo+k5xFuHpVKAk5u92bGBA87zwlwKF1sjw1zsxyxPOiMrAFAXEnq5wSioRqSkPQckNHz+gl324U= Authentication-Results: fb.com; dkim=none (message not signed) header.d=none; fb.com; dmarc=none action=none header.from=cnexlabs.com; Received: from skyninja.cnexlabs.com (193.106.164.211) by CY4PR06MB2774.namprd06.prod.outlook.com (10.175.117.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1034.10; Sat, 15 Apr 2017 18:56:32 +0000 From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= <matias@cnexlabs.com> To: <axboe@fb.com> CC: <linux-block@vger.kernel.org>, <linux-kernel@vger.kernel.org>, =?UTF-8?q?Javier=20Gonz=C3=A1lez?= <jg@lightnvm.io>, =?UTF-8?q?Javier=20Gonz=C3=A1lez?= <javier@cnexlabs.com>, =?UTF-8?q?Matias=20Bj=C3=B8rling?= <matias@cnexlabs.com> Subject: [GIT PULL 14/19] lightnvm: fix type checks on rrpc Date: Sat, 15 Apr 2017 20:55:48 +0200 Message-ID: <20170415185553.16098-15-matias@cnexlabs.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170415185553.16098-1-matias@cnexlabs.com> References: <20170415185553.16098-1-matias@cnexlabs.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [193.106.164.211] X-ClientProxiedBy: AM5PR0701CA0069.eurprd07.prod.outlook.com (10.169.145.159) To CY4PR06MB2774.namprd06.prod.outlook.com (10.175.117.142) X-MS-Office365-Filtering-Correlation-Id: 9d06f901-ad76-4539-4268-08d4843122fb X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:CY4PR06MB2774; X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2774; 3:nL8a+o49yQdmZCd7EwZW9oBwrZjSA/ff6nu2ydSBEefnt8VOkh/dABd3w2duiix8Cvi+BoOyacMwLq9gamES4SrdJNzn9L+o2L2EgzGqb2HsqM9rmu6h2oc+/TyVBb13Druy7Sroq+ndpLYTQm0HNHVZiymvWJ5uKgcbWzdhIbwPZjB8rJPBzqJ6gQKe4RSmVpx/izmkCx4msL4/lIgFArqcdcK8zqu+WdevDjVrh2lrkEYXzZeSA8/LkKvZKEgHDSWoH1/M1zutCChdk5w6VVY4n/izOUdFprzYHcToQ+DlQr4Js/6vZ2PmfGRzpwwGWogMuw6+JeEVz6q+cE728Q==; 25:ytu/Miqbkqph090UfFUY/+a16c+Y1s4vAEiSawMSFIEUq1FhRPk4bXj/I54YuE25K+bcsMAwL7tIqoVaSw0I03RbkRBsH5vwOneH4nNz6tjFBq6gU4yCRsgKZ2KD6oVWYZzDrxQXigFfG/G7a/fvL6gNTFdHRHQQWXoLOJjAlyGpmU638TU7y2yo2Di9JscMk0+JUlnqYXw/RAf8RDYIlr2eIB5tDiiGqvXt5qVie1X1WxKQcK15fT1gNaE12lmcudUH7kXqGFhswzNF/hYpT8b6fuAO4LGqB5cKhGjBOftWWMmIxyAZinwsW59tizfWNj1QPKW4kb8Z+BrB6GjqFXNAZehzWT6wApU8pPwSnlQeN2uvcjlu7hjlg1dvVYnPzyx/jGOpkDsPTATcTfILTDxH0oYhSj+NTbmqcHJIZ5I9zzTVL/jrlYe5215K6wsL X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2774; 31:WZTSmh24kBArhk8QWkMgQqcos8rat7LRsLheYTWDOdg4nkGtgpGT/q8mILoqcO/SKpOSXveWOBWiJDVeXF9BgNT/VV6gzcA6VIo31ylyylJvI1uZDV5jJtT4edBe8UsHAgR15A9B4yxrb5xvZUh0Xf3wzxvPsdfwy5WVy3mKBu8jTh7B7TfCV6TlzvL558SuNoy8BO5P7gQGp3HGKDvOJzoZig7UVUBl7kt7633kK1I=; 20:gPvjgk5XK4TJZEtGbrXcMZZP4H6H2cS8i2E9NweSaoBjuGH4n5jmwwK7A1oXmmkO/Kms88tPFSOjcV2E1W14IS1Jt8ZT7tTEm2c5A6DGqT7LvUnXtVNi1DJCggOiuhmIZKr0XRpJGv5ThtCOkjduPqrOA2KDBGDhqep9egtc6rY= X-Microsoft-Antispam-PRVS: <CY4PR06MB27741F49FB15F407409BDC4DBA040@CY4PR06MB2774.namprd06.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(6041248)(20161123564025)(20161123562025)(20161123560025)(201703131423075)(201703061421075)(20161123555025)(6072148); SRVR:CY4PR06MB2774; BCL:0; PCL:0; RULEID:; SRVR:CY4PR06MB2774; X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2774; 4:xlbFuLxirC5/mJq0CCl59gUo07Kl6DUdXRWFBCta1qool8Bx3ye/45GGt/JdJizuDuX4SRPqD8DjsMQfxeLmfWYIoeaMZAMLbQevWvSUs9T6L3/uuPrx+SeAubgWda/ZvJlT0EOevQxv/RXlfMEjIYPuu+qGk4m4bQ3Pibrt/7iImIgBWVpC8WJbykL39LlLLBY9BsiOA342+1vZzcssAHxU6adwJmaS2vQkGoF7iybD3avnEOoPkbl3fPyF+N2wzUkkk5Zs5knEvf8BcVaDtLdx/a7/+218Fj3BziMLlAmC93U+N0bIDcHcbr23ORWMonNyxlv8asNlwymShqcMK+iSo68+gLBj9+TE2rTvydN6uEtF9NnS924AHuFzxzcm3ruiEEqOSM5WBMGQo9ipS774eY7+Uxj9c2PkAbt0zpWvLT7pO7ggzo1p+oNUmE2s+hPupVtivWtLApL3qnz/EJNcHs0BQ0X+AB3stBZ9qy4ggscdRICrn5LUs1LrbXF5lrxzqyaPM0dJkK6Gx659Jlq+P52QGf0+8NTVOOGPfgTl88YxBGK8+DTEBLbZj1fJ2ceta1tcF1Cf7gH1lYQI/lLGwGJRGkbTZzPcFQCDSV6QrdhkWsGIeH0/yBBVbGSeJUb1w9hpc2fQD/sBHEWZg4mNHRc5h0v4um/hPZSn50c= X-Forefront-PRVS: 02788FF38E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39400400002)(39450400003)(86362001)(575784001)(305945005)(1076002)(6916009)(6666003)(25786009)(2950100002)(6486002)(2906002)(3846002)(6116002)(2870700001)(54906002)(189998001)(53936002)(53416004)(107886003)(110136004)(5660300001)(38730400002)(50986999)(76176999)(2351001)(4326008)(66066001)(5820100001)(23676002)(81166006)(47776003)(42186005)(36756003)(33646002)(50226002)(8676002)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR06MB2774; H:skyninja.cnexlabs.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjA2TUIyNzc0OzIzOmR1WC9SRVZ4Z0Z5aEo2VTVRb1lydVZNMW1s?= =?utf-8?B?Q3h5S3FXWjkyQ1JWdkNqaTJoQmlySWFScXY1Yk4yYlBQUG9kMEQrWnU1aTlP?= =?utf-8?B?eTF6K0ljVWppUERPZkh2NWczc0F3anB3VVM3YUx0QzBRaUZ3bEx0ZVludFpk?= =?utf-8?B?R09VREFYVmxhemYvbVUxZWpoRkdxUGpBWG5iRloyTldBTDR5cDJ4YlhCUTRp?= =?utf-8?B?WGR3WmJrYmhIcnpCMnNrTm84V2VFbEFUWEtROXY2REEzWWtrcEs3U0V5dlZz?= =?utf-8?B?RGxmd2pPTisraHpDZXVxS2tZWEsvUlc1UkEyOUdsVmZjVWlWQmV1ZWNiV1ln?= =?utf-8?B?TGNlMXBuU2pOSzlVQzh0WVR3YW4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-8?B?WnVhYWpiSWd0UlllWE13SnV5R2tmbmgyblovMEpkU24yNWp1UGF3RWpyUVlB?= =?utf-8?B?MEpFRXFhU0NibkJFQXQvSktxdVNCZEhLU1FISDR6OTIyaWJ3NmZVeVIrUWVL?= =?utf-8?Q?gBZLQpjS?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2774; 6:f28it4XtVwYdd9P9IdqSxp7PAjnh5ctKCRjFQ47gnvQ3EGkpe9igc6G/CWY0y1mtAVePeN4UMBZUWJQ/DbTKMa4JBC8R8oAe8Zm1YD1cUAl0JJSwojoUFDtUI4iMRlnQJJ+nJiR3AUsmdO1uQTnrnDxYh44F1QV9oF6QmiA3f2fqpcBe0kjDQ+PqfNze+gqx4SJK48/FbDCNMdwe1Tm7YFeoBNoh6XnfPo4p74661krFikmKWNVS5pKaa93x0LmBsVM+p1my8ojHy571YWkEXBCBt6adzMhxjgbvTsaCQMq7FkaEvaNa19TioevFicCZu421pTKmnX0yUdr9C98pmN/NW+gO+4+wYTYinhdQKbu/HPBmthg8m29aQpNqXHfLAzCQDZprES01F/MuuVLY0ffMWI6gpheBn2r9NGmD8H3kp+Eh+NlqMGsNkSPi3giZdSWUCIe34WBww94FGlh75g==; 5:i8BqkmmsPo4377H6XjMaRu9o9zsTfcM/R63tKSDNkGDd2LZy5LHDLRqDbD07YbfJdLn+4HCMaDXT6QCutkn7sxrK1GHeIMnEr8nnvU14UrjZ96R+EG6rce3AlQtnDhP9tDA7jENiPxrdVmH9gb6UuQ==; 24:zlLbC86U00RSNeItZ6R5usKsLxzOdPD0N/chssuLO5+7/8kZrJCf/ZXHRdYkzY3OiJdTPgc2AXIflsp2EsBD4L+G27eh0p5tIz2lnU6/JGg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR06MB2774; 7:qgYs37wVWlXNi/y9RBq6F6TY69SK6uD9xc8cA56dbthr+EQ0EBGG8dN91LrSjhRcEfn7owb9RDel5kATUm55uAYiAOd7xoZ0KlQSnIMmmOTc9RdUWWK+mn0/iMFwLH2VTQZhqNa6esKhY3ZkObbEHtikPEOdb0AkGVz38VsOyfAiQeHqCeyJgRhoa2SwamWlHaJKtaCDc1r/dYqaRavsRo/eHoetJ7SurBLomfqqVEHrlu1xdzpwoI3MLOZK5mYKdGPRVOehQjoIezTUDp3AdHeBeMM6GGSkSJ0y+bXeRZfFP+4nHGrK91xkoOfuJjxjEB8KBO2Il2qj1fOxgxbaGg== X-OriginatorOrg: cnexlabs.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2017 18:56:32.9498 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR06MB2774 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: <linux-block.vger.kernel.org> X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c index 5dba544..cf0e28a 100644 --- a/drivers/lightnvm/rrpc.c +++ b/drivers/lightnvm/rrpc.c @@ -817,7 +817,7 @@ static int rrpc_read_ppalist_rq(struct rrpc *rrpc, struct bio *bio, for (i = 0; i < npages; i++) { /* We assume that mapping occurs at 4KB granularity */ - BUG_ON(!(laddr + i >= 0 && laddr + i < rrpc->nr_sects)); + BUG_ON(!(laddr + i < rrpc->nr_sects)); gp = &rrpc->trans_map[laddr + i]; if (gp->rblk) { @@ -846,7 +846,7 @@ static int rrpc_read_rq(struct rrpc *rrpc, struct bio *bio, struct nvm_rq *rqd, if (!is_gc && rrpc_lock_rq(rrpc, bio, rqd)) return NVM_IO_REQUEUE; - BUG_ON(!(laddr >= 0 && laddr < rrpc->nr_sects)); + BUG_ON(!(laddr < rrpc->nr_sects)); gp = &rrpc->trans_map[laddr]; if (gp->rblk) {