Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[sfrench/cifs-2.6.git] / arch / sparc64 / solaris / timod.c
index a9d32ceabf26e5bed3c6cf2dc2810a2d94e2a07d..15234fcd191a209041a6dd6712cdfae9c7fd3000 100644 (file)
@@ -81,7 +81,7 @@ void mykfree(void *p)
 #define MKCTL_MAGIC    0xDEADBABEBADC0DEDL
 #define PUT_MAGIC(a,m) do{(*(u64*)(a))=(m);}while(0)
 #define SCHECK_MAGIC(a,m)      do{if((*(u64*)(a))!=(m))printk("%s,%u,%s(): magic %08x at %p corrupted!\n",\
-                               __FILE__,__LINE__,__FUNCTION__,(m),(a));}while(0)
+                               __FILE__,__LINE__,__func__,(m),(a));}while(0)
 #define BUF_OFFSET     sizeof(u64)
 #define MKCTL_TRAILER  sizeof(u64)
 
@@ -859,7 +859,8 @@ asmlinkage int solaris_getmsg(unsigned int fd, u32 arg1, u32 arg2, u32 arg3)
 
        SOLD("entry");
        lock_kernel();
-       if(fd >= NR_OPEN) goto out;
+       if (fd >= sysctl_nr_open)
+               goto out;
 
        fdt = files_fdtable(current->files);
        filp = fdt->fd[fd];
@@ -927,7 +928,8 @@ asmlinkage int solaris_putmsg(unsigned int fd, u32 arg1, u32 arg2, u32 arg3)
 
        SOLD("entry");
        lock_kernel();
-       if(fd >= NR_OPEN) goto out;
+       if (fd >= sysctl_nr_open)
+               goto out;
 
        fdt = files_fdtable(current->files);
        filp = fdt->fd[fd];