strict signatures for kobj methods in sound subsystem
Alexander Leidinger
Alexander at Leidinger.net
Thu Apr 16 12:05:09 PDT 2009
On Thu, 16 Apr 2009 17:44:34 +0300 Andriy Gapon <avg at icyb.net.ua> wrote:
> on 16/04/2009 15:30 Alexander Leidinger said the following:
> > Quoting Andriy Gapon <avg at icyb.net.ua> (from Wed, 15 Apr 2009
> > 21:06:13 +0300):
> >
> >>
> >> 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.
> >
> > As you have to change a lot of places, a question would be if it is
> > ok to change the interface from u_int32_t to int instead. I haven't
> > investigated if this is about our internal in-kernel interface, or
> > (indirectly) the official userland OSS interface. I also hadn't a
> > look what 3rd party sound drivers (e.g. in ports) are using.
>
> I think that this would be incorrect because callers of those methods
> do actually expect uint32_t to be returned, e.g. they assign the
> result to a variable of such type etc. In fact most of those changed
> functions do have uint32_t type for the variables that they return.
> Although uint32_t->int->uint32_t conversion via return doesn't cause
> any loss or altering of information, it's still not good, IMO.
I agree.
> > You are also mixing u_int32_t and uint32_t in the change. Most of
> > them are of the u_int32_t style, but some changes have uint32_t.
>
> Yes, but I am preserving the style of each individual file being
> changed.
Ah, ok. I didn't look that carefully at it. This is surely ok.
Bye,
Alexander.
More information about the freebsd-multimedia
mailing list