Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3799242ybi; Mon, 29 Jul 2019 12:51:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqyzx1vnnKlkVgKINkJSiIvkvixaMveeUTQnNstFgA9kf6Eg4QluW8xP28HW6HqI/dL2P6sn X-Received: by 2002:a17:902:3081:: with SMTP id v1mr114052710plb.169.1564429905798; Mon, 29 Jul 2019 12:51:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564429905; cv=none; d=google.com; s=arc-20160816; b=eaomM4LL13t3xnf/Q+hEsSlu+bUNGZo7baUXsqLg1h/CiBlOzkpaZM2nOMi58ikPx+ wA/s4c5hZRL9SNpmF9G5u1ktGce9WUwg/jXjBdiiTBgqoJozsv33z+JRYtExnsPINCVz 1TZeJaUPwIOdCdXMtGITcutM6Ul9N//Wf7sSLG+/hp3BzrpSCqjCRC/A5GM4Vefo+kip A05/3zCGxJ10dNaQkLe2ThSTTByLpfNTBdAzHpryEanUletU/Nce7YvYhaKhcddUgvgd ysyVLzJ/AkLRYCybNeJ6MovdF3WglBEqKy+MMmVXB30B8WPME+lUAY81IDJXzguLPb7M dU/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jCcoS99hg0QoOyqCDyaIDtRsdVmCzQrfsAS5h/yXdVM=; b=E51jjADUKnLad57Eb0ZMrW9aXXj92Wzol8Oph21FXf95wcmpNQnPoWPZ01tnuOgcKu E+AskqB+AQcODXRjTSjGaEHTXhVg7ikoVkjNP/bBZDwQfOJIER2vCfzfZd1Rkozej3CE WBDRwDtYBAwNOLhtY2Wey182M1Caf8cakXay+BqyHQ7g8wi01V9MiV+9L5knbw4xBT+U oQZkhHNlhWhG4c4F7XtL7itIKIRd/tMfRMmf8ZOXGnijDk6cO7O1f2t8KDt2BM8EJfCO IwO6TiE8C7/GRfYvXuId5HDreaYYOzpQX//OkKyW9pZdZG/WaD3hFleFwofTnO+iBACQ vX/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FJOWWj8H; 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 n2si28674221pgd.247.2019.07.29.12.51.30; Mon, 29 Jul 2019 12:51:45 -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=pass header.i=@kernel.org header.s=default header.b=FJOWWj8H; 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 S2403773AbfG2TuP (ORCPT + 99 others); Mon, 29 Jul 2019 15:50:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:41126 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726516AbfG2TuP (ORCPT ); Mon, 29 Jul 2019 15:50:15 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 45D21205F4; Mon, 29 Jul 2019 19:50:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429814; bh=xwKZZt9RPsUw9lityUO2BIO1UFepdsEzObO9gq9lH30=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FJOWWj8Hle7zicwWaMVYJiNVpGW/22BtU71lXtkLA/QrKTLLQjg2l6o/LyERpDTvh XlLaDcdzzXXvBEoaxrV42LiXzqY2cbkEKb46s2x0A2OpoCOPMjS/PokBJbf47jRbEv accOeyegBFNSl9c+y0dxumZlaVHPSrX7EcVNL5fE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christoph Hellwig , Mathieu Malaterre , Michael Neuling , Michael Ellerman , Sasha Levin Subject: [PATCH 5.2 103/215] powerpc: silence a -Wcast-function-type warning in dawr_write_file_bool Date: Mon, 29 Jul 2019 21:21:39 +0200 Message-Id: <20190729190756.898918407@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190739.971253303@linuxfoundation.org> References: <20190729190739.971253303@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 548c54acba5bd1388d50727a9a126a42d0cd4ad0 ] 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 triggers the following warning about incompatible function types: arch/powerpc/kernel/hw_breakpoint.c:408:21: error: cast between incompatible function types from 'int (*)(struct arch_hw_breakpoint *)' to 'void (*)(void *)' [-Werror=cast-function-type] Since the warning is there for a reason, and should not be hidden behind a cast, provide an intermediate callback function to avoid the warning. Fixes: c1fe190c0672 ("powerpc: Add force enable of DAWR on P9 option") Suggested-by: Christoph Hellwig Signed-off-by: Mathieu Malaterre Signed-off-by: Michael Neuling Signed-off-by: Michael Ellerman Signed-off-by: Sasha Levin --- arch/powerpc/kernel/hw_breakpoint.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/hw_breakpoint.c b/arch/powerpc/kernel/hw_breakpoint.c index a293a53b4365..50262597c222 100644 --- a/arch/powerpc/kernel/hw_breakpoint.c +++ b/arch/powerpc/kernel/hw_breakpoint.c @@ -370,6 +370,11 @@ 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) @@ -389,7 +394,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; } -- 2.20.1