Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751294AbdH2Eik (ORCPT ); Tue, 29 Aug 2017 00:38:40 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:54730 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750758AbdH2Eij (ORCPT ); Tue, 29 Aug 2017 00:38:39 -0400 Date: Mon, 28 Aug 2017 21:38:37 -0700 (PDT) Message-Id: <20170828.213837.1354872205076475221.davem@davemloft.net> To: vivien.didelot@savoirfairelinux.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, f.fainelli@gmail.com, andrew@lunn.ch, privat@egil-hjelmeland.no, john@phrozen.org, Woojung.Huh@microchip.com, sean.wang@mediatek.com, nikita.yoush@cogentembedded.com, cphealy@gmail.com Subject: Re: [PATCH net-next v2 00/10] net: dsa: add generic debugfs interface From: David Miller In-Reply-To: <20170828191748.19492-1-vivien.didelot@savoirfairelinux.com> References: <20170828191748.19492-1-vivien.didelot@savoirfairelinux.com> X-Mailer: Mew version 6.7 on Emacs 25.2 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Mon, 28 Aug 2017 21:38:38 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 883 Lines: 23 From: Vivien Didelot Date: Mon, 28 Aug 2017 15:17:38 -0400 > This patch series adds a generic debugfs interface for the DSA > framework, so that all switch devices benefit from it, e.g. Marvell, > Broadcom, Microchip or any other DSA driver. I've been thinking this over and I agree with the feedback given that debugfs really isn't appropriate for this. Please create a DSA device class, and hang these values under appropriate sysfs device nodes that can be easily found via /sys/class/dsa/ just as easily as they would be /sys/kernel/debug/dsa/ You really intend these values to be consistent across DSA devices, and you don't intend to go willy-nilly changig these exported values arbitrarily over time. That's what debugfs is for, throw-away stuff. So please make these proper device sysfs attributes rather than debugfs. Thank you.