From patchwork Mon Mar 22 11:45:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12154631 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2D21C433DB for ; Mon, 22 Mar 2021 11:48:34 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 961A461974 for ; Mon, 22 Mar 2021 11:48:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 961A461974 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=ya5IyFQAo40zY1QrmdSWVkLmMMXQgIMQzFHgOY5iYtE=; b=ZXGa7JU11d5fwWYarQ4bBtjyu1 h8UqzB0jNX8yiZiZFLrjzTKhlH4NZ0YUx4n2gfka0Zbs4w2uYsdaw0R/15lD7AXQFTtQyqFWM3qKl NucwMfj1IoOfv+w8JA8fDStQJtez1Bkh7RuF1H731PJjCpdhJEsSP3MkweHQsZv2k4axOQ5xktaIE bfZs8+LkAg1aBysUmORRlbZ53wekai7BV+KRPqTk/SStIVpZAJ7ZzX3Sr81fsPlsy2/bzLSARIpku AThjysN1T52ttenw5NIXBedlkorvH1M1LYMqb0m3lft0imA8CiYzZrR3GEaTWHUSY+NCCfYn31XFf JsFmaLVQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lOJ0z-00BV67-WB; Mon, 22 Mar 2021 11:46:34 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lOJ0d-00BV3f-5I for linux-arm-kernel@lists.infradead.org; Mon, 22 Mar 2021 11:46:13 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9C65561974; Mon, 22 Mar 2021 11:46:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616413569; bh=f2OpoXVZq2VLNR6MAxUr6Q1I6s2tmGFmatpyYC67wZQ=; h=From:To:Cc:Subject:Date:From; b=SMaTgT2/UajX+rHFJSLyguksEtzAaOh8dvO5ge1cGMoEhpoaLW5rVviXG3JX/JXie g7dH9ELKvfILnLyleI5HE8SuhkuSt7GjuKX1QhBVQhXfDaMpoo9ZbTrMKNFGvDMJmf JRU3yQDch+LBxu99YMsLM+xvrLeNte915SNqe0Omf3zuq/+K3aQnQ9u/ViNsZGg5Je SAq2b1fD75WkYU9kzSHHyWA4e1APB6iJn/9hOFEy1qQ9mJDkXHw4s/6ou6nx6DWgcq ykPjbzouiqahhWYPUzy5NuGXmeOuOAfuSpJp0V7Z0W/6HNuDqmA9DuYW/dKdUlMY57 G62aQ3mOVGJPQ== From: Arnd Bergmann To: Russell King Cc: Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] ARM: kprobes: address gcc -Wempty-body warning Date: Mon, 22 Mar 2021 12:45:50 +0100 Message-Id: <20210322114600.3528031-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210322_114612_055680_42C82D7E X-CRM114-Status: GOOD ( 12.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann Building with 'make W=1' shows a warning in some configurations when 'verbose()' is defined to be empty. arch/arm/probes/kprobes/test-core.c: In function 'kprobes_test_case_start': arch/arm/probes/kprobes/test-core.c:1367:26: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body] 1367 | current_instruction); | ^ Change the definition of verbose() to use no_printk(), allowing format string checking and avoiding the warning. Signed-off-by: Arnd Bergmann --- arch/arm/probes/kprobes/test-core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/probes/kprobes/test-core.h b/arch/arm/probes/kprobes/test-core.h index 19a5b2add41e..6e42c0dd82a5 100644 --- a/arch/arm/probes/kprobes/test-core.h +++ b/arch/arm/probes/kprobes/test-core.h @@ -98,7 +98,7 @@ struct test_arg_end { #if VERBOSE #define verbose(fmt, ...) pr_info(fmt, ##__VA_ARGS__) #else -#define verbose(fmt, ...) +#define verbose(fmt, ...) no_printk(fmt, ##__VA_ARGS__) #endif #define TEST_GROUP(title) \