From owner-freebsd-multimedia@FreeBSD.ORG Wed Apr 15 18:17:17 2009 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3EF70106564A; Wed, 15 Apr 2009 18:17:17 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 013F58FC18; Wed, 15 Apr 2009 18:17:16 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n3FIDqbt078746; Wed, 15 Apr 2009 12:13:52 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 15 Apr 2009 12:14:45 -0600 (MDT) Message-Id: <20090415.121445.-1264106115.imp@bsdimp.com> To: avg@icyb.net.ua From: "M. Warner Losh" In-Reply-To: <49E62215.4010309@icyb.net.ua> References: <49E62215.4010309@icyb.net.ua> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-multimedia@freebsd.org, rpaulo@freebsd.org, jhb@freebsd.org Subject: Re: strict signatures for kobj methods in sound subsystem X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2009 18:17:17 -0000 In message: <49E62215.4010309@icyb.net.ua> Andriy Gapon writes: : : Please review the attached, largely mechanical, patch for sound subsystem. : This patch is supposed to make all functions that implement kobj methods have : strictly the same signatures as defined by the interfaces. : : The only non-mechanical change is in sys/dev/sound/pcm/channel_if.m: usage of : setformat method in channel.c shows that this method is supposed to return error : number and so int is more appropriate return type than u_int32_t. : E.g.: : r = CHANNEL_SETFORMAT(c->methods, c->devinfo, sndbuf_getfmt(b)); : if (r == 0) : r = chn_tryspeed(c, c->speed); : } : return r; : } else : return EINVAL; My only comment is that it might be a good time to change the u_int32_t to uint32_t. Otherwise I think this is good. I've been trying to get the problems in the tree like this fixed so we can turn that feature on going forward... Warner