From mboxrd@z Thu Jan 1 00:00:00 1970 From: xerofoify@gmail.com (Nick Krause) Date: Wed, 13 Aug 2014 15:24:47 -0400 Subject: [PATCH] staging: Check for Null return of allocated skb in fw_download_code In-Reply-To: <16587.1407957439@turing-police.cc.vt.edu> References: <1407900272-29402-1-git-send-email-xerofoify@gmail.com> <14218.1407908124@turing-police.cc.vt.edu> <39663.1407938186@turing-police.cc.vt.edu> <6253.1407945756@turing-police.cc.vt.edu> <16587.1407957439@turing-police.cc.vt.edu> Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Wed, Aug 13, 2014 at 3:17 PM, wrote: > On Wed, 13 Aug 2014 14:03:08 -0400, Nick Krause said: > >> I did test my patch by doing a kernel build and I get this error, >> drivers/staging/rtl8192e/rtl8192e/r8192E_firmware.c:66:4: error: >> implicit declaration of function ?skb_quene_purge? >> [-Werror=implicit-function-declaration] >> skb_quene_purge(&priv->rtllib->skb_waitQ[tcb_desc->queue_index]); > > Well, this is a C 101 problem. > >> I am wondering how do I fix this, > > You fix this by not doing any further kernel hacking until you've gotten > a handle on *VERY BASIC* C development concepts. > > Also, you're going to have to justify why you're being a total > dumbass and coding skb_waitQ[tcb_desc->queue_index] when the *obvious* > code is skb_waitQ[TXCMD_QUEUE] - yes, an optimizing compiler will do > that substitution, but code clarity is important. > > Argh. I may have to break out my +5 Trout of Smacking.... > > On Wed, 13 Aug 2014 15:01:45 -0400, Nick Krause said: >> This is the fixed patch, I do get an error about uninitialized >> variables > > Are you *trying* to get put in *everybody's* killfile? > >> If someone wants to send this out, please do so as this is has been >> built and applied tested. > > And you think that *anybody* wants to upstream a patch from you that even > *you* admit still has trouble??!? I checked the patched and it worked , uninitialized variables are common and I hit 12 of them. Nick