From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 01C3EC001DB for ; Thu, 10 Aug 2023 06:43:16 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 8D26560FD9; Thu, 10 Aug 2023 06:43:16 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 8D26560FD9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1691649796; bh=4QZsGGCKBzlAvz1x6FiqEEkHob5baADEgFbDCCUnjRU=; h=Date:From:To:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=sMrhcFLWHfwpQVaZviuh/U8KFhb3E8WlQbHrSXpEwqoVXY5p0Nw9zs1kBYYPa/Ycu bbRsJcJWb3Xxb5GH8q2rtKgNPCPun0k/cCmEjelY/mLcx03aRpmBcbOY3TDxY2kWfl yjUeQiqCMoaSd4buGur08sRkMlbHXjo/Kr28B4AHR+/a2wtrqb/0yC+WhmmSLMj36r /XqWPVG65WcRhUGtzAFHls1/T5jWVw95zdKcsNBVfFt0ihOzA0HYP8DYZwCYtsi1Qt ey3a8Dc8HO5GLyh/95UDGQA87SuLvUiSh/6FCe7RQkxdEmnsqUKwFR+c+ac5xa5YNc rDFblCFkWReDw== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6oVsaVtqIHJT; Thu, 10 Aug 2023 06:43:15 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id A788B60FF9; Thu, 10 Aug 2023 06:43:15 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org A788B60FF9 Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 7388C1BF39F for ; Thu, 10 Aug 2023 06:43:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 524334023B for ; Thu, 10 Aug 2023 06:43:14 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 524334023B X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qZA2OxsQuZ8J for ; Thu, 10 Aug 2023 06:43:07 +0000 (UTC) Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by smtp2.osuosl.org (Postfix) with ESMTPS id AEC14400E7 for ; Thu, 10 Aug 2023 06:43:04 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org AEC14400E7 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-3fe5c0e58c0so5137425e9.3 for ; Wed, 09 Aug 2023 23:43:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691649783; x=1692254583; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=yut2Z+a14yxMcDEXkZzdFPLfRVZ9Qb94p4k3EOO68Sk=; b=VHKLtODl166ehBPyfBjJhtGUSKDMUGmhCgcMlUfx2wghVu8eBaScrfEZ6IMRvs3Ilc vTGUHjaavB38DAK7oxic9amUjHgySWO+Ih245hegGR5vkLHub0vPcFGytGG3MjytrpCY ijaI1+kzbk1ORBbzbX8je7MXqjeXmWn9bhUhiev+J23c/df3jsNM4Xx6zYo8FWlX/kTn 11isUVQ6apJgy4+lRvYTbvvVLPcJIUvnzgEgKQWnAU6sMm+pJ/pbZvwy89pI+jNKjAeS CpIF/D57XwyupRL+ZCle42kqi+oDd+W1r3Zc0m7evAGQtLVZt5/XVYLLyHD/qc9NoKaK po/Q== X-Gm-Message-State: AOJu0YyMZECsXEtktPLPSTVuoW/C8T1la6409ihXqbUIGoQyowHldR8W 3fAAJ9S5BVqA3VQ0DcjauA37Mw== X-Google-Smtp-Source: AGHT+IEb+I3lyZINCDfzufoiEQMlOzN4F9fGAh7xM3gOhb0li7sIX6eV0rOgKMK5X7Ymolf57qXmPA== X-Received: by 2002:a05:600c:4fd5:b0:3fe:4d66:2d4b with SMTP id o21-20020a05600c4fd500b003fe4d662d4bmr1096237wmq.28.1691649782577; Wed, 09 Aug 2023 23:43:02 -0700 (PDT) Received: from localhost ([212.23.236.67]) by smtp.gmail.com with ESMTPSA id b10-20020a5d550a000000b0031801aa34e2sm1066784wrv.9.2023.08.09.23.43.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 23:43:01 -0700 (PDT) Date: Thu, 10 Aug 2023 08:43:00 +0200 From: Jiri Pirko To: Vadim Fedorenko Message-ID: References: <20230809214027.556192-1-vadim.fedorenko@linux.dev> <20230809214027.556192-8-vadim.fedorenko@linux.dev> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230809214027.556192-8-vadim.fedorenko@linux.dev> X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20221208.gappssmtp.com; s=20221208; t=1691649783; x=1692254583; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=yut2Z+a14yxMcDEXkZzdFPLfRVZ9Qb94p4k3EOO68Sk=; b=1jfPBNHE0y4mAOO5VPnZKKKbCc0i2D7mzRSFE7xLau88UAVMFTX/eIuLcqpU9qIQqF nTnGkB+J9fE04oWwgeY69dzIzbrmF5HkVCJfbjUZYUxWqtVAeGP/n/32olVrS/Kq9gP0 AdyrPcVcNQKU7lmrCLa6Q/x6Q3yOqy5Q/MuD0TDr8+p44PerbSjSQCyClZSUb61+HMwx 05UzRyUzxOz48sQV74+3TaRKFSxhTkC4j6c7aYvU5iK1WLq8pWDPehJlpEXtCwNaSitv zCuNUMe+m53dt2TPiqkgm7G1h+L+qYGH7c+p+gc5KfR+yJdkbVBMsdUgF81bOGfrXvAa imJw== X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=resnulli-us.20221208.gappssmtp.com header.i=@resnulli-us.20221208.gappssmtp.com header.a=rsa-sha256 header.s=20221208 header.b=1jfPBNHE Subject: Re: [Intel-wired-lan] [PATCH net-next v3 7/9] ice: implement dpll interface to control cgu X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bart Van Assche , netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-arm-kernel@lists.infradead.org, Jonathan Lemon , Jakub Kicinski , Paolo Abeni , linux-clk@vger.kernel.org, Milena Olech Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" Wed, Aug 09, 2023 at 11:40:25PM CEST, vadim.fedorenko@linux.dev wrote: >From: Arkadiusz Kubalewski [...] >+/** >+ * 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 [...] _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0220BC001DB for ; Thu, 10 Aug 2023 06:43:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231596AbjHJGnM (ORCPT ); Thu, 10 Aug 2023 02:43:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229789AbjHJGnL (ORCPT ); Thu, 10 Aug 2023 02:43:11 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3693AEA for ; Wed, 9 Aug 2023 23:43:04 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-3fe45481edfso5235665e9.1 for ; Wed, 09 Aug 2023 23:43:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20221208.gappssmtp.com; s=20221208; t=1691649783; x=1692254583; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=yut2Z+a14yxMcDEXkZzdFPLfRVZ9Qb94p4k3EOO68Sk=; b=1jfPBNHE0y4mAOO5VPnZKKKbCc0i2D7mzRSFE7xLau88UAVMFTX/eIuLcqpU9qIQqF nTnGkB+J9fE04oWwgeY69dzIzbrmF5HkVCJfbjUZYUxWqtVAeGP/n/32olVrS/Kq9gP0 AdyrPcVcNQKU7lmrCLa6Q/x6Q3yOqy5Q/MuD0TDr8+p44PerbSjSQCyClZSUb61+HMwx 05UzRyUzxOz48sQV74+3TaRKFSxhTkC4j6c7aYvU5iK1WLq8pWDPehJlpEXtCwNaSitv zCuNUMe+m53dt2TPiqkgm7G1h+L+qYGH7c+p+gc5KfR+yJdkbVBMsdUgF81bOGfrXvAa imJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691649783; x=1692254583; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=yut2Z+a14yxMcDEXkZzdFPLfRVZ9Qb94p4k3EOO68Sk=; b=QlfyqK0ftENvMBtE5ZgqYN+R1OjT/eDFJ4mQrVlyRJRMVLi3UWzaFdOKQSW5kb5Jg3 hluAIIM30uFlL2GX1eEF8F1ynevhRW6qUrY61bXyVNAeWlCW96OSlvfPRG1C+/SPTGiu okKdJAq6ziVwJ9iXbHLbEa2fmPg28vNejyt3C+e9+rszS1TK4CvhuSbvriPeOs9KTa8s t2gUllOIF+AGuEIi/yfh6OhkZRzF+G7/0HqoYCitFEWpmHdD4OM3ZtIWZJIbCJxnPt+Z YHINTaotKQvHAYPNIQJktMRxVCQ4dwdrgpVHJx1tZySEh90PFxMxa3igfCH8gteVznyQ kpEw== X-Gm-Message-State: AOJu0YyEeX5I7vQsiO+Hr021BhwNG6dHjhjb1ZDfFGnFvxLWhMuESrRJ 63NRPz2qhvrIuIOpimkMOwCyUQ== X-Google-Smtp-Source: AGHT+IEb+I3lyZINCDfzufoiEQMlOzN4F9fGAh7xM3gOhb0li7sIX6eV0rOgKMK5X7Ymolf57qXmPA== X-Received: by 2002:a05:600c:4fd5:b0:3fe:4d66:2d4b with SMTP id o21-20020a05600c4fd500b003fe4d662d4bmr1096237wmq.28.1691649782577; Wed, 09 Aug 2023 23:43:02 -0700 (PDT) Received: from localhost ([212.23.236.67]) by smtp.gmail.com with ESMTPSA id b10-20020a5d550a000000b0031801aa34e2sm1066784wrv.9.2023.08.09.23.43.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 23:43:01 -0700 (PDT) Date: Thu, 10 Aug 2023 08:43:00 +0200 From: Jiri Pirko To: Vadim Fedorenko Cc: Jakub Kicinski , Arkadiusz Kubalewski , Jonathan Lemon , Paolo Abeni , Milena Olech , Michal Michalik , linux-arm-kernel@lists.infradead.org, poros@redhat.com, mschmidt@redhat.com, netdev@vger.kernel.org, linux-clk@vger.kernel.org, Bart Van Assche , intel-wired-lan@lists.osuosl.org Subject: Re: [PATCH net-next v3 7/9] ice: implement dpll interface to control cgu Message-ID: References: <20230809214027.556192-1-vadim.fedorenko@linux.dev> <20230809214027.556192-8-vadim.fedorenko@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230809214027.556192-8-vadim.fedorenko@linux.dev> Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Wed, Aug 09, 2023 at 11:40:25PM CEST, vadim.fedorenko@linux.dev wrote: >From: Arkadiusz Kubalewski [...] >+/** >+ * 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 [...] From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EC83DC001DB for ; Thu, 10 Aug 2023 06:44:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nuAedTsaM9o2a74e7XVuT9sYkhmAUHhdWSK1haQfeW4=; b=NzzXz7bkZkBXkf W/eLzngOrPdX4445Lzblsn2TwN4QObA5gZ7MqIpkQKpdPUkT1NQXMpwHA4XgWqRlHqOH3DW7pqjF2 zIXRkh9hfiSyDhE1xmFpMCV76v8hxDejtE2bKhdploAvs/2fB0f1+IvymNK7CCvrwujAv8tUQJ8wr 72Ex6RwHlCtpT5HFGIH/A8oOPGT8xJ4N5I9OaK8+FyWna8rGYQZw1bDuux0UMwfg8SIfMPmXgv6OW K0/fWQRvNjqqvG8BvY04yomxVfOXhwsQOBVZ8za5AzyXMcOp963Rw1z74tbGuYHdrYUSt8u1Kymbu Fu4Q9yjGNT134Znc0KsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qTzOA-006gt1-1r; Thu, 10 Aug 2023 06:43:18 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qTzO0-006grn-1Y for linux-arm-kernel@lists.infradead.org; Thu, 10 Aug 2023 06:43:16 +0000 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3fe4cdb727cso5354945e9.0 for ; Wed, 09 Aug 2023 23:43:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20221208.gappssmtp.com; s=20221208; t=1691649783; x=1692254583; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=yut2Z+a14yxMcDEXkZzdFPLfRVZ9Qb94p4k3EOO68Sk=; b=1jfPBNHE0y4mAOO5VPnZKKKbCc0i2D7mzRSFE7xLau88UAVMFTX/eIuLcqpU9qIQqF nTnGkB+J9fE04oWwgeY69dzIzbrmF5HkVCJfbjUZYUxWqtVAeGP/n/32olVrS/Kq9gP0 AdyrPcVcNQKU7lmrCLa6Q/x6Q3yOqy5Q/MuD0TDr8+p44PerbSjSQCyClZSUb61+HMwx 05UzRyUzxOz48sQV74+3TaRKFSxhTkC4j6c7aYvU5iK1WLq8pWDPehJlpEXtCwNaSitv zCuNUMe+m53dt2TPiqkgm7G1h+L+qYGH7c+p+gc5KfR+yJdkbVBMsdUgF81bOGfrXvAa imJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691649783; x=1692254583; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=yut2Z+a14yxMcDEXkZzdFPLfRVZ9Qb94p4k3EOO68Sk=; b=TpdPdy+lNKev4Sjo84mh9nEla8qaQOA78kJDoxrdz07siOgwxMe6GwSM+JKgyy/j7V QJuQtYyYTmAGZvlrDdbnkmOm/aD4XiVgbOFaT7ain7wYrzuazkb8+0V6u5xzXrXhci0g H+chWnPRsny55r7vO5bH3PzVbYFuhvVHxdtQYgKZkW2F+qAlY4hMyznwcMCPWDdZeX8A XQsnlp4yKcj/VqBCN+KcZtoRgMg0lniWHb4Eks/bquVzztDgOuxLZLqFmU5sQf0Fp8Kc BWveEZXvdJ3lNUx+RQp1DgFMd2Ot6UoqL3WhswVr7gkYjr8DOU6eTF0QAqDe+gnre1tH w4hQ== X-Gm-Message-State: AOJu0YwLE3CkmgKnzL0oC4FobErGqvIoDPviP7sdBsWEc1Ao9tlEP5RN J4LHHg4Tz7o687P9xikmfOjTNQ== X-Google-Smtp-Source: AGHT+IEb+I3lyZINCDfzufoiEQMlOzN4F9fGAh7xM3gOhb0li7sIX6eV0rOgKMK5X7Ymolf57qXmPA== X-Received: by 2002:a05:600c:4fd5:b0:3fe:4d66:2d4b with SMTP id o21-20020a05600c4fd500b003fe4d662d4bmr1096237wmq.28.1691649782577; Wed, 09 Aug 2023 23:43:02 -0700 (PDT) Received: from localhost ([212.23.236.67]) by smtp.gmail.com with ESMTPSA id b10-20020a5d550a000000b0031801aa34e2sm1066784wrv.9.2023.08.09.23.43.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 23:43:01 -0700 (PDT) Date: Thu, 10 Aug 2023 08:43:00 +0200 From: Jiri Pirko To: Vadim Fedorenko Cc: Jakub Kicinski , Arkadiusz Kubalewski , Jonathan Lemon , Paolo Abeni , Milena Olech , Michal Michalik , linux-arm-kernel@lists.infradead.org, poros@redhat.com, mschmidt@redhat.com, netdev@vger.kernel.org, linux-clk@vger.kernel.org, Bart Van Assche , intel-wired-lan@lists.osuosl.org Subject: Re: [PATCH net-next v3 7/9] ice: implement dpll interface to control cgu Message-ID: References: <20230809214027.556192-1-vadim.fedorenko@linux.dev> <20230809214027.556192-8-vadim.fedorenko@linux.dev> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230809214027.556192-8-vadim.fedorenko@linux.dev> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230809_234308_706331_D1B455D7 X-CRM114-Status: UNSURE ( 8.72 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Wed, Aug 09, 2023 at 11:40:25PM CEST, vadim.fedorenko@linux.dev wrote: >From: Arkadiusz Kubalewski [...] >+/** >+ * 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 [...] _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel