netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pkshih <pkshih@realtek.com>
To: "joe@perches.com" <joe@perches.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"kvalo@codeaurora.org" <kvalo@codeaurora.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH] rtlwifi/*/dm.c: Use const in swing_table declarations
Date: Mon, 29 Jun 2020 03:34:28 +0000	[thread overview]
Message-ID: <1593401639.12786.10.camel@realtek.com> (raw)
In-Reply-To: <1593400347.12786.8.camel@realtek.com>

On Mon, 2020-06-29 at 11:12 +0800, Pkshih wrote:
> On Sun, 2020-06-28 at 19:51 -0700, joe@perches.com wrote:
> > On 2020-06-28 19:09, Pkshih wrote:
> > > On Sun, 2020-06-28 at 03:17 -0700, Joe Perches wrote:
> > > 
> > > Use 'rtlwifi:' as subject title prefix is enough, likes
> > >   rtlwifi: Use const in swing_table declarations
> > 
> > We disagree.
> > 
> > I like knowing what content is changed via patch subject lines
> > as there are 3 rtlwifi drivers being changed by this one patch.
> 
> If 3 drivers are needed to be listed, I'd use below subject
> 
> "rtlwifi: Use const in rtl8188ee/rtl8723be/rtl8821ae swing_table declarations"
> 
> > 
> > But your choice, you can change it if you choose.
> > 
> > >> Reduce data usage about 1KB by using const.
> > []
> > > Please remove below type casting: 
> > > 
> > > @@ -1872,10 +1872,10 @@ static void 
> > > rtl8821ae_get_delta_swing_table(struct
> > > ieee80211_hw *hw,
> > >                 *up_b = rtl8821ae_delta_swing_table_idx_5gb_p[2];
> > >                 *down_b = rtl8821ae_delta_swing_table_idx_5gb_n[2];
> > >         } else {
> > > -           *up_a = (u8 *)rtl8818e_delta_swing_table_idx_24gb_p;
> > > -           *down_a = (u8 *)rtl8818e_delta_swing_table_idx_24gb_n;
> > > -           *up_b = (u8 *)rtl8818e_delta_swing_table_idx_24gb_p;
> > > -           *down_b = (u8 *)rtl8818e_delta_swing_table_idx_24gb_n;
> > > +               *up_a = rtl8818e_delta_swing_table_idx_24gb_p;
> > > +               *down_a = rtl8818e_delta_swing_table_idx_24gb_n;
> > > +               *up_b = rtl8818e_delta_swing_table_idx_24gb_p;
> > > +               *down_b = rtl8818e_delta_swing_table_idx_24gb_n;
> > 
> > The compiler is quiet about this so I believe this to be
> > an unrelated change and whitespace correction.
> 
> I know compiler doesn't warn this, but it looks wired to cast 'const u8 *'
> to 'u8 *' to 'const u8 *'.
> 
> 
> > 
> > Of course you could modify it if you choose.
> > 
> > btw: There's an unnecessary return at the 2nd instance
> >       of this cast removal too.
> 
> It seems like to copy from rtl8812ae_get_delta_swing_table(), so
> I can remove it by another patch.
> 

Two patches are sent:

rtlwifi: 8821ae: remove unused path B parameters from swing table
rtlwifi: Use const in 8188ee/8723be/8821ae swing_table declarations

---
Thanks
PK

      reply	other threads:[~2020-06-29  3:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-28 10:17 [PATCH] rtlwifi/*/dm.c: Use const in swing_table declarations Joe Perches
2020-06-29  2:09 ` Pkshih
2020-06-29  2:51   ` joe
2020-06-29  3:12     ` Pkshih
2020-06-29  3:34       ` Pkshih [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=1593401639.12786.10.camel@realtek.com \
    --to=pkshih@realtek.com \
    --cc=davem@davemloft.net \
    --cc=joe@perches.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@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 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).