Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1211102pxb; Thu, 4 Feb 2021 07:33:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJw/QaAS5BiStYO6X+tGDdtEjC7+OG5W6pWAELoE98w4PTCMssnMw5KjxkZmOgcvlcuumK3X X-Received: by 2002:a50:fc06:: with SMTP id i6mr7874132edr.20.1612452819683; Thu, 04 Feb 2021 07:33:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612452819; cv=none; d=google.com; s=arc-20160816; b=kUD/NP6MM9u0L32Qjf9TUa2/RdKneNN8btD+Vt9VkNb/aXTiFyPrqyGCK3phOJhXXU dWzfhafHsoEF2eb5sYPhZSbaDmIohUN0idaVDgRKBwJjG1/ahxPLbWiwsCHU9bURz0HG sZ0LmrQc0Ttuv7ETfAKA9Z4cH3Di7jLZxaqMI2HEULCCpuxEoSfMEM+7mST3E4Lzqed0 xvWJnQv0Te17EhhhXjfhmE5aZfAN6n3tk3UKwEo3DxrSoUWfGewCm9q2tt0hAalBxv8J TrAGL95DfzKyWUzwwHWWNWExS/5o/mTxM2Dj1ie4DOLQP5Y4nrCwc98NEk3h+AE6V59T UHug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:ironport-sdr :ironport-sdr; bh=axdAYjdCNB9d9QcCU/7ZRvHhiJKNeTV14ZSUbjydnq0=; b=UUsBf4et1f9xD4mSW9lwkcNIoeD9P+Lu0LJ5wPqdf68+fepCtcbGxsBvQpJG5hngOU BXaoGylvPDv0ZYXvXn8ZL8Q4PZKWL7EiZBsdnOpenz95mXG5yfvAuBsKng5Bgs5WaTZj 4Y9DY41oRHf6LOvZuZTfeF9BIswptlNX7y1ZWsGRZ1q4Vd+d1FsxyWNOe8z+YCCJRuiO CEJlrHwTeyL+m+u9Qn3hveFzYJhq4pH8tXcTNrU4oNfsSnSLDl5FX1CDwknipJaxYS17 eqyQWeXJqeIqCXivEhL4ycxoddP8F40n8eBndlUYqcBiRxZzTQfh5Ozeuo+e+PZyV1CZ KHwg== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hk6si3421331ejb.204.2021.02.04.07.33.14; Thu, 04 Feb 2021 07:33:39 -0800 (PST) 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237330AbhBDPbO (ORCPT + 99 others); Thu, 4 Feb 2021 10:31:14 -0500 Received: from mga01.intel.com ([192.55.52.88]:24482 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237164AbhBDP3q (ORCPT ); Thu, 4 Feb 2021 10:29:46 -0500 IronPort-SDR: bUN6V2kV8PHVnv6VaDvCBP+aKJeCFaRSGUr302Rh8UZTSW2ykZwjjy2iZEUewGr7E8pKgUE32C nqxPGvyLbhJg== X-IronPort-AV: E=McAfee;i="6000,8403,9885"; a="200252103" X-IronPort-AV: E=Sophos;i="5.79,401,1602572400"; d="scan'208";a="200252103" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2021 07:29:05 -0800 IronPort-SDR: e/5p4pSuQmOb/MbMZ2Wp1tEb+Ne2uaNCe7q0PWUrRotDCKEL57esF7lmORz7DWpIeTm1AgiK/R 1fiQGYbuvEGA== X-IronPort-AV: E=Sophos;i="5.79,401,1602572400"; d="scan'208";a="415207885" Received: from jguillor-mobl1.amr.corp.intel.com (HELO intel.com) ([10.252.133.14]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2021 07:29:03 -0800 Date: Thu, 4 Feb 2021 07:29:01 -0800 From: Ben Widawsky To: Christoph Hellwig Cc: Dan Williams , linux-cxl@vger.kernel.org, Linux ACPI , Linux Kernel Mailing List , linux-nvdimm , Linux PCI , Bjorn Helgaas , Chris Browy , Ira Weiny , Jon Masters , Jonathan Cameron , Rafael Wysocki , Randy Dunlap , Vishal Verma , daniel.lll@alibaba-inc.com, "John Groves (jgroves)" , "Kelley, Sean V" Subject: Re: [PATCH 03/14] cxl/mem: Find device capabilities Message-ID: <20210204152901.pzjnyr64xlvo6yup@intel.com> References: <20210130002438.1872527-1-ben.widawsky@intel.com> <20210130002438.1872527-4-ben.widawsky@intel.com> <20210202181016.GD3708021@infradead.org> <20210202182418.3wyxnm6rqeoeclu2@intel.com> <20210203171534.GB4104698@infradead.org> <20210203172342.fpn5vm4xj2xwh6fq@intel.com> <20210204071646.GA122880@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210204071646.GA122880@infradead.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 21-02-04 07:16:46, Christoph Hellwig wrote: > On Wed, Feb 03, 2021 at 01:23:31PM -0800, Dan Williams wrote: > > > I'd prefer to keep the helpers for now as I do find them helpful, and so far > > > nobody else who has touched the code has complained. If you feel strongly, I > > > will change it. > > > > After seeing the options, I think I'd prefer to not have to worry what > > extra magic is happening with cxl_read_mbox_reg32() > > > > cxl_read_mbox_reg32(cxlm, CXLDEV_MB_CAPS_OFFSET); > > > > readl(cxlm->mbox_regs + CXLDEV_MB_CAPS_OFFSET); > > > > The latter is both shorter and more idiomatic. > > Same here. That being said I know some driver maintainers like > wrappers, my real main irk was the macro magic to generate them. I think the wrapper is often used as a means of trying to have cross OS compatibility to some degree. Just to be clear, that was *not* the purpose here. Stating I disagree for posterity, I'll begin reworking this code and it will be changed for v2. Thanks. Ben