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
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090708181718.GC13944@redhat.com>
Date:	Wed, 8 Jul 2009 14:17:18 -0400
From:	Dave Jones <davej@...hat.com>
To:	Linus Torvalds <torvalds@...ux-foundation.org>
Cc:	Alexander Beregalov <a.beregalov@...il.com>,
	linux-kernel@...r.kernel.org, mathieu.desnoyers@...ymtl.ca
Subject: Re: [PATCH] cpufreq: fix UP build

On Wed, Jul 08, 2009 at 11:08:12AM -0700, Linus Torvalds wrote:

 > (not new to your diff - it's pre-existing crap):
 > 
 > 	>  #ifdef CONFIG_SMP
 > 	>       struct cpufreq_policy *managed_policy;
 > 	> +     struct sys_device *cpu_sys_dev;
 > 	>  #endif
 > 
 > and instead those variables should be declared inside the blocks where 
 > they are used, not at the top.
 > 
 > The rule should always be: make the scope of a variable as small as 
 > possible. Don't declare it at the top and try to "save" a declaration when 
 > it can be used inside multiple blocks as multiple different variables.
 > 
 > Also, that whole function could damn well be split into smaller pieces, 
 > which would make it much more readable than that horrible 250+ line piece 
 > of crap monster-function with #ifdef's inside the code.

Yes, cpufreq_add_dev is a monster. Its complexity keeps biting us in new ways.

 > Please, somebody?
 
It's something to look at for .32, agreed.

	Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ