From mboxrd@z Thu Jan 1 00:00:00 1970 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=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 5B0B9C4332E for ; Tue, 16 Mar 2021 17:29:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4321E650F8 for ; Tue, 16 Mar 2021 17:29:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231689AbhCPR3f (ORCPT ); Tue, 16 Mar 2021 13:29:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:33258 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238374AbhCPR3M (ORCPT ); Tue, 16 Mar 2021 13:29:12 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5937264F17; Tue, 16 Mar 2021 17:29:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615915751; bh=lV8PweIP8gOM3/NCWUWqs8QeJNQNF3mh0R8CA+oyv24=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZZfLxv6cvEeQiInTwCaKI1gLTZKPxEdTrUv7q6rkWvWp1iQBbcO0zxaTOgjtXcbPU d7WsEZoaULr3afIZU1fYgkwqQgekyKVhl58xI/OJE6iXzUPX4Bhf3uBuP8I4ijN9KM 9psNsnPI3+AUOWMMi0lwg/Um5JHrG76dDNTGYuU4= Date: Tue, 16 Mar 2021 18:29:09 +0100 From: Greg KH To: Mihai Carabas Cc: linux-kernel@vger.kernel.org, arnd@arndb.de, bobo.shaobowang@huawei.com, rdunlap@infradead.org Subject: Re: [PATCH v5 3/3] misc/pvpanic: add PCI driver Message-ID: References: <1615897229-4055-1-git-send-email-mihai.carabas@oracle.com> <1615897229-4055-4-git-send-email-mihai.carabas@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 16, 2021 at 07:08:38PM +0200, Mihai Carabas wrote: > ..snip.. > > > +}; > > > +static unsigned int capability = PVPANIC_PANICKED | PVPANIC_CRASH_LOADED; > > > +static unsigned int events; > > > + > > > +static ssize_t capability_show(struct device *dev, > > > + struct device_attribute *attr, char *buf) > > > +{ > > > + return sysfs_emit(buf, "%x\n", capability); > > A global capability for all devices? No, this needs to be a per-device > > attttribute as you are showing it to userspace as such. > > We can only have a pvpanic-pci device. This is necessary in that case? Why would it not be? Why constrain yourself to something that someone will only have to fix sometime in the future? > ...snip.. > > > +static struct attribute *pvpanic_pci_dev_attrs[] = { > > > + &dev_attr_capability.attr, > > > + &dev_attr_events.attr, > > > + NULL > > > +}; > > > +ATTRIBUTE_GROUPS(pvpanici_pci_dev); > > You did not document these new sysfs files in Documentation/ABI/ so it's > > hard to judge what they do. Please do so next version. > > This appeared after 5.12 rebase on pvpanic-mmio. I did this changes to > pvpanic-pci to be on the same page as pvpanic-mmio which is described here: > Documentation/ABI/testing/sysfs-bus-pci-devices-pvpanic. Ah, missed that, my fault, sorry. But you also now do this for the other device type right? So does the documentation need to reflect that too? thanks, greg k-h