Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp272899ybi; Fri, 24 May 2019 03:41:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwW0YG19hhOxts+4weuKDpzaRt+2UDiuOAgi7G5g84md1JaTWFF3uuxHpx6wBW2nm7DmF16 X-Received: by 2002:a17:902:aa91:: with SMTP id d17mr101155138plr.251.1558694465992; Fri, 24 May 2019 03:41:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558694465; cv=none; d=google.com; s=arc-20160816; b=OrqXtOKwMHNnTwaqGEwkX0opvWCY/XPshzTfgxXf6L/6I39igcEerkiSaos5eTw/6b 9fV6qTvRuHXv6lnK5HWtJRvyiBu52g5lnMwO4yT1GViuf/xpgo5aJH4ZuHrWM6lDvYXM GcbzlLxfwHBnFZoelDlTo4IWNwINPqthfSg7XhC7g1QZ1bnCrgOJ3jH4Yzh4XanLXuSE vZ6ruQa50ty8E8eXVEFVsIUP7QeDJpYxbZIx4qi0gPOlZh0cY+S7wQEtqFPmr/TkLSdf zqxGngdE3c4uXgeoWflFfZ1Povg35CEUUhOT7HVxX2pNjG+yu1/s2jHkIlho4mRdBXjX FXmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=BriCFiVsvXiSB70hYfidU8VqORTyQEhK40fA2bRZURg=; b=fs7l2jZScuZvQoPPC6JECVz/zz4vu4FF1UUDWUjAq2aGYAEJIZ+jHbzDs01G6TjSwP H9l6uyN5mJUUW1uTiPffpzIQA2LWK6rIm06bvp3/A07vuR6XR3oZ6iOhPVQFvLgFg4J4 htMvy5elTPjnrQp+rYJlaXfezR8zdL2ADaLKa74r1xLmFonk+C5PKm66QIVTQf6VdE1N 0oHeWCgl1KYQqQpjSzAMue5DD9EMygEp/raZHdXmvYR8ftMgbQwrb1t2wuqZCbRb4weY uq/1EmMxk/5LTdixW01RSpK/+VmVlkjfciK23gEc7KWsoi6/2YHmpvXqCLPAMC33AaoI qSWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=JahhLfLy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x16si3012574pjt.85.2019.05.24.03.40.50; Fri, 24 May 2019 03:41:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=JahhLfLy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390639AbfEXKjq (ORCPT + 99 others); Fri, 24 May 2019 06:39:46 -0400 Received: from merlin.infradead.org ([205.233.59.134]:48176 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390106AbfEXKjq (ORCPT ); Fri, 24 May 2019 06:39:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=BriCFiVsvXiSB70hYfidU8VqORTyQEhK40fA2bRZURg=; b=JahhLfLypSqyFz1nlMEJrreDo 3zwU9SAKwXFypEKOnmLTpx577riUPdcFXcLfxiXSji7/3qJkglkHQJ9S/ajcXtjPpEN34Y9am+jEy wGqCfu5wOl/CHLFzZmYtYQddiVqSw1FVLwpYpRdu9kZamS1j4c8qdy6T1yGj9MKPhlwk8JSN3MHP2 aI43izaMyVjyjrPILaDT6yePtOw84wXW/A0V0bhfTwG8UusvU40KLO7Yr0vqmQZwyTW6fpIjaEhgo V8zPR/LibQJOzv3xCOXfI7kpYcWhw41YcHDnXngkLInrFAq3s/B1ArSyxx8+M4jRgDXaqa1g5u5qQ mF/kjCrpQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hU7bt-0007ui-JC; Fri, 24 May 2019 10:39:37 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 87D2F2029B0A3; Fri, 24 May 2019 12:39:34 +0200 (CEST) Date: Fri, 24 May 2019 12:39:34 +0200 From: Peter Zijlstra To: Andrea Parri Cc: linux-kernel@vger.kernel.org, Arnd Bergmann , Greg Kroah-Hartman , Jorgen Hansen , Will Deacon , Mark Rutland , "Paul E. McKenney" Subject: Re: [PATCH 1/2] vmw_vmci: Clean up uses of atomic*_set() Message-ID: <20190524103934.GO2606@hirez.programming.kicks-ass.net> References: <1558694136-19226-1-git-send-email-andrea.parri@amarulasolutions.com> <1558694136-19226-2-git-send-email-andrea.parri@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1558694136-19226-2-git-send-email-andrea.parri@amarulasolutions.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 24, 2019 at 12:35:35PM +0200, Andrea Parri wrote: > The primitive vmci_q_set_pointer() relies on atomic*_set() being of > type 'void', but this is a non-portable implementation detail. > > Reported-by: Mark Rutland > Signed-off-by: Andrea Parri > Cc: Arnd Bergmann > Cc: Greg Kroah-Hartman > Cc: Jorgen Hansen > Cc: Peter Zijlstra > Cc: Will Deacon > Cc: Mark Rutland > Cc: "Paul E. McKenney" > --- > include/linux/vmw_vmci_defs.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/linux/vmw_vmci_defs.h b/include/linux/vmw_vmci_defs.h > index 0c06178e4985b..eb593868e2e9e 100644 > --- a/include/linux/vmw_vmci_defs.h > +++ b/include/linux/vmw_vmci_defs.h > @@ -759,9 +759,9 @@ static inline void vmci_q_set_pointer(atomic64_t *var, > u64 new_val) > { > #if defined(CONFIG_X86_32) > - return atomic_set((atomic_t *)var, (u32)new_val); > + atomic_set((atomic_t *)var, (u32)new_val); > #else > - return atomic64_set(var, new_val); > + atomic64_set(var, new_val); > #endif > } All that should just die a horrible death. That code is crap. See: lkml.kernel.org/r/20190524103731.GN2606@hirez.programming.kicks-ass.net