From owner-svn-src-all@FreeBSD.ORG Sat May 14 20:31:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DCB5106566C; Sat, 14 May 2011 20:31:05 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D76C8FC14; Sat, 14 May 2011 20:31:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p4EKV5bp014533; Sat, 14 May 2011 20:31:05 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4EKV5el014531; Sat, 14 May 2011 20:31:05 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201105142031.p4EKV5el014531@svn.freebsd.org> From: Marius Strobl Date: Sat, 14 May 2011 20:31:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221913 - head/sys/dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 May 2011 20:31:05 -0000 Author: marius Date: Sat May 14 20:31:04 2011 New Revision: 221913 URL: http://svn.freebsd.org/changeset/base/221913 Log: - There's no need for nibbletab to be static, it's const however. - Fix whitespace. Modified: head/sys/dev/mii/mii.c Modified: head/sys/dev/mii/mii.c ============================================================================== --- head/sys/dev/mii/mii.c Sat May 14 19:36:12 2011 (r221912) +++ head/sys/dev/mii/mii.c Sat May 14 20:31:04 2011 (r221913) @@ -552,7 +552,7 @@ mii_down(struct mii_data *mii) static unsigned char mii_bitreverse(unsigned char x) { - static unsigned char nibbletab[16] = { + unsigned const char const nibbletab[16] = { 0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15 }; @@ -567,6 +567,6 @@ mii_oui(u_int id1, u_int id2) h = (id1 << 6) | (id2 >> 10); return ((mii_bitreverse(h >> 16) << 16) | - (mii_bitreverse((h >> 8) & 0xff) << 8) | - mii_bitreverse(h & 0xff)); + (mii_bitreverse((h >> 8) & 0xff) << 8) | + mii_bitreverse(h & 0xff)); }