Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Apr 2009 12:14:45 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        avg@icyb.net.ua
Cc:        freebsd-multimedia@freebsd.org, rpaulo@freebsd.org, jhb@freebsd.org
Subject:   Re: strict signatures for kobj methods in sound subsystem
Message-ID:  <20090415.121445.-1264106115.imp@bsdimp.com>
In-Reply-To: <49E62215.4010309@icyb.net.ua>
References:  <49E62215.4010309@icyb.net.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <49E62215.4010309@icyb.net.ua>
            Andriy Gapon <avg@icyb.net.ua> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090415.121445.-1264106115.imp>