Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936633AbdGTUFw (ORCPT ); Thu, 20 Jul 2017 16:05:52 -0400 Received: from mga09.intel.com ([134.134.136.24]:33320 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934471AbdGTUFv (ORCPT ); Thu, 20 Jul 2017 16:05:51 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,384,1496127600"; d="scan'208";a="1174859312" Date: Thu, 20 Jul 2017 16:11:40 -0400 From: Keith Busch To: Martin Wilck Cc: Christoph Hellwig , Sagi Grimberg , Martin Wilck , Johannes Thumshirn , Hannes Reinecke , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, joe@perches.com Subject: Re: [PATCH v3 3/3] nvme: wwid_show: strip trailing 0-bytes Message-ID: <20170720201140.GE1202@localhost.localdomain> References: <20170720163402.17793-1-mwilck@suse.com> <20170720163402.17793-4-mwilck@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170720163402.17793-4-mwilck@suse.com> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 539 Lines: 14 On Thu, Jul 20, 2017 at 06:34:02PM +0200, Martin Wilck wrote: > Some broken targets (such as the current Linux target) pad > model or serial fields with 0-bytes rather than spaces. The > NVME spec disallows 0 bytes in "ASCII" fields. > Thus strip trailing 0-bytes, too. Also make sure that we get no > underflow for pathological input. > > Signed-off-by: Martin Wilck > Reviewed-by: Hannes Reinecke > Acked-by: Christoph Hellwig Looks good. Reviewed-by: Keith Busch