Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp2791852rdb; Tue, 26 Dec 2023 05:28:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IHV/tFqDqvfGgUP4nr8vSmKQrFkKZqkwSAxXlfOltYz/M7tbKvmbJ1AuO33UM27hg12MExm X-Received: by 2002:a05:6a20:3791:b0:194:ae7b:3847 with SMTP id q17-20020a056a20379100b00194ae7b3847mr7236423pze.34.1703597311009; Tue, 26 Dec 2023 05:28:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703597310; cv=none; d=google.com; s=arc-20160816; b=nBr8y232VGvglgNN2l1AN16qYWsGYvFrFUdb9kQdoKN/Kr0rsOEgA8J2+297HI/ZJL EEeZw/PDNqXdwdnxx4AFbrUYr86Z6RvQeO/j2Rv33HylqUCsI4YgWMWPggRqXZJrsQM2 qjw2b8+aog94rwXGlFQbEt24DH911kh68p+Co0yZMmdactu/aJJ36iNjAVOib2jsrFkw J2KCQvz/u14nfaYXIGEhA1Y9vLY6upzdOEsYP5YSm3n9RlXGkLGOnRqKB4j4IP1Oau+G nKpHHsAruf9XOL/wKTF1/judgRK9RwjEoHKeiW1gEAYO6mIpgUyhDjM1bdbrBk9t5Nmf VFrw== ARC-Message-Signature: i=1; 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=5LKUghNjSLJ2aoOVo5dxNSkHXTNp2mWbZkp52MM6q9Q=; fh=XaTqR/2qXzY/zSYNV/jctYbDgh++p8ja6kzJiUxOQys=; b=LONLF73KhwRLxVnOwlccOcuBhedvyARbz7cZyR/gE+ySKViwOLyDAPFHJqBRQ8PDt4 sYJ5QSWaf8R2Quo5Mm0dAO9Gdz7UzzXV2p6ygto90RNmoeJna2KWSzNlsiPih3GNOtoE GGf3fl4lIZrdREOYOnn+TKB4nL19MHFTekbpWCV+f0hlb8CRbWFJcIPOxtSipLPINWni Zz00W77lBMMuKtjt1sbfxVWBsVLYy6VU/j0TjVFocdIxjqeACFO0IgeNFljHwYt4O8wa aEGLWPuVZWKxsC4Fwo/T5X1nYTWVvQ3qmOhvjyElB+k2sLDwaCOjN2R8ZFqg5KyzvdTu yj3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-11519-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11519-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 76-20020a63024f000000b005cd9243c104si4095013pgc.295.2023.12.26.05.28.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 05:28:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11519-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; spf=pass (google.com: domain of linux-kernel+bounces-11519-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11519-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 A1E272830D1 for ; Tue, 26 Dec 2023 13:28:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 838244EB4D; Tue, 26 Dec 2023 13:28:25 +0000 (UTC) X-Original-To: linux-kernel@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 C1C644EB25 for ; Tue, 26 Dec 2023 13:28:22 +0000 (UTC) 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 1rI7Td-0006yB-Ok; Tue, 26 Dec 2023 14:28:09 +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 1rI7Tb-001ePq-CM; Tue, 26 Dec 2023 14:28:08 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rI7Tc-001FXA-1G; Tue, 26 Dec 2023 14:28:08 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Dov Murik , Ard Biesheuvel , Dan Williams Cc: kernel@pengutronix.de, Gerd Hoffmann , linux-kernel@vger.kernel.org Subject: [PATCH 1/2] virt: efi_secret: Convert to platform remove callback returning void Date: Tue, 26 Dec 2023 14:28:02 +0100 Message-ID: <4a97c8e6996c9c95244715310b57ce5af6ccb1ad.1703596577.git.u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@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=1623; i=u.kleine-koenig@pengutronix.de; h=from:subject:message-id; bh=HZawbBGN4ZeoKoNwMa9p/anf72qdPDLDyflq3XBOU2g=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBlitTiF7Q6LPTBILQzLPFujFV4KCr1bTgHzw6NW OwjGqfEtpaJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZYrU4gAKCRCPgPtYfRL+ TkBkCACeaJNlG6+8zgivZjAdP0unbo7IwQwQBaiq7ypeRCwzJCDAqGQwyMju5tlx3ArltRsdnqH ZRU1TbnKe14zmg09+lFYV3ix30OhcDomGQvKoVwstNquuHPOkiRZA+8rtGXQzMxtWz8Fz706qqm 8utEqC6IgubmAlTwkETt9DpBgVc+a7dUD1YkS4s8fl04qIJICkNACClyT58nsruiNOdfvQxEpyt 1ANnl1yiWrSVeLMgAcfxISqwosqYib2fhYqG/poy6UmM928lcu5cup2b/rS959RvgmLdMeecgJH S8IJ70jrNPuEXdncItYBFgvHKb+33dZ8/Sgp0t//wPAfZQQm 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-kernel@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/virt/coco/efi_secret/efi_secret.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/virt/coco/efi_secret/efi_secret.c b/drivers/virt/coco/efi_secret/efi_secret.c index e700a5ef7043..cd29e66b1543 100644 --- a/drivers/virt/coco/efi_secret/efi_secret.c +++ b/drivers/virt/coco/efi_secret/efi_secret.c @@ -326,16 +326,15 @@ static int efi_secret_probe(struct platform_device *dev) return ret; } -static int efi_secret_remove(struct platform_device *dev) +static void efi_secret_remove(struct platform_device *dev) { efi_secret_securityfs_teardown(dev); efi_secret_unmap_area(); - return 0; } static struct platform_driver efi_secret_driver = { .probe = efi_secret_probe, - .remove = efi_secret_remove, + .remove_new = efi_secret_remove, .driver = { .name = "efi_secret", }, -- 2.43.0