Arguments format

Paweł Jasiak pawel at jasiak.xyz
Fri Apr 17 16:06:03 UTC 2020


Hi!

I have three questions.

1. In sys/mips/mips/autoconf.c we have functions

static void configure_first(dummy)
static void configure(dummy)
static void configure_final(dummy)

and we are not using argument. We are having those functions also in
ricv, arm, arm64, powerpc and x86 and in non of them we are using dummy,
so maybe we can just remove it? Or if it is necessary why we don't mark
it as __unused like in other functions?


2. Above functions have strange definition for arguments.

    static void
    configure(dummy)
        void *dummy;
    {
        ...
    }

Why we are not using

    static void
    configure(void *dummy)
    {
        ...
    }

like in other places?


3. In sys/mips/mips/octeon_cop2.c we are having

    struct octeon_cop2_state *
    octeon_cop2_alloc_ctx()
    {
        ...
    }
but it's declaration in sys/mips/include/octeon_cop2.h is

    struct octeon_cop2_state* octeon_cop2_alloc_ctx(void);

Question is if we should change octeon_cop2_alloc_ctx() into
octeon_cop2_alloc_ctx(void)?

I will be happy to help with creating patches.

Thanks!

-- 

Paweł Jasiak
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20200417/f86e6388/attachment.sig>


More information about the freebsd-questions mailing list