Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2565297rda; Wed, 25 Oct 2023 06:31:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHzHen9VPz7E2VFjpxrYpGfN0bKOwTyLuDeiHriH8dPXhI/TXK3XZ4PUUbQacjip3IpQJ0R X-Received: by 2002:a05:6808:1789:b0:3ad:f86a:878e with SMTP id bg9-20020a056808178900b003adf86a878emr17298502oib.13.1698240697875; Wed, 25 Oct 2023 06:31:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698240697; cv=none; d=google.com; s=arc-20160816; b=nq35Ldrrt3AaI2vggBtF1Ikxn6hKs9cjiwWcuLKxSG5q7ONdgauSTpceVUYOE1hcEM UdFb9XSLbwactue+Hi4XdWOSI49q38nyrpDAXF4Zz7+nO+h1uURExCARQd9AMERY1mV0 0d8zywLknyT0MSATGhUbbADe9mTLz44+DahJLoJ/8usA13Lfo9RjPhSZBfFAVasx1YHj Of6OHaI3f/B/uRN28TsBMsBTsfZbuehXA6WfRb4pE+QrBCsFmLvefk8HyaH3Xt5Mm2pz fOMaAaxcQ2CFEhkgfNPmiXE7+TDWA9JP+V9G0WA4l/Vm9Zy+ZF7Ox0CzaMl30SXowHsU VxaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RG2mfTqWbL3cxDA9gME5AJbCoVhfsJy6L44fFhUJ/WQ=; fh=QnQFCawfBcJMaseyLrOKE+kEEs9lNyZCWHm956NhFZ0=; b=HpC+sTI4xE+8+1dh0/WdmhMCRxCDMBTSlT+6zAdM+DVt2NGDT5ly9eZmg13GwGulwf ULF5hXSvCcbn8AnnMaBMN9bCNAfb+vWpov56RvZuguQGAQbQGjMZ88p9YxIvyUhwhhAm TOC4QpV0JfD14D1GluN2ljvHztA+cYxEMrYY9eQMRb11Iua9QJKRP+XQhuG37i4zrlem DcpuNagn6dbeki/YPvJm1w852KdpaWPPiSdj1LOvNPKxsKb5rySU1NSg1bM0OWVHc73s l+BrzmeKTyDTmUchTd9Bly10+em7Wb/rh5A1p5MIZkvGdU3opMSXZFQiM8FR7SpmV0RX sanw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=kEDXqe7U; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id ea22-20020a056130149600b007b9be15c6e7si210670uab.7.2023.10.25.06.31.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 06:31:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=kEDXqe7U; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 2EFEC810FBD5; Wed, 25 Oct 2023 06:31:33 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344687AbjJYNbQ (ORCPT + 99 others); Wed, 25 Oct 2023 09:31:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344586AbjJYNbA (ORCPT ); Wed, 25 Oct 2023 09:31:00 -0400 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC3AF19B for ; Wed, 25 Oct 2023 06:30:54 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-40839807e82so5500625e9.0 for ; Wed, 25 Oct 2023 06:30:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1698240653; x=1698845453; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=RG2mfTqWbL3cxDA9gME5AJbCoVhfsJy6L44fFhUJ/WQ=; b=kEDXqe7UH8ClEgA/ECdoBeGnmPewZnnnCTcfK2qLu/1GUtWsLLnIAKpIk9x3jNs/E6 tpGd4dfK7FGNUWp6mwYGhnDNAUsobbflSR34uEPXr+VGQVdtsIA179PIMtJYuZ0dupYc +cstDofbn4tnetBdoriYsDEnLVsZriioLkCrW4/hbUyZtF/iXXeKr7/5sd6b8qo8f1yh hYYrVDC4TrhTrTCyoyeVZPzH/dhu+M8VY/VEEOc+AljWDAII/7EjsAPuEeSA+llb18tm dBdlWtqxh2Ngl5l/6Vh25AOz9BCNORVul3z9nc5fzcHcB1GAQjx9HRbkT2gA4Wud+0NI VlFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698240653; x=1698845453; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RG2mfTqWbL3cxDA9gME5AJbCoVhfsJy6L44fFhUJ/WQ=; b=ml8fz4BEIfq5DirOEy5Fw6W0CE5YAfkc0bPejbyercehc8xQqJ5l0rWFQAOBwpwdBz 2vdttZEF77Ze5aenrcVAVBDymmPFjNtolHLp6cJaJ/ZGCvWl0jp08ve3+42evwhdZtK2 34wXNhi3E6/mMTw9ZThiP6wHZtNoPNdCrjAqB3DfLNPziCoMrXgl/Y3tMozW9rP+r25g jY9eutwR6vwH05OqGqmvRJnFKsbgi4txb+ccboDjwvxUbXqvJewSkRes+gwt6ADCdwJx lAn+jWL71o6GZazmrsZVj36aI/KGdNxxgj4UJT1Um4HoaC6Q1EEOszyT2MIVVUSuIG4s 2YXw== X-Gm-Message-State: AOJu0YxMkRy7JGaj1C/Rf8/2AifD3Xc1JScw10Q5R7dh/t3cmg/5SNll D8TSWmzu85EUwxQ/uICJjs+6WQ== X-Received: by 2002:a05:600c:310d:b0:406:44fc:65c9 with SMTP id g13-20020a05600c310d00b0040644fc65c9mr16195701wmo.8.1698240653281; Wed, 25 Oct 2023 06:30:53 -0700 (PDT) Received: from Red ([2a01:cb1d:3d5:a100:4a02:2aff:fe07:1efc]) by smtp.googlemail.com with ESMTPSA id je20-20020a05600c1f9400b004063ea92492sm14921894wmb.22.2023.10.25.06.30.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 06:30:52 -0700 (PDT) Date: Wed, 25 Oct 2023 15:30:51 +0200 From: Corentin LABBE To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Herbert Xu , "David S. Miller" , Linus Walleij , Imre Kaloz , linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH 22/42] crypto: intel/ixp4xx-crypto - Convert to platform remove callback returning void Message-ID: References: <20231020075521.2121571-44-u.kleine-koenig@pengutronix.de> <20231020075521.2121571-66-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231020075521.2121571-66-u.kleine-koenig@pengutronix.de> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 25 Oct 2023 06:31:33 -0700 (PDT) Le Fri, Oct 20, 2023 at 09:55:44AM +0200, Uwe Kleine-K?nig a ?crit : > 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/crypto/intel/ixp4xx/ixp4xx_crypto.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c b/drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c > index 4a18095ae5d8..f8a77bff8844 100644 > --- a/drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c > +++ b/drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c > @@ -1563,7 +1563,7 @@ static int ixp_crypto_probe(struct platform_device *_pdev) > return 0; > } > > -static int ixp_crypto_remove(struct platform_device *pdev) > +static void ixp_crypto_remove(struct platform_device *pdev) > { > int num = ARRAY_SIZE(ixp4xx_algos); > int i; > @@ -1578,8 +1578,6 @@ static int ixp_crypto_remove(struct platform_device *pdev) > crypto_unregister_skcipher(&ixp4xx_algos[i].crypto); > } > release_ixp_crypto(&pdev->dev); > - > - return 0; > } > static const struct of_device_id ixp4xx_crypto_of_match[] = { > { > @@ -1590,7 +1588,7 @@ static const struct of_device_id ixp4xx_crypto_of_match[] = { > > static struct platform_driver ixp_crypto_driver = { > .probe = ixp_crypto_probe, > - .remove = ixp_crypto_remove, > + .remove_new = ixp_crypto_remove, > .driver = { > .name = "ixp4xx_crypto", > .of_match_table = ixp4xx_crypto_of_match, > -- > 2.42.0 > Acked-by: Corentin Labbe Thanks