Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp12123389rwl; Tue, 3 Jan 2023 09:18:20 -0800 (PST) X-Google-Smtp-Source: AMrXdXvvVVgwTsaq808zW2242gvzLyOaofi04GcsrcLXQ7GLlX8RmtIw2O+YN0iXav3aj87algJc X-Received: by 2002:a62:e911:0:b0:581:579d:5c44 with SMTP id j17-20020a62e911000000b00581579d5c44mr26602451pfh.5.1672766300068; Tue, 03 Jan 2023 09:18:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672766300; cv=none; d=google.com; s=arc-20160816; b=LJIeG/AYseOdZt+d+5RghyBfWhrwJ7KTejYXtxH141Yr4Sc4gnW1byQuDzluZd5RBm se8bfrk9g5mnZO4Kb07BpY4HiefytD4q+AS6PkIXyo/BkgkOcaMb6RtzxG63cwaEK1X1 JBrT6S5TfOSe57ROtqYLVJYHILAMr6z5XX0L4oqWy7SCwJpf/2YRsmz/dJjaVAPbk1aI PSXccyOeytIzBgDT/ybWiq24lH8JdqmJm+rzNDHTAQIMBM/wYp92D4nas4Olf8Z24LaU 0vhVf6ozldmXqwi2oXnINx5KU29IVLjwNCIb/1morxTFqLarUW/Y2YBJFebCPVRrgOJN 4yXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=mxDcbg9196yYDc4/nWFTQPBwp/sgfGLK/oSLrLpBDOI=; b=ScCgZe33n21v4Hjmxg+2gjvn/I3KMa/EGz7XRoeJCKjF2ZGkBohk/npJGAzZIkn0Ez wuvH9XlD4+lI8uZlkhvEU4dALRKuSDs4M+khG02xVRUy4+krNmVfpyPmYC+ZKamO9Bem AILnBuZ56Ugg7fYCwd2jAmXcW9JvXpv9VrIN3BrNFJo0L2lEQdaJC3OTBItxILlMiErF 2bjvF5Eg0SLwM6lhdfbrnBjn6hjQic5d3xv9qhU9rOHdSQoKyEtPhjOCmqJdZJEUzTk+ N3EoRlFiD8IPJelc/kfO2Tv+0ezo1MrISQlfALOX586Rl5xe0Py05uK/RMWgN0y5vj82 YXXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=IGa6eXA7; 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=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l13-20020a056a00140d00b005807fa620a0si33685824pfu.326.2023.01.03.09.18.12; Tue, 03 Jan 2023 09:18:20 -0800 (PST) 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; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=IGa6eXA7; 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=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233441AbjACQ7H (ORCPT + 60 others); Tue, 3 Jan 2023 11:59:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230373AbjACQ7E (ORCPT ); Tue, 3 Jan 2023 11:59:04 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08C08C5B for ; Tue, 3 Jan 2023 08:59:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:Content-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=mxDcbg9196yYDc4/nWFTQPBwp/sgfGLK/oSLrLpBDOI=; b=IGa6eXA7tCe5Q+39nOMcg2hp9j 4h0v2Z7M8Mpuh9jI+Ejhhzs5tTmuKOzwNU1pgJeCWtPpKJUC11fh5Jn/5YjdIqlF1X4dAsmABcdBY MpQKu7kITSU1HkF5iWgjJ0zJXfNMOWQnbXAljM+4YTtBsj+6cfvRofi7JwpK7JVufP2IXy54ZFps2 oCq7DKnsX0WInHFkNpp44YFq66VL+O8EvUcHb3wHLDuIKE5NCKyhaJKQ5XV1rmhpkQwjtSbj5WTT1 0SxDD+BuMHZHgDiE/r35nHQzsT95s346bZGQ+zCfkE3twtviIVlsXz0axlp2v4CId1TuMYNeyqdUt 3EkVJl7w==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:35948) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pCkcr-0005bj-B9; Tue, 03 Jan 2023 16:58:56 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1pCkcn-0002GF-DC; Tue, 03 Jan 2023 16:58:53 +0000 Date: Tue, 3 Jan 2023 16:58:53 +0000 From: "Russell King (Oracle)" To: Srinivas Kandagatla Cc: Bartosz Golaszewski , Gaosheng Cui , Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Maxime Ripard , Hector Martin Subject: [PATCH v3 0/5] Fix a whole host of nvmem registration/cleanup issues Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: Russell King (Oracle) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham 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 Hi, This series fixes a whole host of nvmem registration/error cleanup issues that have been identified by both Hector and myself. It is a substantial rework of my original patch fixing the first problem. The first most obvious problem is the race between nvmem registration and use, which leads to sporadic failures of drivers to probe at boot time. While fixing this, it has been noticed that a recent fix to check the return value of dev_set_name() introduced a new bug where wp_gpio was not being put in that newly introduced error path. Then there's a fix for a previous fix which itself purports to fix another bug, but results in the allocated ID being leaked. Fix for a fix for a fix is not good! Then there's an error in the docbook documentation for wp_gpio (it's listed as wp-gpio instead) but as nothing seems to set wp_gpio, we might as well get rid of it - which also solves the issue that we call gpiod_put() on this whether we own it or not. Lastly, there's a fix for yet another spurious white-space in this code, one of what seems to be a long history of past white-space fixes. These patches have been individually build-tested in the order of posting, but not run-time tested except for the entire series. drivers/nvmem/core.c | 51 ++++++++++++++++++------------------------ include/linux/nvmem-provider.h | 2 -- 2 files changed, 22 insertions(+), 31 deletions(-) -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!