Page MenuHomeFreeBSD

arm/ti: correct softc member name in ti_mux_clock and ti_gate_clock
Needs ReviewPublic

Authored by rick_sloservers.com on Sun, Aug 23, 8:06 AM.
Tags
Referenced Files
F169856303: D59119.id184770.diff
Wed, Sep 2, 6:58 PM
F169829487: D59119.id184770.diff
Wed, Sep 2, 5:01 PM
F169819767: D59119.diff
Wed, Sep 2, 4:14 PM
F169781293: D59119.diff
Wed, Sep 2, 1:28 PM
F169594569: D59119.id184770.diff
Wed, Sep 2, 12:42 AM
F169587956: D59119.id.diff
Wed, Sep 2, 12:11 AM
Unknown Object (File)
Tue, Sep 1, 3:35 AM
Unknown Object (File)
Mon, Aug 31, 1:44 PM
Subscribers
None

Details

Reviewers
imp
andrew
manu
oh
Summary

struct ti_mux_softc and struct ti_gate_softc both declare their device
handle as sc_dev. Neither has a member named dev, but three call sites in
each file reference sc->dev:

sys/arm/ti/clk/ti_mux_clock.c:170,179,187   bus_attach_children(sc->dev);
sys/arm/ti/clk/ti_gate_clock.c:188,197,205  bus_attach_children(sc->dev);

Adjacent lines in the same functions already use sc->sc_dev correctly,
e.g. DPRINTF(sc->sc_dev, ...) immediately above each of these calls.

Introduced by 18250ec6c089 "Replace calls to bus_generic_attach with
bus_attach_children", a mechanical tree-wide change. The error survived
because nothing builds these files: AM335x was removed from the armv7
GENERIC config in 3416e102c4e9, so the compiler has not checked them since.

Test Plan

As with D59118, compile coverage requires an AM335x kernel configuration
(see D46703).

Verified by building KERNCONF=AM335X for TARGET=arm TARGET_ARCH=armv7 on
stable/15: the files compile, and the resulting kernel boots to multi-user
on a BeagleBone Black Rev B3 with the TI clock tree registering (mux,
gate, divider and DPLL nodes all attach).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped