NetBSD-Bugs archive

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

port-arm/51551: src/sys/arch/arm/nvidia/tegra_xusb.c: possible cut-n-paste error ?



>Number:         51551
>Category:       port-arm
>Synopsis:       src/sys/arch/arm/nvidia/tegra_xusb.c: possible cut-n-paste error ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-arm-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 11 15:40:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs-20161011
>Organization:
>Environment:
>Description:
1.
[src/sys/arch/arm/nvidia/tegra_xusb.c:214] -> [src/sys/arch/arm/nvidia/tegra_xusb.c:216]: (style) Variable 'error' is reassigned a value before the old one has been used.

Source code is

    error = clk_set_rate(clk, 102000000);
    rate = clk_get_rate(clk);
    error = clk_enable(clk); /* XXX set frequency */
    device_printf(sc->sc_dev, "rate %u error %d\n", rate, error);

2.

[src/sys/arch/arm/nvidia/tegra_xusb.c:223] -> [src/sys/arch/arm/nvidia/tegra_xusb.c:225]: (style) Variable 'error' is reassigned a value before the old one has been used.

    error = clk_set_rate(clk, 204000000);
    rate = clk_get_rate(clk);
    error = clk_enable(clk);
    device_printf(sc->sc_dev, "rate %u error %d\n", rate, error);

3.

[src/sys/arch/arm/nvidia/tegra_xusb.c:272] -> [src/sys/arch/arm/nvidia/tegra_xusb.c:274]: (style) Variable 'error' is reassigned a value before the old one has been used.

    error = clk_set_parent(clk, pll_u_48);
    rate = clk_get_rate(clk);
    error = clk_enable(clk); /* XXX set frequency */
    device_printf(sc->sc_dev, "rate %u error %d\n", rate, error);

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index