Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp468720pxa; Tue, 4 Aug 2020 09:45:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzIkbiockmZT0iMaUy39ACYsMyeqw7EkL62z7s8zX8XEwZ8SWWhTfeqmXuWzHAxQ19bujNf X-Received: by 2002:a17:906:7d6:: with SMTP id m22mr21412054ejc.229.1596559536947; Tue, 04 Aug 2020 09:45:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596559536; cv=none; d=google.com; s=arc-20160816; b=G2zWNY3seYogW8dQn3GJ7/LbXHK2eU+4UcrAE7HR24f4x1nt5X2FGJERs6E7wsi7eQ KQyZdYm5BbeS9u/xoGVljn787QbpBTDd3vfW78DbB0lR6PjYAdOZ3ozxIH3ibecaYxWs ZuOBgLTVdPaCdcH9sDr8OErQSRcCjCO/AugrktUjGL57LUNjYMqU0GD4D6lUAyqXn5ww iDWb+g8vUn/d028x0L5yZ8xV43XfPzEi9y+fC4S0+6hZpZjdZ7U32TCq3C+uPi75a2Ve TItiwsuu7oJ2qgHRSf3q3KdPYkWVkkfuO+yyQp3RWwI8iY7qhFDfd4vKaZL71d+J+Bn9 S7bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=cZVn0I4eEjWf9GSbjkitWMe0ZRzxngl/mGkWY7/RFJQ=; b=lPW7KtZ2fLQ7GmN2Q7ssDPTcY+Pdjv03Xo/kj53/AgdnoVOKFpWcxljXXgDCSk8UwF 4XWt1NwoxO8NeFqnJnxAUgxRaHMX26QMSfkFHbmhd+9xH/SF57y8IrqiMCW0YNUD24dx ci/FOu2cmukrYoDLFkgbP9K+BzZW80Wn/R4dYY3YT/SqPltqTj/NrNxChvfnrqXPOeBv jbSehcpeuiv2+yvH4zDZjPBImVQy5tOmdz/+SKitrAb31IA1TPUtgJj2uk2h3lcUJ5oJ rt4PcNRcWvoBWhkYRTw60mLEGtexg/IVm49ML+vygYno5rJAOaSzck72I+vllTzVVj4o onUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HDegcDZ7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k25si12780666ejx.608.2020.08.04.09.45.11; Tue, 04 Aug 2020 09:45:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HDegcDZ7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729844AbgHDQm3 (ORCPT + 99 others); Tue, 4 Aug 2020 12:42:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:42096 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728678AbgHDQm1 (ORCPT ); Tue, 4 Aug 2020 12:42:27 -0400 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 42A222064B; Tue, 4 Aug 2020 16:42:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596559346; bh=d3uaiTv0Ga0UKUyb/DBtTQ3erGKWoEO0Ny8JGoOpI2I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HDegcDZ7nagJV+SMTFAJ1bgoiG6iWF2OiUhEiTH6b0vq2i0EZAgTPYy/yESW9liEo 7PWsHc9KwOblEb5l0LrWJJiXI7mrhy1vqS6cc5vriB8+Z7c9AoOBhpQZLa7VlbQi7i kdpJzcbn0UioADmv/A+8sMdXMwkwy/YHILLc51g0= Date: Tue, 4 Aug 2020 18:42:46 +0200 From: Greg Kroah-Hartman To: Daniel Gutson Cc: Derek Kiernan , Tudor Ambarus , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Mika Westerberg , Arnd Bergmann , Mauro Carvalho Chehab , linux-kernel , Richard Hughes , Alex Bazhaniuk Subject: Re: [PATCH] Platform lockdown information in SYSFS Message-ID: <20200804164246.GA502540@kroah.com> References: <20200730214136.5534-1-daniel.gutson@eclypsium.com> <20200731070053.GC1518178@kroah.com> <20200731141503.GA1717752@kroah.com> <20200804064154.GE696690@kroah.com> <20200804142250.GA247448@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 04, 2020 at 11:37:02AM -0300, Daniel Gutson wrote: > static void mypci_remove(struct pci_dev *pdev) > { > /* > I tried enabling and disabling this > if (child_device != NULL) { > put_device(child_device); > device_unregister(child_device); > } > */ You can just call device_destroy() here, but this should be the same. But, if you have it commented out, that's not good, you have to clean this up. > class_remove_file(&my_class, &class_attr_howareyou); You don't always have to remove files you create, but it doesn't hurt. > class_unregister(&my_class); class_destroy()? But this is the same as well, so all is good. Try running without the above code commented out. greg k-h