device: do not log on idempotent device state change

Part of being actually idempotent is that we shouldn't penalize code
that takes advantage of this property with a log splat.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2021-02-09 15:25:43 +01:00
parent 6ac1240821
commit d6e76fdbd6

View File

@ -160,7 +160,6 @@ func (device *Device) changeState(want deviceState) {
}
switch want {
case old:
device.log.Verbosef("Interface already in state %s", want)
return
case deviceStateUp:
atomic.StoreUint32(&device.state.state, uint32(deviceStateUp))