Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964833AbWBLK2k (ORCPT ); Sun, 12 Feb 2006 05:28:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932380AbWBLK2j (ORCPT ); Sun, 12 Feb 2006 05:28:39 -0500 Received: from smtp.osdl.org ([65.172.181.4]:28825 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S932378AbWBLK2j (ORCPT ); Sun, 12 Feb 2006 05:28:39 -0500 Date: Sun, 12 Feb 2006 02:27:42 -0800 From: Andrew Morton To: Hansjoerg Lipp Cc: kkeil@suse.de, i4ldeveloper@listserv.isdn4linux.de, linux-usb-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, gregkh@suse.de, tilman@imap.cc Subject: Re: [PATCH 6/9] isdn4linux: Siemens Gigaset drivers - procfs interface Message-Id: <20060212022742.16df78a2.akpm@osdl.org> In-Reply-To: References: X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1061 Lines: 30 Hansjoerg Lipp wrote: > > This patch adds the procfs interface to the gigaset module. sysfs, actually. The patches look reasonable from a quick scan. A few little things: - The ringbuffer head and tail indexes are atomic_t's, but always seem to be manipulated inside the lock. Perhaps they can become integers. - You did the ringbuffer the wrong way. Don't constrain the head and tail to be within 0..MAX_EVENTS. Instead, just let them wrap right up to 0xffffffff. Apply the masking when you actually _use_ them. That way, empty is (head == tail) and full is (tail - head == MAX_EVENTS). - Could use kstrdup() in a few places. - A few unneeded casts of void*'s, but everyone does that. - There are a lot of global symbols in there. Perhaps they don't all need to be global. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/