Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1664465

Re: [PATCH v2 3/3] staging: rtl8188eu: Shorten lines over 80 chars

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 3/3] staging: rtl8188eu: Shorten lines over 80 chars
Date 2017-06-13 08:10 +0200
Message-ID <tRNbz-4k7-9@gated-at.bofh.it> (permalink)
References <tRMSe-3YG-5@gated-at.bofh.it> <tRN1U-41I-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 2017-06-13 at 08:52 +0300, Aviya Erenfeld wrote:
> Shorten lines over 80 chars

Most of these changes are not useful.

Style nits if 80 columns are _really_ desired.

> diff --git a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
[]
> @@ -157,7 +164,8 @@ u32	_rtw_free_sta_priv(struct	sta_priv *pstapriv)
>  				plist = plist->next;
>  
>  				for (i = 0; i < 16; i++) {
> -					preorder_ctrl = &psta->recvreorder_ctrl[i];
> +					preorder_ctrl =
> +						&psta->recvreorder_ctrl[i];
>  					del_timer_sync(&preorder_ctrl->reordering_ctrl_timer);

This is harder to read.

> @@ -453,14 +471,16 @@ u32 rtw_init_bcmc_stainfo(struct adapter *padapter)
>  {
>  	struct sta_info		*psta;
>  	u32 res = _SUCCESS;
> -	unsigned char bcast_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
> +	unsigned char bcast_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff,
> +					      0xff};

More common would be

	unsigned char bcast_addr[ETH_ALEN] = {
		0xff, 0xff, 0xff, 0xff, 0xff, 0xff
	};

Better still would be to use static const.
Best would be to see if bcast_addr is needed at all.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/3] Fix some style issues Aviya Erenfeld <aviyae42@gmail.com> - 2017-06-13 07:50 +0200
  [PATCH v2 2/3] staging: rtl8188eu: Remove unneeded blank lines Aviya Erenfeld <aviyae42@gmail.com> - 2017-06-13 08:00 +0200
  [PATCH v2 3/3] staging: rtl8188eu: Shorten lines over 80 chars Aviya Erenfeld <aviyae42@gmail.com> - 2017-06-13 08:00 +0200
    Re: [PATCH v2 3/3] staging: rtl8188eu: Shorten lines over 80 chars Joe Perches <joe@perches.com> - 2017-06-13 08:10 +0200
  [PATCH v2 1/3] staging: rtl8188eu: Remove redundant parenthesis Aviya Erenfeld <aviyae42@gmail.com> - 2017-06-13 08:00 +0200
    Re: [PATCH v2 1/3] staging: rtl8188eu: Remove redundant parenthesis Greg KH <gregkh@linuxfoundation.org> - 2017-06-13 11:30 +0200

csiph-web