All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Gilad Avidov <gavidov@codeaurora.org>,
	gregkh@linuxfoundation.org, netdev@vger.kernel.org
Cc: sdharia@codeaurora.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, vikrams@codeaurora.org,
	shankerd@codeaurora.org
Subject: Re: [PATCH] net: emac: emac gigabit ethernet controller driver
Date: Tue, 8 Dec 2015 00:33:04 +0100	[thread overview]
Message-ID: <56661730.4050801@openwrt.org> (raw)
In-Reply-To: <1449529094-10922-1-git-send-email-gavidov@codeaurora.org>

On 2015-12-07 23:58, Gilad Avidov wrote:
> +/* RRD (Receive Return Descriptor) */
> +union emac_rrd {
> +	struct {
> +		/* 32bit word 0 */
> +		u32  xsum:16;
> +		u32  nor:4;       /* number of RFD */
> +		u32  si:12;       /* start index of rfd-ring */
> +		/* 32bit word 1 */
> +		u32  hash;
> +		/* 32bit word 2 */
You should never use bitfields for hardware structs.
I think in general, kernel code should be made endian safe, even if you
only care about one particular endian type for your platform.

- Felix

  reply	other threads:[~2015-12-07 23:33 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-07 22:58 [PATCH] net: emac: emac gigabit ethernet controller driver Gilad Avidov
2015-12-07 23:33 ` Felix Fietkau [this message]
2015-12-07 23:47   ` Gilad Avidov
2015-12-07 23:37 ` kbuild test robot
2015-12-07 23:37   ` kbuild test robot
2015-12-09 20:09 ` Timur Tabi
2015-12-09 20:37   ` Fabio Estevam
2015-12-09 20:58     ` David Miller
2015-12-10  0:26   ` Gilad Avidov
2015-12-10  4:04     ` Timur Tabi
  -- strict thread matches above, loose matches on Subject: below --
2015-12-15  0:19 Gilad Avidov
2015-12-15  0:19 ` Gilad Avidov
2015-12-15  1:39 ` Florian Fainelli
2015-12-15 14:30   ` Christopher Covington
     [not found]     ` <567023F8.80302-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-12-15 14:50       ` Arnd Bergmann
2015-12-15 14:50         ` Arnd Bergmann
2015-12-15 15:17         ` Timur Tabi
2015-12-15 15:17           ` Timur Tabi
2015-12-15 15:41           ` Arnd Bergmann
2015-12-15 21:09             ` Timur Tabi
2015-12-15 21:55               ` Arnd Bergmann
2015-12-15 22:49   ` Gilad Avidov
2015-12-31 23:03     ` Rob Herring
     [not found] ` <1450138740-32562-1-git-send-email-gavidov-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-12-16  0:15   ` Timur Tabi
2015-12-16  0:15     ` Timur Tabi
2015-12-16  3:12     ` David Miller
2015-12-16  3:30       ` Timur Tabi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56661730.4050801@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=gavidov@codeaurora.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sdharia@codeaurora.org \
    --cc=shankerd@codeaurora.org \
    --cc=vikrams@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.