Skip to content

Commit

Permalink
remove redundant imports
Browse files Browse the repository at this point in the history
Newer compiler versions warn about these.
  • Loading branch information
bradjc committed Feb 21, 2024
1 parent fbcbb56 commit 5916dc6
Show file tree
Hide file tree
Showing 85 changed files with 12 additions and 118 deletions.
1 change: 0 additions & 1 deletion arch/cortex-m/src/mpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use core::cmp;
use core::fmt;
use core::num::NonZeroUsize;

use kernel;
use kernel::platform::mpu;
use kernel::utilities::cells::OptionalCell;
use kernel::utilities::math;
Expand Down
1 change: 0 additions & 1 deletion arch/cortex-m/src/support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Copyright Tock Contributors 2022.

use crate::scb;
use core::ops::FnOnce;

#[cfg(all(target_arch = "arm", target_os = "none"))]
#[inline(always)]
Expand Down
1 change: 0 additions & 1 deletion arch/rv32i/src/support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
//! Core low-level operations.

use crate::csr::{mstatus::mstatus, CSR};
use core::ops::FnOnce;

#[cfg(all(target_arch = "riscv32", target_os = "none"))]
#[inline(always)]
Expand Down
2 changes: 0 additions & 2 deletions arch/rv32i/src/syscall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@

//! Kernel-userland system call interface for RISC-V architecture.

use core::convert::TryInto;
use core::fmt::Write;
use core::mem::size_of;
use core::ops::Range;

use crate::csr::mcause;
use kernel;
use kernel::errorcode::ErrorCode;
use kernel::syscall::ContextSwitchReason;

Expand Down
1 change: 0 additions & 1 deletion boards/apollo3/lora_things_plus/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use core::panic::PanicInfo;
use crate::CHIP;
use crate::PROCESSES;
use crate::PROCESS_PRINTER;
use apollo3;
use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
Expand Down
1 change: 0 additions & 1 deletion boards/apollo3/redboard_artemis_atp/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use core::panic::PanicInfo;
use crate::CHIP;
use crate::PROCESSES;
use crate::PROCESS_PRINTER;
use apollo3;
use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
Expand Down
1 change: 0 additions & 1 deletion boards/apollo3/redboard_artemis_nano/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use core::panic::PanicInfo;
use crate::CHIP;
use crate::PROCESSES;
use crate::PROCESS_PRINTER;
use apollo3;
use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
Expand Down
3 changes: 0 additions & 3 deletions boards/arty_e21/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@
// SPDX-License-Identifier: Apache-2.0 OR MIT
// Copyright Tock Contributors 2022.

use arty_e21_chip;
use core::fmt::Write;
use core::panic::PanicInfo;
use core::str;
use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::gpio;
use kernel::hil::led;
use rv32i;
use sifive;

use crate::CHIP;
use crate::PROCESSES;
Expand Down
1 change: 0 additions & 1 deletion boards/clue_nrf52840/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use core::fmt::Write;
use core::panic::PanicInfo;
use kernel::ErrorCode;

use cortexm4;
use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
Expand Down
1 change: 0 additions & 1 deletion boards/components/src/analog_comparator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

use capsules_extra::analog_comparator::AnalogComparator;
use core::mem::MaybeUninit;
use kernel;
use kernel::capabilities;
use kernel::component::Component;
use kernel::create_capability;
Expand Down
1 change: 0 additions & 1 deletion boards/components/src/ble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
//! let ble_radio = BLEComponent::new(board_kernel, &nrf52::ble_radio::RADIO, mux_alarm).finalize();
//! ```

use capsules_core;
use capsules_core::virtualizers::virtual_alarm::VirtualMuxAlarm;
use core::mem::MaybeUninit;
use kernel::capabilities;
Expand Down
2 changes: 0 additions & 2 deletions boards/components/src/thread_network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
//! ));
//! ```

use capsules_core;
use capsules_core::virtualizers::virtual_aes_ccm::MuxAES128CCM;
use capsules_core::virtualizers::virtual_alarm::VirtualMuxAlarm;
use capsules_extra::net::ipv6::ipv6_send::IP6SendStruct;
Expand All @@ -42,7 +41,6 @@ use capsules_extra::net::udp::udp_recv::MuxUdpReceiver;
use capsules_extra::net::udp::udp_recv::UDPReceiver;
use capsules_extra::net::udp::udp_send::{MuxUdpSender, UDPSendStruct, UDPSender};
use core::mem::MaybeUninit;
use kernel;
use kernel::capabilities;
use kernel::capabilities::NetworkCapabilityCreationCapability;
use kernel::component::Component;
Expand Down
2 changes: 0 additions & 2 deletions boards/components/src/udp_driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
//! .finalize(components::udp_driver_component_static!());
//! ```

use capsules_core;
use capsules_core::virtualizers::virtual_alarm::VirtualMuxAlarm;
use capsules_extra::net::ipv6::ip_utils::IPAddr;
use capsules_extra::net::ipv6::ipv6_send::IP6SendStruct;
Expand All @@ -33,7 +32,6 @@ use capsules_extra::net::udp::udp_recv::MuxUdpReceiver;
use capsules_extra::net::udp::udp_recv::UDPReceiver;
use capsules_extra::net::udp::udp_send::{MuxUdpSender, UDPSendStruct, UDPSender};
use core::mem::MaybeUninit;
use kernel;
use kernel::capabilities;
use kernel::capabilities::NetworkCapabilityCreationCapability;
use kernel::component::Component;
Expand Down
2 changes: 0 additions & 2 deletions boards/components/src/udp_mux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
// Author: Hudson Ayers <[email protected]>
// Last Modified: 5/21/2019

use capsules_core;
use capsules_core::virtualizers::virtual_alarm::{MuxAlarm, VirtualMuxAlarm};
use capsules_extra::ieee802154::device::MacDevice;
use capsules_extra::net::ieee802154::MacAddress;
Expand All @@ -46,7 +45,6 @@ use capsules_extra::net::udp::udp_recv::MuxUdpReceiver;
use capsules_extra::net::udp::udp_send::MuxUdpSender;
use capsules_extra::net::udp::UDPHeader;
use core::mem::MaybeUninit;
use kernel;
use kernel::capabilities;
use kernel::component::Component;
use kernel::create_capability;
Expand Down
1 change: 0 additions & 1 deletion boards/hail/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use core::fmt::Write;
use core::panic::PanicInfo;
use core::str;
use cortexm4;
use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
Expand Down
2 changes: 0 additions & 2 deletions boards/hifive1/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
use core::fmt::Write;
use core::panic::PanicInfo;
use core::str;
use e310_g002;
use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::gpio;
use kernel::hil::led;
use rv32i;

use crate::CHIP;
use crate::PROCESSES;
Expand Down
2 changes: 0 additions & 2 deletions boards/hifive_inventor/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
use core::fmt::Write;
use core::panic::PanicInfo;
use core::str;
use e310_g003;
use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
use rv32i;

use crate::CHIP;
use crate::PROCESSES;
Expand Down
2 changes: 0 additions & 2 deletions boards/imix/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@

use core::fmt::Write;
use core::panic::PanicInfo;
use cortexm4;
use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
use kernel::hil::uart::{self, Configure};
use sam4l;

use crate::CHIP;
use crate::PROCESSES;
Expand Down
1 change: 0 additions & 1 deletion boards/microbit_v2/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use core::fmt::Write;
use core::panic::PanicInfo;

use cortexm4;
use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
Expand Down
1 change: 0 additions & 1 deletion boards/nano33ble/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use core::fmt::Write;
use core::panic::PanicInfo;

use cortexm4;
use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
Expand Down
1 change: 0 additions & 1 deletion boards/nordic/nrf52840_dongle/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use core::fmt::Write;
use core::panic::PanicInfo;
use cortexm4;
use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
Expand Down
2 changes: 1 addition & 1 deletion boards/nordic/nrf52840_dongle/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use kernel::scheduler::round_robin::RoundRobinSched;
use kernel::{capabilities, create_capability, debug, debug_gpio, debug_verbose, static_init};
use nrf52840::gpio::Pin;
use nrf52840::interrupt_service::Nrf52840DefaultPeripherals;
use nrf52_components::{self, UartChannel, UartPins};
use nrf52_components::{UartChannel, UartPins};

// The nRF52840 Dongle LEDs
const LED1_PIN: Pin = Pin::P0_06;
Expand Down
1 change: 0 additions & 1 deletion boards/nordic/nrf52840dk/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use core::fmt::Write;
use core::panic::PanicInfo;
use cortexm4;
use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
Expand Down
2 changes: 1 addition & 1 deletion boards/nordic/nrf52840dk/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ use kernel::scheduler::round_robin::RoundRobinSched;
use kernel::{capabilities, create_capability, debug, debug_gpio, debug_verbose, static_init};
use nrf52840::gpio::Pin;
use nrf52840::interrupt_service::Nrf52840DefaultPeripherals;
use nrf52_components::{self, UartChannel, UartPins};
use nrf52_components::{UartChannel, UartPins};

#[allow(dead_code)]
mod test;
Expand Down
1 change: 0 additions & 1 deletion boards/nordic/nrf52_components/src/startup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

use capsules_core::virtualizers::virtual_alarm::{MuxAlarm, VirtualMuxAlarm};
use capsules_extra::segger_rtt::SeggerRtt;
use components;
use core::mem::MaybeUninit;
use kernel::component::Component;
use nrf52::gpio::Pin;
Expand Down
1 change: 0 additions & 1 deletion boards/nordic/nrf52dk/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use core::fmt::Write;
use core::panic::PanicInfo;
use cortexm4;
use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
Expand Down
2 changes: 1 addition & 1 deletion boards/nordic/nrf52dk/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ use kernel::{capabilities, create_capability, debug, debug_gpio, debug_verbose,
use nrf52832::gpio::Pin;
use nrf52832::interrupt_service::Nrf52832DefaultPeripherals;
use nrf52832::rtc::Rtc;
use nrf52_components::{self, UartChannel, UartPins};
use nrf52_components::{UartChannel, UartPins};

// The nRF52 DK LEDs (see back of board)
const LED1_PIN: Pin = Pin::P0_17;
Expand Down
3 changes: 0 additions & 3 deletions boards/nucleo_f429zi/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
use core::fmt::Write;
use core::panic::PanicInfo;

use cortexm4;

use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
use kernel::hil::uart;
use kernel::hil::uart::Configure;

use stm32f429zi;
use stm32f429zi::gpio::PinId;

use crate::CHIP;
Expand Down
3 changes: 0 additions & 3 deletions boards/nucleo_f446re/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
use core::fmt::Write;
use core::panic::PanicInfo;

use cortexm4;

use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
use kernel::hil::uart;
use kernel::hil::uart::Configure;

use stm32f446re;
use stm32f446re::gpio::PinId;

use crate::CHIP;
Expand Down
1 change: 0 additions & 1 deletion boards/particle_boron/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use core::fmt::Write;
use core::panic::PanicInfo;
use cortexm4;
use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
Expand Down
2 changes: 0 additions & 2 deletions boards/redboard_redv/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@
use core::fmt::Write;
use core::panic::PanicInfo;
use core::str;
use e310_g002;
use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::gpio;
use kernel::hil::led;
use rv32i;

use crate::CHIP;
use crate::PROCESSES;
Expand Down
1 change: 0 additions & 1 deletion boards/sma_q3/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use core::fmt::Write;
use core::panic::PanicInfo;
use cortexm4;
use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
Expand Down
1 change: 0 additions & 1 deletion boards/stm32f3discovery/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use kernel::hil::led;
use kernel::hil::uart;
use kernel::hil::uart::Configure;

use stm32f303xc;
use stm32f303xc::gpio::PinId;

use crate::CHIP;
Expand Down
3 changes: 0 additions & 3 deletions boards/stm32f412gdiscovery/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
use core::fmt::Write;
use core::panic::PanicInfo;

use cortexm4;

use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
use kernel::hil::uart;
use kernel::hil::uart::Configure;

use stm32f412g;
use stm32f412g::gpio::PinId;

use crate::CHIP;
Expand Down
3 changes: 0 additions & 3 deletions boards/stm32f429idiscovery/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
use core::fmt::Write;
use core::panic::PanicInfo;

use cortexm4;

use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
use kernel::hil::uart;
use kernel::hil::uart::Configure;

use stm32f429zi;
use stm32f429zi::gpio::PinId;

use crate::CHIP;
Expand Down
3 changes: 0 additions & 3 deletions boards/weact_f401ccu6/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@
use core::fmt::Write;
use core::panic::PanicInfo;

use cortexm4;

use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
use kernel::hil::uart;
use kernel::hil::uart::Configure;

use stm32f401cc;
use stm32f401cc::gpio::PinId;

use crate::CHIP;
Expand Down
1 change: 0 additions & 1 deletion boards/wm1110dev/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use core::fmt::Write;
use core::panic::PanicInfo;

use cortexm4;
use kernel::debug;
use kernel::debug::IoWrite;
use kernel::hil::led;
Expand Down
Loading

0 comments on commit 5916dc6

Please sign in to comment.