linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacob Kiefer <jtk54@cornell.edu>
To: Larry Finger <Larry.Finger@lwfinger.net>,
	Jes Sorensen <Jes.Sorensen@redhat.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Gujulan Elango, Hari Prasath (H.)" <hgujulan@visteon.com>,
	Roberta Dobrescu <roberta.dobrescu@gmail.com>,
	"open list:STAGING - REALTEK RTL8723U WIRELESS DRIVER"
	<linux-wireless@vger.kernel.org>,
	"open list:STAGING SUBSYSTEM" <devel@driverdev.osuosl.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: rtl8723au: Fix Sparse errors in rtl8723a_cmd.c
Date: Sun, 4 Oct 2015 15:26:18 -0400	[thread overview]
Message-ID: <20151004192618.GA2938@jtk54-Q550LF> (raw)
In-Reply-To: <1443832594-29663-1-git-send-email-jtk54@cornell.edu>

Hi Greg,

Thanks for the response! It's always good to get notes on a patch.
Some responses to your points:

> Why __le32?  Does this variable go across the user/kernel boundry
> somehow?  If not, just use le32.

Good point, this should probably have been le32.

> At first glance, you aren't doing ths same logic in this function as the
> original did, please look at this very closely again and verify that you
> are doing this correctly.
>
> Don't just blindly quiet tools like sparse, it is warning for a reason,
> but be careful about your fix.

On a second, closer look at the code I am not doing this correctly: the
buffer I am converting to le32 needs to persist (which a local variable
would not). On my first glance at this code I saw the same buffer being
used for both little- and big-endian storage of the same data -- it's
correct, but a little ugly.

I am going to leave this code as is, since it was functioning properly
before my patch.

Thanks,
Jake

      parent reply	other threads:[~2015-10-04 19:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-03  0:36 [PATCH] staging: rtl8723au: Fix Sparse errors in rtl8723a_cmd.c Jacob Kiefer
2015-10-04  8:48 ` Greg Kroah-Hartman
2015-10-04 19:26 ` Jacob Kiefer [this message]

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=20151004192618.GA2938@jtk54-Q550LF \
    --to=jtk54@cornell.edu \
    --cc=Jes.Sorensen@redhat.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hgujulan@visteon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=roberta.dobrescu@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).