Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp182270lqo; Thu, 16 May 2024 03:12:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUwQA+HWt7JFWqG5pTnK259MytbZQhYJfOMa5R5VgdRe51sBTJeFhL3TJ2WJ3Ulkt6yBRh+HkbMgVVwiVUy3JavMeA1fCarGWEqFn4DVA== X-Google-Smtp-Source: AGHT+IF0u1pmDyAqzMGNeeICYIJkaj2jfvTxbR2h0IilqHsk4HKd1YOdBBjCHCkYnE17yWdnI4tH X-Received: by 2002:a05:6a20:5643:b0:1a9:8b4a:b84 with SMTP id adf61e73a8af0-1afde0e6adamr15932248637.18.1715854352649; Thu, 16 May 2024 03:12:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715854352; cv=pass; d=google.com; s=arc-20160816; b=cuRWojgd+vrj1vM7MLarnHv2RAXy1cIdi5Si3FuQLR/Ww7TP4ISjuOp5C12I4VvMg2 lkF4hoNdIB/XCukcfgl21nws6+G1tc0EulYbv543rkTgMRiuEjBjTt6/aL9GBMWZg7nc H0csK9EUlVMb87HOCwQwmDMLOPQXxJAL1ETLw7Gp1Hkor6Zfo6lF31mUa5Oqz84YmrPt xnAdzYfBNKDPHzUXG8mLmJnHl4xPPw8Y+WrJB4OxBY2s3ixBuJiKj0L5aQkwc9J1Lp4p VO8QgaZ5t/g5wW3dJ4bZ7Haw41F96W24oMAkLu3/Yg58xd3Eny7LSBnqp2FNn7E85rvQ LICg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=i7xcYas1mCHPBv2m5841PBt02cH6wnPNq719uEG2i9Q=; fh=ilKBmqc/B6uclla/DEXvRUx4n26OFPljtCUOV7rEJRQ=; b=na8Eo+9tUBRM4UFWzKRPuU7OvR5ugIHXKhWdIAaZynwuHfsvjYoOXstVcC/QBYOr4n skvHa1aOlI0inDWz5mVNrM5OlYeLVTAJB7uatMa3pLsZcL40mpZqIxcFhyoJwI29OZdE 8J7WfWWHL5yX2DtGPw4zyXy2C42HSUQqrDFUra8F/GWD+sX/OkON5E8gwDx0Nk8bqIk7 u9De/SN3ayBfYyqu0RNx8TMPYMUaCwjouk3nS5CMqI1gPKknKDyTRDZPqKJ6N/aUhIwm n2aQSOmC1vjvQ0TMpcyTCiQHnWPyqoewcm0PjhGMQnne1dNY99uu7tDrwGa6e+TyWV5s sWWQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=U4jJXRQE; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-180890-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180890-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1ef0bad5a70si13926465ad.150.2024.05.16.03.12.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 03:12:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-180890-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=U4jJXRQE; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-180890-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-180890-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 0AE98284CDD for ; Thu, 16 May 2024 10:12:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A6650143892; Thu, 16 May 2024 10:12:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="U4jJXRQE" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (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 76332143754 for ; Thu, 16 May 2024 10:12:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715854324; cv=none; b=a7N91GnRJ4chPwXPiu7GFnETTZy0wBneb1SzYmgfuVzqsLBXt8BJdVDAEqaQjb/9DBduIvpOJWvCdL6Rjnd9TnfiUHrx0QgHonk9CspxbfielZI9lO1t4OLtxb7O8DJUIF2QyYLFzZdB/10ljIKSBxRb8nNuww1D/jbj/cCcXyA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715854324; c=relaxed/simple; bh=fJVijZDsk7G+N5ZyDazIeeDuEW47pTV5GN2yegKbc4s=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=LzG3q4zqr/qdLuG9M89Y4bk7mrqmBKRVaAPO9bbpsliBSYKN14eJfoMVhqxQK8qodalkw7hbpLDAYY7mJ5HpdOlg2EO10JnT8A+Y7K7eHE36T1NIkLVzxIKESPC1Q5fFVamoIKnC+l6voGXlGVVT6ptUoS5OrLFGdbOR28ZcsOc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=U4jJXRQE; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1715854321; bh=fJVijZDsk7G+N5ZyDazIeeDuEW47pTV5GN2yegKbc4s=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=U4jJXRQEQ9NqrEbULaHQIdf6/LNc1tjtq9H0VDDd+AWcnVMH0yoqF1hM9h3BYYsrO jmTs0f+wdu4NNZF8aUQ37jo4tY5jGlupeOt0silOa73/mVBuLZK8fpib56bgU9/mxk hKECjqfE+bnd0ah2bzSZmtNwMw2IVBGDJgHFzw3jH2kB7fM2uMUOK/bYxzpuCDY5ov Y8HmqA03vGqdBQb3FEF7U+CWLdIiecb23ypUyYhLcUUTLP3d6u5vil1hR5Le0RfDb0 xXG7jNYW21Qd71b0yl1I2wIH35KRecTOi+qBEOEmh8RRr9kKd+kVOrljGHLE1N0uyF CaqBGh//bGyfQ== Received: from [100.113.186.2] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 4A61C3780C13; Thu, 16 May 2024 10:12:01 +0000 (UTC) Message-ID: <671f4976-46e6-4873-98b2-89df896e4a4f@collabora.com> Date: Thu, 16 May 2024 12:12:00 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/4] drm/mediatek: Convert to platform remove callback returning void To: =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , David Airlie , Daniel Vetter Cc: Chun-Kuang Hu , Philipp Zabel , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <4a64dfbfbcfdf9b7cd46bc8026223e69a4b453b4.1712681770.git.u.kleine-koenig@pengutronix.de> From: AngeloGioacchino Del Regno Content-Language: en-US In-Reply-To: <4a64dfbfbcfdf9b7cd46bc8026223e69a4b453b4.1712681770.git.u.kleine-koenig@pengutronix.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Il 09/04/24 19:02, Uwe Kleine-König ha scritto: > 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 Reviewed-by: AngeloGioacchino Del Regno > --- > drivers/gpu/drm/mediatek/mtk_padding.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_padding.c b/drivers/gpu/drm/mediatek/mtk_padding.c > index 0d6451c149b6..9f92b720aaae 100644 > --- a/drivers/gpu/drm/mediatek/mtk_padding.c > +++ b/drivers/gpu/drm/mediatek/mtk_padding.c > @@ -137,10 +137,9 @@ static int mtk_padding_probe(struct platform_device *pdev) > return 0; > } > > -static int mtk_padding_remove(struct platform_device *pdev) > +static void mtk_padding_remove(struct platform_device *pdev) > { > component_del(&pdev->dev, &mtk_padding_component_ops); > - return 0; > } > > static const struct of_device_id mtk_padding_driver_dt_match[] = { > @@ -151,7 +150,7 @@ MODULE_DEVICE_TABLE(of, mtk_padding_driver_dt_match); > > struct platform_driver mtk_padding_driver = { > .probe = mtk_padding_probe, > - .remove = mtk_padding_remove, > + .remove_new = mtk_padding_remove, > .driver = { > .name = "mediatek-disp-padding", > .owner = THIS_MODULE,