Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11791479pjo; Thu, 2 Jan 2020 14:20:54 -0800 (PST) X-Google-Smtp-Source: APXvYqy32fON4hV4xiD+/92QeIl0Ugi0Zeeo1P+VW33Jo6JBQlZoX/KvPSGwjrtbI7Oqo84nyvN5 X-Received: by 2002:a05:6830:18ed:: with SMTP id d13mr30461999otf.208.1578003654308; Thu, 02 Jan 2020 14:20:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578003654; cv=none; d=google.com; s=arc-20160816; b=KhpNeGBTWhYHfqVCKH5oVDe1Fmuj5xQOjwth8zp0h/MgFQfIEanfzO6Zg2Tbww4odW 3zRuwgAn99/1Pa//hYukbSdkw2oncPLCj2dNuzv+dbe1SkRtaLlINf821HWpE/Cnkqii u+MmdLLrK3Bq2tZYIv54O9+CKM7Ni9VlicLzOH9FoXk3DmnvoEUDGIB787til34iLN/n rXUyTokLPXJ4PkrjyPcj6Nr4tay4JC7KQCkvPRi0qkqs7pqYcW9Ck4oFl6MLBxO+7Qlp JG73mCaDgcxs1k+cbytfqEv2AXjA1VtB69DQ4N2LtqJUKR9k6Rrz510sktsSXxC7Kszy eD3Q== 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=GIJZzTJ5i5SU19uA1wO7fuywNTZtPncalB+6QVRj+II=; b=dns7XeOaJOVlG+gfOjHd0dIpYsL1gEXomkJISK8jqJaDTNZ0Q+gmcGafaApQllbDqG 2f2EhDqNW4kTeJXeJHjg18kC9FvvBJvPkOrlEE//4IDrrngLDLTswl0+4H8ONv5XUw6c mfPzOmdpjj8EKBRkWi61HFaK0lQQV7APm1QLsAicmcXRMOlkKTWkt/e8+bnLHFO8yhuS ZByIfUX0+R8nnOIe58PkQlnHjYuEiyLPrJ3r4Hu0yjIl33h/J7Cabd/7NhU1zM4nr749 cDuFkC10XX3gFm0nYCkOuCZ0l3ILypBkhs11ormBICcloupGcyiSCaRLOnkTz+6K23T+ wr6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=PiwR7xqK; 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 h138si26206511oib.6.2020.01.02.14.20.42; Thu, 02 Jan 2020 14:20:54 -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=PiwR7xqK; 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 S1728540AbgABWUF (ORCPT + 99 others); Thu, 2 Jan 2020 17:20:05 -0500 Received: from mail.kernel.org ([198.145.29.99]:36980 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728465AbgABWUD (ORCPT ); Thu, 2 Jan 2020 17:20:03 -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 059D321582; Thu, 2 Jan 2020 22:20:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578003603; bh=3QqmxzjRnnfI5UcPweVfpNf6bneZPfb32al9pMhaHGM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PiwR7xqKaTc2dG+e2ReMYYunG5RvLgkGi1CTUeiVQZxeY6gYK+3iSbucJtSYwMJrx K+AIuJHbIjygybavdglIO3OmyGm6e0dyCof6v/0zHhfgvCNj1BwCAPPecDbiK/VBWi qdFym7UKrw4e4yf8OxGnFUE3Vrnxn5t0EWFoYjP0= 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.19 037/114] powerpc/pseries/cmm: Implement release() function for sysfs device Date: Thu, 2 Jan 2020 23:06:49 +0100 Message-Id: <20200102220032.836037148@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220029.183913184@linuxfoundation.org> References: <20200102220029.183913184@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 25427a48feae..502ebcc6c3cb 100644 --- a/arch/powerpc/platforms/pseries/cmm.c +++ b/arch/powerpc/platforms/pseries/cmm.c @@ -425,6 +425,10 @@ static struct bus_type cmm_subsys = { .dev_name = "cmm", }; +static void cmm_release_device(struct device *dev) +{ +} + /** * cmm_sysfs_register - Register with sysfs * @@ -440,6 +444,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