mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Phillip Potter <phil@philpotter.co.uk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: r8188eu: Fix PPPoE tag insertion on big endian systems
Date: Sat, 2 Apr 2022 14:18:22 -0700	[thread overview]
Message-ID: <0c646d80-3198-06c1-e8aa-442b245ffb3e@roeck-us.net> (raw)
In-Reply-To: <8e68501c-24fd-cfbc-60f2-ec3e277159ab@lwfinger.net>

On 4/1/22 13:25, Larry Finger wrote:
> On 4/1/22 14:25, Guenter Roeck wrote:
>> The rest of the code uses htons/ntohs, so I prefer to follow that lead.
> 
> You just proved my point. It is hard to get be16_to_cpu() wrong. Sparse will flag the error when you use cpu_to_be16() instead. I expect that your htons/ntohs problem would also have shown up with Sparse.
> 

Ok, you made your point. I'll use be16_to_cpu() - the driver
already uses it elsewhere anyway. As for the other problems,
I am not sure if the driver ever worked. The function we are
looking at can't really have worked on a little endian system
because of the missing conversion, and the same is true for the
other code flagged by sparse. I think I'll just add a note
to this patch and let the driver authors decide what to do
about those problems.

Guenter

  reply	other threads:[~2022-04-02 21:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-01 15:12 Guenter Roeck
2022-04-01 18:40 ` Larry Finger
2022-04-01 19:25   ` Guenter Roeck
2022-04-01 20:25     ` Larry Finger
2022-04-02 21:18       ` Guenter Roeck [this message]
2022-04-04  9:53         ` Dan Carpenter
2022-04-04 13:47           ` Guenter Roeck

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=0c646d80-3198-06c1-e8aa-442b245ffb3e@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=phil@philpotter.co.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®