Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Mar 2013 17:06:52 -0500
From:      Joshua Isom <jrisom@gmail.com>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        "freebsd-wireless@freebsd.org" <freebsd-wireless@freebsd.org>
Subject:   Re: Fine, OK, here's my initial AR9380/AR9485 support
Message-ID:  <513FA6FC.5040809@gmail.com>
In-Reply-To: <CAJ-VmomarDPXSS85dF0HsCnT4rRuemPhBfoTaghBPmhR7GXZuQ@mail.gmail.com>
References:  <513d3ae3.08c2440a.59a6.63b2@mx.google.com> <513DA767.6010208@gmail.com> <CAJ-Vmo=uSeKK1SV3k_nRLDSHShobiyN6ky861b5NDn_U8NxukQ@mail.gmail.com> <513E6AF5.9010304@gmail.com> <CAJ-Vmo=9Kj41=J3m6SapXi0y6t9cF-A=XCX8AWz0qirLnrwX=Q@mail.gmail.com> <513E7924.3060302@gmail.com> <CAJ-VmomWgitUZvxVQbQc6qFu8rOYJVZiZCrVEjQm2fOdp5Sz7w@mail.gmail.com> <CAJ-Vmok2ONOJsZK4BuD9J5drUpmjri6mV-dB4N7-9HvuGcVV0Q@mail.gmail.com> <CAJ-VmonmrYV__z_6VterhZ2itmtL2seTo0VQ5oUHTOwuCWydQg@mail.gmail.com> <CAJ-Vmo=wHhq2yGiwEJxGvNHYaOYTTWSuAbUyPG%2BZgUwE%2BOWaiA@mail.gmail.com> <513F9A4B.5030704@gmail.com> <CAJ-VmomarDPXSS85dF0HsCnT4rRuemPhBfoTaghBPmhR7GXZuQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 3/12/2013 4:14 PM, Adrian Chadd wrote:
> On 12 March 2013 14:12, Joshua Isom <jrisom@gmail.com> wrote:
>> I had to remove the /sys/ from the PATH and CFLAGS to point to the right
>> directory, it's still failing with warnings.  I tried gcc and clang. I'll
>> try to see how much I can patch myself without knowing the code at all.
>
> Hi,
>
> Where's it failing with warnings with gcc?
>
> I do gcc builds all the time and I get no warnings. But my primary
> station/laptop testing atm is on 9-STABLE (my access points run -HEAD
> atm.)
>
> Thanks,
>
>
> Adrian
>

Here's the build log from clang.  The most obvious different things are 
ar9300_gpio.c's comparisons with a constant.

> ===> ath (all)
> cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. -I/root/ATH/head/sys/modules/ath/../../dev/ath -I/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal -I. -I/root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/root/ATH/head/sys/ATH/opt_global.h -I. -I@ -I@/contrib/altq -fno-common -g -fno-omit-frame-pointer -I/usr/obj/root/ATH/head/sys/ATH  -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option  -Wno-error-tautological-compare -Wno-error-empty-body  -Wno-error-parentheses-equality  -c /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath
_hal/ar9300/ar9300_radio.c
> cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. -I/root/ATH/head/sys/modules/ath/../../dev/ath -I/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal -I. -I/root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/root/ATH/head/sys/ATH/opt_global.h -I. -I@ -I@/contrib/altq -fno-common -g -fno-omit-frame-pointer -I/usr/obj/root/ATH/head/sys/ATH  -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option  -Wno-error-tautological-compare -Wno-error-empty-body  -Wno-error-parentheses-equality  -c /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath
_hal/ar9300/ar9300_reset.c
> /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300_radio.c:83:27: error: unused variable 'ichan' [-Werror,-Wunused-variable]
>     HAL_CHANNEL_INTERNAL *ichan = ath_hal_checkchannel(ah, chan);
>                           ^
> 1 error generated.
> *** [ar9300_radio.o] Error code 1
> cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc  -I. -I/root/ATH/head/sys/modules/ath/../../dev/ath -I/root/ATH/head/sys/modules/ath/../../dev/ath/ath_hal -I. -I/root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/root/ATH/head/sys/ATH/opt_global.h -I. -I@ -I@/contrib/altq -fno-common -g -fno-omit-frame-pointer -I/usr/obj/root/ATH/head/sys/ATH  -mno-aes -mno-avx -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-include-dirs -fdiagnostics-show-option  -Wno-error-tautological-compare -Wno-error-empty-body  -Wno-error-parentheses-equality  -c /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath
_hal/ar9300/ar9300_gpio.c
> /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c:2809:52: error: variable 'modes_txgaintable_index' is uninitialized when used here [-Werror,-Wuninitialized]
>         REG_WRITE_ARRAY(&ahp->ah_ini_modes_txgain, modes_txgaintable_index,
>                                                    ^~~~~~~~~~~~~~~~~~~~~~~
> /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300.h:904:85: note: expanded from macro 'REG_WRITE_ARRAY'
>                 OS_REG_WRITE(ah, INI_RA((iniarray), (r), 0), INI_RA((iniarray), r, (column)));\
>                                                                                     ^
> /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300.h:323:99: note: expanded from macro 'INI_RA'
> #define INI_RA(iniarray, row, column) (((iniarray)->ia_array)[(row) * ((iniarray)->ia_columns) + (column)])
>                                                                                                   ^
> /root/ATH/head/sys/modules/ath/../../dev/ath/ah_osdep.h:119:68: note: expanded from macro 'OS_REG_WRITE'
> #define OS_REG_WRITE(_ah, _reg, _val)   ath_hal_reg_write(_ah, _reg, _val)
>                                                                      ^
> /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300_reset.c:2609:47: note: initialize the variable 'modes_txgaintable_index' to silence this warning
>     u_int modes_index, modes_txgaintable_index, freq_index;
>                                               ^
>                                                = 0
> 1 error generated.
> *** [ar9300_reset.o] Error code 1
> /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c:63:15: error: cast to 'volatile u_int32_t *' (aka 'volatile unsigned int *') from smaller integer type 'unsigned int' [-Werror,-Wint-to-pointer-cast]
>     address = (volatile u_int32_t *)(AR9340_SOC_GPIO_FUN0 + (out_func*4));
>               ^
> /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c:159:25: warning: comparison of constant 20 with expression of type 'HAL_GPIO_MUX_TYPE' is always true [-Wtautological-constant-out-of-range-compare]
>     if (hal_signal_type < ARRAY_LENGTH(mux_signal_conversion_table))
>         ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /root/ATH/head/sys/modules/ath/../../contrib/dev/ath/ath_hal/ar9300/ar9300_gpio.c:271:23: warning: comparison of constant 20 with expression of type 'HAL_GPIO_MUX_TYPE' is always true [-Wtautological-constant-out-of-range-compare]
>     if (halSignalType < ARRAY_LENGTH(mux_signal_conversion_table))
>         ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2 warnings and 1 error generated.
> *** [ar9300_gpio.o] Error code 1
> 3 errors
> `all' not remade because of errors.
> *** [all] Error code 2
> 1 error
> *** [modules-all] Error code 2
> 1 error
> `all' not remade because of errors.
> *** [buildkernel] Error code 2
> 1 error
> *** [buildkernel] Error code 2
> 1 error




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?513FA6FC.5040809>