Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp4216041rwr; Sun, 30 Apr 2023 02:48:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4mPHWwl9M+k7cZwdQexY0Ai01CPjXli7QtzdHP7YPhaZrKUdTVvkCGGzzWGOqr3qSW5a/l X-Received: by 2002:a05:6a20:72a3:b0:c0:2875:9e8c with SMTP id o35-20020a056a2072a300b000c028759e8cmr14521906pzk.1.1682848096590; Sun, 30 Apr 2023 02:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682848096; cv=none; d=google.com; s=arc-20160816; b=XMHDZdOJ9wxt6MDnZi5GT0mg3oLd2W8yvZZQYYv/smu05bkRt24IopOKHyzjh1Oupj Us/l8f6G4s3atxZIpoTq6dJPHbbA6hFsVMkDtJOXrt0CUaf8cgIEKxB89pV8iK7T4k5t eDLLontyyPwk/opX4gKyz2yVLyPlrWAQJdH6sl+krirv5pHyOIhNQR7PcOHsX5wWz9UJ 6hVvOILD1lSDukDLyKQX9+CTcc+HDirNcDDzdzE10m4OrLqlt8WrhduZPbrG1M2fE9Yn jKYeFAI+r6xtGrQjlZO4C89cwBpSgBSHCtU9eGrI+yHupjcNqk9RSU4xZz8e9LxXq7Nq P2/g== 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-disposition:mime-version :references:message-id:subject:cc:to:date:from; bh=UsCYVpFqQRfGa8BcDUYgGhpg6XAlR3qhHokQFpfam4o=; b=E83gTvqJWMry/kK9qku484pgEmKvPOG0txGJ7v0s1nBbeKgEEpv822Id0JY18PXZuc J/HDRIJzsZUe2r/QgCd8YOpgznB7SvbH6ZbK9TQx3sS92S4Z0jD+RhGnSAlO+nWqr7GQ UsQod8hxPyAAbhu8OJrr+NpK4Al/XCNhiGDSen/4cR+1fk4cchDG0Xhcs6h20+Rk45Bf 9ctKfaxLQPEOoeG/effQQA0+rjjtsni5KAR47jGwLt5ELylIi/tj/sdYZbvXcdLOWcEt 1AoSdB+kvn/FC8TJIisPL8jjgkL/6CZHNeA9OD2//Gxjq457xUVtcUiooGlBrcF4FjEz GWug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ls4-20020a17090b350400b0024988ecf25bsi30825057pjb.86.2023.04.30.02.48.02; Sun, 30 Apr 2023 02:48:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229636AbjD3Jnx (ORCPT + 99 others); Sun, 30 Apr 2023 05:43:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbjD3Jnw (ORCPT ); Sun, 30 Apr 2023 05:43:52 -0400 Received: from fgw20-7.mail.saunalahti.fi (fgw20-7.mail.saunalahti.fi [62.142.5.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 49FC5199B for ; Sun, 30 Apr 2023 02:43:50 -0700 (PDT) Received: from localhost (88-113-26-95.elisa-laajakaista.fi [88.113.26.95]) by fgw20.mail.saunalahti.fi (Halon) with ESMTP id 80ddc11b-e73b-11ed-b3cf-005056bd6ce9; Sun, 30 Apr 2023 12:43:47 +0300 (EEST) From: andy.shevchenko@gmail.com Date: Sun, 30 Apr 2023 12:43:46 +0300 To: Lizhe Cc: linus.walleij@linaro.org, orsonzhai@gmail.com, baolin.wang@linux.alibaba.com, zhang.lyra@gmail.com, andriy.shevchenko@linux.intel.com, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] pinctrl:sprd: Check if the pinctrl_dev still exists Message-ID: References: <20230430042254.7543-1-sensor1010@163.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230430042254.7543-1-sensor1010@163.com> X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FORGED_GMAIL_RCVD,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sun, Apr 30, 2023 at 12:22:54PM +0800, Lizhe kirjoitti: > to check if the pinctrl_dev still exists before calling > pinctrl_unregister(). Besides commit message has no explanation (and English grammar incorrectness)... ... > +++ b/drivers/pinctrl/sprd/pinctrl-sprd.c > @@ -1115,7 +1115,9 @@ int sprd_pinctrl_remove(struct platform_device *pdev) > { > struct sprd_pinctrl *sprd_pctl = platform_get_drvdata(pdev); > > - pinctrl_unregister(sprd_pctl->pctl); > + if (sprd_pctl->dev) ...this code is not needed. > + pinctrl_unregister(sprd_pctl->pctl); > return 0; > } NAK. -- With Best Regards, Andy Shevchenko