Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp564423yba; Wed, 15 May 2019 06:16:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHhr6X/1oDxwjPX8UH/S4f2xg6ABBjzAUXlh77ahBLevvzT3irTwLtBIGhk546W5UaXk10 X-Received: by 2002:a63:b706:: with SMTP id t6mr37798453pgf.305.1557926201906; Wed, 15 May 2019 06:16:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557926201; cv=none; d=google.com; s=arc-20160816; b=ZRKCTvyDhCDyoxdKUbcvxl1h82qlfzk3SYndBolrchnqJ37QcCz1Jxnc8bILnuI3X1 kaJcV5sfwn7k1qe6SuehmEmlqNl3qaSMtUzGyrBuW/ztNf9QaLqGUNze2DjQjquzUhKP r0qkETIqn4f0ORyiOiwGjxpQ2+NRrndMQFWJ3wWv3o1sms2I2yPSIXU/CUv+gEz7IK0B HrsR/mz1OPP2rQMZuu44TVHqPVZMnAOyh6o+48t09W6WDzDujIjpE/lAlNrH542mMBbQ Y4d2/Ml47LPAZpbQyLcbGx2DBSWj/IWzYSn7Qigm6P3wpguttsvkZIgjz+5sE5cwNrAl fGmQ== 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=qShoqLt0JmHyoHgAq3sjRJ0pBZKTFY+W/Ie1+Gslfcs=; b=ZY5UDxPrLtBBB7hA8pJhXiHzZKbWpsa0r3xm+VcgXSR0BP1MCydH3KZhrJIGogwYxE 4PHJyVDfG+lykwmuRKpUw9jlqzhLpx1yTlNWY+I0AWC7K66WBYef/I24qSWfd/6M130e eLbxZli6qrI+JCZH1auEgEqG+kJfUBLYgFJhJiZkWdQ7HMAeQYvrkGr5h/M15j6tffY7 spafwIjrkWtiFn2bkFXgAVb3Hfuyd0D9jlvfls6bXuHRA7OojYse1LY6H3pt7QR46D8z H5dYAl4//TXqrjURLdvShuWELU6O1z+Qvbys/kMTK4u263uMUhr486aKx1TcheF8zhLe MhXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=rYCXmxJt; 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 w8si1712847plz.301.2019.05.15.06.16.26; Wed, 15 May 2019 06:16:41 -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=bombadil.20170209 header.b=rYCXmxJt; 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 S1727294AbfEONOo (ORCPT + 99 others); Wed, 15 May 2019 09:14:44 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:47304 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726752AbfEONOo (ORCPT ); Wed, 15 May 2019 09:14:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=qShoqLt0JmHyoHgAq3sjRJ0pBZKTFY+W/Ie1+Gslfcs=; b=rYCXmxJt7WIVkj4UyET3hLn4H OmfbIB7jIAwSa9Jv4QvcOVmdEuLtr4hR6GYVoIViMZ7bWW94ldFI3s2GeCcXaveKviEIC88Yi5364 90FxvdcJw6lodstcqCiNE2IioHmGFIGm1uVuP+hLxOXY/UrQHLUWMASdv6psi37jJPfIip/Wxz3Xc BTzsy2JNdKHNbhpUAFNeSMPGbiElM4NDeYb8AH1+3ZiU8nrOih5wfVNc1BQUc3TgRe7/4oBj52ZV3 FJPXQm7UWb0JuyMa2ZJNdmKpwTqgwGQEB9yNibzD05AHHDBxIA4D78Dc377GEBv4O6nuBOghgN5kd Y8Kp+Ki5Q==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1hQtk1-0000z1-RR; Wed, 15 May 2019 13:14:41 +0000 Date: Wed, 15 May 2019 06:14:41 -0700 From: Christoph Hellwig To: Mathieu Malaterre Cc: Michael Ellerman , Michael Neuling , linux-kernel@vger.kernel.org, Paul Mackerras , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] powerpc: silence a -Wcast-function-type warning in dawr_write_file_bool Message-ID: <20190515131441.GA3072@infradead.org> References: <20190515120942.3812-1-malat@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190515120942.3812-1-malat@debian.org> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 15, 2019 at 02:09:42PM +0200, Mathieu Malaterre wrote: > In commit c1fe190c0672 ("powerpc: Add force enable of DAWR on P9 > option") the following piece of code was added: > > smp_call_function((smp_call_func_t)set_dawr, &null_brk, 0); > > Since GCC 8 this trigger the following warning about incompatible > function types: And the warning is there for a reason, and should not be hidden behind a cast. This should instead be fixed by something like this: diff --git a/arch/powerpc/kernel/hw_breakpoint.c b/arch/powerpc/kernel/hw_breakpoint.c index da307dd93ee3..a26b67a1be83 100644 --- a/arch/powerpc/kernel/hw_breakpoint.c +++ b/arch/powerpc/kernel/hw_breakpoint.c @@ -384,6 +384,12 @@ void hw_breakpoint_pmu_read(struct perf_event *bp) bool dawr_force_enable; EXPORT_SYMBOL_GPL(dawr_force_enable); + +static void set_dawr_cb(void *info) +{ + set_dawr(info); +} + static ssize_t dawr_write_file_bool(struct file *file, const char __user *user_buf, size_t count, loff_t *ppos) @@ -403,7 +409,7 @@ static ssize_t dawr_write_file_bool(struct file *file, /* If we are clearing, make sure all CPUs have the DAWR cleared */ if (!dawr_force_enable) - smp_call_function((smp_call_func_t)set_dawr, &null_brk, 0); + smp_call_function(set_dawr_cb, &null_brk, 0); return rc; }