* Re: drivers/pci/search.c:85:2: warning: suggest parentheses around assignment used as truth value
@ 2012-09-25 19:27 Yinghai Lu
2012-09-25 19:49 ` Dan Carpenter
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Yinghai Lu @ 2012-09-25 19:27 UTC (permalink / raw)
To: kernel-janitors
On Tue, Sep 25, 2012 at 2:04 AM, Yuanhan Liu <yuanhan.liu@intel.com> wrote:
> Hi Yinghai,
>
> FYI, there are new compile warnings show up in
>
> commit: 73ebfa72e382802b163a354fcb4d8dfea8ab58f3
> title: PCI: kill pci_find_next_bus
> date: 2012-09-25 01:21:07 -0700
> config: x86_64-allyesdebian (attached as .config)
>
>
> All error/warnings:
>
> drivers/edac/i7core_edac.c: In function 'i7core_pci_lastbus':
> drivers/edac/i7core_edac.c:1299:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
for checkpatch.pl ?
the code is like:
#define for_each_pci_host_bridge(d) while ((d pci_get_next_host_bridge(d)) != NULL)
so checkpatch.pl need to be fixed.
-Yinghai
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/pci/search.c:85:2: warning: suggest parentheses around assignment used as truth value
2012-09-25 19:27 drivers/pci/search.c:85:2: warning: suggest parentheses around assignment used as truth value Yinghai Lu
@ 2012-09-25 19:49 ` Dan Carpenter
2012-09-25 20:02 ` Yinghai Lu
2012-09-26 0:51 ` Fengguang Wu
2 siblings, 0 replies; 4+ messages in thread
From: Dan Carpenter @ 2012-09-25 19:49 UTC (permalink / raw)
To: kernel-janitors
On Tue, Sep 25, 2012 at 12:27:19PM -0700, Yinghai Lu wrote:
> On Tue, Sep 25, 2012 at 2:04 AM, Yuanhan Liu <yuanhan.liu@intel.com> wrote:
> > Hi Yinghai,
> >
> > FYI, there are new compile warnings show up in
> >
> > commit: 73ebfa72e382802b163a354fcb4d8dfea8ab58f3
> > title: PCI: kill pci_find_next_bus
> > date: 2012-09-25 01:21:07 -0700
> > config: x86_64-allyesdebian (attached as .config)
> >
> >
> > All error/warnings:
> >
> > drivers/edac/i7core_edac.c: In function 'i7core_pci_lastbus':
> > drivers/edac/i7core_edac.c:1299:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
>
> for checkpatch.pl ?
>
GCC.
> the code is like:
>
> #define for_each_pci_host_bridge(d) while ((d > pci_get_next_host_bridge(d)) != NULL)
In 73ebfa72e3828 "PCI: kill pci_find_next_bus" it doesn't have the
extra parens.
7b543663 (Yinghai Lu 2012-04-02 18:31:53 -0700 396) #define to_pci_host_bridge(n) container_of(n, struct pci_host_bridge, dev)
573a6050 (Yinghai Lu 2012-09-25 01:21:06 -0700 397) #define for_each_pci_host_bridge(d) while (d = pci_get_next_host_bridge(d))
573a6050 (Yinghai Lu 2012-09-25 01:21:06 -0700 398)
Maybe this got fixed later? Fengguang is probably testing
individual patches. If it's a non-rebase tree he has a way to mark
those...
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/pci/search.c:85:2: warning: suggest parentheses around assignment used as truth value
2012-09-25 19:27 drivers/pci/search.c:85:2: warning: suggest parentheses around assignment used as truth value Yinghai Lu
2012-09-25 19:49 ` Dan Carpenter
@ 2012-09-25 20:02 ` Yinghai Lu
2012-09-26 0:51 ` Fengguang Wu
2 siblings, 0 replies; 4+ messages in thread
From: Yinghai Lu @ 2012-09-25 20:02 UTC (permalink / raw)
To: kernel-janitors
On Tue, Sep 25, 2012 at 12:49 PM, Dan Carpenter
<dan.carpenter@oracle.com> wrote:
>> > drivers/edac/i7core_edac.c: In function 'i7core_pci_lastbus':
>> > drivers/edac/i7core_edac.c:1299:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
>>
>> for checkpatch.pl ?
> GCC.
gcc in opensuse 12.1 does not complain about that:
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.6/lto-wrapper
Target: x86_64-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++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.6
--enable-ssp --disable-libssp --disable-plugin
--with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--disable-libgcj --disable-libmudflap --with-slibdir=/lib64
--with-system-zlib --enable-__cxa_atexit
--enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--enable-version-specific-runtime-libs --program-suffix=-4.6
--enable-linux-futex --without-system-libunwind --with-arch-32=i586
--with-tune=generic --build=x86_64-suse-linux
Thread model: posix
gcc version 4.6.2 (SUSE Linux)
>
>> the code is like:
>>
>> #define for_each_pci_host_bridge(d) while ((d >> pci_get_next_host_bridge(d)) != NULL)
-Yinghai
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: drivers/pci/search.c:85:2: warning: suggest parentheses around assignment used as truth value
2012-09-25 19:27 drivers/pci/search.c:85:2: warning: suggest parentheses around assignment used as truth value Yinghai Lu
2012-09-25 19:49 ` Dan Carpenter
2012-09-25 20:02 ` Yinghai Lu
@ 2012-09-26 0:51 ` Fengguang Wu
2 siblings, 0 replies; 4+ messages in thread
From: Fengguang Wu @ 2012-09-26 0:51 UTC (permalink / raw)
To: kernel-janitors
On Tue, Sep 25, 2012 at 01:02:39PM -0700, Yinghai Lu wrote:
> On Tue, Sep 25, 2012 at 12:49 PM, Dan Carpenter
> <dan.carpenter@oracle.com> wrote:
> >> > drivers/edac/i7core_edac.c: In function 'i7core_pci_lastbus':
> >> > drivers/edac/i7core_edac.c:1299:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
> >>
> >> for checkpatch.pl ?
>
> > GCC.
>
> gcc in opensuse 12.1 does not complain about that:
>
> gcc -v
> Using built-in specs.
> COLLECT_GCC=gcc
> COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.6/lto-wrapper
> Target: x86_64-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++,objc,fortran,obj-c++,java,ada
> --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.6
> --enable-ssp --disable-libssp --disable-plugin
> --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
> --disable-libgcj --disable-libmudflap --with-slibdir=/lib64
> --with-system-zlib --enable-__cxa_atexit
> --enable-libstdcxx-allocator=new --disable-libstdcxx-pch
> --enable-version-specific-runtime-libs --program-suffix=-4.6
> --enable-linux-futex --without-system-libunwind --with-arch-32=i586
> --with-tune=generic --build=x86_64-suse-linux
> Thread model: posix
> gcc version 4.6.2 (SUSE Linux)
Yinghai, I'm running gcc 4.7.1 and 4.6.3 in debian. They both
complain about the parentheses for line
#define for_each_pci_host_bridge(d) while (d = pci_get_next_host_bridge(d))
wfg@bee ~/linux/obj-compiletest% gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-1)
Thanks,
Fengguang
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-09-26 0:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-25 19:27 drivers/pci/search.c:85:2: warning: suggest parentheses around assignment used as truth value Yinghai Lu
2012-09-25 19:49 ` Dan Carpenter
2012-09-25 20:02 ` Yinghai Lu
2012-09-26 0:51 ` Fengguang Wu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox