All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Colberg <peter.colberg@intel.com>
To: Wu Hao <hao.wu@intel.com>, Tom Rix <trix@redhat.com>,
	Moritz Fischer <mdf@kernel.org>, Xu Yilun <yilun.xu@intel.com>,
	linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Russ Weight <russ.weight@linux.dev>,
	Marco Pagani <marpagan@redhat.com>,
	Matthew Gerlach <matthew.gerlach@linux.intel.com>,
	Peter Colberg <peter.colberg@intel.com>
Subject: [RFC PATCH v2 7/9] fpga: dfl: migrate DFL support header to dfl_feature_dev_data
Date: Tue,  9 Apr 2024 19:39:40 -0400	[thread overview]
Message-ID: <20240409233942.828440-8-peter.colberg@intel.com> (raw)
In-Reply-To: <20240409233942.828440-1-peter.colberg@intel.com>

This change separates out most of the symbol name changes required by this
patch series for the file: drivers/fpga/dfl.h. This is done to split a
single monolithic change into multiple, smaller patches at the request of
the maintainer.

Signed-off-by: Peter Colberg <peter.colberg@intel.com>
---
v2:
- Split monolithic patch into series at request of maintainer
---
 drivers/fpga/dfl.h | 46 ++++++++++++++++++++--------------------------
 1 file changed, 20 insertions(+), 26 deletions(-)

diff --git a/drivers/fpga/dfl.h b/drivers/fpga/dfl.h
index d724614796cb..b700f5bb7be7 100644
--- a/drivers/fpga/dfl.h
+++ b/drivers/fpga/dfl.h
@@ -333,55 +333,51 @@ struct dfl_feature_platform_data {
 };
 
 static inline
-int dfl_feature_dev_use_begin(struct dfl_feature_platform_data *pdata,
+int dfl_feature_dev_use_begin(struct dfl_feature_dev_data *fdata,
 			      bool excl)
 {
-	if (pdata->excl_open)
+	if (fdata->excl_open)
 		return -EBUSY;
 
 	if (excl) {
-		if (pdata->open_count)
+		if (fdata->open_count)
 			return -EBUSY;
 
-		pdata->excl_open = true;
+		fdata->excl_open = true;
 	}
-	pdata->open_count++;
+	fdata->open_count++;
 
 	return 0;
 }
 
 static inline
-void dfl_feature_dev_use_end(struct dfl_feature_platform_data *pdata)
+void dfl_feature_dev_use_end(struct dfl_feature_dev_data *fdata)
 {
-	pdata->excl_open = false;
+	fdata->excl_open = false;
 
-	if (WARN_ON(pdata->open_count <= 0))
+	if (WARN_ON(fdata->open_count <= 0))
 		return;
 
-	pdata->open_count--;
+	fdata->open_count--;
 }
 
 static inline
-int dfl_feature_dev_use_count(struct dfl_feature_platform_data *pdata)
+int dfl_feature_dev_use_count(struct dfl_feature_dev_data *fdata)
 {
-	return pdata->open_count;
+	return fdata->open_count;
 }
 
-#define dfl_fpga_fdata_set_private dfl_fpga_pdata_set_private
-
 static inline
-void dfl_fpga_pdata_set_private(struct dfl_feature_platform_data *pdata,
+void dfl_fpga_fdata_set_private(struct dfl_feature_dev_data *fdata,
 				void *private)
 {
-	pdata->private = private;
+	fdata->private = private;
 }
 
-#define dfl_fpga_fdata_get_private dfl_fpga_pdata_get_private
-
 static inline
-void *dfl_fpga_pdata_get_private(struct dfl_feature_platform_data *pdata)
+void *dfl_fpga_fdata_get_private(struct dfl_feature_dev_data *fdata)
 {
-	return pdata->private;
+	return fdata->private;
 }
 
 struct dfl_feature_ops {
@@ -414,9 +410,9 @@ struct platform_device *dfl_fpga_inode_to_feature_dev(struct inode *inode)
 	return pdata->dev;
 }
 
-#define dfl_fpga_dev_for_each_feature(pdata, feature)			    \
-	for ((feature) = (pdata)->features;				    \
-	   (feature) < (pdata)->features + (pdata)->num; (feature)++)
+#define dfl_fpga_dev_for_each_feature(fdata, feature)			    \
+	for ((feature) = (fdata)->features;				    \
+	   (feature) < (fdata)->features + (fdata)->num; (feature)++)
 
 static inline
 struct dfl_feature *dfl_get_feature_by_id(struct device *dev, u16 id)
@@ -445,12 +441,10 @@ void __iomem *dfl_get_feature_ioaddr_by_id(struct device *dev, u16 id)
 
 #define to_dfl_feature_dev_data dev_get_platdata
 
-#define dfl_fpga_fdata_to_parent dfl_fpga_pdata_to_parent
-
 static inline
-struct device *dfl_fpga_pdata_to_parent(struct dfl_feature_platform_data *pdata)
+struct device *dfl_fpga_fdata_to_parent(struct dfl_feature_dev_data *fdata)
 {
-	return pdata->dev->dev.parent->parent;
+	return fdata->dev->dev.parent->parent;
 }
 
 static inline bool dfl_feature_is_fme(void __iomem *base)
-- 
2.44.0


  parent reply	other threads:[~2024-04-09 23:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09 23:39 [RFC PATCH v2 0/9] fpga: dfl: fix kernel warning on port release/assign for SRIOV Peter Colberg
2024-04-09 23:39 ` [RFC PATCH v2 1/9] fpga: dfl: alias dfl_feature_dev_data to dfl_feature_platform_data Peter Colberg
2024-04-09 23:39 ` [RFC PATCH v2 2/9] fpga: dfl: migrate AFU DMA region management driver to dfl_feature_dev_data Peter Colberg
2024-04-23  9:01   ` Xu Yilun
2024-04-09 23:39 ` [RFC PATCH v2 3/9] fpga: dfl: migrate AFU MMIO " Peter Colberg
2024-04-09 23:56   ` Colberg, Peter
2024-04-23 14:22     ` Xu Yilun
2024-04-09 23:39 ` [RFC PATCH v2 4/9] fpga: dfl: migrate FPGA Management Engine " Peter Colberg
2024-04-23  9:38   ` Xu Yilun
2024-04-09 23:39 ` [RFC PATCH v2 5/9] fpga: dfl: migrate FME partial reconfiguration " Peter Colberg
2024-04-09 23:39 ` [RFC PATCH v2 6/9] fpga: dfl: migrate Accelerated Function Unit " Peter Colberg
2024-04-23 14:31   ` Xu Yilun
2024-04-09 23:39 ` Peter Colberg [this message]
2024-04-09 23:39 ` [RFC PATCH v2 8/9] fpga: dfl: migrate dfl_get_feature_by_id() " Peter Colberg
2024-04-23 15:16   ` Xu Yilun
2024-04-09 23:39 ` [RFC PATCH v2 9/9] fpga: dfl: fix kernel warning on port release/assign for SRIOV Peter Colberg
2024-04-23 15:36   ` Xu Yilun
2024-04-23  8:27 ` [RFC PATCH v2 0/9] " Xu Yilun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240409233942.828440-8-peter.colberg@intel.com \
    --to=peter.colberg@intel.com \
    --cc=hao.wu@intel.com \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marpagan@redhat.com \
    --cc=matthew.gerlach@linux.intel.com \
    --cc=mdf@kernel.org \
    --cc=russ.weight@linux.dev \
    --cc=trix@redhat.com \
    --cc=yilun.xu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.