All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ernestas Kulik <ernestas.kulik@gmail.com>
To: Joe Perches <joe@perches.com>, gregkh@linuxfoundation.org
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: ks7010: clean up code
Date: Sat, 4 Mar 2017 08:28:58 +0200	[thread overview]
Message-ID: <20170304062858.GA2120@gmail.com> (raw)
In-Reply-To: <1488590630.2179.41.camel@perches.com>

On Fri, 2017-03-03 at 17:23-0800, Joe Perches wrote:

> On Fri, 2017-03-03 at 22:58 +0200, Ernestas Kulik wrote:
>
> > This fixes type warnings generated by sparse, replaces instances of
> > ntohs() with be16_to_cpu() and removes unused fields in structs.
> 
> There's no real need to convert ntohs to be16_to_cpu

I noticed a patch that was merged that replaces calls to these with the
more “generic” be16_to_cpu(), but I can revert that.

This kind of conversion also happened in SeaBIOS, but it’s not exactly
the same thing as here.

> > diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
> []
> > 
> > @@ -297,7 +297,8 @@ static int write_to_device(struct ks_wlan_private *priv, unsigned char *buffer,
> >  	hdr = (struct hostif_hdr *)buffer;
> >  
> >  	DPRINTK(4, "size=%d\n", hdr->size);
> > -	if (hdr->event < HIF_DATA_REQ || HIF_REQ_MAX < hdr->event) {
> > +	if (le16_to_cpu(hdr->event) < HIF_DATA_REQ ||
> > +	    HIF_REQ_MAX < le16_to_cpu(hdr->event)) {
> > 
> 
> This isn't mentioned and doesn't match the commit message

It is and it does, but the commit message is a bit vague. I’ll try to
expand it.

  reply	other threads:[~2017-03-04  6:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-03 20:58 [PATCH] staging: ks7010: clean up code Ernestas Kulik
2017-03-04  1:23 ` Joe Perches
2017-03-04  6:28   ` Ernestas Kulik [this message]
2017-03-04  6:37     ` Joe Perches
2017-03-04  6:49       ` Ernestas Kulik
2017-03-04  7:24         ` Joe Perches
2017-03-04  9:04           ` Ernestas Kulik

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=20170304062858.GA2120@gmail.com \
    --to=ernestas.kulik@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.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.