From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757461Ab2GEWVa (ORCPT ); Thu, 5 Jul 2012 18:21:30 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:56048 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753161Ab2GEWV3 (ORCPT ); Thu, 5 Jul 2012 18:21:29 -0400 MIME-Version: 1.0 In-Reply-To: <20120705220040.GA15685@thunk.org> References: <1341511933-11169-1-git-send-email-tytso@mit.edu> <1341511933-11169-2-git-send-email-tytso@mit.edu> <1341514078.4020.1213.camel@calx> <1341524367.4020.1324.camel@calx> <20120705220040.GA15685@thunk.org> From: Linus Torvalds Date: Thu, 5 Jul 2012 15:21:06 -0700 X-Google-Sender-Auth: RXz6vBqJCNUYoatxsxtBLanzPlY Message-ID: Subject: Re: [PATCH 01/10] random: make 'add_interrupt_randomness()' do something sane To: "Theodore Ts'o" , Linus Torvalds , Matt Mackall , Linux Kernel Developers List , w@1wt.eu, ewust@umich.edu, zakir@umich.edu, greg@kroah.com, nadiah@cs.ucsd.edu, jhalderm@umich.edu, tglx@linutronix.de, davem@davemloft.net, stable@kernel.org Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 5, 2012 at 3:00 PM, Theodore Ts'o wrote: > > Like this? Looks fine to me. Although I think it might be better to stay closer to what we used to do, and just 'or' in the action flags rather than make it some conditional. And then at the end, do if (!(flags & __IRQF_TIMER)) add_interrupt_randomness(irq) instead on that or'ed flags value. Otherwise gcc will create silly conditional moves (or worse still, conditional branches) just for that "random" variable assignment. Linus