[OS-BUILD PATCHv4 1/2] redhat: Add mark_driver_deprecated()

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

 



From: Phil Sutter <psutter@xxxxxxxxxx>

redhat: Add mark_driver_deprecated()

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1945179
Upstream Status: RHEL-only

Allow marking drivers deprecated. The printed message is basically
identical to what mark_hardware_deprecated() prints but generalized a
bit to cover non-hardware drivers also. Semantically, the introduced
function aligns with mark_driver_unsupported().

Signed-off-by: Phil Sutter <psutter@xxxxxxxxxx>

diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index blahblah..blahblah 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -538,11 +538,13 @@ void mark_hardware_unsupported(const char *msg);
 void mark_hardware_deprecated(const char *msg);
 void mark_tech_preview(const char *msg, struct module *mod);
 void mark_driver_unsupported(const char *name);
+void mark_driver_deprecated(const char *name);
 #else
 static inline void mark_hardware_unsupported(const char *msg) { }
 static inline void mark_hardware_deprecated(const char *msg) { }
 static inline void mark_tech_preview(const char *msg, struct module *mod) { }
 static inline void mark_driver_unsupported(const char *name) { }
+static inline void mark_driver_deprecated(const char *name) { }
 #endif
 
 #endif
diff --git a/kernel/rh_taint.c b/kernel/rh_taint.c
index blahblah..blahblah 100644
--- a/kernel/rh_taint.c
+++ b/kernel/rh_taint.c
@@ -91,3 +91,19 @@ void mark_driver_unsupported(const char *name)
 	        name ? name : "kernel");
 }
 EXPORT_SYMBOL(mark_driver_unsupported);
+
+/**
+ * mark_driver_deprecated() - Mark drivers as deprecated.
+ * @name: the name of the driver
+ *
+ * Called to minimize the support status of a previously supported driver in
+ * a minor release. This does not TAINT the kernel. Future
+ * RHEL major releases may not include this driver. Driver updates and fixes
+ * will be limited to critical issues in future minor releases.
+ */
+void mark_driver_deprecated(const char *name)
+{
+	pr_crit("Warning: %s - this driver is not recommended for new deployments. It continues to be supported in this RHEL release, but it is likely to be removed in the next major release. Driver updates and fixes will be limited to critical issues. Please contact Red Hat Support for additional information.\n",
+	        name ? name : "kernel");
+}
+EXPORT_SYMBOL(mark_driver_deprecated);

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1226
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux