Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp280688pxb; Wed, 14 Apr 2021 15:26:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfhpeY/n/6SgkGaMki4dfKn0sR7qPUZd5ns/yf3mffGgGOvq6o1jvnucjczFI6Ju5gqvgx X-Received: by 2002:a17:906:51d5:: with SMTP id v21mr319179ejk.252.1618439207484; Wed, 14 Apr 2021 15:26:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618439207; cv=none; d=google.com; s=arc-20160816; b=Eu07lf0WyXmzkCSxf1tMRxBVrf/mFK03AdnSFf7ZvSdCmKPZti9ErbiXNghovojQ4Y 46H+eIAgmk5x5hJdFNBJPpTlLZET8ojZuf6FadPUpJfO0CVbtj5qcB1C7ialUw5SPiQa 4VbJCGaNi9PzDSkNdp2NM1nINu/2pHS0UCNYPdATM8gxXnf39AEh8g2DrHRTkuCL8ycd j4mTdL6MKUBWe0hLa2ZZfd8rIy7R/Oo1sFAWOQSgO1EEjss3fP7MmLqxWhv4IOdJAy8C 8+ZZgalRzdPxG2eNGRB3YIDrabxVxmB4FPbFnkQeKt+O7FkS2YS/MwkyZlRe1Ry1K+Sp qR1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=A13eGn0Z4Lk1BJDgNCLsAa0rzkYxxquupvZcfyrwkt8=; b=w/OOEePxwHPMpFTk6MMrfTpp+pd9TPg6PSBUCDtekJe4liH18dVVfYFs4uQu827/IB Vs3R3UHsI3XGihhtYqjWc//+w4+HN/Goih4FtqGA1EOLFYrK08Yihp2m0prDb7gcZ3B7 ofGvVUk1cNu1O4S+/052NNRR0ZmqXE1cSHyjptxvb1whtxyIPp4QWKvFYI+J+Yt82vuF XC8b+hst67GD5k6apC1Eh4bQ7lcDMbu58+nhPXmtSZCWO6Q7gEVaDgVrRDOod2Z0pnPO 9uZlgKwEeXXsnIGzUtIMl6WHUn5ihsgl9oN3rX96Y448j/ygoG7VIUh8SMaZRZ7HwM05 KttQ== 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z9si763004edb.10.2021.04.14.15.26.24; Wed, 14 Apr 2021 15:26:47 -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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348554AbhDNJXJ (ORCPT + 99 others); Wed, 14 Apr 2021 05:23:09 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:2850 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348526AbhDNJXI (ORCPT ); Wed, 14 Apr 2021 05:23:08 -0400 Received: from fraeml702-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4FKxZq4rnxz6893H; Wed, 14 Apr 2021 17:12:51 +0800 (CST) Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by fraeml702-chm.china.huawei.com (10.206.15.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2106.2; Wed, 14 Apr 2021 11:22:43 +0200 Received: from localhost (10.47.83.55) by lhreml710-chm.china.huawei.com (10.201.108.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 14 Apr 2021 10:22:42 +0100 Date: Wed, 14 Apr 2021 10:21:15 +0100 From: Jonathan Cameron To: Dan Williams CC: , Linux PCI , "Linux ACPI" , "Weiny, Ira" , "Vishal L Verma" , "Schofield, Alison" , Ben Widawsky , "Linux Kernel Mailing List" Subject: Re: [PATCH v2 1/8] cxl/mem: Move some definitions to mem.h Message-ID: <20210414102115.00001f09@Huawei.com> In-Reply-To: References: <161728744224.2474040.12854720917440712854.stgit@dwillia2-desk3.amr.corp.intel.com> <161728744762.2474040.11009693084215696415.stgit@dwillia2-desk3.amr.corp.intel.com> <20210406173845.00000bec@Huawei.com> Organization: Huawei Technologies Research and Development (UK) Ltd. X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; i686-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.83.55] X-ClientProxiedBy: lhreml713-chm.china.huawei.com (10.201.108.64) To lhreml710-chm.china.huawei.com (10.201.108.61) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 13 Apr 2021 17:42:37 -0700 Dan Williams wrote: > On Tue, Apr 13, 2021 at 5:18 PM Dan Williams wrote: > > > > On Tue, Apr 6, 2021 at 10:47 AM Jonathan Cameron > > wrote: > > > > > > On Thu, 1 Apr 2021 07:30:47 -0700 > > > Dan Williams wrote: > > > > > > > In preparation for sharing cxl.h with other generic CXL consumers, > > > > move / consolidate some of the memory device specifics to mem.h. > > > > > > > > Reviewed-by: Ben Widawsky > > > > Signed-off-by: Dan Williams > > > > > > Hi Dan, > > > > > > Would be good to see something in this patch description saying > > > why you chose to have mem.h rather than push the defines down > > > into mem.c (which from the current code + patch set looks like > > > the more logical thing to do). > > > > The main motivation was least privilege access to memory-device > > details, so they had to move out of cxl.h. As to why move them in to a > > new mem.h instead of piling more into mem.c that's just a personal > > organizational style choice to aid review. I tend to go to headers > > first and read data structure definitions before reading the > > implementation, and having that all in one place is cleaner than > > interspersed with implementation details in the C code. It's all still > > private to drivers/cxl/ so I don't see any "least privilege" concerns > > with moving it there. > > > > Does that satisfy your concern? > > > > If yes, I'll add the above to v3. > > Oh, another thing it helps is the information content of diffstats to > distinguish definition changes from implementation development. I go the other way style wise, but agree it doesn't really matter for local headers included from few other files. Adding a above to comment will at least avoid anyone else (or forgetful me) raising question on v3. Jonathan