From: Greg KH <gregkh@linuxfoundation.org>
To: Michael Straube <straube.linux@gmail.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 14/17] staging: rtl8188eu: simplify null array initializations
Date: Wed, 19 Dec 2018 08:32:11 +0100 [thread overview]
Message-ID: <20181219073211.GA22266@kroah.com> (raw)
In-Reply-To: <20181218183451.18692-14-straube.linux@gmail.com>
On Tue, Dec 18, 2018 at 07:34:48PM +0100, Michael Straube wrote:
> Simplfy initialization of null arrays to improve readability
> and save some lines.
>
> Signed-off-by: Michael Straube <straube.linux@gmail.com>
> ---
> drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 4 ++--
> drivers/staging/rtl8188eu/core/rtw_xmit.c | 6 ++----
> 2 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> index d3d211d8eeee..2a42f80d1970 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> @@ -17,7 +17,7 @@
> #include <mlme_osdep.h>
> #include <recv_osdep.h>
>
> -static u8 null_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0};
> +static u8 null_addr[ETH_ALEN] = {};
>
> /**************************************************
> OUI definitions for the vendor specific IE
> @@ -5207,7 +5207,7 @@ u8 setkey_hdl(struct adapter *padapter, u8 *pbuf)
> struct setkey_parm *pparm = (struct setkey_parm *)pbuf;
> struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
> struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
> - u8 null_sta[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
> + u8 null_sta[ETH_ALEN] = {};
This just changed the type of the variable to a fixed size. I'm
guessing it's ok, but it looks odd in a "cleanup patch"...
thanks,
greg k-h
next prev parent reply other threads:[~2018-12-19 7:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 18:34 [PATCH v2 01/17] staging: rtl8188eu: cleanup declarations in rtw_mlme_ext.c Michael Straube
2018-12-18 18:34 ` [PATCH v2 02/17] staging: rtl8188eu: replace tabs with spaces " Michael Straube
2018-12-18 18:34 ` [PATCH v2 03/17] staging: rtl8188eu: remove commented declarations " Michael Straube
2018-12-18 18:34 ` [PATCH v2 04/17] staging: rtl8188eu: remove blank lines between declarations Michael Straube
2018-12-18 18:34 ` [PATCH v2 05/17] staging: rtl8188eu: add blank line after declarations Michael Straube
2018-12-18 18:34 ` [PATCH v2 06/17] staging: rtl8188eu: remove unnecessary comments in rtw_mlme_ext.c Michael Straube
2018-12-18 18:34 ` [PATCH v2 07/17] staging: rtl8188eu: remove unnecessary parentheses " Michael Straube
2018-12-18 18:34 ` [PATCH v2 08/17] staging: rtl8188eu: remove unused arrays WFD_OUI and WMM_INFO_OUI Michael Straube
2018-12-18 18:34 ` [PATCH v2 09/17] staging: rtl8188eu: remove redundant declaration in rtw_mlme_ext.c Michael Straube
2018-12-18 18:34 ` [PATCH v2 10/17] staging: rtl8188eu: convert unsigned char arrays to u8 Michael Straube
2018-12-18 18:34 ` [PATCH v2 11/17] staging: rtl8188eu: constify some arrays Michael Straube
2018-12-18 18:34 ` [PATCH v2 12/17] staging: rtl8188eu: make some arrays static in rtw_mlme_ext.c Michael Straube
2018-12-18 18:34 ` [PATCH v2 13/17] staging: rtl8188eu: change order of declarations to improve readability Michael Straube
2018-12-18 18:34 ` [PATCH v2 14/17] staging: rtl8188eu: simplify null array initializations Michael Straube
2018-12-19 7:32 ` Greg KH [this message]
2018-12-18 18:34 ` [PATCH v2 15/17] staging: rtl8188eu: change return type of is_basicrate() to bool Michael Straube
2018-12-18 18:34 ` [PATCH v2 16/17] staging: rtl8188eu: add spaces around '&' in rtw_mlme_ext.c Michael Straube
2018-12-18 18:34 ` [PATCH v2 17/17] staging: rtl8188eu: cleanup brace coding style issues Michael Straube
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=20181219073211.GA22266@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=straube.linux@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
Powered by JetHome