The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: simran singhal <singhalsimran0@gmail.com>
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH] staging: rtl8192u: Remove typedef phy_ofdm_rx_status_rxsc_sgien_exintfflag
Date: Sat, 11 Mar 2017 17:26:38 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1703111725060.3127@hadrien> (raw)
In-Reply-To: <20170311162045.GA21103@singhal-Inspiron-5558>



On Sat, 11 Mar 2017, simran singhal wrote:

> Remove typdef phy_ofdm_rx_status_rxsc_sgien_exintfflag and replace its uses
> in the code.
>
> Signed-off-by: simran singhal <singhalsimran0@gmail.com>
> ---
>  drivers/staging/rtl8192u/r8192U.h      | 4 ++--
>  drivers/staging/rtl8192u/r8192U_core.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/rtl8192u/r8192U.h b/drivers/staging/rtl8192u/r8192U.h
> index a7ba8f3..cd3e922 100644
> --- a/drivers/staging/rtl8192u/r8192U.h
> +++ b/drivers/staging/rtl8192u/r8192U.h
> @@ -793,12 +793,12 @@ typedef struct _phy_cck_rx_status_report_819xusb {
>  } phy_sts_cck_819xusb_t;
>
>
> -typedef struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag {
> +struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag {

You should drop the _ at the beginning of the name.  The _ suggests that
he name is a hidden thing, because one was intended to use the typedef.
The is not the case any more, so it would be better to drop the _.

The name of the structure seems to be sort of a concatenation of the names
of the fields.  If you can think of a better name based on how the
structure is used, that could be good to.

julia

>  	u8			reserved:4;
>  	u8			rxsc:2;
>  	u8			sgi_en:1;
>  	u8			ex_intf_flag:1;
> -} phy_ofdm_rx_status_rxsc_sgien_exintfflag;
> +};
>
>  typedef enum _RT_CUSTOMER_ID {
>  	RT_CID_DEFAULT = 0,
> diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c
> index 13239f4..0d830f6 100644
> --- a/drivers/staging/rtl8192u/r8192U_core.c
> +++ b/drivers/staging/rtl8192u/r8192U_core.c
> @@ -4242,7 +4242,7 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv,
>  {
>  	phy_sts_ofdm_819xusb_t *pofdm_buf;
>  	phy_sts_cck_819xusb_t	*pcck_buf;
> -	phy_ofdm_rx_status_rxsc_sgien_exintfflag *prxsc;
> +	struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag *prxsc;
>  	u8	*prxpkt;
>  	u8	i, max_spatial_stream, tmp_rxsnr, tmp_rxevm, rxsc_sgien_exflg;
>  	s8	rx_pwr[4], rx_pwr_all = 0;
> @@ -4432,7 +4432,7 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv,
>
>  		/* record rx statistics for debug */
>  		rxsc_sgien_exflg = pofdm_buf->rxsc_sgien_exflg;
> -		prxsc =	(phy_ofdm_rx_status_rxsc_sgien_exintfflag *)
> +		prxsc =	(struct _phy_ofdm_rx_status_rxsc_sgien_exintfflag *)
>  			&rxsc_sgien_exflg;
>  		if (pdrvinfo->BW)	/* 40M channel */
>  			priv->stats.received_bwtype[1 + prxsc->rxsc]++;
> --
> 2.7.4
>
> --
> 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/20170311162045.GA21103%40singhal-Inspiron-5558.
> For more options, visit https://groups.google.com/d/optout.
>

  reply	other threads:[~2017-03-11 16:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-11 16:20 [PATCH] staging: rtl8192u: Remove typedef phy_ofdm_rx_status_rxsc_sgien_exintfflag simran singhal
2017-03-11 16:26 ` Julia Lawall [this message]
2017-03-11 16:46   ` [Outreachy kernel] " SIMRAN SINGHAL
2017-03-11 16:52     ` Julia Lawall

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=alpine.DEB.2.20.1703111725060.3127@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=singhalsimran0@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