Search Linux Wireless

Re: [PATCH V2 1/2] brcmfmac: modify __brcmf_err() to take bus as a parameter

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

 



On 01.02.2019 13:14, Kalle Valo wrote:
Rafał Miłecki wrote:

From: Rafał Miłecki <rafal@xxxxxxxxxx>

So far __brcmf_err() was using pr_err() which didn't allow identifying
device that was affected by an error. It's crucial for systems with more
than 1 device supported by brcmfmac (a common case for home routers).

This change allows passing struct brcmf_bus to the __brcmf_err(). That
struct has been agreed to be the most common one. It allows accessing
struct device easily & using dev_err() printing helper.

Signed-off-by: Rafał Miłecki <rafal@xxxxxxxxxx>
Acked-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>

Fails to build for me:

drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c: In function 'brcmf_pcie_pm_enter_D3':
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c:1948:20: error: redeclaration of 'bus' with no linkage
   struct brcmf_bus *bus;
                     ^~~
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c:1946:20: note: previous definition of 'bus' was here
   struct brcmf_bus *bus = dev_get_drvdata(dev);
                     ^~~
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c: In function 'brcmf_pcie_pm_leave_D3':
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c:1978:20: error: redeclaration of 'bus' with no linkage
   struct brcmf_bus *bus;
                     ^~~
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c:1976:20: note: previous definition of 'bus' was here
   struct brcmf_bus *bus = dev_get_drvdata(dev);
                     ^~~
make[6]: *** [drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.o] Error 1
make[6]: *** Waiting for unfinished jobs....
drivers/net/wireless/broadcom/brcm80211/brcmfmac/tracepoint.c: In function '__brcmf_err':
drivers/net/wireless/broadcom/brcm80211/brcmfmac/tracepoint.c:35:15: error: dereferencing pointer to incomplete type 'struct brcmf_bus'
    dev_err(bus->dev, "%s: %pV", func, &vaf);
                ^~

I have no idea why my gcc didn't complain. Sorry. I'll send V3.

$ mips-suse-linux-gcc -v
Using built-in specs.
COLLECT_GCC=mips-suse-linux-gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/mips-suse-linux/8/lto-wrapper
Target: mips-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++ --enable-checking=release --disable-werror --with-gxx-include-dir=/usr/include/c++/8 --enable-ssp --disable-libssp --disable-libvtv --disable-libmpx --disable-cet --disable-libcc1 --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --with-gcc-major-version-only --enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function --program-suffix=-8 --program-prefix=mips-suse-linux- --target=mips-suse-linux --disable-nls --with-sysroot=/usr/mips-suse-linux --with-build-sysroot=/usr/mips-suse-linux --with-build-time-tools=/usr/mips-suse-linux/bin --build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
gcc version 8.2.1 20181108 [gcc-8-branch revision 265914] (SUSE Linux)



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux