Wed, Aug 09, 2023 at 11:40:25PM CEST, vadim.fedorenko@linux.dev wrote:
From: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>
[...]
+/**
+ * ice_dpll_deinit - Disable the driver/HW support for dpll subsystem
+ * the dpll device.
+ * @pf: board private structure
+ *
+ * Handles the cleanup work required after dpll initialization, freeing
+ * resources and unregistering the dpll, pin and all resources used for
+ * handling them.
+ *
+ * Context: Destroys pf->dplls.lock mutex.
+ */
+void ice_dpll_deinit(struct ice_pf *pf)
+{
+ bool cgu = ice_is_feature_supported(pf, ICE_F_CGU);
+
+ if (!test_bit(ICE_FLAG_DPLL, pf->flags))
+ return;
+ if (cgu)
+ ice_dpll_deinit_worker(pf);
+ clear_bit(ICE_FLAG_DPLL, pf->flags);
Clearing the flag after deinit worker somehow implicates that it needs
to be set until here. That is not true.
Please rather use test_and_clear_bit() instead of test_bit() which would
takes care of the clear alongside with the check.
With or without that.
Signed-off-by: Jiri Pirko <redacted>
[...]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel