From patchwork Thu Jan 2 22:07:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 234710 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C53EC3276E for ; Thu, 2 Jan 2020 22:32:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E8C2E222C3 for ; Thu, 2 Jan 2020 22:32:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578004333; bh=DgE2YruiqIrozhteqtBVmjlDK5quw31v2tGDG7oUILw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=abwfSZXqrZcYbG5mm8iufQVzWGVre3uLdAGXXuh6C0+fjUcmnumDNexr4n3SB6bx9 HblPwU4TNUWVQ9R5tjrRsYyTPS8I42gGQ8Zud3Wg59RkdmMAk0chg0/eLkG8O3kGYU 4JrZcugPWzG9ggwMZw4fhkYHBrvpYemBWSi+sKXQ= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730236AbgABWcL (ORCPT ); Thu, 2 Jan 2020 17:32:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:38112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730370AbgABWcL (ORCPT ); Thu, 2 Jan 2020 17:32:11 -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 F3E06227BF; Thu, 2 Jan 2020 22:32:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578004330; bh=DgE2YruiqIrozhteqtBVmjlDK5quw31v2tGDG7oUILw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y+5Qn+/pSUkvGk8Wsbhp6o144oUm4BvtxkA/W4otcDFohK7diZBPojL0kTv5xfLYX NBloobcSzSnYsTr8uTc7KqkpNNsus9R5yiQmuvLQXlN4GoJki/yHkzrbK8n216C54f eizbEF8Ij/H/SxxT/bXLS7dJirWCzBylQ6TVxQIc= 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.9 134/171] powerpc/pseries/cmm: Implement release() function for sysfs device Date: Thu, 2 Jan 2020 23:07:45 +0100 Message-Id: <20200102220605.613718505@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220546.960200039@linuxfoundation.org> References: <20200102220546.960200039@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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 66e7227469b8..b5ff5ee3e39c 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;