Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1891877pxj; Wed, 19 May 2021 16:56:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJynEE6r7E4iB0os2wnhyRXkCon5Ta5Wnx0bBzyPI1vY06lwqj132FouTq2pOC/BHshjnQ8i X-Received: by 2002:a02:354c:: with SMTP id y12mr2374428jae.144.1621468588025; Wed, 19 May 2021 16:56:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621468588; cv=none; d=google.com; s=arc-20160816; b=rQMDhnwjqXOrVvCjmztDiKHkSIpkLcrUggRdMCTKG7eBXV2D6bPGJIMWYm/ooBA0GV 20MtxrX922SFY65fa5wLlV+ppVce7lk6XHvEy/bHgHrp+tp74EqBhKSkz4Zm1A5+OMm6 3AManNYZHAJ6Ituk6VWK+8fGdeKvUXYZ6TMWWKrbMqGAnCwfBfFJjRx/03FuqWs6tvgA IU4aVDik3qiMA+wR3m61J9N7LyHxLe7Sw+fYjogzlGkiqbrvme7GVdLPlM0qnOYILKyw 7sCUWRBtVCncuT1sQP+PnmOUL3/3rmofQ0b3B/CQ9MljY1tk0GHkKHT4OF/YK77l2I5P 4ehg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zJt4FvOdaHnERK7zPswPmt+3fi+oS0bIfqgJwwAG+cs=; b=cZeGjkz8dbCaVQV9BcBSkXvLW7xz4yShYXm4hnO8L0HBbZNgT76QguiA7rKwI47Or0 ZwLLpc2+QSTL01WBe0fXe7SfUlG+tIzmrSkdWPRquK8OMHDS1GCWxHRGzgc3PN0AbUZJ isHqIK3KEnIApJmkEEWvVKNmqYajwv0bziOsgBOqsZjWwBEmrzUr0JTjUQdqY3Ycgeer jHw0b9PJnaaoLC/iWfcPHIW1Pyn10K0jNegSHS1Eis8YVyeIyiLn+bv74l3RMkgecyzc Cj7bC0oPP9aaQl0ajH8Y8nyB73svCTFVllXtqgPDLwJJGjbJt9L3Xr+zbD5UUT/ac70Q a1mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="J/puEMOq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si1423360ilj.61.2021.05.19.16.56.15; Wed, 19 May 2021 16:56:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="J/puEMOq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230137AbhESX4i (ORCPT + 99 others); Wed, 19 May 2021 19:56:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230185AbhESX4e (ORCPT ); Wed, 19 May 2021 19:56:34 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AA9FC061760 for ; Wed, 19 May 2021 16:55:12 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id q7so20335245lfr.6 for ; Wed, 19 May 2021 16:55:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zJt4FvOdaHnERK7zPswPmt+3fi+oS0bIfqgJwwAG+cs=; b=J/puEMOqZ8T7DKVZKypmjoPKYZMTdm7d14F3rAgMbCOnsJToM3PxHQae9wcGe0qK+N 1GbFwe+U3EFT1xj8JIqlx8z8eybFL2ZwItzst7aaCoYtGmxQv2XXNupjR0xn4X6k3mF2 JSvrhlnnPppLwlydiZfepQUHKVhGW31Q5YRRJkK7zmr7AiLoqTsl4Kf8GR9U22edkAIq sAB8UGa/P2IQr/qz6iKBVH4BFfn1cqMKz9p0CQ20QFCV9+8F0FHaMi0jMop5a4HmH2tq ZB89rgPrhEmrOkDDNwkqKd/gDO05zbaYh3+XmoVpQgCol+MpN+jfG1aFoKGKRZe3Phum GxAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zJt4FvOdaHnERK7zPswPmt+3fi+oS0bIfqgJwwAG+cs=; b=L9ysiFNMn0nr2grkS0wFXcnxv+VTOdxcl8mGNl6KqPVEpsklJEYYi+F6ss+9QKoiQL jdvNnWGqbY+bwgiJZQOq2wL+LbRitcrQbtI+BlPi+X7EN8fACTIuoSSxCiWVeTiAx/B9 Z+EQuqZypPQnvXkCWcN8ovXPX6DOt4QTiNVHz/0XWFr1UMEtJlBmSGuilfB5ngxfjxq4 Y6bBzlADP5Frv0RdagbeiVE/SrRFS2WnrBN62N8u3mYbafIe2ZsTcJQslEzbrkfZUve9 kpiNGWyBVbGGAnhkalt39bWA0wU+MYwiSiUH+66KoxvgLA7bE10c1Djf7Yuj1cnJtvte h1rA== X-Gm-Message-State: AOAM530JCv9M8RQ+BZSk6jjjyssZO/X60O4KpW2qPB+1jWXSvnQg/7Vu isAPLkL9Ld/Sl1b1RFDhENhhBHoSr7VlsqlvHBiUxA== X-Received: by 2002:a19:b0b:: with SMTP id 11mr1383425lfl.291.1621468510806; Wed, 19 May 2021 16:55:10 -0700 (PDT) MIME-Version: 1.0 References: <20210516061425.8757-1-aardelean@deviqon.com> In-Reply-To: <20210516061425.8757-1-aardelean@deviqon.com> From: Linus Walleij Date: Thu, 20 May 2021 01:55:00 +0200 Message-ID: Subject: Re: [PATCH] gpio: gpio-stmpe: fully use convert probe to device-managed To: Alexandru Ardelean Cc: "open list:GPIO SUBSYSTEM" , linux-kernel , Bartosz Golaszewski , alexandre.torgue@foss.st.com, Maxime Coquelin Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 16, 2021 at 8:14 AM Alexandru Ardelean wrote: > The driver doesn't look like it can be built as a kmod, so leaks cannot > happen via a rmmod mechanism. > The remove hook was removed via commit 3b52bb960ec6 ("gpio: stmpe: make > it explicitly non-modular"). > > The IRQ is registered via devm_request_threaded_irq(), making the driver > only partially device-managed. > > In any case all resources should be made device-managed, mostly as a good > practice. That way at least the unwinding on error is happening in reverse > order (as the probe). > > This change also removes platform_set_drvdata() since the information is > never retrieved to be used in the driver. > > Signed-off-by: Alexandru Ardelean Nice! Reviewed-by: Linus Walleij Yours, Linus Walleij