Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH 05/18] net: use ARRAY_SIZE
Date: Mon, 02 Oct 2017 16:46:29 +0300	[thread overview]
Message-ID: <87h8vh64sq.fsf@codeaurora.org> (raw)
In-Reply-To: <20171001193101.8898-6-jeremy.lefaure@lse.epita.fr> ("Jérémy Lefaure"'s message of "Sun, 1 Oct 2017 15:30:43 -0400")

J?r?my Lefaure <jeremy.lefaure@lse.epita.fr> writes:

> Using the ARRAY_SIZE macro improves the readability of the code. Also,
> it is not always useful to use a variable to store this constant
> calculated at compile time.
>
> Found with Coccinelle with the following semantic patch:
> @r depends on (org || report)@
> type T;
> T[] E;
> position p;
> @@
> (
>  (sizeof(E)@p /sizeof(*E))
> |
>  (sizeof(E)@p /sizeof(E[...]))
> |
>  (sizeof(E)@p /sizeof(T))
> )
>
> Signed-off-by: J?r?my Lefaure <jeremy.lefaure@lse.epita.fr>
> ---
>  drivers/net/ethernet/emulex/benet/be_cmds.c        |   4 +-
>  drivers/net/ethernet/intel/i40e/i40e_adminq.h      |   3 +-
>  drivers/net/ethernet/intel/i40evf/i40e_adminq.h    |   3 +-
>  drivers/net/ethernet/intel/ixgbe/ixgbe_x550.c      |   3 +-
>  drivers/net/ethernet/intel/ixgbevf/vf.c            |  17 +-
>  drivers/net/usb/kalmia.c                           |   9 +-
>  .../broadcom/brcm80211/brcmsmac/phy/phytbl_n.c     | 473 ++++++---------------
>  .../net/wireless/realtek/rtlwifi/rtl8723be/hw.c    |   9 +-
>  .../net/wireless/realtek/rtlwifi/rtl8723be/phy.c   |  12 +-
>  .../net/wireless/realtek/rtlwifi/rtl8723be/table.c |  14 +-
>  .../net/wireless/realtek/rtlwifi/rtl8821ae/table.c |  34 +-
>  include/net/bond_3ad.h                             |   3 +-
>  net/ipv6/seg6_local.c                              |   6 +-
>  13 files changed, 177 insertions(+), 413 deletions(-)

We have a tree for wireless so usually it's better to submit wireless
changes on their own but here I assume Dave will apply this to his tree.
If not, please resubmit the wireless part in a separate patch.

-- 
Kalle Valo

  parent reply	other threads:[~2017-10-02 13:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-01 19:30 [Intel-wired-lan] [PATCH 00/18] use ARRAY_SIZE macro =?unknown-8bit?q?J=C3=A9r=C3=A9my?= Lefaure
2017-10-01 19:30 ` [Intel-wired-lan] [PATCH 05/18] net: use ARRAY_SIZE =?unknown-8bit?q?J=C3=A9r=C3=A9my?= Lefaure
2017-10-02 13:07   ` Andy Shevchenko
2017-10-03  1:22     ` =?unknown-8bit?q?J=C3=A9r=C3=A9my?= Lefaure
2017-10-03  8:09       ` Andy Shevchenko
2017-10-02 13:46   ` Kalle Valo [this message]
2017-10-03  1:23     ` =?unknown-8bit?q?J=C3=A9r=C3=A9my?= Lefaure
2017-10-01 22:01 ` [Intel-wired-lan] [PATCH 00/18] use ARRAY_SIZE macro Tobin C. Harding
2017-10-02  0:52   ` =?unknown-8bit?q?J=C3=A9r=C3=A9my?= Lefaure
2017-10-02  5:35     ` Greg KH
2017-10-02 19:22       ` J. Bruce Fields
2017-10-03  1:33         ` =?unknown-8bit?q?J=C3=A9r=C3=A9my?= Lefaure
2017-10-05 17:57           ` J. Bruce Fields
2017-10-02 16:37     ` Mauro Carvalho Chehab
2017-10-02 17:05 ` [Intel-wired-lan] [Intel-gfx] " Zhi Wang

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=87h8vh64sq.fsf@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=intel-wired-lan@osuosl.org \
    /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