From patchwork Sat Feb 17 07:30:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 202578 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp194678dyc; Fri, 16 Feb 2024 23:32:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXQj3jD/gJJawG7iZ9SQl4f6vy/zE1BBiWkJ6wseiffzoTwK8oUVrK+AalD4d1FZeN89GGtDvp66il1dXwQYS4Dw7jL/w== X-Google-Smtp-Source: AGHT+IEh9kKNN/0Yg04XF5FHqXVEAvCy+2EEmh8wEuITbTlcflYRqBc9P4K8PbumhIGrlU+xxbAr X-Received: by 2002:a05:622a:1886:b0:42c:7b96:12df with SMTP id v6-20020a05622a188600b0042c7b9612dfmr16697481qtc.31.1708155143973; Fri, 16 Feb 2024 23:32:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708155143; cv=pass; d=google.com; s=arc-20160816; b=RHcl+FCrq5HvvH0t2L50tF8tuz3yNdyoudPpahE+wHUrzFQIVVdaXrBt2VUwijeOQh WBqKGxBBRLdKPBsttBcYhvfl6fnRXFZua02LsEPeycXkk4UY8uVFtmBtbHfZSjLqoEPs XtwRn/M5M5ScXJhkkvZ9BvnFHF1JRbb9Yr1F2DHgunIySnfJq3NLIrGZiG6Upcc3xs9B tpJ19QWLbShIAYqtAnxwSOA7NEJCR8/9CeWbumvCgUvBOoP/ZcV5jwheLnJC84dPmQce ecAamP/gLIgVwnqjdXmEbGPUGoM0eM06x2LaW8WfDaz8tJWr0L5mMQm+Vx2SiCxCnmn7 Pl3w== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=HXDa8YFPQiliIbuq5HJ9khulV8rK+PXHSC6Ee9kcXik=; fh=AkZTJ1vQdqOJlAfk7xXIPyq0VWZ2grm6Iy/f8NX2w48=; b=OZg+y7U2OMw6/u1K84ur1TDM7n6w3hoRKodecZbgvIeTWqeOo1pLVXJel6bo6yXgIl f1qEPp5XOlcIo5w58vPvOtK+2BQ/xsPwm3SEIotmM2Ice7ABm1M9vpO18TqImoeXjgE5 K3vWZ+FIC5taB9BPeDdInEEi3Qyk6yHOfQLl4Lx7hn3UDmxE+GkBa87cqr29Cr3i5vOz 3NadsbhLJ+njrqEo5rLDY5uwkFxu7slSuo8iexhldJ0CMed+mtKQLD1aCl+HhR9QfHWq R5ePyUTDiI+Jdu/reMLIvQuTRjwn/EFX9SAgF1+4jfnESAVdw0a3TVLEEY2vZZTzDIe+ P+YA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=phcQj97w; arc=pass (i=1 spf=pass spfdomain=wanadoo.fr dkim=pass dkdomain=wanadoo.fr dmarc=pass fromdomain=wanadoo.fr); spf=pass (google.com: domain of linux-kernel+bounces-69714-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69714-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id bp13-20020a05620a458d00b00785da71a474si1651405qkb.193.2024.02.16.23.32.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 23:32:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69714-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=phcQj97w; arc=pass (i=1 spf=pass spfdomain=wanadoo.fr dkim=pass dkdomain=wanadoo.fr dmarc=pass fromdomain=wanadoo.fr); spf=pass (google.com: domain of linux-kernel+bounces-69714-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69714-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=wanadoo.fr 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id BDBEC1C20FED for ; Sat, 17 Feb 2024 07:32:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 794B31CF98; Sat, 17 Feb 2024 07:32:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="phcQj97w" Received: from smtp.smtpout.orange.fr (smtp-19.smtpout.orange.fr [80.12.242.19]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3705517727 for ; Sat, 17 Feb 2024 07:31:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708155120; cv=none; b=lEXpdpTYnkwKCjTxtsQtZ7NqNZeavgJUj7pOiDhEwF8OxCf4n9WVBg6cWLnOGuBrMWcAk0dEc7tqWT9P0GnyQ94eI0Jz+/AVZVPNALy56psYVjtQxdnO1cwMHlYTxPVEQSo38QpMnYvr0C7azTXcfxFcn/NJsidu9lGTzaX9a7w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708155120; c=relaxed/simple; bh=npv7ZOWRpw6sxGJkWx9vOTc73+q2ocP0AqU18/94cms=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kmzLPrAjFLCQmb4CVKURy4wKSazuflOFf85brgS4Dn4EGwEXsCtHLYv3YRGPmmPuAfmD7tIf7/S/EzwpG6hV/Gc6pRBGfI1NOaCgS8bRAP6c3+qkJb5rNT1Y0xC9zN7ep/8ScZLvAxbeHAUtmqfUj2S2letfze3c40Xz7oXk6yY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=phcQj97w; arc=none smtp.client-ip=80.12.242.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Received: from fedora.home ([92.140.202.140]) by smtp.orange.fr with ESMTPA id bF9rr7RBlRhCJbF9rr0LV3; Sat, 17 Feb 2024 08:30:48 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1708155048; bh=HXDa8YFPQiliIbuq5HJ9khulV8rK+PXHSC6Ee9kcXik=; h=From:To:Cc:Subject:Date; b=phcQj97w9FE+Zh+H12MyDYbqxfDXboeZhcdKcaDy6IYyvzkOgI972oBzbtXtwMg5C TSZzZnStNK+6c0yjaRj6GF3y0dBpnOXAJAUlwEsLl9upx5aFrJOzMzF2hKsQXaT49C mXh+FDJQK6n9udm26kvldXMSW6j8/KqH2VouZIXH4wPfx71+y8hUTRLOsfunS4eSb0 xMXnV9UilbxMZjyEV378CWYPjQR0nLNmPjq0rPE2VV1lRyo6Te76CGsSbLDlhQVbNA BXcBr0lnTd3SDNbOwf3iQ+bI5ijk3c7TvYPinnOVdFynHb25p4ZKxfLFfGilW4zWsl /+7QF7t8eyVFw== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 17 Feb 2024 08:30:48 +0100 X-ME-IP: 92.140.202.140 From: Christophe JAILLET To: Marcel Holtmann , Luiz Augusto von Dentz Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-bluetooth@vger.kernel.org Subject: [PATCH 1/2] Bluetooth: btbcm: Use strreplace() Date: Sat, 17 Feb 2024 08:30:41 +0100 Message-ID: <79b9c9d9f86b4c573f0d3f2dac0a6fc9e6024058.1708154999.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.43.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791130487972158544 X-GMAIL-MSGID: 1791130487972158544 Use strreplace() instead of hand-writing it. It is less verbose. Signed-off-by: Christophe JAILLET --- drivers/bluetooth/btbcm.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c index 0a5445ac5e1b..01d2343b4978 100644 --- a/drivers/bluetooth/btbcm.c +++ b/drivers/bluetooth/btbcm.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -544,7 +545,6 @@ static const char *btbcm_get_board_name(struct device *dev) char *board_type; const char *tmp; int len; - int i; root = of_find_node_by_path("/"); if (!root) @@ -557,10 +557,7 @@ static const char *btbcm_get_board_name(struct device *dev) len = strlen(tmp) + 1; board_type = devm_kzalloc(dev, len, GFP_KERNEL); strscpy(board_type, tmp, len); - for (i = 0; i < len; i++) { - if (board_type[i] == '/') - board_type[i] = '-'; - } + strreplace(board_type, '/', '-'); of_node_put(root); return board_type; From patchwork Sat Feb 17 07:30:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 202579 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2685:b0:108:e6aa:91d0 with SMTP id mn5csp194762dyc; Fri, 16 Feb 2024 23:32:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVtgOTZd/scK0LRcMdge2KVZhXFQ1s2Jo1pCgyOp0KfLE3BCQvN8pL4HDZ9chdQdjG3hPmq6H1I8SjxLferbyCw/vy1/g== X-Google-Smtp-Source: AGHT+IE8Whp9V9/x2yUXnpk8P0QXamWn9jSYpUgUnNqWTjYNgBAUXa0JH7INi2YeJEoZ06bicZ0S X-Received: by 2002:a17:906:f44:b0:a3d:d7f1:35fd with SMTP id h4-20020a1709060f4400b00a3dd7f135fdmr3142705ejj.9.1708155159278; Fri, 16 Feb 2024 23:32:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708155159; cv=pass; d=google.com; s=arc-20160816; b=PtdaxuWUMyIyoDEhp6w+mso1+PLRX2qSxmRxKSlSHyXv3AsBIVkDXJ16DBjsj6nNW8 ASPeJ3xquCajVMQUUnp0A+aVHTQ71cpt8pVzeSecRGiTZKD5M062zFsa0WPwHTKpy/I6 O6PPMKJ0i+TCorrAp16nLz1+tI7brfDd1qpvwWvkohghplY0fSYM6o3FfiyraVUu/2iQ O5JaTWAo3sbKwB2X442yCfz9QsppgF35sg/AT/nHgZo6GqQMq5sQ8q8Scd2bUlEk/zxu uzMCad5JIDGn0NjatyTRNIoOasoVFkX6TKJL9EGNMB6OF5PS/uwaECncRoELU43KoUom UCFQ== 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=5vKyutSF5vbJeBYhO1altd+rC0SgjetnS/HWHgINoOs=; fh=AkZTJ1vQdqOJlAfk7xXIPyq0VWZ2grm6Iy/f8NX2w48=; b=fFPvWk2RM7KJte2R/eJiA/J/9XwLQYfFFobo0bM3e6EIndbt6elh0gmcodrIN240sA qCBh6HbVJ3flUX5KzL3OFRCuDllYlH7rDyO8JRxby6LgRNMTEK2kRWeNFYRNPywpMrKz LnJcssLK2QfaE2+ZYxszzL3KHn6KRpylSZxpX7cUVftHX3OnArvh05GpFs2EegNswIVx aFLeS8RKwF0x3AcIkTQAZat+b1LPXF1FhKxbU4JROr9cpeAMOP8HaiEhodhWewJcHPdx fHnAuhfQa2CdcMHkY+7Tnw8b+UWZEAthFfQAcEwgVdaANi9xr1Yq5mO/f/FyI9I69p3Z sQ2w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=PuMWz8ZT; arc=pass (i=1 spf=pass spfdomain=wanadoo.fr dkim=pass dkdomain=wanadoo.fr dmarc=pass fromdomain=wanadoo.fr); spf=pass (google.com: domain of linux-kernel+bounces-69715-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69715-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h16-20020a170906719000b00a3d1df335edsi628977ejk.988.2024.02.16.23.32.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 23:32:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69715-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=PuMWz8ZT; arc=pass (i=1 spf=pass spfdomain=wanadoo.fr dkim=pass dkdomain=wanadoo.fr dmarc=pass fromdomain=wanadoo.fr); spf=pass (google.com: domain of linux-kernel+bounces-69715-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69715-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=wanadoo.fr 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 am.mirrors.kernel.org (Postfix) with ESMTPS id DEE3D1F22315 for ; Sat, 17 Feb 2024 07:32:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 585CB1D53C; Sat, 17 Feb 2024 07:32:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="PuMWz8ZT" Received: from smtp.smtpout.orange.fr (smtp-19.smtpout.orange.fr [80.12.242.19]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3FCF31CAB8 for ; Sat, 17 Feb 2024 07:31:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708155122; cv=none; b=FpWPKO6AK/qucmH1lEKsql72PrYl0COrhtS3S8Km8g9xLgcnlXYLDA1NSuyKvg2EI3CgnEKh+PI4u4Rs4CiDMgEL7rZ++7P5HuqU0sNZg+JeHNDVyPQrJnJGmmfDBA4ikzmgP/0kWUgdQzb6+JxiaksB00iGCEuQVuYL6wPkIVU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708155122; c=relaxed/simple; bh=3wE0OY454mubqM9kqU3kHG80CJKYun5q3sKzkDVg2vs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QdpjQe1rFbc3hTB26BTEGsdJE9XEjg5j1o6xvZjojeK/ivj7gZOuPA+MXvZbZIv+Wy2nujPC1VkZXM3MxtQSXeDAvBPrQDbtHnE25KK3WJLnJ8LdmeSnMZ8H13OisBBJK/f3PoiLo14G9L1Dbp8ekuFsPGRg01VW30PJDWffiD0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=PuMWz8ZT; arc=none smtp.client-ip=80.12.242.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Received: from fedora.home ([92.140.202.140]) by smtp.orange.fr with ESMTPA id bF9rr7RBlRhCJbF9tr0LVY; Sat, 17 Feb 2024 08:30:49 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1708155049; bh=5vKyutSF5vbJeBYhO1altd+rC0SgjetnS/HWHgINoOs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=PuMWz8ZTELKEI8vMRbQe6sW8sB9UIkS8KOjwo8ppSOudEaxa0Lgmi5UFIpWeQIVYT Hg8au41CCBRXki8wWZso2guY1wUC/4Mpf9rpSHiDTqjE6ojSzFGiVYeurLICDSeOfK E1V27m6vMF9Y8tKWjykO3djjzhW9CCLiZv23uFgbmH15+Wp+kmzYATvvcH1vDXlGt0 RP2krzxKEzp5Q+T8aY0w85zPLl6bRvtFMKobcgCoPOdU7R8lTydn4Dbr63omIqg8yb b/ySRMCSRFaOeD5yl6/hYQuMj6ITg227LEOy9bZmYLlFwrQTnHW288nsF53SWkgXvd J1wZeKzEafSaA== X-ME-Helo: fedora.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sat, 17 Feb 2024 08:30:49 +0100 X-ME-IP: 92.140.202.140 From: Christophe JAILLET To: Marcel Holtmann , Luiz Augusto von Dentz Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-bluetooth@vger.kernel.org Subject: [PATCH 2/2] Bluetooth: btbcm: Use devm_kstrdup() Date: Sat, 17 Feb 2024 08:30:42 +0100 Message-ID: <272fb12e9392c0bc6fead23931f98ea45bf6fc69.1708154999.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.43.2 In-Reply-To: <79b9c9d9f86b4c573f0d3f2dac0a6fc9e6024058.1708154999.git.christophe.jaillet@wanadoo.fr> References: <79b9c9d9f86b4c573f0d3f2dac0a6fc9e6024058.1708154999.git.christophe.jaillet@wanadoo.fr> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791130504143314894 X-GMAIL-MSGID: 1791130504143314894 Use devm_kstrdup() instead of hand-writing it. It is less verbose. Signed-off-by: Christophe JAILLET --- drivers/bluetooth/btbcm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c index 01d2343b4978..f9a7c790d7e2 100644 --- a/drivers/bluetooth/btbcm.c +++ b/drivers/bluetooth/btbcm.c @@ -544,7 +544,6 @@ static const char *btbcm_get_board_name(struct device *dev) struct device_node *root; char *board_type; const char *tmp; - int len; root = of_find_node_by_path("/"); if (!root) @@ -554,9 +553,7 @@ static const char *btbcm_get_board_name(struct device *dev) return NULL; /* get rid of any '/' in the compatible string */ - len = strlen(tmp) + 1; - board_type = devm_kzalloc(dev, len, GFP_KERNEL); - strscpy(board_type, tmp, len); + board_type = devm_kstrdup(dev, tmp, GFP_KERNEL); strreplace(board_type, '/', '-'); of_node_put(root);