Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp3320892pxb; Wed, 14 Apr 2021 02:41:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuXW2XXyBrsEHY8TklhPcYOcQXf1Z2KZZFEFNGQChospweCPQrPQzGq01nbrDnUlk1EBH9 X-Received: by 2002:a17:906:7206:: with SMTP id m6mr37150228ejk.281.1618393313583; Wed, 14 Apr 2021 02:41:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618393313; cv=none; d=google.com; s=arc-20160816; b=niQx/qP6yc6yCYjgI223trh5pS/XkaDC5k25QsfMkh366GZCcWtqFPtDnfyOev2T0l jOSpLrSpMo0t1DVvWASksOSIJVpF4wLvX7rz8l0LaSoGBEg1cBN3oBvjazR3BPc2j4i/ nj2JOi/lgs2FWewe1p/ob1aVQZYrR2iDGyvxFzXs5UNEjsddPk2lqlFvyANjX49if4kF F+zVWtkXu9HeJU8S55hpTl1hPXUXUvgVu6jWmgA7d2/2jie+A0wzA865oIDgBz7XBPfT Evdk+gCsVT4YH/o4KNCwUmjhQt4iokMDy+Z+5mS9uyRbqVbb9///KYIslVBSLP+cIRSW HBrA== 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:dkim-signature; bh=u0/LF5DvnJRfIsal2eM96sTYXDhf7ujpklsSaSTIhCQ=; b=ay8rzNrUErwbiHPxIxih1aBO7mjDvMfK4S2d9UU1x+x5ZjzMWueQu5m3djEjH1VuD5 0aizwVxZKAWsgIAFk0jtLsG7i8n4Bvb3pGKvf4geSXsJR/sITTghNSvFxx4EK7uqsWbm XARGwWi3ZF1fve/iqeYDGuOpUWEdjouFzFDGwHxUwsE4J7P667Oj5eizHfs1XtP/QEqF Gon2dE+hOSSs3e5KjvbqQ924wEVmqHG79BeZUtIo3/RFEiTiKyJpoeiT6LJdPUv5QJh6 d3Vjsrs5vcP8ea68b4Z6pupmEmxUB+gc7/expjCZBz/DViYihrR4NSy8RUkZg6UCEKHQ 1Cew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=CNJ4765p; 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id de36si14365262ejc.136.2021.04.14.02.41.30; Wed, 14 Apr 2021 02:41:53 -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; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=CNJ4765p; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348836AbhDNAnE (ORCPT + 99 others); Tue, 13 Apr 2021 20:43:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348224AbhDNAnC (ORCPT ); Tue, 13 Apr 2021 20:43:02 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49BE4C061756 for ; Tue, 13 Apr 2021 17:42:42 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id d21so1461742edv.9 for ; Tue, 13 Apr 2021 17:42:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=u0/LF5DvnJRfIsal2eM96sTYXDhf7ujpklsSaSTIhCQ=; b=CNJ4765pxcQst3JPb+keJePZ0HFK55PaPj2fLwYDS8pSubS6w9mb52dlvO7uhUesC/ 0i2SgQASheLanq9zIYXbCdUex+W0wr2QB9JmhvaAFrcxgg0cz8g20yptXvt7TYuk1kiY aISidfsijHZe5TA7FbhIlEyU+D45ILGqxmoZmFfg/4EeJO6UWni+N2alXO/LLgkfPVzF sNvcIC7dG+/yneHoloul/QAv3McILDmeTVXxHI5XvETVQVOwdTP/CxkiNrXlvogmoFw3 m4j/mQhik0wC3P0eW1XqpvX0PNTe1gLw1e2Izjrqv3zmJt8qccPVHI2s0yXFh3M4PyiB 1ETw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=u0/LF5DvnJRfIsal2eM96sTYXDhf7ujpklsSaSTIhCQ=; b=Er6kpao18ExpbzwTMxHF7eHsjLyBZwKWrybQ25AO17W3/DrOywPWb7QrDzm7BKw7sg W+JCPU3V58WUkpM0DEyJIqhq5gx0k8o9V/TYan+vqgUY/q5214LDio8FdFQBoM3a2lVv Wh1jsuAwacqZXDlff5XAYzqS7uJvKJ4FREsc7ouIVqYUYZjNY2l7qsgPF1g9sMyHqC/s LiD6yWy07N4XMoOvveD/KYnByWhe0RxVlI8qEglrNZj+AY+bS5FdEzbYvcUlyZizkAhz +x+W4uHiSOjOJmFSYWu0IpbpDWWZ5CLvvp0nSqHVjXcTf4njG1p+m80piGgAxPMWfQ4a 5JXQ== X-Gm-Message-State: AOAM531EjQQuExf+XPLVcpm2t9o5LXYoFbv3wp8cMAXBoPfotmjeHbnG +xC0JtSaALBebJ8D34rqmfUJjt7UvomRj7QaRqOELw== X-Received: by 2002:a05:6402:30ae:: with SMTP id df14mr37499178edb.97.1618360960988; Tue, 13 Apr 2021 17:42:40 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: From: Dan Williams Date: Tue, 13 Apr 2021 17:42:37 -0700 Message-ID: Subject: Re: [PATCH v2 1/8] cxl/mem: Move some definitions to mem.h To: Jonathan Cameron Cc: linux-cxl@vger.kernel.org, Linux PCI , Linux ACPI , "Weiny, Ira" , Vishal L Verma , "Schofield, Alison" , Ben Widawsky , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.