Re: [PATCH 6.1 2/2] fpga: manager: add owner module and take its refcount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[ Sasha's backport helper bot ]

Hi,

The upstream commit SHA1 provided is correct: 4d4d2d4346857bf778fafaa97d6f76bb1663e3c9

WARNING: Author mismatch between patch and upstream commit:
Backport author: Xiangyu Chen <xiangyu.chen@xxxxxxxxxxxxxxxxx>
Commit author: Marco Pagani <marpagan@xxxxxxxxxx>


Status in newer kernel trees:
6.12.y | Present (exact SHA1)
6.11.y | Present (exact SHA1)
6.6.y | Present (different SHA1: 2da62a139a62)
6.1.y | Not found

Note: The patch differs from the upstream commit:
---
--- -	2024-11-25 10:08:25.352634693 -0500
+++ /tmp/tmp.mxHKcERVgS	2024-11-25 10:08:25.345028939 -0500
@@ -1,3 +1,5 @@
+[ Upstream commit 4d4d2d4346857bf778fafaa97d6f76bb1663e3c9 ]
+
 The current implementation of the fpga manager assumes that the low-level
 module registers a driver for the parent device and uses its owner pointer
 to take the module's refcount. This approach is problematic since it can
@@ -26,6 +28,8 @@
 Acked-by: Xu Yilun <yilun.xu@xxxxxxxxx>
 Link: https://lore.kernel.org/r/20240305192926.84886-1-marpagan@xxxxxxxxxx
 Signed-off-by: Xu Yilun <yilun.xu@xxxxxxxxxxxxxxx>
+Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
+Signed-off-by: Xiangyu Chen <xiangyu.chen@xxxxxxxxxxxxx>
 ---
  Documentation/driver-api/fpga/fpga-mgr.rst | 34 +++++----
  drivers/fpga/fpga-mgr.c                    | 82 +++++++++++++---------
@@ -33,7 +37,7 @@
  3 files changed, 89 insertions(+), 53 deletions(-)
 
 diff --git a/Documentation/driver-api/fpga/fpga-mgr.rst b/Documentation/driver-api/fpga/fpga-mgr.rst
-index 49c0a95126532..8d2b79f696c1f 100644
+index 49c0a9512653..8d2b79f696c1 100644
 --- a/Documentation/driver-api/fpga/fpga-mgr.rst
 +++ b/Documentation/driver-api/fpga/fpga-mgr.rst
 @@ -24,7 +24,8 @@ How to support a new FPGA device
@@ -109,7 +113,7 @@
  .. kernel-doc:: drivers/fpga/fpga-mgr.c
     :functions: fpga_mgr_unregister
 diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c
-index 06651389c5926..0f4035b089a2e 100644
+index 8efa67620e21..0c71d91ba7f6 100644
 --- a/drivers/fpga/fpga-mgr.c
 +++ b/drivers/fpga/fpga-mgr.c
 @@ -664,20 +664,16 @@ static struct attribute *fpga_mgr_attrs[] = {
@@ -141,12 +145,12 @@
   */
  struct fpga_manager *fpga_mgr_get(struct device *dev)
  {
--	struct device *mgr_dev = class_find_device(&fpga_mgr_class, NULL, dev,
+-	struct device *mgr_dev = class_find_device(fpga_mgr_class, NULL, dev,
 -						   fpga_mgr_dev_match);
 +	struct fpga_manager *mgr;
 +	struct device *mgr_dev;
 +
-+	mgr_dev = class_find_device(&fpga_mgr_class, NULL, dev, fpga_mgr_dev_match);
++	mgr_dev = class_find_device(fpga_mgr_class, NULL, dev, fpga_mgr_dev_match);
  	if (!mgr_dev)
  		return ERR_PTR(-ENODEV);
  
@@ -167,9 +171,9 @@
 +	struct fpga_manager *mgr;
 +	struct device *mgr_dev;
  
--	dev = class_find_device_by_of_node(&fpga_mgr_class, node);
+-	dev = class_find_device_by_of_node(fpga_mgr_class, node);
 -	if (!dev)
-+	mgr_dev = class_find_device_by_of_node(&fpga_mgr_class, node);
++	mgr_dev = class_find_device_by_of_node(fpga_mgr_class, node);
 +	if (!mgr_dev)
  		return ERR_PTR(-ENODEV);
  
@@ -337,7 +341,7 @@
  static void fpga_mgr_dev_release(struct device *dev)
  {
 diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h
-index 54f63459efd6e..0d4fe068f3d8a 100644
+index 54f63459efd6..0d4fe068f3d8 100644
 --- a/include/linux/fpga/fpga-mgr.h
 +++ b/include/linux/fpga/fpga-mgr.h
 @@ -201,6 +201,7 @@ struct fpga_manager_ops {
@@ -393,3 +397,6 @@
 +			 struct module *owner);
  
  #endif /*_LINUX_FPGA_MGR_H */
+-- 
+2.43.0
+
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.1.y        |  Success    |  Success   |




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux