Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp298404lqi; Wed, 6 Mar 2024 18:41:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWP/WQJgWQmn5xllyxtQqWwpTmy/S1apjWbnmYq3P+4ZDh9yLBF8/VPAg8uu5jLZX1ZQoKWzZ5kCGL+DwMPOqqa3S0qVh+IvxgmUJ8oUg== X-Google-Smtp-Source: AGHT+IEcJdfqs69inreeNOC6prewtcLoD95NnxqyEuh+LOWx4xzKI00f3fSNM5yRfcJOcvlSCIvp X-Received: by 2002:a17:902:eb8a:b0:1dc:84ab:95d with SMTP id q10-20020a170902eb8a00b001dc84ab095dmr9529640plg.45.1709779279686; Wed, 06 Mar 2024 18:41:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709779279; cv=pass; d=google.com; s=arc-20160816; b=0D+Nxuk2p+hCSFc2txpmdbpm+Yln0mKEYKd/Y/q++HdLNSeoxJ3oLu7vUfComX5m1i Cq/+ZzRh6byWn83WqW+j8C44E3Uoac7WWXlcJXCRfRrvpKSDEhGIU5D1+wVIQHVTfYqG Nb3Ahe3LQG8AZVZTKYay4RTno0FG+xT6nsc3eMPMrxiTmQjEWpUT0KuxXdRiixAeaunX 7lgt5dbyPR5nwScg0d6r7I/pJkjKju0qquVMr0J8F19RtsSuKPeL/R7w5zzhJt/00JPT U+1xPx4pbkDVzlGsSDAhmzYK+w1bqP+zcGtWPm81ZCx8g++o2CmayZ06LOt7kwFDsTtE 4o/Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:dkim-filter; bh=jEVsja8SSmoMIIjVaOxrbFMoSgIk5r+GyxaxqJuvUC4=; fh=2TCgDUABLhnN+B3LhAvwj3wO9TJloQkaRFwwXQWooLw=; b=qAQUBG2J/aeEGsIvnGb5C9nxlDZwfmNF/nA+go3OPDGt4jBRpugdxwG634GxgH4Wvy XJ9bpvs7R4S7Zeyja78/J1fSq3WwGzywM9TwpJu1gk5/5BPkaZK5i7ODPpHERJ9tXOwJ wJr9GiSCLQ0OldV2BNXh5IoOmJ4dLz9sfr65ND/T+PPIoYVpLLHMGBdV/VgBp0zCtsXq 7OOoDIca2TpjTsMDEiF2fJf8qeykl+633gSvO39l0ikaWqHnVZ8NnAetxhc6fopTYU7w /hW19/Zct2O1faRawfJL/hQN61crxVX/TNxjKRGHXhWk8BR0laX4fXsOw0rRx3Lt2k5Z raKQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=ngT8lCR3; arc=pass (i=1 spf=pass spfdomain=salutedevices.com dkim=pass dkdomain=salutedevices.com dmarc=pass fromdomain=salutedevices.com); spf=pass (google.com: domain of linux-kernel+bounces-94869-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94869-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=salutedevices.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id o9-20020a170902d4c900b001db719a840csi13286426plg.569.2024.03.06.18.41.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 18:41:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-94869-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=ngT8lCR3; arc=pass (i=1 spf=pass spfdomain=salutedevices.com dkim=pass dkdomain=salutedevices.com dmarc=pass fromdomain=salutedevices.com); spf=pass (google.com: domain of linux-kernel+bounces-94869-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94869-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=salutedevices.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 83978B22090 for ; Thu, 7 Mar 2024 02:41:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E9BABD2FE; Thu, 7 Mar 2024 02:40:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b="ngT8lCR3" Received: from mx1.sberdevices.ru (mx2.sberdevices.ru [45.89.224.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6806D1847; Thu, 7 Mar 2024 02:40:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.89.224.132 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709779256; cv=none; b=hpVIqg92GrjyfTZjhzs1EA13+SQNQZChAkxgA77aFjn0PyXbtlzi7Pd6VeMFjyczFrd2PR1PWUcH6bsoQIjr5GMJbQNOcib/O2WNK9PKBzMzC/LPFq33IPBVTgja/FJoIxG6DIa7iYFYPND7P9g2ZjyDMtsjLELx+s4Qep+mG8g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709779256; c=relaxed/simple; bh=Yjjz5ewPjXZp4KyL2oiueZbhuwnsqUODQj8pNHnwbkc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iJbtFnOEg6mXXJZPx4wiFzm1NEN4ci8mL569hfjFMV6Rbe6J4+MuYRQW82Yso+SABZPQGqKTWzBl1Kvnc74r4aArMURKosEIMNZ1O0qfQXL5dKGUVx3LlLFGWtm0qkvUyWnCnmAcaPks01TbMZ6bx7Og9TB2avbAUnKEp1h/TIA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com; spf=pass smtp.mailfrom=salutedevices.com; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b=ngT8lCR3; arc=none smtp.client-ip=45.89.224.132 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=salutedevices.com Received: from p-infra-ksmg-sc-msk02 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 05C5312001F; Thu, 7 Mar 2024 05:40:45 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 05C5312001F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1709779245; bh=jEVsja8SSmoMIIjVaOxrbFMoSgIk5r+GyxaxqJuvUC4=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From; b=ngT8lCR3EkUmke2AOk56uWYG4CAuNBWDlIKszqS1zln2UZaEF+1yEzt2vI7f8Nn0W KojlbOIIVzM95uqCKn1NJAG9vU7b7gTDCvhIX+GMFiquDk7sLDkBvk95nuPECE26q+ /Eu1HxrZr7thZXj90/iIJeve4tbdPOdjyWU3MBLNdcnHzamHA9gDqdOxG0dw/J7M1Z k4bhE4Og8ZeCC8Een2FVn7E1O5Bi610KIzTocJq+EGHSvRT2FRDAQg/Qkcz5A8Yvpc wrhRfI+pCpolfY/a0nOpQJL8Kmbusli08c3YBudNBCLrJHzmh3LJFTmnH/15ZiZWEe qlS4PomkNG+nw== Received: from smtp.sberdevices.ru (p-i-exch-sc-m01.sberdevices.ru [172.16.192.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Thu, 7 Mar 2024 05:40:44 +0300 (MSK) Received: from localhost.localdomain (100.125.24.169) by p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 7 Mar 2024 05:40:44 +0300 From: George Stark To: , , , , , , , , , , , , , , , CC: , , , , George Stark Subject: [PATCH v5 01/10] locking/mutex: move mutex_destroy() definition lower Date: Thu, 7 Mar 2024 05:40:25 +0300 Message-ID: <20240307024034.1548605-2-gnstark@salutedevices.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240307024034.1548605-1-gnstark@salutedevices.com> References: <20240307024034.1548605-1-gnstark@salutedevices.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: p-i-exch-a-m1.sberdevices.ru (172.24.196.116) To p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 183875 [Feb 29 2024] X-KSMG-AntiSpam-Version: 6.1.0.3 X-KSMG-AntiSpam-Envelope-From: gnstark@salutedevices.com X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 7 0.3.7 6d6bf5bd8eea7373134f756a2fd73e9456bb7d1a, {Tracking_from_domain_doesnt_match_to}, FromAlignment: s, ApMailHostAddress: 100.125.24.169 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2024/02/29 19:21:00 #23899999 X-KSMG-AntiVirus-Status: Clean, skipped mutex_destroy() definition is located in the middle of the code related purely to mutex initialization so place it separately after mutex_init() Signed-off-by: George Stark --- Hello Waiman. This is helper patch to make resulting mutex.h look like we discussed it in December. It was in you cleanup patch at first but slept away somehow include/linux/mutex.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/include/linux/mutex.h b/include/linux/mutex.h index 67edc4ca2bee..f7611c092db7 100644 --- a/include/linux/mutex.h +++ b/include/linux/mutex.h @@ -37,14 +37,10 @@ # define __DEBUG_MUTEX_INITIALIZER(lockname) \ , .magic = &lockname -extern void mutex_destroy(struct mutex *lock); - #else # define __DEBUG_MUTEX_INITIALIZER(lockname) -static inline void mutex_destroy(struct mutex *lock) {} - #endif #ifndef CONFIG_PREEMPT_RT @@ -117,6 +113,16 @@ do { \ } while (0) #endif /* CONFIG_PREEMPT_RT */ +#ifdef CONFIG_DEBUG_MUTEXES + +void mutex_destroy(struct mutex *lock); + +#else + +static inline void mutex_destroy(struct mutex *lock) {} + +#endif + /* * See kernel/locking/mutex.c for detailed documentation of these APIs. * Also see Documentation/locking/mutex-design.rst. -- 2.25.1