Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3605392imm; Wed, 5 Sep 2018 03:00:45 -0700 (PDT) X-Google-Smtp-Source: ANB0VdajcE8dlQSRs576qSH8BMsp1RG3Mz4dEes+GZsDA22zxuo4fndf5pdGyn3aaAsTwGrxyf4Z X-Received: by 2002:a63:fa49:: with SMTP id g9-v6mr36036385pgk.18.1536141645340; Wed, 05 Sep 2018 03:00:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536141645; cv=none; d=google.com; s=arc-20160816; b=vqhNdOQ+3Q86SiJ7wQ5Pwm6bm1zzrJzzKp+dn3R+xO0Sxbw3hpcfGf5ZneXUwWUsj3 1c2DUKFlPW89t1Gql2hwTRzN1kBWlxyV+FvnIvKILwfeMPn/9jpSAkHdYz+SQ9NDZSGy 2hVnUH1pEimnCcn5zTXuY9wrLTdCQPMffmFOgZLU9zxDmizmdSdn4ys1TaU3ZEabiLxB vy5xjGoib31Ca2V/ev+iZn3toKB0BKAgMzbTL76wPXIziz5Wm3RC2GvJVSQYd66EdpV9 j3QsIVBHEGLfu+wVYGYNofs+KF2F/uJd4lTd8cqUaCGsMJDKd4xna1eHL9gJKSmD7kPx XFQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=WCHgNT8Fd0mUae6agHgPqqiEiOmmncrWpb0z/BNArGo=; b=nf/Y1Lq/dwe+2Q7kJIqPfnxqkvji//CslA9VN6NXJOHxb3wdyYF/YP6nTdqvcbBg1X gTAgzXr7oBgpCAMZLntdDxjbK22N97yYsmJnkkGAAo2+Cpz06eR19QUz3lJkwXQJfrk3 qdzRYc8PGLJXkCeWw/2jU8nOEAhgogy1Nb2b7IRgjRNBRpcsfsUiSZdI6bj5ZYs4G4X8 ToRC7PbWOH+TpmUcsdwnmFANgzPEt1kWj5T9dg9rHrO/iDnaOwLyCgf0DxjRTQzC44K+ BwENOjX5Ibzb5r4v6huPrzianGVVnnVWda4G1RH9F6/Ltggp16xT8DOjSHkEa6JuY9Bf jb1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=bZXBhHCh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n2-v6si1481865plp.276.2018.09.05.03.00.29; Wed, 05 Sep 2018 03:00:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=bZXBhHCh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728338AbeIEO1l (ORCPT + 99 others); Wed, 5 Sep 2018 10:27:41 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:39300 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728094AbeIEO1j (ORCPT ); Wed, 5 Sep 2018 10:27:39 -0400 Received: by mail-wm0-f68.google.com with SMTP id q8-v6so7075522wmq.4 for ; Wed, 05 Sep 2018 02:58:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=WCHgNT8Fd0mUae6agHgPqqiEiOmmncrWpb0z/BNArGo=; b=bZXBhHChURlSf+fd3NQpsORtX+CEZ3+VV04Uab7NFP1UB4vZUGQe2AaGkDW4AWjgKW R17AeGV3uPdhhZmv7ChFPhBh6BT1KFgSLOUF5hl5543TYWMWpcmsAyDG3shOWQF/TOw8 cZ4/awoWGD8wtimPvqfbm3nH6IAuiLn9TMfPpNlklxGSIh9SNmpQLr0lcTA8k9d8R9HM gsFsi3fNmN0nm8aolEMFrhkfH8FrRmxn7+4bDkGDcfcmQfIubqZpJwk1fYOAvvsA4xtf oe/FOHghsO/QVSwHzFtSzBainckL5dfO1diHSYvj+i4MfrwR660Mff58vVxGMnno3yUc 3G3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=WCHgNT8Fd0mUae6agHgPqqiEiOmmncrWpb0z/BNArGo=; b=K3yjY7y8ooOltcnr0B0a9nk/73I5yBnxLb3ngcS+sFDp7rY5DxPcOe2kvHijR/utKS PEe69/tlQ2QNCZpBf5oLMV55Fqboql/KxlcCaIhxswLW+LP3uwx0Di3NnBaCgAWbuicl /JkqFKBHxrOc3CPPJl8bQ40mTqA5Wg9i89Ck8jyH1aWlvB8VbnwWmsF7SstOffQ2UK2M Z8R/3GVPROWFdH2kY+FDh8cEA5venKbQRi+m8AM78f/L0gid08+AXsAum5XaZGr2flBv anYHR5BHsGpRKc6XBamSCjrEFB4K1HJR422X1/9xKSf8VdBFFAJhmNxZGFCoYER2kTUU IfPA== X-Gm-Message-State: APzg51Ba1QZZXkmv1L4xMAV/guxm4xaRhMMZo9E87u7v6d/u4ZdzTeYq MnYQgeTuCBzWszi2ax9VpXCGcg== X-Received: by 2002:a1c:578a:: with SMTP id l132-v6mr5296664wmb.16.1536141490469; Wed, 05 Sep 2018 02:58:10 -0700 (PDT) Received: from brgl-bgdev.baylibre.local (AStLambert-681-1-33-235.w90-86.abo.wanadoo.fr. [90.86.152.235]) by smtp.gmail.com with ESMTPSA id l12-v6sm2127815wrv.29.2018.09.05.02.58.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 02:58:09 -0700 (PDT) From: Bartosz Golaszewski To: Srinivas Kandagatla , Joachim Eastwood , "David S . Miller" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Andrew Morton , Arnd Bergmann , Jonathan Corbet , Sekhar Nori , Kevin Hilman , David Lechner , Boris Brezillon , Andrew Lunn , Alban Bedel , Maxime Ripard Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: [PATCH 05/13] nvmem: change the signature of nvmem_unregister() Date: Wed, 5 Sep 2018 11:57:30 +0200 Message-Id: <20180905095738.26406-6-brgl@bgdev.pl> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180905095738.26406-1-brgl@bgdev.pl> References: <20180905095738.26406-1-brgl@bgdev.pl> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski This function can no longer fail and there are no more users that check it return value. Change it to return void. Signed-off-by: Bartosz Golaszewski --- drivers/nvmem/core.c | 8 ++------ include/linux/nvmem-provider.h | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index 2335b72d4b3e..89b91f73d08a 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -450,20 +450,16 @@ static void nvmem_device_release(struct kref *kref) * nvmem_unregister() - Unregister previously registered nvmem device * * @nvmem: Pointer to previously registered nvmem device. - * - * Return: Will be an negative on error or a zero on success. */ -int nvmem_unregister(struct nvmem_device *nvmem) +void nvmem_unregister(struct nvmem_device *nvmem) { kref_put(&nvmem->refcnt, nvmem_device_release); - - return 0; } EXPORT_SYMBOL_GPL(nvmem_unregister); static void devm_nvmem_release(struct device *dev, void *res) { - WARN_ON(nvmem_unregister(*(struct nvmem_device **)res)); + nvmem_unregister(*(struct nvmem_device **)res); } /** diff --git a/include/linux/nvmem-provider.h b/include/linux/nvmem-provider.h index cc8556e3c825..07ab1ea73520 100644 --- a/include/linux/nvmem-provider.h +++ b/include/linux/nvmem-provider.h @@ -67,7 +67,7 @@ struct nvmem_config { #if IS_ENABLED(CONFIG_NVMEM) struct nvmem_device *nvmem_register(const struct nvmem_config *cfg); -int nvmem_unregister(struct nvmem_device *nvmem); +void nvmem_unregister(struct nvmem_device *nvmem); struct nvmem_device *devm_nvmem_register(struct device *dev, const struct nvmem_config *cfg); @@ -81,7 +81,7 @@ static inline struct nvmem_device *nvmem_register(const struct nvmem_config *c) return ERR_PTR(-ENOSYS); } -static inline int nvmem_unregister(struct nvmem_device *nvmem) +static inline void nvmem_unregister(struct nvmem_device *nvmem) { return -ENOSYS; } -- 2.18.0