Received: by 10.223.164.221 with SMTP id h29csp3178064wrb; Fri, 3 Nov 2017 03:04:05 -0700 (PDT) X-Google-Smtp-Source: ABhQp+Rw0UmkjZlisYShq/GlE2GQbwkr/lsOh8l00xKdL73hI6Yf5uQfh9ai5uqvr92d7TUAh/wo X-Received: by 10.159.198.11 with SMTP id f11mr6373197plo.425.1509703444987; Fri, 03 Nov 2017 03:04:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509703444; cv=none; d=google.com; s=arc-20160816; b=gh1AQEWMVzVn6+BYHTzXJqjakN3OgFfk6KmYGjYZUstPZids5/Oq8UcO9V44fKYh4X WPvepl79y+2yw6iUB0EJ3XejDcLFnDzyKGtaJSM6B+UofKAEPQ/T+XnMWNNnXBYTifkn lmthuomHTN5ZlgrMzkAtJEvlsN8d36jKuP+vdFFLEUorrxsJ0RBnkEiXlT9hCwDhJq1S 3jvKE426CB6IivQlV0qgTMfxgj6lj1UoA9Hou/rw/f54gQsM2c9oRTJJuR+eaIdw91WJ dahfEzMHFgmut0Z2z1cQuzdN5ykICRbib7McQVDKvQI0lzbi6Tz0hcb5b3bDyAcTfnvZ 57gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=1O5q9LJXCPEkekp4/EEY92gla8G1Gb6/J45bdpp1CK8=; b=IIir7C6VeD/5hIetrA3N6v93gJG1CtMXI5ZscOZYFqrsyC4d/f+OQEMWBd1jD7ZSUQ RIwytRpjsW8gQU2taNuNkuU7JmO3vu26UtUQ+3pJ7Z3YmOxhnot4leO9QzLsgFQq8a5m bjIVAUi6pwC0PVnNOPiVIBPzEE6+Gd4yH+NZAW1CHc8r0Qp/1b8S7h2Qtdy0Voobs0Dp r7ws7kLZZqS8KmHakGYtvnTSZbfpLSvh5RoudyQAjZcriMGfIF34POglaYJjNMMGOPDq FhVQqJFG/DZxIxSJr0BGJ3PLphWaG5rLdDSPBplZAAuR6hx5Cbt/qF0ZNjZef2AiQhUi ABjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=sYMf8lL2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k4si6103255pgp.422.2017.11.03.03.03.50; Fri, 03 Nov 2017 03:04:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@lightnvm-io.20150623.gappssmtp.com header.s=20150623 header.b=sYMf8lL2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755950AbdKCKDD (ORCPT + 97 others); Fri, 3 Nov 2017 06:03:03 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:51127 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752211AbdKCKC7 (ORCPT ); Fri, 3 Nov 2017 06:02:59 -0400 Received: by mail-wm0-f68.google.com with SMTP id s66so309136wmf.5 for ; Fri, 03 Nov 2017 03:02:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1O5q9LJXCPEkekp4/EEY92gla8G1Gb6/J45bdpp1CK8=; b=sYMf8lL2t5rm5S8ziKNrZxzUW0TkyCJ9dmILj7yckvOkOWfy15gfJZjU+746B0a0Bl 9lKZAMxqJh4adEEF6QDtMDTOU6uCjZl1URS+IzT7hlqk0rYjszZVXhGavew5vVk2zvfK C8XI6nU86X1rY6zGYYs03TqRKQNT8J+iX9rEnKWG2L/sG7jpNFJKxe/x9IcqVnoCW5RR 2vHdUEpWQ5Q5WlLrYaJF+6dIUuClf3D3Uj1ICV7s5VipWsKNcMXAYgyXF5Zk9LuZ7w/G sv9/yJhiyntc4cLXhMMgT1DQESEoWKrFfvMVDLfVis/LREFsc6amYW8C7OrnDlm/bKvz 69MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1O5q9LJXCPEkekp4/EEY92gla8G1Gb6/J45bdpp1CK8=; b=A9hcnBWSzI0xsHoVgHakhYLRd4f6RWtf/ej1qpCuGHiu8njfb2jWgMjHWeDKkribsu D5J6dx5dqXAtH1xMH5RKf4eYxugjrqTe/41gjd5G6GyZF1IDo3EvHdKu5bmyJD6I/Nha Pcge9cBwViekt0w1PUVspx4IzKM8mlx2JlmqkYT13IjoRnrYInwmLXgfmTHSf1oh1UBv 5GkQByDVXBnHJw2AWQpsX0hk+exX8XwLpGZobCcwJcfUn1tPOZt9l2F9qosxd6Pm8nlk raSVk5YTdnAJaK1fmVPCLuQQZdpn0cf9ZFSCwHndyT7PtmQ8q9FEQLoLdyd0s7qjyZky P48Q== X-Gm-Message-State: AMCzsaW5Yj7bcpIwvl2nAhvigodVdYGaEeHcc5gR6WbvI7P+q51ujLIz nD7L8RQN37JGSRweBptSyqYC1Q== X-Received: by 10.80.147.83 with SMTP id n19mr8443940eda.36.1509703377963; Fri, 03 Nov 2017 03:02:57 -0700 (PDT) Received: from uHalley.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id 41sm4837530edz.66.2017.11.03.03.02.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Nov 2017 03:02:57 -0700 (PDT) From: "=?UTF-8?q?Javier=20Gonz=C3=A1lez?=" X-Google-Original-From: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= To: hch@lst.de, sagi@grimberg.me, keith.busch@intel.com Cc: linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Javier=20Gonz=C3=A1lez?= Subject: [PATCH 1/3] nvme: do not check for ns on rw path Date: Fri, 3 Nov 2017 11:02:48 +0100 Message-Id: <1509703370-20379-2-git-send-email-javier@cnexlabs.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509703370-20379-1-git-send-email-javier@cnexlabs.com> References: <1509703370-20379-1-git-send-email-javier@cnexlabs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On the rw path, the ns is assumed to be set. However, a check is still done, inherited from the time the code resided at nvme_queue_rq(). Eliminate this check, which also eliminates a smatch complain for not doing proper NULL checks on ns. Signed-off-by: Javier González --- drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 5a14cc7f28ee..bd1d5ff911c9 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -472,7 +472,7 @@ static inline blk_status_t nvme_setup_rw(struct nvme_ns *ns, * unless this namespace is formated such that the metadata can be * stripped/generated by the controller with PRACT=1. */ - if (ns && ns->ms && + if (ns->ms && (!ns->pi_type || ns->ms != sizeof(struct t10_pi_tuple)) && !blk_integrity_rq(req) && !blk_rq_is_passthrough(req)) return BLK_STS_NOTSUPP; -- 2.7.4 From 1583316170148139358@xxx Mon Nov 06 11:32:46 +0000 2017 X-GM-THRID: 1583308136877745180 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread