lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 19 Nov 2007 19:21:09 -0800 (PST) From: David Miller <davem@...emloft.net> To: shemminger@...ux-foundation.org Cc: satyam@...radead.org, netdev@...r.kernel.org Subject: Re: [PATCH 02/11] netpoll: netpoll_poll cleanup From: Stephen Hemminger <shemminger@...ux-foundation.org> Date: Sat, 03 Nov 2007 11:43:16 -0700 > Restructure code slightly to improve readability: > * dereference device once > * change obvious while() loop > * let poll_napi() handle null list itself > > Signed-off-by: Stephen Hemminger <shemminger@...ux-foundation.org> Applied to net-2.6.25, but I made some coding style fixups, one of which is a huge pet peeve of mine. When declaring local variables for a function I always list the longest lines down gradually to the shortest lines. It is nicer to the eye and naturally it means that all the complicated structure assignments and dereferences sit at the top and the simpler iterators and counters like 'i' end up at the bottom making local variable lists that much easier to read and search when learning how a function works. You explicitly changed this one I had set up: > { > - struct netpoll_info *npinfo = np->dev->npinfo; > - struct napi_struct *napi; > int budget = 16; > + struct napi_struct *napi; And I thus reverted it back to the correct order: struct napi_struct *napi; int budget = 16; I also got rid of the mid-parens spaces in: > + while ( (skb = skb_dequeue(&npi->arp_tx)) ) Thanks. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists