From patchwork Thu May 17 10:47:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 10406339 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 DB8C160230 for ; Thu, 17 May 2018 10:47:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9DDD28A6B for ; Thu, 17 May 2018 10:47:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD99828A6E; Thu, 17 May 2018 10:47:19 +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=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, 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 AB43C28A6B for ; Thu, 17 May 2018 10:47:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751396AbeEQKrS (ORCPT ); Thu, 17 May 2018 06:47:18 -0400 Received: from mx2.suse.de ([195.135.220.15]:50203 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751481AbeEQKrR (ORCPT ); Thu, 17 May 2018 06:47:17 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 143A1AE6C; Thu, 17 May 2018 10:47:16 +0000 (UTC) From: Petr Vorel To: linux-integrity@vger.kernel.org Cc: Linux-Next Mailing List , Linux Kernel Mailing List , Petr Vorel , Mimi Zohar Subject: [PATCH] ima: Fix pr_fmt() redefinition Date: Thu, 17 May 2018 12:47:02 +0200 Message-Id: <20180517104702.24689-1-pvorel@suse.cz> X-Mailer: git-send-email 2.16.3 Sender: linux-integrity-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-integrity@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Previous definition was too late and caused problems in powerpc allyesconfig: security/integrity/ima/ima_kexec.c:18:0: warning: "pr_fmt" redefined #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt In file included from include/linux/kernel.h:14:0, from include/asm-generic/bug.h:18, from arch/powerpc/include/asm/bug.h:128, from include/linux/bug.h:5, from include/linux/seq_file.h:7, from security/integrity/ima/ima_kexec.c:13: include/linux/printk.h:288:0: note: this is the location of the previous definition #define pr_fmt(fmt) fmt Fixes: 3dea0d93d257 ("ima: Unify logging") Signed-off-by: Petr Vorel Reported-by: Stephen Rothwell --- security/integrity/ima/ima_kexec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/integrity/ima/ima_kexec.c b/security/integrity/ima/ima_kexec.c index db0de585f6c0..16bd18747cfa 100644 --- a/security/integrity/ima/ima_kexec.c +++ b/security/integrity/ima/ima_kexec.c @@ -10,13 +10,13 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include #include "ima.h" -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt - #ifdef CONFIG_IMA_KEXEC static int ima_dump_measurement_list(unsigned long *buffer_size, void **buffer, unsigned long segment_size)