Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 08484ef4 authored by Tobin C. Harding's avatar Tobin C. Harding Committed by Greg Kroah-Hartman
Browse files

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: default avatarTobin C. Harding <me@tobin.cc>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8cd1dbe1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment