From owner-freebsd-multimedia@FreeBSD.ORG Wed Apr 15 18:22:27 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 49F251065670; Wed, 15 Apr 2009 18:22:27 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 227708FC1A; Wed, 15 Apr 2009 18:22:25 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id VAA24005; Wed, 15 Apr 2009 21:22:22 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <49E625DD.9040703@icyb.net.ua> Date: Wed, 15 Apr 2009 21:22:21 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.21 (X11/20090406) MIME-Version: 1.0 To: "M. Warner Losh" References: <49E62215.4010309@icyb.net.ua> <20090415.121445.-1264106115.imp@bsdimp.com> In-Reply-To: <20090415.121445.-1264106115.imp@bsdimp.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 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:22:27 -0000 on 15/04/2009 21:14 M. Warner Losh said the following: > 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... I tried to use u_int32_t or uint32_t consistently with the file I changed. The drivers are typically quite self-consistent, but across drivers the styles are different. u_int32_t => uint32_t would make diff substantially larger, so I'd prefer to do separately [mumbles "if at all" :-)]. -- Andriy Gapon