Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp361390pxa; Tue, 4 Aug 2020 07:24:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwEfBaWeIoAFCcIjAqTLqtz9CwlN5rEroygZBdol+p7s8U2J/l5y/alX0DNO0E/YpY+PlGK X-Received: by 2002:aa7:c395:: with SMTP id k21mr21480730edq.386.1596551064133; Tue, 04 Aug 2020 07:24:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596551064; cv=none; d=google.com; s=arc-20160816; b=RXsr74zPMWgOXfzUWoRqrncXshHseZqhojl+FZWCjgEHF7d6PtycuOYAjgw7y9BG5e MkIhhn3EII4NsoDLdiNwcpao1LPJnS8wq3g0m3SZ5uZaWro5JzNQUxe29+IbcuNdvSyO uZf2Wo0iFeFSvGNI1jSywGJryaLS6Ga+1Hv7Is4zCZpCv3/tzk45/p5rSvqubAE0Rbmg IPfjD0cBsXn/5bZFyd9+zh6h31qxyCsgYxS+6n0M7+OwIzQn26g3LJpcynVMI2NQkbcr BkkbJXJOx0swiSzxB/p74lKcOInpRftn+ZyVsJ6uG2XFFM7QZGv/srqWpklOCkMAyNu6 nySA== 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=yIuINZOkL0gG7J50OV4a/GQ+gboSmkFJEFVFE+3fpc8=; b=LXd14GpKBKqQJguwVofDbJ9Ipy/Y5JQAfsWiG+HAWkIQogPJJPnkiCdvWiRnt9Vtn5 xDR4Kktzz+FlQAB8v/JQkN2WDxVxt4SqT8P+X8aYZSqE2Jg43XeJe8rWAALAR1vmDiCN w5ohcOd79SWLV7ceyw2d41KWtlztyM2fM0omjX7Snq6dB/LIwg0NElIGp8EIOYQCZuLM GsTH39h8eSWpu/ndNSSubjFF+LOsElGfSIMf6jFCYDA0P6f+rxhmHDs8HlbI+Ss6p8fF ovYLVMDAkHMQqQYaDg+dLmlKhiYjnSHqOiYBGxj0EVNyq3TuMG2iUpeQJ2raNwG07F49 XEVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CnPcdLRm; 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 o6si12000543edv.566.2020.08.04.07.24.01; Tue, 04 Aug 2020 07:24:24 -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=CnPcdLRm; 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 S1728595AbgHDOXP (ORCPT + 99 others); Tue, 4 Aug 2020 10:23:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:58996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728387AbgHDOXN (ORCPT ); Tue, 4 Aug 2020 10:23:13 -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 2E468208A9; Tue, 4 Aug 2020 14:23:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596550991; bh=gCAOTGV+S81wbKkcdN1P5rxcMrLXO+oK03/TIyVDses=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CnPcdLRmjk0BoEPdgStiHhz3IrtIBwNjq2Pwr+QjQ3YkoGp1MF7W54hvnm03KMQrc 60QZhwFmrfQ56agxlyCvDzWqnmmZxYehYxScxkEWWVOa+cHzklHbaM2CpEa7GeyRUo WkBlOG5Rk1nHpVd5vaooFnkOYOdvbYg2FilFG94Y= Date: Tue, 4 Aug 2020 16:22:50 +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: <20200804142250.GA247448@kroah.com> References: <20200730214136.5534-1-daniel.gutson@eclypsium.com> <20200731070053.GC1518178@kroah.com> <20200731141503.GA1717752@kroah.com> <20200804064154.GE696690@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 10:50:13AM -0300, Daniel Gutson wrote: > On Tue, Aug 4, 2020 at 3:41 AM Greg Kroah-Hartman > wrote: > > > > On Mon, Aug 03, 2020 at 07:04:56PM -0300, Daniel Gutson wrote: > > > > > > Think of this as an input device. You don't put the random input > > > > > > attributes all in one place, you create a new device that represents the > > > > > > input interface and register that. > > > > > > I'm having trouble with this. What's the dev_t for the child devices? > > > I'm doing > > > child_device = device_create(&my_class, &pdev->dev, MKDEV(0, 0), > > > NULL, "child"); > > > pdev is the pci_device (intel-spi-pci) > > > dmesg shows > > > > > > sysfs: cannot create duplicate filename '/class/my-class' > > > (call trace) > > > kobject_add_internal failed for my-class with -EEXIST, don't try > > > to register things with the same name in the same directory. > > > > Without seeing all of your code, I can't tell you what you are doing > > wrong, but the kernel should be giving you a huge hint here... > > > > Don't create duplicate names in the same subdirectory. > > I'm not doing that. One of my questions is if MKDEV(0, 0) is valid for > create_device, which I inferred so from the documentation. Yes it is, but that's not the error given to you :) Many in-kernel users call device_create() with MKDEV(0, 0) > Here is the listing It's not in any format to read, please never strip leading whitespace, it hurts my brain... thanks, greg k-h