Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp695806lql; Mon, 11 Mar 2024 14:50:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVbEOXr3ZmBZkohgst+evc/HGe7nOW0x7zqsdeJ+fEo9kEYdHQAePf2XnA9ugAo+r2CaSsnXg+mPjnxQ0nZOWMXtqU3VyPenr7L/ptyUQ== X-Google-Smtp-Source: AGHT+IGf/1NdJuAR+CzLuox/u8ODVyH27qa4s+cXMwgc/9acKTvZIJOHWIc+skmvih19oN5F8OIp X-Received: by 2002:a05:6808:1a16:b0:3c2:513e:92ca with SMTP id bk22-20020a0568081a1600b003c2513e92camr2837920oib.6.1710193818788; Mon, 11 Mar 2024 14:50:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710193818; cv=pass; d=google.com; s=arc-20160816; b=H5e1VkvitO2mdxSSLPiFuXBcDp74HfHGku7nUgkXt1SiSBH6Yo3ffONAXtrT1f2u0m n6yanJGOQ0TLdfTOgECPyXcONre1XxUDqmB4OqPZyfx2SfdBQOldGSEexTt5lwN3Lo9E wAXtrk97l9jiDTjsCv2ZxyqKjK9kn6WViVfe4Hm4dOqLYVUOh7dELThUnOanVhL7Uof1 95P6biHZ4x67EYaRugyVZkarRkOrUYZ6v84jajndGKA8gVw0aXji9nqI5KPZddNsE7mP r4VIDvHDwd9vZE8VIVS9hVqief7akQQ0ECCKQhxjzrxt1HSHsgOz1oDQKFG8vv4ijgr0 qfMA== 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; bh=8MIBF74Uen7VD3XjDSnrZ6JOVnEo8HAsK45LIwOzE2M=; fh=9Hr2DpZRGZQjm2oDsmrDrmwLVaEdragpb8/3KNpnwmo=; b=W3cLoqTcVYFLRDmkVEr3/jZXQD3nqV2T7qL+Hv34qsTJi0qKVOKokhaHjzu5GMVzLg do29v6UklirPfY0mpCpjJtQZyIUwRzGWHleLe+rcV5e/JtnzethckFau0gBCVEMwOZrv KE8hYaZPuQF+gYipVaD5PuLBWineaxHNbDnaH3Cc/HuzE3VZ5JhZEbAnZ6Cc7fCwAz8M hHG0x1wmA03+2E3cyCKok/UsA5jcdY01h9RhJpMhXzwTEhSvTolq5cX3uKqqFFePHpdD 24Rxf87Irn9SUVbAn+AF7wBx1phQC9o+5zbSk1/4TITeiMEGKg6Q0mnOd+xxVun5SQt9 AJag==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-bluetooth+bounces-2442-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2442-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u15-20020a65670f000000b005dc529b708asi5670333pgf.743.2024.03.11.14.50.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 14:50:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-2442-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-bluetooth+bounces-2442-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2442-linux.lists.archive=gmail.com@vger.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 6B379281609 for ; Mon, 11 Mar 2024 21:50:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8FDCE57307; Mon, 11 Mar 2024 21:50:08 +0000 (UTC) X-Original-To: linux-bluetooth@vger.kernel.org Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (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 75DF456B77 for ; Mon, 11 Mar 2024 21:50:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710193808; cv=none; b=V5Zio11iyczgYON9G9b33FJwem4Vyjqxqhph7tgOKQMdOqwcKcw2o07LNyptQ5XJmH0m7a+MElzV+qmYmNoTd+LvHTepUbUicYA/a90x8aUlfbQ49O58iexd7zR4xS0Rjx4GmZiCYPoH2prULEU8C8neDHly7DpX9EpO3Q4UuHg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710193808; c=relaxed/simple; bh=utqFOcp6ACV+cy8qTYsIXw7uFfcZt5FhhtAl/yvFyf8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=uzhl3PggYjx0Lk6HKbaiSQ/p1FV8umLzM55wmAQbodlAVqadzps5hqHjEuP8mxWWcFfmznEWDtv4rHHnGo9Gt7A0MrWio0SY6NKNG7TJeRRXdhHO+tdE4GR65u+YcfOBlNSbYvJcy/AbarzIIWfFW5AogBTd4rCgujMonJj7Au8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rjnX0-0003Eq-4R; Mon, 11 Mar 2024 22:50:02 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rjnWz-005nDq-NO; Mon, 11 Mar 2024 22:50:01 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rjnWz-004Ioe-24; Mon, 11 Mar 2024 22:50:01 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Marcel Holtmann , Luiz Augusto von Dentz Cc: linux-bluetooth@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 3/3] Bluetooth: hci_intel: Convert to platform remove callback returning void Date: Mon, 11 Mar 2024 22:49:54 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1740; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=utqFOcp6ACV+cy8qTYsIXw7uFfcZt5FhhtAl/yvFyf8=; b=owGbwMvMwMXY3/A7olbonx/jabUkhtT3NS0n/BX3X5/q5i1g4liWpbzlfm3lG3uG8MWvhZt1k wWjVF92MhqzMDByMciKKbLYN67JtKqSi+xc++8yzCBWJpApDFycAjCR33/Z/8e4qhRcMjsue165 d3HjlUm3rAMdft+MLfWrPsMqoVsRvekpR/w3S08xnrdBZw55zj+/2WNdTJ4Kc4fNIzH3S+m9j39 rzMjtcsie9s3F3sVvxo3zmpGVW180b+yw445MZj9q80d4Q7FQl8Hxhf+uHf7NVH/DMjxVS+9aBc crt9hvCt88bCveHAng0e1c+ccwUN/i2qK/G27kv1Z/c1dbL9PuGOfa/6//WS9yKY+8IKS2tXRTw bnmluTzB67MUmHZfbzG4PHun8ePb5sgm7D9nYhT+KFJlUqq7tevszXFMsZae8XK20VbqExeU7zP VFfa6NqFD+I5X9Xaq/Uz1jmJanZkbbOcd0xljk2Oe/huAA== X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-bluetooth@vger.kernel.org The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new(), which already returns void. Eventually after all drivers are converted, .remove_new() will be renamed to .remove(). Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König --- drivers/bluetooth/hci_intel.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/bluetooth/hci_intel.c b/drivers/bluetooth/hci_intel.c index 78afb9a348e7..bd44d683b9be 100644 --- a/drivers/bluetooth/hci_intel.c +++ b/drivers/bluetooth/hci_intel.c @@ -1190,7 +1190,7 @@ static int intel_probe(struct platform_device *pdev) return 0; } -static int intel_remove(struct platform_device *pdev) +static void intel_remove(struct platform_device *pdev) { struct intel_device *idev = platform_get_drvdata(pdev); @@ -1201,13 +1201,11 @@ static int intel_remove(struct platform_device *pdev) mutex_unlock(&intel_device_list_lock); dev_info(&pdev->dev, "unregistered.\n"); - - return 0; } static struct platform_driver intel_driver = { .probe = intel_probe, - .remove = intel_remove, + .remove_new = intel_remove, .driver = { .name = "hci_intel", .acpi_match_table = ACPI_PTR(intel_acpi_match), -- 2.43.0