Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4322260pxf; Tue, 16 Mar 2021 10:33:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+BVt6HUrzRgzJ5YkTqHiZOQa2cows/QpLtxlc6n8lY1KY8DyBwAc1f7nS3ECXtFBZW3eL X-Received: by 2002:a05:6402:5113:: with SMTP id m19mr38067848edd.78.1615915991675; Tue, 16 Mar 2021 10:33:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615915991; cv=none; d=google.com; s=arc-20160816; b=X+mE1C/ODBAw+CvsbxHmLCBLodSyQWkXrMGKyhtkLbcCemDqXbMZnYlzFlUzWHtVc6 1kKphmgnmWluAMDR1tuS4bNz4WQ62SC/cE4/m/ycMUhGW3lYDDhEC1B3mjtophf7JlHl OAPJy2w2t46kDBbZLE+FdD4dB7ixblS8lNjQOFfbOoyCcvTptpr0olAhGiyTE3dF2Pjy m7ZfQJvRlxbMUR6c/VzGXhcjTq/d+JyHePezZm6Hx0j0PfBuRIDQtKUtBBNpSYZ8ToJ4 nIbsgwdxd83B42aIIo/T3N345sQTEiYa50tWIsz9i/q5jZDGzc/ctfbK+uUnqJhUZFqZ Q5DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ILXUf63h3yN7Vgq9G14EJl4dMS4UVX79vmI73nHQnyw=; b=Y5FucSSE+fKnvvXUJ1rT8KhKBjyoyKTWKeALillHZkrpZLW8v4FTz7TGlKU3RskuiO R52+V9uYLHbZ4aJ/LMWtZbf1SjrTu90ES5rM/rnuNnF+Ev98gDBwh9e9m1pXeAk9NpjD NCyCNGpGjMLceM75aqbgJoapaUQQ+Uwt/L3my0hnpPR0cwcG8O9BzoVwFMXilUlAgkbP q9xwol5lmbtFJm/OuiTjmnEXFIExiyRUphp4bk1isju53v8kAsOm3PA5M/9R0pjwPv9O xLt9MSz1OrVL93ulZnU9uS1Ld60TpQlXmDjKixSNbDMviKdv+3jb5kPfknRm+vlUeWEn P9UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZZfLxv6c; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j5si14577795edh.218.2021.03.16.10.32.49; Tue, 16 Mar 2021 10:33:11 -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=@linuxfoundation.org header.s=korg header.b=ZZfLxv6c; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230285AbhCPR3a (ORCPT + 99 others); Tue, 16 Mar 2021 13:29:30 -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