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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 D3AB8C77B7F for ; Fri, 27 Jun 2025 20:43:47 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 92C8E10EA89; Fri, 27 Jun 2025 20:43:47 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="l0A8aLGv"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id E287B10EA8D for ; Fri, 27 Jun 2025 20:43:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1751057023; x=1782593023; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SYAl1u/XRegt0ncYA3mE4OZP0Ai5tpa2Z4Lzp5d+OrA=; b=l0A8aLGvm/Aq1eDQv2+QnwG/YT96MwuOEDIxrhy4rDPmL6K0AaNw+HSP k2KEB73L6or/5Xfl8ca1TtuGa+9xYb3KcryVLnD2G7mdjvzo4axV1H6sL u+/lgmTHCiLbKHlUEbhjXE/FeiRpXJCSsuYVPVYZBnq4HkbfzH9HxRbZp 5qeRPvvWZeVkA92Evsc7rMqBewIOIDWw2HV5izt5Nvmog2OAWKskWvvhT uulI252yvlsW/3EC2Rw5UeTJViNpbcyiYoz8oMqYH9tHNisSv9pb+bTHL myLmq6nvUSOxylN9OaX1C/RxfZva8sYpqE99O1Sww5Xpy10ielkH37QR5 w==; X-CSE-ConnectionGUID: kfBKJpLvTVC7vOOs4i617A== X-CSE-MsgGUID: lgIldaYoQjq2aOdMz6K++Q== X-IronPort-AV: E=McAfee;i="6800,10657,11477"; a="41003184" X-IronPort-AV: E=Sophos;i="6.16,271,1744095600"; d="scan'208";a="41003184" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2025 13:43:42 -0700 X-CSE-ConnectionGUID: Sxfy+H/lRguqGxyd/lZU+A== X-CSE-MsgGUID: q12BhVtUQh+WLqqbMtz+Ig== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.16,271,1744095600"; d="scan'208";a="156938997" Received: from mjruhl-desk.amr.corp.intel.com (HELO mjruhl-desk.intel.com) ([10.124.220.252]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jun 2025 13:43:42 -0700 From: "Michael J. Ruhl" To: platform-driver-x86@vger.kernel.org, intel-xe@lists.freedesktop.org, hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com, lucas.demarchi@intel.com, rodrigo.vivi@intel.com, thomas.hellstrom@linux.intel.com, airlied@gmail.com, simona@ffwll.ch, david.e.box@linux.intel.com Cc: "Michael J. Ruhl" Subject: [PATCH v5 04/12] platform/x86/intel/pmt: mutex clean up Date: Fri, 27 Jun 2025 16:43:13 -0400 Message-ID: <20250627204321.521628-5-michael.j.ruhl@intel.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250627204321.521628-1-michael.j.ruhl@intel.com> References: <20250627204321.521628-1-michael.j.ruhl@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-xe-bounces@lists.freedesktop.org Sender: "Intel-xe" The header file for mutex usage and mutex_remove() cleanup code is absent from this module. Add the header file and mutex_revove(). Signed-off-by: Michael J. Ruhl --- drivers/platform/x86/intel/pmt/crashlog.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/intel/pmt/crashlog.c b/drivers/platform/x86/intel/pmt/crashlog.c index d40c8e212733..6e32fc1f8f1d 100644 --- a/drivers/platform/x86/intel/pmt/crashlog.c +++ b/drivers/platform/x86/intel/pmt/crashlog.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -262,8 +263,12 @@ static void pmt_crashlog_remove(struct auxiliary_device *auxdev) struct pmt_crashlog_priv *priv = auxiliary_get_drvdata(auxdev); int i; - for (i = 0; i < priv->num_entries; i++) - intel_pmt_dev_destroy(&priv->entry[i].entry, &pmt_crashlog_ns); + for (i = 0; i < priv->num_entries; i++) { + struct crashlog_entry *crashlog = &priv->entry[i]; + + intel_pmt_dev_destroy(&crashlog->entry, &pmt_crashlog_ns); + mutex_destroy(&crashlog->control_mutex); + } } static int pmt_crashlog_probe(struct auxiliary_device *auxdev, -- 2.49.0