From: Soumyajit Deb <debsoumyajit100@gmail.com>
To: Stefano Brivio <sbrivio@redhat.com>, outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [Outreachy] [PATCH v2 2/3] staging: rtl8188eu: Line over 80 characters
Date: Wed, 1 Apr 2020 13:29:10 +0530 [thread overview]
Message-ID: <20200401075902.GA18430@ubuntu> (raw)
In-Reply-To: <20200401044838.4f8a0ba9@elisabeth>
On Wed, Apr 01, 2020 at 04:48:38AM +0200, Stefano Brivio wrote:
> On Wed, 1 Apr 2020 00:02:00 +0530
> Soumyajit Deb <debsoumyajit100@gmail.com> wrote:
>
> > @@ -445,7 +455,8 @@ static void update_bmc_sta(struct adapter *padapter)
> > tx_ra_bitmap = 0xf;
> >
> > raid = networktype_to_raid(network_type);
> > - init_rate = get_highest_rate_idx(tx_ra_bitmap & 0x0fffffff) & 0x3f;
> > + init_rate = get_highest_rate_idx(tx_ra_bitmap & 0x0fffffff) &
> > + 0x3f;
>
> Hmm, no, wait, what is 0x3f bit-wise intersected with?
>
> a = lol;
>
> a = lol *
> 2;
>
> a = (lol + foo) *
> 2;
>
> a = lol + foo *
> 2;
>
> but not:
>
> a = (lol + foo) *
> 2;
>
> ...right?
>
I am sorry but I couldn't understand what you mean.
As much I can see, a bitwise AND operation is being done between 0x3f and the
return value of get_highest_rate_idx() function. The first & operation
is between the arguments of get_highest_rate_idx() function.
If the current alignment is wrong, should I place 0x3f someplace else?
But as you suggested previously in this thread, that I should place 0x3f
below the start of first & operand.
> >
> > /* ap mode */
> > rtw_hal_set_odm_var(padapter, HAL_ODM_STA_INFO, psta, true);
> > @@ -456,7 +467,8 @@ static void update_bmc_sta(struct adapter *padapter)
> > arg = psta->mac_id & 0x1f;
> > arg |= BIT(7);
> > tx_ra_bitmap |= ((raid << 28) & 0xf0000000);
> > - DBG_88E("%s, mask = 0x%x, arg = 0x%x\n", __func__, tx_ra_bitmap, arg);
> > + DBG_88E("%s, mask = 0x%x, arg = 0x%x\n", __func__,
> > + tx_ra_bitmap, arg);
> >
> > /* bitmap[0:27] = tx_rate_bitmap */
> > /* bitmap[28:31]= Rate Adaptive id */
> > @@ -647,7 +659,8 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf)
> > rtw_hal_set_hwreg(padapter, HW_VAR_SEC_CFG, (u8 *)(&val8));
> >
> > /* Beacon Control related register */
> > - rtw_hal_set_hwreg(padapter, HW_VAR_BEACON_INTERVAL, (u8 *)(&bcn_interval));
> > + rtw_hal_set_hwreg(padapter, HW_VAR_BEACON_INTERVAL,
> > + (u8 *)(&bcn_interval));
>
> This is another pair of parentheses that you could remove: &a == (&a).
>
> --
> Stefano
I noticed those parentheses while removing other extra parentheses
but I didn't remove these as most of these parentheses are present
after a type cast.
Will it not look confusing if I remove these paretheses?
If not, I will remove them :)
Thank you.
--
Soumyajit
>
next prev parent reply other threads:[~2020-04-01 7:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-31 18:31 [Outreachy] [PATCH v2 0/3] staging: rtl8188eu: Resolve various warnings reported by checkpatch.pl Soumyajit Deb
2020-03-31 18:31 ` [Outreachy] [PATCH v2 1/3] staging: rtl8188eu: Properly structure the multiline comment Soumyajit Deb
2020-03-31 18:32 ` [Outreachy] [PATCH v2 2/3] staging: rtl8188eu: Line over 80 characters Soumyajit Deb
2020-04-01 2:48 ` [Outreachy kernel] " Stefano Brivio
2020-04-01 7:59 ` Soumyajit Deb [this message]
2020-04-01 8:41 ` Julia Lawall
2020-04-02 13:01 ` Soumyajit Deb
2020-04-02 13:04 ` Julia Lawall
2020-04-02 14:41 ` Soumyajit Deb
2020-03-31 18:32 ` [Outreachy] [PATCH v2 3/3] staging: rtl8188eu: Remove unnecessary extra parentheses Soumyajit Deb
2020-04-01 2:47 ` [Outreachy kernel] [Outreachy] [PATCH v2 0/3] staging: rtl8188eu: Resolve various warnings reported by checkpatch.pl Stefano Brivio
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=20200401075902.GA18430@ubuntu \
--to=debsoumyajit100@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
--cc=sbrivio@redhat.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 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.