[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130628.210855.431269923795010173.davem@davemloft.net>
Date: Fri, 28 Jun 2013 21:08:55 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: ogerlitz@...lanox.com
Cc: roland@...nel.org, linux-rdma@...r.kernel.org,
netdev@...r.kernel.org, eli@....mellanox.co.il,
moshel@...lanox.com, eli@...lanox.com
Subject: Re: [PATCH for/net-next 2/8] net/mlx5: Mellanox Connect-IB, core
driver part 2/3
From: Or Gerlitz <ogerlitz@...lanox.com>
Date: Wed, 26 Jun 2013 17:22:11 +0300
> + eqe->owner = 0x55;
Magic constant. If this is how you will represent "Invalid Owner",
then make a macro for this value 0x55 expressing that.
> + switch (synd) {
> + case 0x1:
Please make descriptive macros instead of using magic constants.
> +#if defined(__LITTLE_ENDIAN)
> + he_in.he = 0x0;
> +#elif defined(__BIG_ENDIAN)
> + he_in.he = 0x80;
> +#else
> +#error Host endianness not defined
> +#endif
This endiannes bit needs a define, rather than just using a magic
constant. And where you define this in a header file, you can do
the CPP ifdefs, rather than here.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists