drivers: Drop inline from driver remove wrapper

The driver remove function is a function pointer and therefore, it does
not make sense to define the function as an 'inline'. Update the
coccinelle script and drivers to remove the inline statement.

Bug 4749580

Change-Id: Ia03691b75c4edffe609f27468b911a92a5ddbd68
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3233980
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Jon Hunter
2024-10-21 13:08:36 +01:00
parent 96dd1cf2ee
commit f01227d4ea
94 changed files with 190 additions and 190 deletions

View File

@@ -26,12 +26,12 @@ identifier match1.removefn;
fresh identifier removefn_wrapper = removefn ## "_wrapper";
@@
+#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
+static inline void removefn_wrapper(struct platform_device *pdev)
+static void removefn_wrapper(struct platform_device *pdev)
+{
+ removefn(pdev);
+}
+#else
+static inline int removefn_wrapper(struct platform_device *pdev)
+static int removefn_wrapper(struct platform_device *pdev)
+{
+ return removefn(pdev);
+}
@@ -48,12 +48,12 @@ identifier match2.removefn;
fresh identifier removefn_wrapper = removefn ## "_wrapper";
@@
+#if defined(NV_PLATFORM_DRIVER_STRUCT_REMOVE_RETURNS_VOID) /* Linux v6.11 */
+static inline void removefn_wrapper(struct platform_device *pdev)
+static void removefn_wrapper(struct platform_device *pdev)
+{
+ removefn(pdev);
+}
+#else
+static inline int removefn_wrapper(struct platform_device *pdev)
+static int removefn_wrapper(struct platform_device *pdev)
+{
+ return removefn(pdev);
+}