Re: staging: wlan-ng: p80211conv.h: warning I don't understand

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

 



On Thu, 12 Nov 2015 02:55:40 +0000, "Gavin O'Leary" said:

> What is this warning about? How do I go about fixing it?
>
> Thank you,

Let's cut-n-paste 2 more lines out of the file:

    613         /* Allocate the rxmeta */
    614         rxmeta = kzalloc(sizeof(struct p80211_rxmeta), GFP_ATOMIC);
    615
    616         if (rxmeta == NULL) {
    617                 netdev_err(wlandev->netdev,
    618                            "%s: Failed to allocate rxmeta.\n", wlandev->name);
    619                 result = 1;
    620                 goto exit;
    621         }

Lesson 1:  Under what conditions will the kzalloc return NULL?  If this happens,
what are the chances you'll have a chance to *see* the message? (Hint - what
size is that struct?  If the kernel can't find that much free memory, what are
the chances you still have a functional syslog daemon?)

Lesson 2: The wisest thing ever said about checkpatch.pl:
" the code is more what you'd call "guidelines" than actual rules."
			-- Captain Barbossa

Attachment: pgpS6Nk9mthZE.pgp
Description: PGP signature

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux