Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755253AbbLDUTH (ORCPT ); Fri, 4 Dec 2015 15:19:07 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:34882 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752968AbbLDUTE (ORCPT ); Fri, 4 Dec 2015 15:19:04 -0500 Date: Fri, 4 Dec 2015 12:19:01 -0800 From: Venkatesh Srinivas To: "Michael S. Tsirkin" Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH v2] vhost: replace % with & on data path Message-ID: <20151204201901.GB19430@google.com> References: <1448874894-18398-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1448874894-18398-1-git-send-email-mst@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 586 Lines: 17 On Mon, Nov 30, 2015 at 11:15:23AM +0200, Michael S. Tsirkin wrote: > We know vring num is a power of 2, so use & > to mask the high bits. > > Signed-off-by: Michael S. Tsirkin > --- The generated code switches from DIV -> masking, source is clearer as well. Tested-by: Venkatesh Srinivas -- vs; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/