treewide: Add __GFP_NOWARN to k.alloc calls with v.alloc fallbacks
[cascardo/linux.git] / drivers / scsi / cxgbi / libcxgbi.h
index 80fa99b..8135f04 100644 (file)
@@ -658,11 +658,11 @@ static inline u32 cxgbi_tag_nonrsvd_bits(struct cxgbi_tag_format *tformat,
 static inline void *cxgbi_alloc_big_mem(unsigned int size,
                                        gfp_t gfp)
 {
-       void *p = kmalloc(size, gfp);
+       void *p = kzalloc(size, gfp | __GFP_NOWARN);
+
        if (!p)
-               p = vmalloc(size);
-       if (p)
-               memset(p, 0, size);
+               p = vzalloc(size);
+
        return p;
 }