Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1464878ybx; Thu, 31 Oct 2019 10:58:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqx3eR00szlQ75w9FAmFBm/V4bC/ueHhF/BrjsPB8vFa1VrzkynfK//epAxyK5RMZrzZAIuV X-Received: by 2002:a50:91c4:: with SMTP id h4mr7732911eda.36.1572544719615; Thu, 31 Oct 2019 10:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572544719; cv=none; d=google.com; s=arc-20160816; b=dwtcnTiKXjTci54+GZvcL5iLDddRytkiOG15q7GgaeBYYdBSuufaplXNdikMwaUkhk tK9HD3fYYOsxkmSVSf3NfUqkJEcf18ln3TC6ag52Ymkc9hpQrCP+JWJa5C/QEFogLGu3 svJ9Nnv69ghLz6ovX+C0ftIGk+3ZL+YXPnbu1EuwGID27AgcsEB7qwjnGf6yvhWbT9gY C438osHHdu9gVQGrHxE52rtfpwCiEzupaxteSFnh9+5WvPUEdZ2hPHGbZBfU/XCVe/Tk Nw996QZhPnURisM+Dh5jHEFHeFGRgxCCzjg9XfmdxGXGuX8KphR7+NRWuYPYS9DYs3uC INBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=kz/FCtj2PF4gxBdcIEXsfbI3RO9QLhbBmTNUon1wjBw=; b=C+uFnlSPUBpIsB9t0oe4yRaUTDwCQfwBL4bk07sbHKrH4mjVjLDo/4bRGe516aiOzQ PUsHBFxDjPFSvMIWAINKFxf3+gAe9tkJXb42oVjcdvt0U+c8M9IP9GOApo4X0PxiEQ+G QplDi8IFlOaWzml1xIhGSvjqMcLQ0Hc8iDVmCOgBlXdEbyOsjKGMBNztA0duZDPlW7BB DehD1y8rqAZOlvr3HferJL6/UnnJUN/+Me8zGWtVCWPbYgmzoJx2m6rzKb04oQ19YS8c 8nFGbtb2rmJwPHQUfmuvX4Zd2fpp5Gm5qRzxJyDMSE8Jk+owkG+y3aEXgYmfKR+I1FN1 v7tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=EST86sBD; 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 k18si5013774edj.94.2019.10.31.10.58.14; Thu, 31 Oct 2019 10:58:39 -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=fail header.i=@gmail.com header.s=20161025 header.b=EST86sBD; 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 S1729174AbfJaRya (ORCPT + 99 others); Thu, 31 Oct 2019 13:54:30 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:40879 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726602AbfJaRya (ORCPT ); Thu, 31 Oct 2019 13:54:30 -0400 Received: by mail-pf1-f195.google.com with SMTP id r4so4862345pfl.7; Thu, 31 Oct 2019 10:54:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=kz/FCtj2PF4gxBdcIEXsfbI3RO9QLhbBmTNUon1wjBw=; b=EST86sBDiClx5CY1TbLmQF3b5slqCpp8BgmFv4VLc7H8M+gWS4n0FyV7tJl/SNCedP x+RIjeA/vG/S844grBTtcbmvcnGfRwRgmdoeUSOCuvmE+08qpPH2Uew7FU/IbFCTaNXV NpOGNwzYATmj3M6w2DDZ86mwPurmvgfdrfNEb96YHl6L+leWAc3qLdpRuuod4c22wjbZ dbUTVnX4+UJkxWXqRXIFlGytjAhwWnqjf5mYXYr11Z9rB+b6yF1fgfpPI7azzX29zQ1x SwZE+rDreClmrLI3TroX6/PZGpkboSq9KsDv1ati/aajpk7JNZBDXS2U5Ed8zkFTM/Kz dc/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=kz/FCtj2PF4gxBdcIEXsfbI3RO9QLhbBmTNUon1wjBw=; b=Zw3ydVs4mPPVGreKYSAOPbJPczc/UpOsqj2vLifZRouQthVSFDvlydlsKoF2YXISM8 1upCHH/AoGzNslJWL1UIIm/dPJl0VLP132H/39FLIIozp5GAYexsO2KmtXNXJIhc1wzZ gR6zuF7zP9dvAYyF2q85a4adCOw40J/nir/DU1jV55VMe4s+EtIIW0cl1hlw21GMzj/G EgK0hAgkUKFp4qVH2vBmx74IATBkBU/FLu5FZrIcSZfQ6TTxRzV25D5PzgskWe04WeYR jvx3uVNrkxxitkSyPzlZSmIvjnR2g/9KMoksZ4Rq486RTXREuo+gkCwVOV8bqwGU3R5d QsBQ== X-Gm-Message-State: APjAAAUERY3z1V10ECJa85Wi4RbCR6yGPqUu938DZNtJ0qCIdYM2hM0h CV/kmjYsiaVwV94kbt7aeHY= X-Received: by 2002:a63:1a46:: with SMTP id a6mr7805345pgm.3.1572544467672; Thu, 31 Oct 2019 10:54:27 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id j7sm3523599pgl.38.2019.10.31.10.54.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Oct 2019 10:54:26 -0700 (PDT) Date: Thu, 31 Oct 2019 10:54:25 -0700 From: Guenter Roeck To: Christoph Hellwig Cc: Akinobu Mita , Keith Busch , Jens Axboe , Sagi Grimberg , LKML , linux-nvme@lists.infradead.org, Linux PM , Chris Healy Subject: Re: [PATCH v2] nvme: Add hardware monitoring support Message-ID: <20191031175425.GA25602@roeck-us.net> References: <20191029223214.18889-1-linux@roeck-us.net> <20191031134549.GB4763@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191031134549.GB4763@lst.de> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 31, 2019 at 02:45:49PM +0100, Christoph Hellwig wrote: > On Wed, Oct 30, 2019 at 07:20:37PM -0700, Guenter Roeck wrote: > >> The nvme_init_identify() can be called multiple time in nvme ctrl's > >> lifetime (e.g 'nvme reset /dev/nvme*' or suspend/resume paths), so > >> should we need to prevent nvme_hwmon_init() from registering hwmon > >> device more than twice? > >> > >> In the nvme thermal zone patchset[1], thernal zone is registered in > >> nvme_init_identify and unregistered in nvme_stop_ctrl(). > >> > > > > Doesn't that mean that the initialization should happen in nvme_start_ctrl() > > and not here ? > > I think calling it from nvme_init_identify is fine, it just needs to > be in the "if (!ctrl->identified)" section of that function. Excellent, I'll do that. Thanks a lot for the hint! Guenter