Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11810233pjo; Thu, 2 Jan 2020 14:40:26 -0800 (PST) X-Google-Smtp-Source: APXvYqzCxbdkeirQcLvEmm0a0FaU87HjeP4VT8dYWzfHKusVLVSDJ/PoPpHRZTufTIWGA10Y9fh4 X-Received: by 2002:aca:d507:: with SMTP id m7mr3002175oig.48.1578004826361; Thu, 02 Jan 2020 14:40:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578004826; cv=none; d=google.com; s=arc-20160816; b=vJ22zoNzo38B9o0Akst2zQ9zd4d3CCAQVLzgAg5wdq1UnWyATRY3USkOVom4iyHNs/ v2kl7P7MPqbjrCMu/8hwnWRm8ruNSJ0Z1PmRzawdkfzi1Ci4cqdEwiBkMbhd+dDtRMMM r5RNKv9SohvyuHCOjNrzaS48ABDBzRwf3SwYwDq+/O0lAb67Q+yxZjJQ/Ydbf9BsizbP skqjC+bbQ5qq/0gzY7iqz+NVcEWVeX7r6eMLS6j0a2/PzX6xBbdYXOdO97MhNZ5SoXe1 263yz8Z2MjlfH5SDykqRT5oHrVKdL8o2lxSqw8wlXL45VKPR8KsalUtWZfY/rfT7RpNr Fiog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=DhXgrsKVwordASM5Rqizv6ThI4PAA+h9bS5CRKhgy90=; b=ON+jmSBhrLh3xbMLvogtMHb5YFXj1HWZZG6aTeVcS/T9t6R9tqVsSAcA8208uuICr2 Wh523iazKzblvL4KGJ7Oo/gqckSIbLz3TVzl5Um9Y/4PKn1zJxWy+Dr+P5rIxDfGDXQc bCakhSNBnlZ2w+U+jh+vCoV6CQ4CRHy0nPlKBNsDorpyhQC/B809CxTvW0oBsJKes10m y7+dRDNbTaoGIkBSSrlL4h0sKUuxhxEh8w+SZPf8Y6zRi4K83nCHRYAJM2CMyCAEe5jG DLl3lapVkwekRGw1qCtNpbMGosIqQfPIPVJ4NJxV9Z6yd/36MOZs+Z9fjOALEkSsaolP rpuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qCh7Mr8v; 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 i25si26501108oii.259.2020.01.02.14.40.14; Thu, 02 Jan 2020 14:40:26 -0800 (PST) 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=@kernel.org header.s=default header.b=qCh7Mr8v; 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 S1731301AbgABWia (ORCPT + 99 others); Thu, 2 Jan 2020 17:38:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:52384 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731295AbgABWi0 (ORCPT ); Thu, 2 Jan 2020 17:38:26 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 01EB621D7D; Thu, 2 Jan 2020 22:38:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578004705; bh=Hck+kzrpDFMdZXKRk2YWpAyA1rBxxHJBk5eU4kirlrk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qCh7Mr8vfwhZpnfoolCih9fmam77HdGIKKUE8ZbB/K+ogULz5gI9yrdrPTPsxQ5EN yaZ/966ATyghDx88MaFXfQa3FxGX089bcXevbJu21l2kZf7/r1lHaqWcDz3qkAbUsE t0iA9zDfY00XFTengaPlxcLq25omMth0T8oZuyVY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Hildenbrand , Michael Ellerman , Sasha Levin Subject: [PATCH 4.4 111/137] powerpc/pseries/cmm: Implement release() function for sysfs device Date: Thu, 2 Jan 2020 23:08:04 +0100 Message-Id: <20200102220602.111487492@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220546.618583146@linuxfoundation.org> References: <20200102220546.618583146@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Hildenbrand [ Upstream commit 7d8212747435c534c8d564fbef4541a463c976ff ] When unloading the module, one gets ------------[ cut here ]------------ Device 'cmm0' does not have a release() function, it is broken and must be fixed. See Documentation/kobject.txt. WARNING: CPU: 0 PID: 19308 at drivers/base/core.c:1244 .device_release+0xcc/0xf0 ... We only have one static fake device. There is nothing to do when releasing the device (via cmm_exit()). Signed-off-by: David Hildenbrand Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20191031142933.10779-2-david@redhat.com Signed-off-by: Sasha Levin --- arch/powerpc/platforms/pseries/cmm.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/platforms/pseries/cmm.c b/arch/powerpc/platforms/pseries/cmm.c index fc44ad0475f8..b126ce49ae7b 100644 --- a/arch/powerpc/platforms/pseries/cmm.c +++ b/arch/powerpc/platforms/pseries/cmm.c @@ -391,6 +391,10 @@ static struct bus_type cmm_subsys = { .dev_name = "cmm", }; +static void cmm_release_device(struct device *dev) +{ +} + /** * cmm_sysfs_register - Register with sysfs * @@ -406,6 +410,7 @@ static int cmm_sysfs_register(struct device *dev) dev->id = 0; dev->bus = &cmm_subsys; + dev->release = cmm_release_device; if ((rc = device_register(dev))) goto subsys_unregister; -- 2.20.1