From patchwork Sun Oct 1 19:38:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 9979847 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 20412602A0 for ; Sun, 1 Oct 2017 19:38:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 098F528915 for ; Sun, 1 Oct 2017 19:38:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EFE8828A49; Sun, 1 Oct 2017 19:38:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 329F628915 for ; Sun, 1 Oct 2017 19:38:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751644AbdJATiu (ORCPT ); Sun, 1 Oct 2017 15:38:50 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:56263 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751677AbdJATiu (ORCPT ); Sun, 1 Oct 2017 15:38:50 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id CABF24C4DA; Sun, 1 Oct 2017 21:38:48 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id oFJh9Lk0RGfO; Sun, 1 Oct 2017 21:38:42 +0200 (CEST) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: backports@vger.kernel.org, Hauke Mehrtens Subject: [PATCH] header: fix compile error on PowerPC (PPC_85xx) Date: Sun, 1 Oct 2017 21:38:23 +0200 Message-Id: <20171001193823.22685-1-hauke@hauke-m.de> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Including linux/interrupt.h in linux/hrtimer.h causes this error message on PowerPC builds on x86, ARM and MIPS it works: CC [M] /backports-4.14-rc2-1/compat/main.o In file included from /backports-4.14-rc2-1/backport-include/linux/printk.h:5:0, from ./include/linux/kernel.h:13, from /backports-4.14-rc2-1/backport-include/linux/kernel.h:3, from ./include/linux/list.h:8, from /backports-4.14-rc2-1/backport-include/linux/list.h:3, from ./include/linux/module.h:9, from /backports-4.14-rc2-1/backport-include/linux/module.h:3, from /backports-4.14-rc2-1/compat/main.c:1: ./include/linux/ratelimit.h: In function 'ratelimit_state_exit': ./include/linux/ratelimit.h:62:11: error: dereferencing pointer to incomplete type 'struct task_struct' current->comm, rs->missed); ^ ./include/linux/printk.h:279:37: note: in definition of macro 'pr_warning' printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__) ^ ./include/linux/ratelimit.h:61:3: note: in expansion of macro 'pr_warn' pr_warn("%s: %d output lines suppressed due to ratelimiting\n", ^ The backport of the hrtimer_start() functions needs the linux/interrupt.h because some parts are defined there. Fix this by moving the hrtimer_start() backport to the linux/interrupt.h backport header file. Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/hrtimer.h | 17 ----------------- backport/backport-include/linux/interrupt.h | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 18 deletions(-) delete mode 100644 backport/backport-include/linux/hrtimer.h diff --git a/backport/backport-include/linux/hrtimer.h b/backport/backport-include/linux/hrtimer.h deleted file mode 100644 index bdcf106e..00000000 --- a/backport/backport-include/linux/hrtimer.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _BP_HRTIMER_H -#define _BP_HRTIMER_H -#include -#include_next -#include - -#if LINUX_VERSION_IS_LESS(4,10,0) -static inline void backport_hrtimer_start(struct hrtimer *timer, s64 time, - const enum hrtimer_mode mode) -{ - ktime_t _time = { .tv64 = time }; - hrtimer_start(timer, _time, mode); -} -#define hrtimer_start LINUX_BACKPORT(hrtimer_start) -#endif - -#endif /* _BP_HRTIMER_H */ diff --git a/backport/backport-include/linux/interrupt.h b/backport/backport-include/linux/interrupt.h index 0e243ba8..ad3cbf66 100644 --- a/backport/backport-include/linux/interrupt.h +++ b/backport/backport-include/linux/interrupt.h @@ -1,2 +1,17 @@ -#include +#ifndef _BP_LINUX_INTERRUPT_H +#define _BP_LINUX_INTERRUPT_H +#include #include_next +#include + +#if LINUX_VERSION_IS_LESS(4,10,0) +static inline void backport_hrtimer_start(struct hrtimer *timer, s64 time, + const enum hrtimer_mode mode) +{ + ktime_t _time = { .tv64 = time }; + hrtimer_start(timer, _time, mode); +} +#define hrtimer_start LINUX_BACKPORT(hrtimer_start) +#endif + +#endif /* _BP_LINUX_INTERRUPT_H */