Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp274483imm; Fri, 21 Sep 2018 14:13:25 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYOny9H6YaZ/yODi/7BA+vPEqrhVV0ubKU45xcXoBZzS4X2QYbH7ME+zIBDGqqnfAXcxWjp X-Received: by 2002:a63:e806:: with SMTP id s6-v6mr6149662pgh.176.1537564405617; Fri, 21 Sep 2018 14:13:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537564405; cv=none; d=google.com; s=arc-20160816; b=zoIsI0cz1zqHKp1lH/N+8VWCoWqu4aErrcHQ43h1B+Gh7hcOcw9bdR4lRwdOmbsTUq nDwWrQZYnwqk6NA/zXYwdtmKCZpNffxXgjLH5Cn7yv61vKnHZbkcfwPfmeYYvmz+FR/X bc+3doDzGR4eE8+p9fr98jQVzptzbq9vrSsGmdM4GNLpOsJV0XbQihskGnPrnkrtWLYg BXogbQFip8CH9A8q46NjPtQQgBq3g37MkB3MtGg1hWB4U/EP0HPZ089Z7soWmdxvL55D JC6M0O6A7r0H29NtGOrxqbVhTw6kykb0HxeoLRuHJ77aaPpzJbAyZRaSn906f0RHRidP F/uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to; bh=45aExDHXXw/Xr2/KK7TgcZPEW5rZO1/q0guxY+cCwXc=; b=eQKBhTehSVXTRpYqmBRRpdQ6Th/qbPHWihCHQEtNX5CvGSATlY5PZ6lVi3SPmLoU9r b64/5hU2urA6TI/DgDwEcnQoTM3OhStlG1icNIBYcPTjtkCNyaXeoeG1yh62AMUQtB83 zNUrfrU7ZNEKHA8DIGSbU2Y9Zm1dDQpES8r/OIMVdADmLFrB5guu8K+7ha8JEfec0GiX 5wZeH0eFow3Zyl0SY+LXz0dnhXbVQfNTDVqqHAYGKpuiXi8LAy7/cX9ssrL7ikkymcDC yviKw4zndRB/gTumFOkbB/6YHjO1SVDP2uGqL/Lf4/XVFmGghRcZHr4/oR8RsA0KNgKV EJnQ== ARC-Authentication-Results: i=1; mx.google.com; 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 w8-v6si30297696plk.222.2018.09.21.14.13.10; Fri, 21 Sep 2018 14:13:25 -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; 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 S2391543AbeIVDDM (ORCPT + 99 others); Fri, 21 Sep 2018 23:03:12 -0400 Received: from ale.deltatee.com ([207.54.116.67]:46532 "EHLO ale.deltatee.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391398AbeIVDDL (ORCPT ); Fri, 21 Sep 2018 23:03:11 -0400 Received: from guinness.priv.deltatee.com ([172.16.1.162]) by ale.deltatee.com with esmtp (Exim 4.89) (envelope-from ) id 1g3Sik-0003Nx-Gs; Fri, 21 Sep 2018 15:12:15 -0600 To: Bjorn Helgaas Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-nvme@lists.infradead.org, linux-rdma@vger.kernel.org, linux-nvdimm@lists.01.org, linux-block@vger.kernel.org, Stephen Bates , Christoph Hellwig , Keith Busch , Sagi Grimberg , Bjorn Helgaas , Jason Gunthorpe , Max Gurtovoy , Dan Williams , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , Benjamin Herrenschmidt , Alex Williamson , =?UTF-8?Q?Christian_K=c3=b6nig?= , Jens Axboe References: <20180913001156.4115-1-logang@deltatee.com> <20180913001156.4115-5-logang@deltatee.com> <20180921161858.GH224714@bhelgaas-glaptop.roam.corp.google.com> From: Logan Gunthorpe Message-ID: <736867f3-8b3e-2e8f-1929-60e5e3cba2b5@deltatee.com> Date: Fri, 21 Sep 2018 15:12:10 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180921161858.GH224714@bhelgaas-glaptop.roam.corp.google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 172.16.1.162 X-SA-Exim-Rcpt-To: axboe@kernel.dk, christian.koenig@amd.com, alex.williamson@redhat.com, benh@kernel.crashing.org, jglisse@redhat.com, dan.j.williams@intel.com, maxg@mellanox.com, jgg@mellanox.com, bhelgaas@google.com, sagi@grimberg.me, keith.busch@intel.com, hch@lst.de, sbates@raithlin.com, linux-block@vger.kernel.org, linux-nvdimm@lists.01.org, linux-rdma@vger.kernel.org, linux-nvme@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, helgaas@kernel.org X-SA-Exim-Mail-From: logang@deltatee.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on ale.deltatee.com X-Spam-Level: X-Spam-Status: No, score=-8.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, GREYLIST_ISWHITE autolearn=ham autolearn_force=no version=3.4.1 Subject: Re: [PATCH v6 04/13] PCI/P2PDMA: Introduce configfs/sysfs enable attribute helpers X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on ale.deltatee.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-09-21 10:18 a.m., Bjorn Helgaas wrote: > It'd be sort of nice if the contents of the sysfs file were valid > things you could put *back* into it. But it looks like the contents > might be "none", which isn't valid for the store. And the contents > are never "on" or "off". In fact, "none" would be accepted by strtobool() as a false (seeing it starts with 'n' and strtobool() only looks at the first character). However, per the rest of your feedback I've changed show() to report "0", "1" or pci_name() and dropped "auto". This matches what the other strtobool configfs attributes are doing in NVMe target. Logan