From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932585AbcIRNfd (ORCPT ); Sun, 18 Sep 2016 09:35:33 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:35266 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755474AbcIRNfY (ORCPT ); Sun, 18 Sep 2016 09:35:24 -0400 Date: Sun, 18 Sep 2016 15:35:18 +0200 From: Frederic Weisbecker To: Paolo Bonzini Cc: LKML , Peter Zijlstra , Wanpeng Li , Eric Dumazet , Ingo Molnar , Mike Galbraith , Rik van Riel Subject: Re: [PATCH 3/5] u64_stats: Introduce IRQs disabled helpers Message-ID: <20160918133516.GA5909@lerouge> References: <1472824985-22947-1-git-send-email-fweisbec@gmail.com> <1472824985-22947-4-git-send-email-fweisbec@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 02, 2016 at 04:35:54PM +0200, Paolo Bonzini wrote: > > > On 02/09/2016 16:03, Frederic Weisbecker wrote: > > static inline unsigned int u64_stats_fetch_begin(const struct u64_stats_sync *syncp) > > { > > -#if BITS_PER_LONG==32 && defined(CONFIG_SMP) > > - return read_seqcount_begin(&syncp->seq); > > -#else > > -#if BITS_PER_LONG==32 > > +#if BITS_PER_LONG==32 && !defined(CONFIG_SMP) > > preempt_disable(); > > +#else > > This should be #endif, or this side ends without a "return" statement. Good catch! Thanks Paolo!