From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757312AbcJ3Q5P (ORCPT ); Sun, 30 Oct 2016 12:57:15 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:36540 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757267AbcJ3Q5O (ORCPT ); Sun, 30 Oct 2016 12:57:14 -0400 Subject: Re: [PATCH 1/1] nvdimm: use the right length of "pmem" To: Dan Williams References: <20161029112852.19975-1-nicolas.iooss_linux@m4x.org> Cc: "linux-nvdimm@lists.01.org" , "linux-kernel@vger.kernel.org" From: Nicolas Iooss Message-ID: Date: Sun, 30 Oct 2016 17:57:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/10/16 16:50, Dan Williams wrote: > On Sat, Oct 29, 2016 at 4:28 AM, Nicolas Iooss > wrote: >> In order to test that the name of a resource begins with "pmem", call >> strncmp() with 4 as length instead of 3 to match the whole prefix. >> >> Fixes: 16660eaea0cc ("libnvdimm, namespace: update label implementation >> for multi-pmem") >> Signed-off-by: Nicolas Iooss > > Thanks, although I would not call this out as a fix since the length > parameter could be 1 and still do the right thing. I.e. we're > distinguishing "blk" from "pmem" resources. I'll add this for 4.10 as > a cleanup. All right. Thanks for your quick reply! Nicolas