Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3131287ybi; Thu, 18 Jul 2019 21:38:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4XfJbQMhIJVDna9iY6COZ5r4/QjdN4ltiX3cfxAbECU8Sk2JEju3y7dDoTM6ozR8f6YRl X-Received: by 2002:a17:902:e20c:: with SMTP id ce12mr56210226plb.130.1563511104287; Thu, 18 Jul 2019 21:38:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563511104; cv=none; d=google.com; s=arc-20160816; b=fjUFlL3OLO6Cl2o2dXRAYqBJNr8GTa1Wy9OU82SI8SK/vnFAdCZQ7CnIKBfCTRX9ea NbFqDVL1Gsmm+p9kg4r3ObOrASOasd3UEF0SnOTjVa1+1JvFNrMmad0D/ASLp/2VeITa m3kliULg1HoksUismXg2Ty8IjoC6vlNAWuRDouhJEgPwjBM7N6oZK6gkcB/yNhEfHyBZ b9qHKpqN4yNeJ5aPyZ6t+R6tb1G4wgWL9X6wtLXNWE84YIXwlqjcfE6pVsw6ZUxKKPwJ VvwdvQxVi1GHwYJ8wbv/dBJkfhO+KGpG/Htyj6KjBMUX/CX4ZjtzRaf2spS6bp06HGfj JnRw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4P71QpXvG/nn5x2X/FqPEb+il+nPXZe9xRJm9IkHaKk=; b=sjco7poj2PNrFeCy9UZ/NREUy3ifxnC0ABCp+8Qep7BoervcZ0bFxK6a7xrIQpAs14 5WPhZNmpGF4iuljpQs5yC8YqtWS0QxCQHJGrYpqW3egK3O9amUkwgkYzv3R2C4c5IGzs FFsbcJWpbPPZ0nQYuk5WraWREVTkn7/Fp6yMQxofwUED9J72G7/JnyNahCKQWMISiwwt 8jp7hJm3nPeQ4r94mDzVcx2HyhHVdeurobUJyLizMj1ezepNjkpNd30Pzdvh1yVq+Xhq hqeYfcPInuz77RZNuTmC/WPBoXYmfBwRU5fTh773HMx0nRRy3BQyC1Uio3LQbkxNfjKC wO9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QJ61WwOz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f20si1900337pfn.166.2019.07.18.21.38.08; Thu, 18 Jul 2019 21:38:24 -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=QJ61WwOz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729020AbfGSEA0 (ORCPT + 99 others); Fri, 19 Jul 2019 00:00:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:60124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727876AbfGSEAQ (ORCPT ); Fri, 19 Jul 2019 00:00:16 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 42AA821882; Fri, 19 Jul 2019 04:00:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563508815; bh=1sTBx+nVYEYy5Fk2KfWlMcNkjbOoZeRjEIvyULIGil4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QJ61WwOzPpYINwe8EeezNyKj64l0w3nWhrxIY5ZiKIEpOLMoILc9QVsvClBBG9ueW c5wnrEryTpqg3su/g9f0qRaJ/Dq+BZUPhz7f/9DKQHfmUVm+UQJVkxfxa004I/5RR9 iSDHiSdzZwNHwtnYE+l+shKVzIqVxcJVln8pVKKs= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mathieu Malaterre , Christoph Hellwig , Michael Neuling , Michael Ellerman , Sasha Levin , linuxppc-dev@lists.ozlabs.org Subject: [PATCH AUTOSEL 5.2 105/171] powerpc: silence a -Wcast-function-type warning in dawr_write_file_bool Date: Thu, 18 Jul 2019 23:55:36 -0400 Message-Id: <20190719035643.14300-105-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719035643.14300-1-sashal@kernel.org> References: <20190719035643.14300-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mathieu Malaterre [ 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