Received: by 2002:a05:7412:b112:b0:f9:3106:f1c0 with SMTP id az18csp86642rdb; Sun, 17 Dec 2023 22:56:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IHYDnHcoDgCXziheZb23E98ScLsDAJKBGV6C9/JlPprzy8Mbk7ACypaUny/JVXqv/GjwH0A X-Received: by 2002:a17:902:db05:b0:1d0:9a64:e51f with SMTP id m5-20020a170902db0500b001d09a64e51fmr9372687plx.0.1702882617906; Sun, 17 Dec 2023 22:56:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702882617; cv=none; d=google.com; s=arc-20160816; b=yn1BTr4W2uoDVdDiFSkoBXIVSB80ZzizgqRUy8C0iZeAuWWUYSozRoL0AjAWu4e0Ch TfzEW/kC55iNjhtMFzn3qVoZlmJbkQuH/KWkBHwGWYpRRYH8XB7PAJbtbLgMf2h6qSxA YGMTz6fG2OX38xiKcjX+k1ta6HnZUIC3WhBZrnd+XXuQe1LSv+oVPkMGH2Tx5YsBF0QR 7YOvEy8910WzJ3dki71L7XGHXTSSzf+cgOtKSsbFMw6wyxvhihqzNwSW1HkikFj3Xi8P O+lFQWO5dsnWq8MMsywahi2tmpnsBtGJocDmGZ6F15YO2tLFrIebrroW0bt5gJEk3QCL 6Bng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=heetabb8aKzy5dkmKa1naMHxOgfU6ho5cqN9FwveJso=; fh=dnoA3QdLdbTKs99Cbn5JNqpUZR7UlmOILiRsUUpDHtg=; b=eFIN0tGOB68b5HgYnNOlG31562DuBuJyTRLuQ/JNQ7YZzAFAAR0OVW5k2/3MIFt8QA EZtUtqa2ncUI/wcHIw2DxIUxu2WoQ2mhNphMzDYCvKgtsyYJLhzzDUBrRQYkazUr5sRB 6QsMzaVFxz5exKhBblFNzR0nyXmuS7xV5QUYMN9TOpbM15pGu9ivxUBgsvyh/UWyu39j 20dMfZavED1ah588CQt5iQZo6c9TOoFr4XDJfoQ6QXknjLGvf4HnuLxiHsUwuJt1uK/x vG4gnrR8Gph7sMQi+8VxETJW71WEVYgvyMYMWNSKNFNPggHbJdO23nN4osFOGVLCZ/3p xzQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b="f2//Jurm"; spf=pass (google.com: domain of linux-kernel+bounces-3072-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3072-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id a18-20020a170902ecd200b001cffbe81706si18076466plh.354.2023.12.17.22.56.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 22:56:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3072-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b="f2//Jurm"; spf=pass (google.com: domain of linux-kernel+bounces-3072-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3072-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com 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 304F9B20DBF for ; Mon, 18 Dec 2023 06:56:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B91F3E55E; Mon, 18 Dec 2023 06:56:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="f2//Jurm" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ot1-f43.google.com (mail-ot1-f43.google.com [209.85.210.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F63AE549 for ; Mon, 18 Dec 2023 06:56:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Received: by mail-ot1-f43.google.com with SMTP id 46e09a7af769-6d9dadc7f36so196940a34.0 for ; Sun, 17 Dec 2023 22:56:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1702882603; x=1703487403; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=heetabb8aKzy5dkmKa1naMHxOgfU6ho5cqN9FwveJso=; b=f2//JurmVLG8h5SJSZ+vzAEz3jbJruN85qL/DQkHauyEO6KgTEHo0vsfayK44XDaup P2RQilD7p1RwmT0VmiLCeJrZJzexGutpS0fIY0vev+01Digu8fR+9EmMrADkgiLa6cdl kD8iYkffBXOq0oV8ZmdJDYkWiqOlkRFcKQOeU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702882603; x=1703487403; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=heetabb8aKzy5dkmKa1naMHxOgfU6ho5cqN9FwveJso=; b=O0IdA7fk4t8l35XVTQrkoNpz2E81NlmAMDFczN4g63DNSmrUTPwkoZgaSHqx8duJ6A G93914aOwCDnQKmUxmARm729hB++BhlpRkIJPSD8acM0UL/DMyAKUlNwuwE1Lui3dpIP r9fV5sdegusAfo/4AuLMCLBfLVfoo6l7mMhKn8ETnQus8N1XIC2K0KCpkPi89RWG3bLS 2PUk248xVPqhmlay2uWYDQTrN/inbpRBqfV5XG085opT/aRhDGcEO+vXC37fvtINfTOG HzcBvpBXFxsIfaSb0tEPuyJUfd14m98j7tBOzX5jlaDggu858SdwU35ZfC+8BFAy8u3/ jwog== X-Gm-Message-State: AOJu0YyuGI16xw+qNnLsck018bC5vPO37bvI2H05cwmYA4RbIN7z34sI ngrfB2WeyMpHj7SXXE7vO4/zcbjFVA3/95ANdBnbDg== X-Received: by 2002:a05:6808:138f:b0:3b2:efd3:e78c with SMTP id c15-20020a056808138f00b003b2efd3e78cmr32596500oiw.1.1702882603322; Sun, 17 Dec 2023 22:56:43 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <94780e5a414b20b6effa1e87208c14620c854e88.1702822744.git.u.kleine-koenig@pengutronix.de> In-Reply-To: <94780e5a414b20b6effa1e87208c14620c854e88.1702822744.git.u.kleine-koenig@pengutronix.de> From: Markus Mayer Date: Sun, 17 Dec 2023 22:56:32 -0800 Message-ID: Subject: Re: [PATCH 01/15] memory: brcmstb_dpfe: Convert to platform remove callback returning void To: =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= Cc: Krzysztof Kozlowski , kernel@pengutronix.de, Broadcom internal kernel review list , Florian Fainelli , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 17 Dec 2023 at 06:30, Uwe Kleine-K=C3=B6nig wrote: > > 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=C3=B6nig > --- > drivers/memory/brcmstb_dpfe.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/memory/brcmstb_dpfe.c b/drivers/memory/brcmstb_dpfe.= c > index a7ab3d377206..5028467b2dc9 100644 > --- a/drivers/memory/brcmstb_dpfe.c > +++ b/drivers/memory/brcmstb_dpfe.c > @@ -909,13 +909,11 @@ static int brcmstb_dpfe_probe(struct platform_devic= e *pdev) > return ret; > } > > -static int brcmstb_dpfe_remove(struct platform_device *pdev) > +static void brcmstb_dpfe_remove(struct platform_device *pdev) > { > struct brcmstb_dpfe_priv *priv =3D dev_get_drvdata(&pdev->dev); > > sysfs_remove_groups(&pdev->dev.kobj, priv->dpfe_api->sysfs_attrs)= ; > - > - return 0; > } > > static const struct of_device_id brcmstb_dpfe_of_match[] =3D { > @@ -936,7 +934,7 @@ static struct platform_driver brcmstb_dpfe_driver =3D= { > .of_match_table =3D brcmstb_dpfe_of_match, > }, > .probe =3D brcmstb_dpfe_probe, > - .remove =3D brcmstb_dpfe_remove, > + .remove_new =3D brcmstb_dpfe_remove, > .resume =3D brcmstb_dpfe_resume, > }; Acked-by: Markus Mayer