From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtprelay0107.hostedemail.com ([216.40.44.107]:43248 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751269AbeCTUAM (ORCPT ); Tue, 20 Mar 2018 16:00:12 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id F26EF180424C4 for ; Tue, 20 Mar 2018 20:00:11 +0000 (UTC) Received: from XPS-9350 (unknown [47.151.150.235]) (Authenticated sender: joe@perches.com) by omf13.hostedemail.com (Postfix) with ESMTPA for ; Tue, 20 Mar 2018 20:00:11 +0000 (UTC) Message-ID: <1521576009.12047.17.camel@perches.com> Subject: rfc: treewide replace local ethernet broadcast char arrays with a global ? From: Joe Perches To: netdev Date: Tue, 20 Mar 2018 13:00:09 -0700 Content-Type: text/plain; charset="ISO-8859-1" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: Treewide there are ~60 declarations of a ethernet broadcast address as a 6 byte array that are later used as either an output for vsprintf extension %pM or as a source array to copy or compare. Perhaps it'd be useful to declare a global static const u8[] in net somewhere instead to save the text/data space of these duplicate declarations. $ grep-2.5.4 -n --include=*.[ch] "\b(?:static\s+)?(?:const\s+)?(?:char|unsigned\s+char|u8)\s+\w+\s*\[\s*(?:ETH_ALEN|6)\s*\]\s*=\s*\{\s*(?:(?i:0xff|255),\s*){5,5}\s*(?i:0xff|255)\s*\}" * | \ grep -P "\.[ch]:\d+:"