Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp431538pxk; Fri, 11 Sep 2020 10:41:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwKyku/eqfEx+ya/5poy2PCErqvXbp0Rx2gJiGLDSixO6wUtCmb7HhnAhPKwb2cCQ9Dv0nh X-Received: by 2002:a05:6402:144c:: with SMTP id d12mr3473956edx.168.1599846073157; Fri, 11 Sep 2020 10:41:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599846073; cv=none; d=google.com; s=arc-20160816; b=N5YCyarmLAOO+Y2dyfCUnPSCC/fwjSGXPrRsdXEIu64PTSj08YV6pMlty3iPgqhILw yNjAHcG9XuKH5yJ/GEe3Gjr1zeNQydA3hUACqk3O4bUOLDAoH9mgJPFbuqaBZwLKNVgm SwO/sxVciRR8cGP9WMtfcSLxCk+coIyirWs8HsNOiK1o52jze7/dOB/gW607H4jM4ets mzqUxh8kvQfAgfzfe99c2qnitq/x5b4Z8BRxQEvCpjEGy/JYgjimrM1VVeOdLfWIM0UL lNSI0Yq+94uNe+MPzX/tgm4iNcJnaswnGqQ637Gsn6DieZjVDZbsO7KBQ0t6khIaMm8W Q0Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=L3C0S+6zhChsidzCoT4fHCt6guHvIr+yr8RZhM+W/sw=; b=Kjx8p+5zz8uEIZNa+VLsgKTefnoy0gzEzsTf6xSQ66IZB5LNDs2iiEKwaP784QjwcM B2EvJyM7UOGiWXkA9CVZCUd0GbPZiY5ffDnJxCRLfH60HvAnwQ0luKMYsxlYWFV2kd7w F16JpCErRQDXtVggJWjngmQkQznre0xQN0hHvzfLn3pGfLiB/rs21B/yEfFhbgxaeikp IvWinC4XhqCmJGaUZfnce2aYtv7/3QP7Xv/KF+SqWXadbTfhngzMatbSr19Dazzb1zcb sG1zP6QYK+uQX5a5OH16niuIvFQEtkhvIj4a8qkc4i7B/DGfGFPO6JR1sPPNUVb7wdzS GtWw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j23si1786410edq.339.2020.09.11.10.40.50; Fri, 11 Sep 2020 10:41:13 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726069AbgIKRkS (ORCPT + 99 others); Fri, 11 Sep 2020 13:40:18 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:35725 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726001AbgIKMpc (ORCPT ); Fri, 11 Sep 2020 08:45:32 -0400 X-Originating-IP: 90.65.88.165 Received: from localhost (lfbn-lyo-1-1908-165.w90-65.abo.wanadoo.fr [90.65.88.165]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id A36C960007; Fri, 11 Sep 2020 12:44:12 +0000 (UTC) Date: Fri, 11 Sep 2020 14:44:12 +0200 From: Alexandre Belloni To: Bartosz Golaszewski Cc: Bartosz Golaszewski , Alessandro Zummo , linux-rtc@vger.kernel.org, LKML Subject: Re: [PATCH 7/8] rtc: rx8010: fix indentation in probe() Message-ID: <20200911124412.GE230586@piout.net> References: <20200904152116.2157-1-brgl@bgdev.pl> <20200904152116.2157-8-brgl@bgdev.pl> <20200904154144.GL230586@piout.net> <20200911122837.GC230586@piout.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/09/2020 14:33:46+0200, Bartosz Golaszewski wrote: > I'm seeing this pattern elsewhere in the kernel too and I just > recently fixed this for MDIO. I think it's just a matter of people > copy-pasting a bad implementation. > > > was an actual reason this was done this way and it was the ordering of > > the rtc_nvmem_register/rtc_nvmem_unregister with rtc_device_unregister. > > I'm not sure this is still necessary though. > > > > To me - each of these should have their own 'unregister' function and > appropriate devres helpers *OR* RTC-related nvmem structures could be > set up and assigned to struct rtc_device after > devm_rtc_allocate_device() and picked up by the registration function > (and also undone by rtc_unregister_device()). > > I'll try to allocate some time to look into this but it's not like > it's urgent or anything - it's just a potential improvement. > Well, this could simply be done by adding a devres_add in __rtc_register_device. I'm planning to remove rtc_nvmem_unregister after the next LTS which will make that even easier. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com