From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kalle Valo Date: Fri, 22 Apr 2016 21:21:42 +0300 Subject: [ath9k-devel] [PATCH] ath9k: remove repetitions of mask array size In-Reply-To: <1460818477-22785-1-git-send-email-me@bobcopeland.com> (Bob Copeland's message of "Sat, 16 Apr 2016 10:54:37 -0400") References: <1460818477-22785-1-git-send-email-me@bobcopeland.com> Message-ID: <87a8kly05l.fsf@purkki.adurom.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org Bob Copeland writes: > The constant "123", which is the number of elements in > mask_m / mask_p, is repeated several times in this function. > > Replace memsets with array initialization, and replace a loop > conditional with ARRAY_SIZE() so that we don't repeat ourselves. > > Signed-off-by: Bob Copeland As this depends on a patch in wireless-drivers (at least I assume so), and I cannot apply a cleanup patch like this to that repository, I'm planning to apply this only after 4.7-rc1 is released. I hope that's ok. -- Kalle Valo