From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: simplify procfs code for seq_file instances Date: Tue, 24 Apr 2018 18:06:53 +0200 Message-ID: <20180424160652.GA28483@lst.de> References: <20180419124140.9309-1-hch@lst.de> <20180419185750.GD2066@avx2> <20180424142304.GE26136@lst.de> <20180424081916.e94ca8463fb3c39ebc082bdd@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20180424081916.e94ca8463fb3c39ebc082bdd-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: drbd-dev-bounces-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org Errors-To: drbd-dev-bounces-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org To: Andrew Morton Cc: linux-rtc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Alessandro Zummo , Alexandre Belloni , devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org, linux-afs-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Corey Minyard , linux-ide-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Greg Kroah-Hartman , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, jfs-discussion-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Alexey Dobriyan , linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, netfilter-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Alexander Viro , Jiri Slaby , linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Christoph Hellwig , megaraidlinux.pdl-dY08KVG/lbpWk0Htik3J/w@public.gmane.org, drbd-dev-cunTk1MwBs8qoQakbn7OcQ@public.gmane.org List-Id: linux-acpi@vger.kernel.org On Tue, Apr 24, 2018 at 08:19:16AM -0700, Andrew Morton wrote: > > > I want to ask if it is time to start using poorman function overloading > > > with _b_c_e(). There are millions of allocation functions for example, > > > all slightly difference, and people will add more. Seeing /proc interfaces > > > doubled like this is painful. > > > > Function overloading is totally unacceptable. > > > > And I very much disagree with a tradeoff that keeps 5000 lines of > > code vs a few new helpers. > > OK, the curiosity and suspense are killing me. What the heck is > "function overloading with _b_c_e()"? The way I understood Alexey was to use have a proc_create macro that can take different ops types. Although the short cut for __builtin_types_compatible_p would be _b_t_c or similar, so maybe I misunderstood him. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de ([213.95.11.211]:60099 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752105AbeDXQFY (ORCPT ); Tue, 24 Apr 2018 12:05:24 -0400 Date: Tue, 24 Apr 2018 18:06:53 +0200 From: Christoph Hellwig To: Andrew Morton Cc: Christoph Hellwig , Alexey Dobriyan , Alexander Viro , Greg Kroah-Hartman , Jiri Slaby , Corey Minyard , Alessandro Zummo , Alexandre Belloni , linux-acpi@vger.kernel.org, drbd-dev@lists.linbit.com, linux-ide@vger.kernel.org, netdev@vger.kernel.org, linux-rtc@vger.kernel.org, megaraidlinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, devel@driverdev.osuosl.org, linux-afs@lists.infradead.org, linux-ext4@vger.kernel.org, jfs-discussion@lists.sourceforge.net, netfilter-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: simplify procfs code for seq_file instances Message-ID: <20180424160652.GA28483@lst.de> References: <20180419124140.9309-1-hch@lst.de> <20180419185750.GD2066@avx2> <20180424142304.GE26136@lst.de> <20180424081916.e94ca8463fb3c39ebc082bdd@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20180424081916.e94ca8463fb3c39ebc082bdd@linux-foundation.org> Sender: linux-rtc-owner@vger.kernel.org List-ID: On Tue, Apr 24, 2018 at 08:19:16AM -0700, Andrew Morton wrote: > > > I want to ask if it is time to start using poorman function overloading > > > with _b_c_e(). There are millions of allocation functions for example, > > > all slightly difference, and people will add more. Seeing /proc interfaces > > > doubled like this is painful. > > > > Function overloading is totally unacceptable. > > > > And I very much disagree with a tradeoff that keeps 5000 lines of > > code vs a few new helpers. > > OK, the curiosity and suspense are killing me. What the heck is > "function overloading with _b_c_e()"? The way I understood Alexey was to use have a proc_create macro that can take different ops types. Although the short cut for __builtin_types_compatible_p would be _b_t_c or similar, so maybe I misunderstood him. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from newverein.lst.de (verein.lst.de [213.95.11.211]) by mail09.linbit.com (LINBIT Mail Daemon) with ESMTP id 93C091056F9F for ; Tue, 24 Apr 2018 18:05:22 +0200 (CEST) Date: Tue, 24 Apr 2018 18:06:53 +0200 From: Christoph Hellwig To: Andrew Morton Message-ID: <20180424160652.GA28483@lst.de> References: <20180419124140.9309-1-hch@lst.de> <20180419185750.GD2066@avx2> <20180424142304.GE26136@lst.de> <20180424081916.e94ca8463fb3c39ebc082bdd@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180424081916.e94ca8463fb3c39ebc082bdd@linux-foundation.org> Cc: linux-rtc@vger.kernel.org, Alessandro Zummo , Alexandre Belloni , devel@driverdev.osuosl.org, linux-afs@lists.infradead.org, linux-scsi@vger.kernel.org, Corey Minyard , linux-ide@vger.kernel.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, jfs-discussion@lists.sourceforge.net, Alexey Dobriyan , linux-acpi@vger.kernel.org, netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, Alexander Viro , Jiri Slaby , linux-ext4@vger.kernel.org, Christoph Hellwig , megaraidlinux.pdl@broadcom.com, drbd-dev@lists.linbit.com Subject: Re: [Drbd-dev] simplify procfs code for seq_file instances List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, Apr 24, 2018 at 08:19:16AM -0700, Andrew Morton wrote: > > > I want to ask if it is time to start using poorman function overloading > > > with _b_c_e(). There are millions of allocation functions for example, > > > all slightly difference, and people will add more. Seeing /proc interfaces > > > doubled like this is painful. > > > > Function overloading is totally unacceptable. > > > > And I very much disagree with a tradeoff that keeps 5000 lines of > > code vs a few new helpers. > > OK, the curiosity and suspense are killing me. What the heck is > "function overloading with _b_c_e()"? The way I understood Alexey was to use have a proc_create macro that can take different ops types. Although the short cut for __builtin_types_compatible_p would be _b_t_c or similar, so maybe I misunderstood him.