* linux-next: Tree for December 15 @ 2009-12-15 5:53 Stephen Rothwell 2009-12-16 22:23 ` [PATCH -next] nfs: fix ISO C90 warning Randy Dunlap 0 siblings, 1 reply; 8+ messages in thread From: Stephen Rothwell @ 2009-12-15 5:53 UTC (permalink / raw) To: linux-next; +Cc: LKML [-- Attachment #1: Type: text/plain, Size: 10859 bytes --] Hi all, My usual call for calm: please do not put stuff destined for 2.6.34 into linux-next trees until after 2.6.33-rc1. Changes since 20091214: Since Linus is now merging trees into his, various conflicts move from tree to tree. The origin tree gained a build failure for which I applied a patch. The md-current tree lost its conflict. The mips tree gained a conflict against Linus' tree. The 52xx-and-virtex lost its build failure but gained a conflict against Linus' tree. The acpi tree still has its build failure so I used the version from next-20091211. The voltage tree gained 2 conflicts against Linus' tree - one requiring a fixup and the other requiring a rollback of the voltage tree to the version in next-20091120. The devicetree tree lost its build failure. The limits tree lost three conflicts. The tip tree lost its conflict. The percpu tree lost its conflicts. ---------------------------------------------------------------------------- I have created today's linux-next tree at git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git (patches at http://www.kernel.org/pub/linux/kernel/v2.6/next/ ). If you are tracking the linux-next tree using git, you should not use "git pull" to do so as that will try to merge the new linux-next release with the old one. You should use "git fetch" as mentioned in the FAQ on the wiki (see below). You can see which trees have been included by looking in the Next/Trees file in the source. There are also quilt-import.log and merge.log files in the Next directory. Between each merge, the tree was built with a ppc64_defconfig for powerpc and an allmodconfig for x86_64. After the final fixups (if any), it is also built with powerpc allnoconfig (32 and 64 bit), ppc44x_defconfig and allyesconfig (minus CONFIG_PROFILE_ALL_BRANCHES - this fails its final link) and i386, sparc and sparc64 defconfig. These builds also have CONFIG_ENABLE_WARN_DEPRECATED, CONFIG_ENABLE_MUST_CHECK and CONFIG_DEBUG_INFO disabled when necessary. Below is a summary of the state of the merge. We are up to 155 trees (counting Linus' and 22 trees of patches pending for Linus' tree), more are welcome (even if they are currently empty). Thanks to those who have contributed, and to those who haven't, please do. Status of my local build tests will be at http://kisskb.ellerman.id.au/linux-next . If maintainers want to give advice about cross compilers/configs that work, we are always open to add more builds. Thanks to Jan Dittmer for adding the linux-next tree to his build tests at http://l4x.org/k/ , the guys at http://test.kernel.org/ and Randy Dunlap for doing many randconfig builds. There is a wiki covering stuff to do with linux-next at http://linux.f-seidel.de/linux-next/pmwiki/ . Thanks to Frank Seidel. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au $ git checkout master $ git reset --hard stable Merging origin/master Merging fixes/fixes Merging arm-current/master Merging m68k-current/for-linus Merging powerpc-merge/merge Merging sparc-current/master Merging scsi-rc-fixes/master Merging net-current/master Merging sound-current/for-linus Merging pci-current/for-linus Merging wireless-current/master Merging kbuild-current/for-linus Merging quilt/driver-core.current Merging quilt/tty.current Merging quilt/usb.current Merging quilt/staging.current Merging cpufreq-current/fixes Merging input-current/for-linus Merging md-current/for-linus Merging audit-current/for-linus Merging crypto-current/master Merging ide-curent/master Merging dwmw2/master Merging arm/devel Merging davinci/davinci-next Merging msm/for-next Merging omap/for-next Merging pxa/for-next Merging samsung/next-samsung Merging avr32/avr32-arch CONFLICT (content): Merge conflict in arch/avr32/mach-at32ap/include/mach/cpu.h Merging blackfin/for-linus Merging cris/for-next Merging ia64/test Merging m68k/for-next Merging m68knommu/for-next CONFLICT (content): Merge conflict in arch/m68k/include/asm/ptrace.h Merging microblaze/next CONFLICT (content): Merge conflict in scripts/recordmcount.pl Merging mips/mips-for-linux-next CONFLICT (content): Merge conflict in arch/mips/Kconfig CONFLICT (content): Merge conflict in arch/mips/Makefile CONFLICT (content): Merge conflict in arch/mips/include/asm/ftrace.h CONFLICT (add/add): Merge conflict in arch/mips/kernel/ftrace.c CONFLICT (add/add): Merge conflict in arch/mips/kernel/mcount.S CONFLICT (content): Merge conflict in drivers/pcmcia/Makefile CONFLICT (content): Merge conflict in scripts/recordmcount.pl Merging parisc/next Merging powerpc/next Merging 4xx/next Merging 52xx-and-virtex/next CONFLICT (content): Merge conflict in arch/powerpc/mm/fsl_booke_mmu.c Merging galak/next Merging s390/features Merging sh/master Merging sparc/master Merging xtensa/master Merging ceph/for-next Merging cifs/master Merging configfs/linux-next Merging ecryptfs/next Merging ext3/for_next Merging ext4/next Merging fatfs/master Merging fuse/for-next Merging gfs2/master Merging jfs/next Merging logfs/master Merging nfs/linux-next Merging nfsd/nfsd-next Merging nilfs2/for-next Merging ocfs2/linux-next Merging squashfs/master Merging udf/for_next Merging v9fs/for-next CONFLICT (add/add): Merge conflict in fs/9p/cache.c Merging ubifs/linux-next Merging xfs/master Merging reiserfs-bkl/reiserfs/kill-bkl Merging vfs/for-next Merging pci/linux-next Merging hid/for-next Merging quilt/i2c Merging bjdooks-i2c/next-i2c Merging quilt/jdelvare-hwmon Merging quilt/kernel-doc Merging v4l-dvb/master Merging kbuild/for-next Merging kconfig/for-next Merging ide/master Merging libata/NEXT Merging infiniband/for-next Merging acpi/test CONFLICT (content): Merge conflict in Documentation/feature-removal-schedule.txt CONFLICT (content): Merge conflict in include/acpi/processor.h $ git reset --hard HEAD^ Merging refs/next/20091211/acpi CONFLICT (content): Merge conflict in Documentation/feature-removal-schedule.txt CONFLICT (content): Merge conflict in include/acpi/processor.h Merging ieee1394/for-next CONFLICT (content): Merge conflict in drivers/media/dvb/firewire/firedtv-1394.c CONFLICT (content): Merge conflict in drivers/media/dvb/firewire/firedtv-avc.c CONFLICT (add/add): Merge conflict in drivers/media/dvb/firewire/firedtv-fw.c CONFLICT (content): Merge conflict in drivers/media/dvb/firewire/firedtv.h Merging ubi/linux-next Merging kvm/linux-next Merging dlm/next Merging scsi/master Merging async_tx/next Merging net/master Merging wireless/master Merging mtd/master CONFLICT (content): Merge conflict in drivers/mtd/devices/m25p80.c CONFLICT (content): Merge conflict in drivers/mtd/maps/pcmciamtd.c CONFLICT (delete/modify): drivers/mtd/nand/excite_nandflash.c deleted in HEAD and modified in mtd/master. Version mtd/master of drivers/mtd/nand/excite_nandflash.c left in tree. CONFLICT (content): Merge conflict in drivers/mtd/nand/pxa3xx_nand.c CONFLICT (content): Merge conflict in kernel/printk.c $ git rm -f drivers/mtd/nand/excite_nandflash.c Merging crypto/master Merging sound/for-next Merging cpufreq/next Merging quilt/rr Applying: modpost: autoconf.h has moved to include/generated Applying: rr: cpufreq: fix up for api name change Merging mmc/next Merging tmio-mmc/linux-next Merging input/next Merging lsm/for-next Merging block/for-next Merging quilt/device-mapper Merging embedded/master Merging firmware/master Merging pcmcia/master Merging battery/master Merging leds/for-mm Merging backlight/for-mm CONFLICT (content): Merge conflict in drivers/platform/x86/thinkpad_acpi.c Merging kgdb/kgdb-next Merging slab/for-next Merging uclinux/for-next Merging md/for-next Merging mfd/for-next Merging hdlc/hdlc-next Merging drm/drm-next CONFLICT (content): Merge conflict in drivers/gpu/drm/drm_fb_helper.c Merging voltage/for-next CONFLICT (rename/modify): Merge conflict in drivers/regulator/twl-regulator.c CONFLICT (content): Merge conflict in drivers/mfd/Kconfig CONFLICT (content): Merge conflict in drivers/mfd/Makefile CONFLICT (content): Merge conflict in drivers/regulator/Makefile $ git reset --hard Merging refs/next/20091120/voltage CONFLICT (content): Merge conflict in drivers/mfd/Kconfig CONFLICT (content): Merge conflict in drivers/mfd/Makefile CONFLICT (content): Merge conflict in drivers/regulator/Makefile Merging security-testing/next Merging lblnet/master Merging agp/agp-next Merging uwb/for-upstream Merging watchdog/master Merging bdev/master Merging dwmw2-iommu/master Merging cputime/cputime Merging osd/linux-next Merging jc_docs/docs-next Merging nommu/master Merging trivial/for-next Merging audit/for-next Merging quilt/aoe Merging suspend/linux-next Merging bluetooth/master Merging fsnotify/for-next CONFLICT (content): Merge conflict in arch/x86/ia32/ia32entry.S CONFLICT (content): Merge conflict in arch/x86/include/asm/unistd_32.h CONFLICT (content): Merge conflict in arch/x86/include/asm/unistd_64.h CONFLICT (content): Merge conflict in arch/x86/kernel/syscall_table_32.S CONFLICT (content): Merge conflict in fs/afs/write.c CONFLICT (content): Merge conflict in fs/cifs/dir.c CONFLICT (content): Merge conflict in fs/ubifs/file.c CONFLICT (content): Merge conflict in include/asm-generic/fcntl.h CONFLICT (content): Merge conflict in include/net/compat.h CONFLICT (content): Merge conflict in net/compat.c CONFLICT (content): Merge conflict in net/socket.c Merging irda/for-next CONFLICT (content): Merge conflict in drivers/net/irda/irda-usb.c Merging hwlat/for-linus CONFLICT (content): Merge conflict in drivers/misc/Makefile Merging drbd/for-jens Merging catalin/for-next Merging alacrity/linux-next CONFLICT (content): Merge conflict in include/linux/Kbuild CONFLICT (content): Merge conflict in lib/Kconfig Merging i7core_edac/linux_next Merging devicetree/next-devicetree Merging spi/next-spi Merging limits/writable_limits CONFLICT (content): Merge conflict in arch/x86/ia32/ia32entry.S CONFLICT (content): Merge conflict in arch/x86/include/asm/unistd_32.h CONFLICT (content): Merge conflict in arch/x86/include/asm/unistd_64.h CONFLICT (content): Merge conflict in arch/x86/kernel/syscall_table_32.S Merging omap_dss2/for-next Merging tip/auto-latest Merging edac-amd/for-next Merging oprofile/for-next Merging percpu/for-next Merging workqueues/for-next Merging sfi/sfi-test Merging asm-generic/next Merging hwpoison/hwpoison CONFLICT (content): Merge conflict in MAINTAINERS Merging sysctl/master Merging quilt/driver-core Merging quilt/tty Merging quilt/usb Merging quilt/staging Merging scsi-post-merge/master Applying: mfd: fix for twl4030 renaming [-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH -next] nfs: fix ISO C90 warning 2009-12-15 5:53 linux-next: Tree for December 15 Stephen Rothwell @ 2009-12-16 22:23 ` Randy Dunlap 2009-12-16 22:40 ` Trond Myklebust 0 siblings, 1 reply; 8+ messages in thread From: Randy Dunlap @ 2009-12-16 22:23 UTC (permalink / raw) To: Stephen Rothwell, Trond Myklebust; +Cc: linux-next, LKML, linux-nfs From: Randy Dunlap <randy.dunlap@oracle.com> Fix gcc ISO C90 warning: fs/nfs/callback.c:356: warning: ISO C90 forbids mixed declarations and code Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> --- fs/nfs/callback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-next-20091215.orig/fs/nfs/callback.c +++ linux-next-20091215/fs/nfs/callback.c @@ -352,8 +352,8 @@ static int check_gss_callback_principal( static int nfs_callback_authenticate(struct svc_rqst *rqstp) { struct nfs_client *clp; - RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); int ret = SVC_OK; + RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); /* Don't talk to strangers */ clp = nfs_find_client(svc_addr(rqstp), 4); ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH -next] nfs: fix ISO C90 warning 2009-12-16 22:23 ` [PATCH -next] nfs: fix ISO C90 warning Randy Dunlap @ 2009-12-16 22:40 ` Trond Myklebust 2009-12-16 22:47 ` Randy Dunlap 0 siblings, 1 reply; 8+ messages in thread From: Trond Myklebust @ 2009-12-16 22:40 UTC (permalink / raw) To: Randy Dunlap; +Cc: Stephen Rothwell, linux-next, LKML, linux-nfs On Wed, 2009-12-16 at 14:23 -0800, Randy Dunlap wrote: > From: Randy Dunlap <randy.dunlap@oracle.com> > > Fix gcc ISO C90 warning: > > fs/nfs/callback.c:356: warning: ISO C90 forbids mixed declarations and code > > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> > --- > fs/nfs/callback.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- linux-next-20091215.orig/fs/nfs/callback.c > +++ linux-next-20091215/fs/nfs/callback.c > @@ -352,8 +352,8 @@ static int check_gss_callback_principal( > static int nfs_callback_authenticate(struct svc_rqst *rqstp) > { > struct nfs_client *clp; > - RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); > int ret = SVC_OK; > + RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); > What version of gcc is giving rise to this warning? RPC_IFDEBUG is a macro that either evaluates to its argument, or to nothing, depending on whether or not RPC_DEBUG is defined or not. In neither case should it evaluate to anything illegal under C90 rules afaics. Trond ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH -next] nfs: fix ISO C90 warning 2009-12-16 22:40 ` Trond Myklebust @ 2009-12-16 22:47 ` Randy Dunlap 2009-12-16 22:58 ` Thomas Gleixner 0 siblings, 1 reply; 8+ messages in thread From: Randy Dunlap @ 2009-12-16 22:47 UTC (permalink / raw) To: Trond Myklebust; +Cc: Stephen Rothwell, linux-next, LKML, linux-nfs On Wed, 16 Dec 2009 17:40:19 -0500 Trond Myklebust wrote: > On Wed, 2009-12-16 at 14:23 -0800, Randy Dunlap wrote: > > From: Randy Dunlap <randy.dunlap@oracle.com> > > > > Fix gcc ISO C90 warning: > > > > fs/nfs/callback.c:356: warning: ISO C90 forbids mixed declarations and code > > > > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> > > --- > > fs/nfs/callback.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > --- linux-next-20091215.orig/fs/nfs/callback.c > > +++ linux-next-20091215/fs/nfs/callback.c > > @@ -352,8 +352,8 @@ static int check_gss_callback_principal( > > static int nfs_callback_authenticate(struct svc_rqst *rqstp) > > { > > struct nfs_client *clp; > > - RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); > > int ret = SVC_OK; > > + RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); > > > > What version of gcc is giving rise to this warning? > gcc --version gcc (GCC) 4.2.1 (SUSE Linux) > RPC_IFDEBUG is a macro that either evaluates to its argument, or to > nothing, depending on whether or not RPC_DEBUG is defined or not. In > neither case should it evaluate to anything illegal under C90 rules > afaics. Yep. Odd warning. --- ~Randy ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH -next] nfs: fix ISO C90 warning 2009-12-16 22:47 ` Randy Dunlap @ 2009-12-16 22:58 ` Thomas Gleixner 2009-12-16 23:01 ` Trond Myklebust 0 siblings, 1 reply; 8+ messages in thread From: Thomas Gleixner @ 2009-12-16 22:58 UTC (permalink / raw) To: Randy Dunlap Cc: Trond Myklebust, Stephen Rothwell, linux-next, LKML, linux-nfs On Wed, 16 Dec 2009, Randy Dunlap wrote: > On Wed, 16 Dec 2009 17:40:19 -0500 Trond Myklebust wrote: > > > On Wed, 2009-12-16 at 14:23 -0800, Randy Dunlap wrote: > > > From: Randy Dunlap <randy.dunlap@oracle.com> > > > > > > Fix gcc ISO C90 warning: > > > > > > fs/nfs/callback.c:356: warning: ISO C90 forbids mixed declarations and code > > > > > > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> > > > --- > > > fs/nfs/callback.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > --- linux-next-20091215.orig/fs/nfs/callback.c > > > +++ linux-next-20091215/fs/nfs/callback.c > > > @@ -352,8 +352,8 @@ static int check_gss_callback_principal( > > > static int nfs_callback_authenticate(struct svc_rqst *rqstp) > > > { > > > struct nfs_client *clp; > > > - RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); > > > int ret = SVC_OK; > > > + RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); > > > > > > > What version of gcc is giving rise to this warning? > > > gcc --version > gcc (GCC) 4.2.1 (SUSE Linux) > > > RPC_IFDEBUG is a macro that either evaluates to its argument, or to > > nothing, depending on whether or not RPC_DEBUG is defined or not. In > > neither case should it evaluate to anything illegal under C90 rules > > afaics. > > Yep. Odd warning. Not really. If the debug macro evaluates to nothing then you have: struct nfs_client *clp; ; int ret = SVC_OK; So you have a stray semicolon, which is interpreted as an empty code line. That qualifies for the mixed declaration and code case :) I know it's nitpicking, but ... Thanks, tglx ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH -next] nfs: fix ISO C90 warning 2009-12-16 22:58 ` Thomas Gleixner @ 2009-12-16 23:01 ` Trond Myklebust 2009-12-17 10:00 ` Américo Wang 0 siblings, 1 reply; 8+ messages in thread From: Trond Myklebust @ 2009-12-16 23:01 UTC (permalink / raw) To: Thomas Gleixner Cc: Randy Dunlap, Stephen Rothwell, linux-next, LKML, linux-nfs On Wed, 2009-12-16 at 23:58 +0100, Thomas Gleixner wrote: > On Wed, 16 Dec 2009, Randy Dunlap wrote: > > On Wed, 16 Dec 2009 17:40:19 -0500 Trond Myklebust wrote: > > > > > On Wed, 2009-12-16 at 14:23 -0800, Randy Dunlap wrote: > > > > From: Randy Dunlap <randy.dunlap@oracle.com> > > > > > > > > Fix gcc ISO C90 warning: > > > > > > > > fs/nfs/callback.c:356: warning: ISO C90 forbids mixed declarations and code > > > > > > > > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> > > > > --- > > > > fs/nfs/callback.c | 2 +- > > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > > > --- linux-next-20091215.orig/fs/nfs/callback.c > > > > +++ linux-next-20091215/fs/nfs/callback.c > > > > @@ -352,8 +352,8 @@ static int check_gss_callback_principal( > > > > static int nfs_callback_authenticate(struct svc_rqst *rqstp) > > > > { > > > > struct nfs_client *clp; > > > > - RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); > > > > int ret = SVC_OK; > > > > + RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); > > > > > > > > > > What version of gcc is giving rise to this warning? > > > > > gcc --version > > gcc (GCC) 4.2.1 (SUSE Linux) > > > > > RPC_IFDEBUG is a macro that either evaluates to its argument, or to > > > nothing, depending on whether or not RPC_DEBUG is defined or not. In > > > neither case should it evaluate to anything illegal under C90 rules > > > afaics. > > > > Yep. Odd warning. > > Not really. If the debug macro evaluates to nothing then you have: > > struct nfs_client *clp; > ; > int ret = SVC_OK; > > So you have a stray semicolon, which is interpreted as an empty code > line. That qualifies for the mixed declaration and code case :) > > I know it's nitpicking, but ... Ah... I see what you mean. So really what we should do is just move that semicolon inside the macro. That would change the !RPC_DEBUG case to struct nfs_client *clp; int ret = SVC_OK; which is 100% legal... Cheers Trond ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH -next] nfs: fix ISO C90 warning 2009-12-16 23:01 ` Trond Myklebust @ 2009-12-17 10:00 ` Américo Wang 2009-12-17 21:58 ` Trond Myklebust 0 siblings, 1 reply; 8+ messages in thread From: Américo Wang @ 2009-12-17 10:00 UTC (permalink / raw) To: Trond Myklebust Cc: Thomas Gleixner, Randy Dunlap, Stephen Rothwell, linux-next, LKML, linux-nfs [-- Attachment #1: Type: text/plain, Size: 2474 bytes --] On Thu, Dec 17, 2009 at 7:01 AM, Trond Myklebust <trond.myklebust@fys.uio.no> wrote: > On Wed, 2009-12-16 at 23:58 +0100, Thomas Gleixner wrote: >> On Wed, 16 Dec 2009, Randy Dunlap wrote: >> > On Wed, 16 Dec 2009 17:40:19 -0500 Trond Myklebust wrote: >> > >> > > On Wed, 2009-12-16 at 14:23 -0800, Randy Dunlap wrote: >> > > > From: Randy Dunlap <randy.dunlap@oracle.com> >> > > > >> > > > Fix gcc ISO C90 warning: >> > > > >> > > > fs/nfs/callback.c:356: warning: ISO C90 forbids mixed declarations and code >> > > > >> > > > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> >> > > > --- >> > > > fs/nfs/callback.c | 2 +- >> > > > 1 file changed, 1 insertion(+), 1 deletion(-) >> > > > >> > > > --- linux-next-20091215.orig/fs/nfs/callback.c >> > > > +++ linux-next-20091215/fs/nfs/callback.c >> > > > @@ -352,8 +352,8 @@ static int check_gss_callback_principal( >> > > > static int nfs_callback_authenticate(struct svc_rqst *rqstp) >> > > > { >> > > > struct nfs_client *clp; >> > > > - RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); >> > > > int ret = SVC_OK; >> > > > + RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); >> > > > >> > > >> > > What version of gcc is giving rise to this warning? >> > >> > > gcc --version >> > gcc (GCC) 4.2.1 (SUSE Linux) >> > >> > > RPC_IFDEBUG is a macro that either evaluates to its argument, or to >> > > nothing, depending on whether or not RPC_DEBUG is defined or not. In >> > > neither case should it evaluate to anything illegal under C90 rules >> > > afaics. >> > >> > Yep. Odd warning. >> >> Not really. If the debug macro evaluates to nothing then you have: >> >> struct nfs_client *clp; >> ; >> int ret = SVC_OK; >> >> So you have a stray semicolon, which is interpreted as an empty code >> line. That qualifies for the mixed declaration and code case :) >> >> I know it's nitpicking, but ... > > Ah... I see what you mean. > > So really what we should do is just move that semicolon inside the > macro. That would change the !RPC_DEBUG case to > > struct nfs_client *clp; > > int ret = SVC_OK; > > which is 100% legal... > Hi, Check that currently all usages of RPC_DEBUG are the same, we can replace them all. What do you think about the attached patch? Sorry for attaching it, I have a bad mail environment here. Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> [-- Attachment #2: rpc-replace-rpc-ifdebug.diff --] [-- Type: text/plain, Size: 3004 bytes --] diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index e50cfa3..4fce0f2 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -152,7 +152,7 @@ lockd(void *vrqstp) */ while (!kthread_should_stop()) { long timeout = MAX_SCHEDULE_TIMEOUT; - RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); + RPCBUF_IFDEBUG(buf); /* update sv_maxconn if it has changed */ rqstp->rq_server->sv_maxconn = nlm_max_connections; diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c index 73ab220..e05b6fc 100644 --- a/fs/nfs/callback.c +++ b/fs/nfs/callback.c @@ -352,7 +352,7 @@ static int check_gss_callback_principal(struct nfs_client *clp, static int nfs_callback_authenticate(struct svc_rqst *rqstp) { struct nfs_client *clp; - RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); + RPCBUF_IFDEBUG(buf); int ret = SVC_OK; /* Don't talk to strangers */ diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c index 1c12177..7a84433 100644 --- a/fs/nfsd/nfsfh.c +++ b/fs/nfsd/nfsfh.c @@ -90,7 +90,7 @@ static __be32 nfsd_setuser_and_check_port(struct svc_rqst *rqstp, /* Check if the request originated from a secure port. */ if (!rqstp->rq_secure && (flags & NFSEXP_INSECURE_PORT)) { - RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); + RPCBUF_IFDEBUG(buf); dprintk(KERN_WARNING "nfsd: request from insecure port %s!\n", svc_print_addr(rqstp, buf, sizeof(buf))); diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h index c2786f2..13185bb 100644 --- a/include/linux/sunrpc/debug.h +++ b/include/linux/sunrpc/debug.h @@ -52,11 +52,11 @@ extern unsigned int nlm_debug; #ifdef RPC_DEBUG # define ifdebug(fac) if (unlikely(rpc_debug & RPCDBG_##fac)) # define dfprintk(fac, args...) do { ifdebug(fac) printk(args); } while(0) -# define RPC_IFDEBUG(x) x +# define RPCBUF_IFDEBUG(x) char x[RPC_MAX_ADDRBUFLEN] #else # define ifdebug(fac) if (0) # define dfprintk(fac, args...) do ; while (0) -# define RPC_IFDEBUG(x) +# define RPCBUF_IFDEBUG(x) char x[0] #endif /* diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 870929e..425c4c1 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c @@ -228,7 +228,7 @@ static int svc_sendto(struct svc_rqst *rqstp, struct xdr_buf *xdr) int len = 0; unsigned long tailoff; unsigned long headoff; - RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); + RPCBUF_IFDEBUG(buf); if (rqstp->rq_prot == IPPROTO_UDP) { struct msghdr msg = { @@ -808,7 +808,7 @@ static struct svc_xprt *svc_tcp_accept(struct svc_xprt *xprt) struct socket *newsock; struct svc_sock *newsvsk; int err, slen; - RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); + RPCBUF_IFDEBUG(buf); dprintk("svc: tcp_accept %p sock %p\n", svsk, sock); if (!sock) @@ -1410,7 +1410,7 @@ static struct svc_xprt *svc_create_socket(struct svc_serv *serv, int newlen; int family; int val; - RPC_IFDEBUG(char buf[RPC_MAX_ADDRBUFLEN]); + RPCBUF_IFDEBUG(buf); dprintk("svc: svc_create_socket(%s, %d, %s)\n", serv->sv_program->pg_name, protocol, ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH -next] nfs: fix ISO C90 warning 2009-12-17 10:00 ` Américo Wang @ 2009-12-17 21:58 ` Trond Myklebust 0 siblings, 0 replies; 8+ messages in thread From: Trond Myklebust @ 2009-12-17 21:58 UTC (permalink / raw) To: Américo Wang Cc: Thomas Gleixner, Randy Dunlap, Stephen Rothwell, linux-next, LKML, linux-nfs On Thu, 2009-12-17 at 18:00 +0800, Américo Wang wrote: > Hi, > Check that currently all usages of RPC_DEBUG are the same, > we can replace them all. > > What do you think about the attached patch? > > Sorry for attaching it, I have a bad mail environment here. > > Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Doesn't that approach instead lead to a lot of 'unreferenced variable' warnings in the '#undef RPC_DEBUG' case? Cheers Trond ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-12-17 21:58 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-12-15 5:53 linux-next: Tree for December 15 Stephen Rothwell 2009-12-16 22:23 ` [PATCH -next] nfs: fix ISO C90 warning Randy Dunlap 2009-12-16 22:40 ` Trond Myklebust 2009-12-16 22:47 ` Randy Dunlap 2009-12-16 22:58 ` Thomas Gleixner 2009-12-16 23:01 ` Trond Myklebust 2009-12-17 10:00 ` Américo Wang 2009-12-17 21:58 ` Trond Myklebust
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox