Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp523058lqp; Tue, 11 Jun 2024 11:04:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUBnyH5d/HwzRMDoaQMi4jt/RVrnowtex4MreSOidIjHrFMRCw7LxAGBY/xiCEXsC41B4Cw/A9kIm3VednJchr9YrlnyjFKfbNBK7lkXA== X-Google-Smtp-Source: AGHT+IGaGCpsUSWfp+0uRkLL6ncsdU2tbUccz2bHQ0+uvUUBazLMNWj8CuahDVjoYf1tC+DLnjCL X-Received: by 2002:a17:902:ec8d:b0:1f6:138e:59e8 with SMTP id d9443c01a7336-1f6d02e08f8mr150051695ad.22.1718129077319; Tue, 11 Jun 2024 11:04:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718129077; cv=pass; d=google.com; s=arc-20160816; b=fTkg4Op33AzXu9eufQpeunZt+aamgdE7YEHZnVq6O7efR8Y034/QtURY0/Rgd4JBF6 f4AqYzqT9PZs8BsnpWs2SfRgPqEqVGUojbBQnwXvmdqQmEszizImvYvWrNzSbvOCpSV2 MTDSP0C7ZmY467oVZe8saWd3UdR3GQuHASDPGqsSclR2qHPq6VsKSIIVB2M4F+vP5zO1 RI4VYilEwvlNbgqbHkINVTcwb42Eu9DDXgepVsPd8AcCzURmAa4GUDq3EMGpXYdjIewd /RVZ64zX6BA8wy+o2rgcLdofNTa9qDxwinC/WBzd+88rAgsqNgSZVMN9GdObL8/m6Unk ubsQ== 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; bh=0kevgpjZJvkzfQV62izrRYDh1HeGZ4SeAzXK4CzeVHA=; fh=oQbvuNnOUeIuBT5siQdg+euUHNNdn+CeEwAg69/1RSo=; b=v3yFbqx6tFiXKyo2vTl3DaoAqqwN4aWyU6rb0CjxFM18PSFvccMCL8kWRtxJD6SG3N UL5uhy1S/q2tV4Gie3QStCOmTcgqEHYeSyF3dkOPSi0DjhQgjwH5nz+NNgM9M4SOu7X5 UurEIn94TO779Tj9vNXmN2p/c1wn/aBysN/8sgRnizlULSuSW785r+7ER0p95hfIJuQ9 jxaURq1DAfsmGsPRd7nNX4dyhvuIZtq5X5vSJuHoMQLo+2vnpBqND8oyJxapsgsOjOOF 3lhbuD0PmjLhocKOxjuyZNaSVt3VLZM8WWw66VBBRBAAPOwloc24Bq3GP3o38E+AeHKL 0lwA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eCZ9YV+6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-210367-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210367-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f6ef8bcaafsi64058425ad.321.2024.06.11.11.04.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 11:04:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210367-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=@kernel.org header.s=k20201202 header.b=eCZ9YV+6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-210367-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210367-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 BFA72B219B9 for ; Tue, 11 Jun 2024 17:57:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A1FA7CF39; Tue, 11 Jun 2024 17:56:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eCZ9YV+6" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A345378C79; Tue, 11 Jun 2024 17:56:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718128566; cv=none; b=FL/JBtpVR/EosJigh0DOwLmkPRdQZPb7dHPiIZ/E9uv8vTz5/MnNkCEfOxr8LTaehgz7mz09sgYXwDbBWoYxgjM/jN3XJU7tUtKZJ2ar823GdRykaZitFzhd3lOQl/Q1Vj/uImgTx+1kUOxS1sYKwSrjM9I1fDt9mS5xABmuBiY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718128566; c=relaxed/simple; bh=qcBiO8SNAAfZtzQky9fVy54pHt8w/K87uRJ98NXalMw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HxkAI8eyybnvYGYeudjTEMRmxPtoNNIKXq2En3jx7/n9Fq3ec/FkNVcVOLWKW3RlnRLfLGBH+ufP4/MQZRooA7zwhVDYRVDjgJ/kYtJfAHjNupabq6zvlaEcrSYz7Y7XhJDdAsjDVBaHgGQc9/nBJiY0+ANZPCPcCQ6qDsMA5Mk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eCZ9YV+6; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id CFBBAC4AF49; Tue, 11 Jun 2024 17:56:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718128566; bh=qcBiO8SNAAfZtzQky9fVy54pHt8w/K87uRJ98NXalMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eCZ9YV+6vzdNEbWMyFBCo5Nm3G/q9xWLYSSS2LhhR55+FkesjxOmlmKiFPa/cC5AT mC8PJn2mdJXba5LRSwoMhJJRPIFPk2Jj7hLCe/gl4Tg1XZ16dcPeo5RFKnAbMXPv9n nJXSApDGUvK+peCbOALN1/YvhRFaUgm2wLFzODuilKjW0T4AYOLl6tIvuONXGYFzVW aZeAWyv95tJ3Gl/Q56sT8nbtTfCPS0scdv50mrulYXzIXYmhr/AVeyC3rrvkmPoBIN PIoyPJ0zJkWBVVLr2AeJ9sa4Rnl8vgAzET+Ez4hVmB1DlkxeHJf9x2VAOz/P7Gvglt caZxLIfNNUvzg== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada Subject: [PATCH 05/16] kconfig: import list_move() and list_move_tail() Date: Wed, 12 Jun 2024 02:55:14 +0900 Message-ID: <20240611175536.3518179-6-masahiroy@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240611175536.3518179-1-masahiroy@kernel.org> References: <20240611175536.3518179-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Import list_move() and list_move_tail() from include/linux/list.h. These will be used in the next commit. Signed-off-by: Masahiro Yamada --- scripts/kconfig/list.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/scripts/kconfig/list.h b/scripts/kconfig/list.h index 882859ddf9f4..7008243f48a8 100644 --- a/scripts/kconfig/list.h +++ b/scripts/kconfig/list.h @@ -127,6 +127,29 @@ static inline void list_del(struct list_head *entry) entry->prev = LIST_POISON2; } +/** + * list_move - delete from one list and add as another's head + * @list: the entry to move + * @head: the head that will precede our entry + */ +static inline void list_move(struct list_head *list, struct list_head *head) +{ + __list_del_entry(list); + list_add(list, head); +} + +/** + * list_move_tail - delete from one list and add as another's tail + * @list: the entry to move + * @head: the head that will follow our entry + */ +static inline void list_move_tail(struct list_head *list, + struct list_head *head) +{ + __list_del_entry(list); + list_add_tail(list, head); +} + /** * list_is_head - tests whether @list is the list @head * @list: the entry to test -- 2.43.0