Re: [libgpiod][PATCH 04/16] treewide: unify gpiod_line_config/request_get_offsets() functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Bartosz,

I gave few comments here, and it looks like you missed them ?

On 16-01-23, 11:22, Viresh Kumar wrote:
> For Rust changes, please run these as well to find any formatting
> issues, warnings:
> 
> cargo fmt --all -- --check
> cargo clippy --release --workspace --bins --examples --tests --benches --all-features --all-targets -- -D warnings -D clippy::undocumented_unsafe_blocks
> 
> On 13-01-23, 22:51, Bartosz Golaszewski wrote:
 
> Just like ValueMap, maybe we can add following in lib.rs for this:
> 
> pub type line::SettingsMap = IntMap<line::Settings>;
> 
> > +        let mut map: HashMap<Offset, Settings> = HashMap::new();
> > +        let num_lines = unsafe { gpiod::gpiod_line_config_get_num_configured_offsets(self.config) };
> 
> This needs a SAFETY comment. Should we check if this returned 0 ?
> 
-- 
viresh



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux