All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
To: Julia Lawall <julia.lawall@lip6.fr>
Cc: outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH 08/13] staging: rtl8192u: remove extra parentheses around right bit shift operation
Date: Wed, 4 Mar 2015 19:57:29 +0200	[thread overview]
Message-ID: <20150304175729.GA4911@waves> (raw)
In-Reply-To: <alpine.DEB.2.10.1503041208500.2777@hadrien>

On Wed, Mar 04, 2015 at 12:09:40PM -0500, Julia Lawall wrote:
> > diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> > index 9de4412..bab7751 100644
> > --- a/drivers/staging/rtl8192u/r8192U_core.c
> > +++ b/drivers/staging/rtl8192u/r8192U_core.c
> > @@ -2310,11 +2310,11 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
> >  	}
> >
> >  	if (bLoad_From_EEPOM) {
> > -		tmpValue = eprom_read(dev, (EEPROM_VID>>1));
> > +		tmpValue = eprom_read(dev, EEPROM_VID>>1);
> 
> Perhaps you could add some spaces around >> at the same time.
>
Yes, I realized the styling issue too, it can be found in many files.
Coders are not consistent when it comes to leaving spaces around
the >> and << operators and checkpatch does not complain. In addition,
checkpatch does not issue any warning about where an operator should
be if a statement is split into two or more lines
e.g.

s = a * 
   b;
is the same as 
s = a 
   * b;

I can send the styling issues handling in a separate patchset. If you
want me to resend the patchset again, let me know. It will however take
me some time.
   
> julia
> 
> >  		priv->eeprom_vid = endian_swap(&tmpValue);
> > -		priv->eeprom_pid = eprom_read(dev, (EEPROM_PID>>1));
> > -		tmpValue = eprom_read(dev, (EEPROM_ChannelPlan>>1));
> > -		priv->eeprom_ChannelPlan = ((tmpValue&0xff00)>>8);
> > +		priv->eeprom_pid = eprom_read(dev, EEPROM_PID>>1);
> > +		tmpValue = eprom_read(dev, EEPROM_ChannelPlan>>1);
> > +		priv->eeprom_ChannelPlan = (tmpValue & 0xff00)>>8;
> >  		priv->btxpowerdata_readfromEEPORM = true;
> >  		priv->eeprom_CustomerID = eprom_read(dev, (EEPROM_Customer_ID>>1)) >>8;
> >  	} else {
> > @@ -2397,7 +2397,8 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
> >  			}
> >  		} else if (priv->EEPROM_Def_Ver == 1) {
> >  			if (bLoad_From_EEPOM) {
> > -				tmpValue = eprom_read(dev, (EEPROM_TxPwIndex_CCK_V1>>1));
> > +				tmpValue = eprom_read(dev,
> > +						EEPROM_TxPwIndex_CCK_V1 >> 1);
> >  				tmpValue = (tmpValue & 0xff00) >> 8;
> >  			} else {
> >  				tmpValue = 0x10;
> > @@ -2410,7 +2411,8 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
> >  				tmpValue = 0x1010;
> >  			*((u16 *)(&priv->EEPROMTxPowerLevelCCK_V1[1])) = tmpValue;
> >  			if (bLoad_From_EEPOM)
> > -				tmpValue = eprom_read(dev, (EEPROM_TxPwIndex_OFDM_24G_V1>>1));
> > +				tmpValue = eprom_read(dev,
> > +					EEPROM_TxPwIndex_OFDM_24G_V1 >> 1);
> >  			else
> >  				tmpValue = 0x1010;
> >  			*((u16 *)(&priv->EEPROMTxPowerLevelOFDM24G[0])) = tmpValue;
> > @@ -2453,7 +2455,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
> >  		// Antenna B gain offset to antenna A, bit0~3
> >  		priv->AntennaTxPwDiff[0] = (priv->EEPROMTxPowerDiff & 0xf);
> >  		// Antenna C gain offset to antenna A, bit4~7
> > -		priv->AntennaTxPwDiff[1] = ((priv->EEPROMTxPowerDiff & 0xf0)>>4);
> > +		priv->AntennaTxPwDiff[1] = (priv->EEPROMTxPowerDiff & 0xf0)>>4;
> >  		// CrystalCap, bit12~15
> >  		priv->CrystalCap = priv->EEPROMCrystalCap;
> >  		// ThermalMeter, bit0~3 for RFIC1, bit4~7 for RFIC2
> > --
> > 1.9.3
> >
> >
> > --
> > Kind Regards,
> > Aya Saif El-yazal Mahfouz
> >
> > --
> > You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/076f797b7a1c3417bb6fe5d027a4a21d5e33b072.1425446659.git.mahfouz.saif.elyazal%40gmail.com.
> > For more options, visit https://groups.google.com/d/optout.
> >

-- 
Kind Regards,
Aya Saif El-yazal Mahfouz


  reply	other threads:[~2015-03-04 17:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04  5:28 [PATCH 00/13] remove extra parentheses around right bit shift operations Aya Mahfouz
2015-03-04  5:28 ` [PATCH 01/13] staging: comedi: drivers: remove extra parentheses around right bit shift operation Aya Mahfouz
2015-03-04  5:29 ` [PATCH 02/13] staging: lustre: lclient: " Aya Mahfouz
2015-03-04  5:30 ` [PATCH 03/13] staging: lustre: llite: " Aya Mahfouz
2015-03-04  5:30 ` [PATCH 04/13] staging: media: bcm2048: " Aya Mahfouz
2015-03-04  5:31 ` [PATCH 05/13] staging: media: lirc: " Aya Mahfouz
2015-03-04  5:31 ` [PATCH 06/13] staging: rtl8188eu: remove extra parentheses around right bit shift operations Aya Mahfouz
2015-03-04  5:32 ` [PATCH 07/13] staging: rtl8192e: remove extra parentheses around right bit shift operation Aya Mahfouz
2015-03-04  5:33 ` [PATCH 08/13] staging: rtl8192u: " Aya Mahfouz
2015-03-04 17:09   ` [Outreachy kernel] " Julia Lawall
2015-03-04 17:57     ` Aya Mahfouz [this message]
2015-03-04 18:15       ` Julia Lawall
2015-03-04  5:33 ` [PATCH 09/13] staging: rtl8712: " Aya Mahfouz
2015-03-04  5:34 ` [PATCH 10/13] staging: rtl8723au: remove extra parentheses around right bit shift operations Aya Mahfouz
2015-03-04  5:34 ` [PATCH 11/13] staging: slicoss: " Aya Mahfouz
2015-03-04  5:35 ` [PATCH 12/13] staging: speakup: remove extra parentheses around right bit shift operation Aya Mahfouz
2015-03-04  5:35 ` [PATCH 13/13] staging: xgifb: remove extra parentheses around right bit shift operations Aya Mahfouz

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=20150304175729.GA4911@waves \
    --to=mahfouz.saif.elyazal@gmail.com \
    --cc=julia.lawall@lip6.fr \
    --cc=outreachy-kernel@googlegroups.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.