Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp695836lql; Mon, 11 Mar 2024 14:50:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVFz0511Y3GIMrkemX4iuYdWNvq1dSOv0wIfYWTVHz1jUxN2mERRoKpqVBzRuRqnu/S0ZOw0wXkGmyKUs266wLSkxDjHpfJOUvg2LTbsg== X-Google-Smtp-Source: AGHT+IGUatvEal1X6kHXFgQFZigQd1lYZqgYJS7ER2YSY959op8eDg33Lmr17VUYQPJ4WMHQFW2w X-Received: by 2002:a05:622a:489:b0:42f:12c0:127c with SMTP id p9-20020a05622a048900b0042f12c0127cmr13586624qtx.29.1710193824820; Mon, 11 Mar 2024 14:50:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710193824; cv=pass; d=google.com; s=arc-20160816; b=s8SPFBOayVfxf0+AOHXnX9BhERBiuup+LQXvGF5ahZofMWp3siPYzt1STfNAw9tvEO hdA7e1UgZB5nSZYgliDJAXKiDIBoxwCVASOKwipxn5OF+eYUF84uDczAbU4ZM30rgd+C rTL27qXDQ51WeW1FQK23pkvJu00QOOVwW8Cg+00FqKw/fcvQMc6SGFMF+r28w+PGI/R5 n9mqQ7/N93he/Yb5sz0Lv95B44MRU+7szKUXI6eZHnzh8yUFMHK1uWXMQj5CRounK36Q EmL+eVy7FRWwGWzicZtaJ+AzOWUDOvE2tBQvivxVcqJN4x53l6nLZKCvFrocgS0t0yXf vYmA== 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=ff0sMbC3rF65uMGESBsU8jCRvarrCJq/2UFjPRNWH08=; fh=s80VUom3J2UaAaGy5FyVg7hmfw6g3S//Mf/K8Jcx/8E=; b=WkoSoFXCJPpvBI66gZfRD6WnbT3rpMU6t4EsDPGGR8b/6IdB1nEqhWwO6mGmNII/L+ lhU2q4PZRi4K/3SUj5npFt4nYFBt/2EdsKyhHTkm6liQnlCQI/d+SA3N2Zn6t6IGFCvL v9KExVl1l1AzfH6QG5Cow+mWVYYyIDZzejN7blKJiSZZmu8XQimkv98LJaW+sbLKludm vxzf0sSfnKlstKmpm6Jn8glplFowjOWaaOubg4UGe0P39RNYgzN8HAw5Yzr4EKyfMdaE fjOwWQXshXmJgnr6UTwoEH7d6xP87VquzbnSgLBpgbV0xzzxSfTf6mw2XK8TidMqf+Vb t36w==; 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-2444-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2444-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id v10-20020a05622a188a00b0042f14d3ea98si6421364qtc.737.2024.03.11.14.50.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 14:50:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-2444-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-bluetooth+bounces-2444-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2444-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8C8A11C20F3B for ; Mon, 11 Mar 2024 21:50:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5966F5731E; Mon, 11 Mar 2024 21:50:10 +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 669E657303 for ; Mon, 11 Mar 2024 21:50:08 +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=1710193810; cv=none; b=DccWaM9DvbJEO7yXt9loRgHYCkku0OdthsNZ6luGr20CmKYzZu8VAYou/Zd7WeeFP2rXzi9HVolbTLrGzERqYVmckiE3f1KfAjPzJpxPAc85XAXzcZIoNZIHLuQoA3nLMcqka9R2+PxTwY1FX/U4sF8aNekRVmu5WVc1gEztdVw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710193810; c=relaxed/simple; bh=siklY8AyTepBDoVjY5hu8J7Bk3TQfvEqwxIzIKqkXfM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Np1CMKyTzqdZZduwsrMRd62CU1xbA+ITPP6HMLKptJpdP0KVHkpVFKJjy4wO/0JLr1eG3txDGMYajRbKhtwUbG/foSj2/5CTrZHu//TyhNzJjfuq2x/Qb7+itbSm4vWSfo8cl8hgzynQrgrDcM3666jwJjPFTLzKD7sj9zCn/w4= 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 1rjnWz-0003DX-Kg; Mon, 11 Mar 2024 22:50:01 +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-005nDk-5d; 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-004IoU-0I; 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: Bjorn Andersson , Konrad Dybcio , linux-arm-msm@vger.kernel.org, linux-bluetooth@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 1/3] Bluetooth: btqcomsmd: Convert to platform remove callback returning void Date: Mon, 11 Mar 2024 22:49:52 +0100 Message-ID: <0707da8c41e85d74788733bc455275580bed778b.1710193561.git.u.kleine-koenig@pengutronix.de> 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=1879; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=siklY8AyTepBDoVjY5hu8J7Bk3TQfvEqwxIzIKqkXfM=; b=owGbwMvMwMXY3/A7olbonx/jabUkhtT3NU1Rn3wXpyxf3yMs9988Ppn5pVyIYblWQ9V3kRnbz To51f07GY1ZGBi5GGTFFFnsG9dkWlXJRXau/XcZZhArE8gUBi5OAZhIpQf7X1l31pM/uSTOsQSz amTNVbDR1dW4sbvF/hjnvfQyrfLbvK38zhlW4Tf3b9khrVehPyciaYupc98N4YoDJi+drCPOOF1 es+Ltgj1RbYyPyyNC/RM4d4RZubsWLFkxzcX+heD2o1/Y9QKktasMfE2DVM/9szT4f6dfTOHFjO L6xgBZjdNCu8SMkkyz/3D2Tj2s1WHTq+UndKmrdfL2pbOFPz9YFbvhvCrr1/JDj3tP72q/ab37h uz+jFsKu6dy2plkhN/l3P2Fx9Jwd0X+8UX2WV3T93c3twhJnGAJz5PpEjBjq0nPje68wfZVps11 0SZeZf891xfKqE1VMJO1q5R6WhctPf/jVoHrhguM3gAA 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/btqcomsmd.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/bluetooth/btqcomsmd.c b/drivers/bluetooth/btqcomsmd.c index 11c7e04bf394..88dbb2f3fabf 100644 --- a/drivers/bluetooth/btqcomsmd.c +++ b/drivers/bluetooth/btqcomsmd.c @@ -197,7 +197,7 @@ static int btqcomsmd_probe(struct platform_device *pdev) return ret; } -static int btqcomsmd_remove(struct platform_device *pdev) +static void btqcomsmd_remove(struct platform_device *pdev) { struct btqcomsmd *btq = platform_get_drvdata(pdev); @@ -206,8 +206,6 @@ static int btqcomsmd_remove(struct platform_device *pdev) rpmsg_destroy_ept(btq->cmd_channel); rpmsg_destroy_ept(btq->acl_channel); - - return 0; } static const struct of_device_id btqcomsmd_of_match[] = { @@ -218,7 +216,7 @@ MODULE_DEVICE_TABLE(of, btqcomsmd_of_match); static struct platform_driver btqcomsmd_driver = { .probe = btqcomsmd_probe, - .remove = btqcomsmd_remove, + .remove_new = btqcomsmd_remove, .driver = { .name = "btqcomsmd", .of_match_table = btqcomsmd_of_match, -- 2.43.0