summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorTobin C. Harding <me@tobin.cc>2017-04-27 11:25:15 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-28 11:45:49 +0200
commit08484ef41927a52fbd0d46c5cd19a65535d768ea (patch)
tree08910900a042f8ebff2b96a7dc9525cf13e01611 /tools/perf/scripts/python
parent8cd1dbe1db97ad74c5265e09c3490eeb7986f623 (diff)
staging: ks7010: remove magic numbers
Driver includes magic numbers. Defining constants or using existing constants aids the readability of the code. Magic number '12' is used for two ethernet addresses (6 bytes each). ETH_ALEN is already defined within the kernel to 6. We can us the expression '2 * ETH_ALEN' to make this code explicit. Magic number '20' refers to the data size, in bytes, of a struct ether_hdr (described in eap_packet.h). We can define a constant for this purpose, making the code explicit and easier to read. Define constant. Remove magic numbers, using newly defined constant and/or expression using existing kernel constant. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions