From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757976AbcIHR5Z (ORCPT ); Thu, 8 Sep 2016 13:57:25 -0400 Received: from merlin.infradead.org ([205.233.59.134]:35516 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752159AbcIHR5Y (ORCPT ); Thu, 8 Sep 2016 13:57:24 -0400 Subject: Re: [PATCH v2] genirq: Machine-parsable version of /proc/interrupts To: Craig Gallek , Thomas Gleixner References: <1469543126-158620-1-git-send-email-kraigatgoog@gmail.com> <1473356083-14601-1-git-send-email-kraigatgoog@gmail.com> Cc: David Decotigny , linux-kernel@vger.kernel.org From: Randy Dunlap Message-ID: <09def1ca-a6bd-3286-7817-a607a23c5643@infradead.org> Date: Thu, 8 Sep 2016 10:57:21 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <1473356083-14601-1-git-send-email-kraigatgoog@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/08/16 10:34, Craig Gallek wrote: > From: Craig Gallek > > Add struct kobject to struct irq_desc to allow for easy export > to sysfs. This allows for much simpler userspace-parsing of > the information contained in struct irq_desc. Please give example(s) of the sysfs (output) format. Also add the interface info to Documentation/ABI/. > +static void irq_sysfs_add(int irq, struct irq_desc *desc) > +{ > + if (irq_kobj_base) { > + if (kobject_add(&desc->kobj, irq_kobj_base, "%d", irq)) > + pr_warn("Fail to add kobject for irq %d\n", irq); Failed > + } > +} Thanks. -- ~Randy