From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964866AbWFNBUl (ORCPT ); Tue, 13 Jun 2006 21:20:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964865AbWFNBUk (ORCPT ); Tue, 13 Jun 2006 21:20:40 -0400 Received: from e1.ny.us.ibm.com ([32.97.182.141]:30935 "EHLO e1.ny.us.ibm.com") by vger.kernel.org with ESMTP id S964866AbWFNBUj (ORCPT ); Tue, 13 Jun 2006 21:20:39 -0400 Subject: Re: [PATCH 03/11] Task watchers: Refactor process events From: Matt Helsley To: Chase Venters Cc: Andrew Morton , Linux-Kernel , Jes Sorensen , LSE-Tech , Chandra S Seetharaman , Alan Stern , John T Kohl , Balbir Singh , Shailabh Nagar , Guillaume Thouvenin In-Reply-To: <200606131943.34800.chase.venters@clientec.com> References: <20060613235122.130021000@localhost.localdomain> <1150242879.21787.143.camel@stark> <200606131943.34800.chase.venters@clientec.com> Content-Type: text/plain Date: Tue, 13 Jun 2006 18:11:22 -0700 Message-Id: <1150247482.21787.206.camel@stark> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2006-06-13 at 19:43 -0500, Chase Venters wrote: > On Tuesday 13 June 2006 18:54, Matt Helsley wrote: > > > + WARN_ON((which_id != PROC_EVENT_UID) && (which_id != PROC_EVENT_GID)); > > } > > How about WARN_ON(!(which_id & (PROC_EVENT_UID | PROC_EVENT_GID))) to save a > cmp? > > Thanks, > Chase I think the compiler is capable of making such optimizations. I also think what I have now is clearer to anyone skimming the code. Cheers, -Matt Helsley