From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD4DE3FEE for ; Thu, 9 Sep 2021 21:10:44 +0000 (UTC) Received: by mail-pl1-f172.google.com with SMTP id d18so1917546pll.11 for ; Thu, 09 Sep 2021 14:10:44 -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=VG1c0x+0/lVVOXIHX3HpgQkWwFlp9iGDH9PblGIsiAk=; b=EyRlvOY8RpnBWH5Nbr4sKz/zrlu2CSQocU0YQiaEjF5OoXFMfbxS2pQZMfAXGMXIfv erHLWdHJOOBhDOIqrznjhwBddqBIpjWNM3JvkFcHvRmGPMAv8DK5gzNjP1EypQPnC9hD aRBPLIXAORFW0R8f1YUGsVAxGum/gwB3/a+23ZHLMBVPYS4+9NKvNPCh4gmVjwskmhnS ecq9gnqeAA6cUwiLc11hHD1aFF/VlEqIER/5/fs22oQ4Il4TLxsvCgtT2OE2nGnWspw1 Pg8jkIb2tUOyMKqBxG2VNKn7JYI0S4+3+4sjpFw6GJ8u0BtquhuCVLlw9nZwkzwOP4mu W8cA== 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=VG1c0x+0/lVVOXIHX3HpgQkWwFlp9iGDH9PblGIsiAk=; b=nFoc0gjYereZ+67lA/DCyqTqcWw6BfuPJhrZltj8sCqijP8xoviQ12QWWW2+J77t9O wQcuVSOrF59W69xIZNTECxk1TfE68kWtna3bWTrXs8MnDdRyO4FC35ZchAfuCT8Z+2VR J7EdIBOJom2mC2ixSE+j065Dx87TK5wg2KpGMmp6NtveeZ1pkYd9rqjfr3Wvt7K+FxAF NHh9vFkiY6rRBHATt7/LS5MThzG1bY33lPskXle08HuXSuslDCXEnPguMdOJIslo+Nsw GHmlNs1qMoIU0ypXtYZ/BZk+TSP+AoethaN+gwmNV59ujha5UvxCm4cVU0HoCn9OKLLm y4Mg== X-Gm-Message-State: AOAM5300Qo4jCnm7j9MgM2c4lNfJC0rBiYi8Y9Ey6I+jCDjI0vNL9olh /tqpo5XJxJGMYkub7FPNXabCSWA5tOkOs8mTMAO6xw== X-Google-Smtp-Source: ABdhPJzlxcCP7Hb984HZFtYsiJ0Isrx0l8Uh6HhNFtFSwIMpAEt6kIRDehsecyRJmVHfOo4UQRQZuLiRxY+agEjLV9U= X-Received: by 2002:a17:902:bd8d:b0:13a:8c8:a2b2 with SMTP id q13-20020a170902bd8d00b0013a08c8a2b2mr4427221pls.89.1631221844391; Thu, 09 Sep 2021 14:10:44 -0700 (PDT) Precedence: bulk X-Mailing-List: nvdimm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <163116429183.2460985.5040982981112374615.stgit@dwillia2-desk3.amr.corp.intel.com> <163116433533.2460985.14299233004385504131.stgit@dwillia2-desk3.amr.corp.intel.com> <20210909162005.ybqjh5xrbhg43wtr@intel.com> <20210909210527.eyxreaq2vim3wfps@intel.com> In-Reply-To: <20210909210527.eyxreaq2vim3wfps@intel.com> From: Dan Williams Date: Thu, 9 Sep 2021 14:10:33 -0700 Message-ID: Subject: Re: [PATCH v4 08/21] cxl/pci: Clean up cxl_mem_get_partition_info() To: Ben Widawsky Cc: linux-cxl@vger.kernel.org, Ira Weiny , Vishal L Verma , Linux NVDIMM , "Schofield, Alison" , Jonathan Cameron Content-Type: text/plain; charset="UTF-8" On Thu, Sep 9, 2021 at 2:05 PM Ben Widawsky wrote: [..] > > Caching is totally fine, I was just suggesting keeping the side effects out of > the innocuous sounding cxl_mem_get_partition_info(). I think I originally > authored authored cxl_mem_identify(), so mea culpa. I just realized it after > seeing the removal that I liked Ira's functional style. > > Perhaps simply renaming these functions is the right solution (ie. save it for a > rainy day). Populate is not my favorite verb, but as an example: > static int cxl_mem_populate_partition_info > static int cxl_mem_populate_indentify Sure, I would not say "no" to a follow-on cleanup patch along those lines that brought these two functions into a coherent style. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 44B32C433F5 for ; Thu, 9 Sep 2021 21:10:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 28E04610C8 for ; Thu, 9 Sep 2021 21:10:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345513AbhIIVLz (ORCPT ); Thu, 9 Sep 2021 17:11:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345073AbhIIVLy (ORCPT ); Thu, 9 Sep 2021 17:11:54 -0400 Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB1ECC061574 for ; Thu, 9 Sep 2021 14:10:44 -0700 (PDT) Received: by mail-pl1-x630.google.com with SMTP id l11so1925153plk.6 for ; Thu, 09 Sep 2021 14:10:44 -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=VG1c0x+0/lVVOXIHX3HpgQkWwFlp9iGDH9PblGIsiAk=; b=EyRlvOY8RpnBWH5Nbr4sKz/zrlu2CSQocU0YQiaEjF5OoXFMfbxS2pQZMfAXGMXIfv erHLWdHJOOBhDOIqrznjhwBddqBIpjWNM3JvkFcHvRmGPMAv8DK5gzNjP1EypQPnC9hD aRBPLIXAORFW0R8f1YUGsVAxGum/gwB3/a+23ZHLMBVPYS4+9NKvNPCh4gmVjwskmhnS ecq9gnqeAA6cUwiLc11hHD1aFF/VlEqIER/5/fs22oQ4Il4TLxsvCgtT2OE2nGnWspw1 Pg8jkIb2tUOyMKqBxG2VNKn7JYI0S4+3+4sjpFw6GJ8u0BtquhuCVLlw9nZwkzwOP4mu W8cA== 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=VG1c0x+0/lVVOXIHX3HpgQkWwFlp9iGDH9PblGIsiAk=; b=2y7JmdJXJxr3sRbqpwVzfiz99dRqgstgHze7lCIi/rDfFKdC+o0PxSu35WO+P3+RSM 9REkN6LhDNq8a0mNL34zEr2clPbsJ8/Nj8mzd6m8SpaNATdhHaSdme09cuOETmZdXRwh 6fBmc+nigjMRUAF2AUOChlA0zaGS9zQGJwmQdrYOvQAVAfmUKriY74nNgh/5hXZiie9r Vwmhw4zZvDcmJXIzDW7eRZ07WuwZlE03kIWXLBfBWLHc4Y8ZBCWQuDhNJ56ZIDpFlzxQ swtlh1goH6ZBOywkNeXKr7d0q5NCCeFm9bjOPTv2k0UIxSDlGvkMm0CN3PblrQd35I4K 6A2g== X-Gm-Message-State: AOAM530jYi/OOkHzLXJ85P+RKqkM3sQIydgqnwpdRgeF6D80ymiUOJQh viDegvULo1HXolEFBWyqUNHvmPqUYQeSitethUJToA== X-Google-Smtp-Source: ABdhPJzlxcCP7Hb984HZFtYsiJ0Isrx0l8Uh6HhNFtFSwIMpAEt6kIRDehsecyRJmVHfOo4UQRQZuLiRxY+agEjLV9U= X-Received: by 2002:a17:902:bd8d:b0:13a:8c8:a2b2 with SMTP id q13-20020a170902bd8d00b0013a08c8a2b2mr4427221pls.89.1631221844391; Thu, 09 Sep 2021 14:10:44 -0700 (PDT) MIME-Version: 1.0 References: <163116429183.2460985.5040982981112374615.stgit@dwillia2-desk3.amr.corp.intel.com> <163116433533.2460985.14299233004385504131.stgit@dwillia2-desk3.amr.corp.intel.com> <20210909162005.ybqjh5xrbhg43wtr@intel.com> <20210909210527.eyxreaq2vim3wfps@intel.com> In-Reply-To: <20210909210527.eyxreaq2vim3wfps@intel.com> From: Dan Williams Date: Thu, 9 Sep 2021 14:10:33 -0700 Message-ID: Subject: Re: [PATCH v4 08/21] cxl/pci: Clean up cxl_mem_get_partition_info() To: Ben Widawsky Cc: linux-cxl@vger.kernel.org, Ira Weiny , Vishal L Verma , Linux NVDIMM , "Schofield, Alison" , Jonathan Cameron Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org On Thu, Sep 9, 2021 at 2:05 PM Ben Widawsky wrote: [..] > > Caching is totally fine, I was just suggesting keeping the side effects out of > the innocuous sounding cxl_mem_get_partition_info(). I think I originally > authored authored cxl_mem_identify(), so mea culpa. I just realized it after > seeing the removal that I liked Ira's functional style. > > Perhaps simply renaming these functions is the right solution (ie. save it for a > rainy day). Populate is not my favorite verb, but as an example: > static int cxl_mem_populate_partition_info > static int cxl_mem_populate_indentify Sure, I would not say "no" to a follow-on cleanup patch along those lines that brought these two functions into a coherent style.