Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753845AbdDKPTo (ORCPT ); Tue, 11 Apr 2017 11:19:44 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:10575 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752845AbdDKPTl (ORCPT ); Tue, 11 Apr 2017 11:19:41 -0400 X-IronPort-AV: E=Sophos;i="5.37,186,1488816000"; d="scan'208";a="106135956" From: Bart Van Assche To: "mb@lightnvm.io" , "jg@lightnvm.io" CC: "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "javier@cnexlabs.com" Subject: Re: [PATCH v5] lightnvn: pblk Thread-Topic: [PATCH v5] lightnvn: pblk Thread-Index: AQHSstBSrGBHLAx/GkuxADFxT3b2B6HASG2A Date: Tue, 11 Apr 2017 15:19:36 +0000 Message-ID: <1491923975.2654.4.camel@sandisk.com> References: <1491921077-9377-1-git-send-email-javier@cnexlabs.com> In-Reply-To: <1491921077-9377-1-git-send-email-javier@cnexlabs.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: lightnvm.io; dkim=none (message not signed) header.d=none;lightnvm.io; dmarc=none action=none header.from=sandisk.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [63.163.107.100] x-microsoft-exchange-diagnostics: 1;CY1PR0401MB1533;7:WVfqS082qWMa2G7NfrtaheC4+BsINr2J3z6BPVhUT9V1CHAofVWemrG9A2cqi4jBMP9ivoH8kbvnc9ZmKNISz2LMnYnmnG5Vg8a9C672850hPCk61ICnyuo3D1+37krZUkJ4pmtb92D3FxRaym0NU8WVfoUjE3FOn2TjmCh4fHTd8/TRkpn5DZvr0nJnKKMZk6RQkCSEdbMBzQGeKhwYcKwje6Yl10jeOBe5ARXWRmf5wtFV0YnpZwxKywuIsR+ZBd4GqD/bpcNJ8CiFX72eqpV6jJbB5qnvHCiQI2URvwU9hqtoWMiDWCaluZDwAwE5stw3vk21R3achicbmhFpOg==;20:HoRUDPM/QLaoEJD4F4ddfh1PKVcun4YhsSTZZQE9KCbtTpKifMARVW1gs1dsTOaPWDZyrGa7TkdWXh1zFy8yJ6+5TA6aG8EabZO3c+vmWKYVcJNzmntaBzNqaM/ifYq+khI8AaKqPsNR7Kh5zYA4dRb/PgBzxTbV8FbY4klxw34= x-ms-office365-filtering-correlation-id: 521ae30b-f691-4095-629d-08d480ee2a08 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254075)(48565401081)(201703131423075)(201703031133081);SRVR:CY1PR0401MB1533; wdcipoutbound: EOP-TRUE x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(20558992708506); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(20161123564025)(20161123560025)(20161123555025)(20161123562025)(6072148);SRVR:CY1PR0401MB1533;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0401MB1533; x-forefront-prvs: 0274272F87 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39850400002)(39860400002)(39840400002)(39450400003)(39400400002)(39410400002)(24454002)(51914003)(377424004)(6116002)(102836003)(3846002)(5660300001)(305945005)(122556002)(4326008)(86362001)(229853002)(189998001)(38730400002)(2501003)(25786009)(66066001)(54356999)(2906002)(99286003)(53936002)(6506006)(7736002)(8676002)(3660700001)(6486002)(103116003)(3280700002)(6436002)(6512007)(2950100002)(966004)(6246003)(8936002)(81166006)(6306002)(77096006)(36756003)(2900100001)(33646002)(76176999)(50986999);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR0401MB1533;H:CY1PR0401MB1536.namprd04.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-ID: <933650B8A3CF294196F76865B8EBFD13@namprd04.prod.outlook.com> MIME-Version: 1.0 X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Apr 2017 15:19:36.0756 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0401MB1533 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v3BFKDFu028142 Content-Length: 846 Lines: 30 On Tue, 2017-04-11 at 16:31 +0200, Javier Gonz?lez wrote: > Changes since v4: > * Rebase on top of Matias' for-4.12/core > * Fix type implicit conversions reported by sparse (reported by Bart Van > Assche) > * Make error and debug statistics long atomic variables. Hello Javier, Thanks for the quick respin. But have you already had a look at the diagnostics reported by smatch? Smatch reports e.g. drivers/lightnvm/pblk-rb.c:783: pblk_rb_tear_down_check() error: we previously assumed 'rb->entries' could be null (see line 779) on the following code: if (rb->entries) goto out; for (i = 0; i < rb->nr_entries; i++) { entry = &rb->entries[i]; if (entry->data) goto out; } Is that "if (rb->entries)" check correct or should that perhaps been "if (!rb->entries)"? Smatch is available at http://repo.or.cz/w/smatch.git. Bart.