Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp170410pxb; Thu, 30 Sep 2021 03:40:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwa+Zckf7QoHDkDBITRq2z0HhkuFhuexrWq3hOHpNs6kzbWJY1o661fLz20lTE5WIlP8N/4 X-Received: by 2002:a50:e046:: with SMTP id g6mr6215406edl.296.1632998420727; Thu, 30 Sep 2021 03:40:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632998420; cv=none; d=google.com; s=arc-20160816; b=N/ZWrBJvE81VzTU22s959vDQLNfVeVdroshc5YbE9+NUk9RurCM9jtB3Sn0ZOlDA5w odq/qYaXk0IXUsrbJHiNBovXbDYe6ID+FxOl8HHpWc6k8nf6Gy36d/G72cmempjmtsbq 8aaRkxdKwzA1w0PapNUqr/76csDaQ4EvtJs1vuwRf95Wh+oSeJEqcNXop9ce4k9u1wdf BLdoLHW/JMGgd5ZyLNVHRmftEG8ZaMBVc+P9b6hQDd4t5w6ziYBouBhevjtYynsF1VwC OIfSxkbPGbBwJEVB3yR+k3G/P80cC3uVzQD5x0jLegDSoVBExw51oPtcQXmSW2TzAguw sFIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=791k1dCYnBwj6qh9NyFd6tnYYhaFD9tuqv9gadUQ6dQ=; b=CENYWwRMhxFb+Eg/hpyGxJpTDT1sP9K8EMBCpYKEQMvF3kujnvBiXc/ZgYrs2q3diN WfeUKOcW40302KZkitGoomyBSlwG67a9eT4+lSUr8eZOoTFkl3d4oAyLLPjy4N6Is+NR kW4ys8kT+Y3+IEznZkeQe5lAz4qmAj/sSiuifi/dzbOcyYot3guC7+pY4/AVsRSNQ16A eZ0KwpWlS3Ihr0xMrsUi8PNIzE4Up6XEQRyBYGc15SoukOhu6Sb/gnXvV6SNOEbszmxV haJ3WPrJ3f9HtwH43C0PdkCOztEr9cU1hbH30xZ3MCn+WVgcqoKkS92+bXq5txIEJoAW /1dA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b25si2876455ejl.496.2021.09.30.03.39.56; Thu, 30 Sep 2021 03:40:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349959AbhI3KjV (ORCPT + 99 others); Thu, 30 Sep 2021 06:39:21 -0400 Received: from mail-oi1-f169.google.com ([209.85.167.169]:46954 "EHLO mail-oi1-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349928AbhI3KjU (ORCPT ); Thu, 30 Sep 2021 06:39:20 -0400 Received: by mail-oi1-f169.google.com with SMTP id s69so6619895oie.13; Thu, 30 Sep 2021 03:37:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=791k1dCYnBwj6qh9NyFd6tnYYhaFD9tuqv9gadUQ6dQ=; b=keAo38l35U+Sl/ieQvcKxHju+dNVkpr6ZgNsiFonZgmdyNCqdDq81/NDxnVDzDAru8 pYgQEJ4i0JMv+JQk8uUDDfV5xANp2PcwP2RUXdZDdguBzoxiuNSdWJSxKlmT2UhdMbs5 EuzGVmZhR7Mnxvqd7oSRMPME28zaU6TLCUFYytphlsbUjsqJBpoyfed8uB5HWbM2NdGr 7RU6XgJx2kw8ZngRBFPmuURDrdylMdW2n/SbJZy9GsgZseVwmo6DeB4QaPK/ETXuWYy7 xzniA9sb+yeW6nAd5XGZZ++PxvX/fvhrjM9bIOOfEblMn8okVvj766AcDKmySUCdhn2Z zZHw== X-Gm-Message-State: AOAM531G8Q0ZlvEoH9yBNztYqFmRGCna4H26BbprisnD2xWTp7qFpcba 2QRRQ0vrZh3uYG6qQ1WyC5k4CaWgiQmeQsowHnY= X-Received: by 2002:a05:6808:1816:: with SMTP id bh22mr2079960oib.69.1632998258221; Thu, 30 Sep 2021 03:37:38 -0700 (PDT) MIME-Version: 1.0 References: <20210929170804.GA778424@bhelgaas> In-Reply-To: From: "Rafael J. Wysocki" Date: Thu, 30 Sep 2021 12:37:27 +0200 Message-ID: Subject: Re: [PATCH 1/2] PCI: Use software node API with additional device properties To: Andy Shevchenko Cc: Heikki Krogerus , Zhangfei Gao , Bjorn Helgaas , Greg Kroah-Hartman , "Rafael J. Wysocki" , Bjorn Helgaas , Andy Shevchenko , Linux Kernel Mailing List , linux-pci Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 30, 2021 at 12:20 PM Andy Shevchenko wrote: > > On Thu, Sep 30, 2021 at 1:06 PM Heikki Krogerus > wrote: > > On Thu, Sep 30, 2021 at 10:33:27AM +0800, Zhangfei Gao wrote: > > ... > > > If the device is really never removed, then we could also constify the > > node and the properties in it. Then the patch would look like this: > > I'm not sure the user can't force removal of the device (via PCI > rescan, for example,, or via unbind/bind cycle). The sysfs unbind doesn't remove the device, though, AFAICS. It just unbinds the driver from it, if any. > I guess this way should be really taken carefully. But I agree.