Received: by 10.223.185.116 with SMTP id b49csp65522wrg; Thu, 8 Mar 2018 13:00:04 -0800 (PST) X-Google-Smtp-Source: AG47ELv8I0HlV+c+6v8y9FlNR7XZRl2cIngEBnXphZPK9HpFgfJubGOaFJODFWHD+wpAxJPaPddt X-Received: by 10.98.180.13 with SMTP id h13mr27449256pfn.139.1520542804299; Thu, 08 Mar 2018 13:00:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520542804; cv=none; d=google.com; s=arc-20160816; b=wNVuJnNuseNQSu09rcwZFfYOrZvSNPXF3Lkml00KdlQSC8M/lyR9Q0K83YxrnbNexJ Y50Dun26PFv52W6JAv0RgJShBrks7BNls/AZMdvfsHAd/Evn0YorfggBZl7OJDWSuaGH VlZrm+ZqhQ9vut8f9VpeH1Cf2Oyhl1C1usKYXa29Y3CKRcnT0+u2Zq9ihiISdHplVgOA iIRGfR5I4NvCxaJkUBfcuGoLehYTb0H2B3C+NLewvNNw2YenDh+tE0OYncgOAu3NPFwe 2lCAR3dbomHulIbZmePmoo2bm80/86BoWiFTqaWnm1eMZQGvo8LcYuUD3APjSjes3Bc1 3c3g== 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 :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=brLY6f2fxH9oiyPU71UsEE46Qqsgz+biuiowpMAGfOc=; b=wpoE/L5+kpougnIBlavsLoHXQzoU4XwwFM0EF9fFMd3KZtGfVqfd7BN750FD+6YDM3 gMU2Y3xE5vtufKG0i8aavjnUMLWL+X3o0AZsBOu+PAbQO0+pzJzXQ7Sz9Utw1cnV5+lp cbUGB3+dH1oPr1QuOHoGE8D5nwtFijpXtOHpyROROmgZ8Eck6J/g8f+9TDS9m+BxxFO7 SXTwoMkKnFS9j57+j0I2Vjk/LUANXE2U69/CtvkkLUZGdns5zi/+MEVQhZ29QG2Z3j19 852CMYqS69fBT/EdpAWugau6uSHHmpquN712aJzmNKaM2L7HdKKonw8VMQEa8wj/PHVW RS5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=TZJZB3dR; 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 e3si13504020pgv.79.2018.03.08.12.59.49; Thu, 08 Mar 2018 13:00:04 -0800 (PST) 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=fail header.i=@gmail.com header.s=20161025 header.b=TZJZB3dR; 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 S1751243AbeCHU6x (ORCPT + 99 others); Thu, 8 Mar 2018 15:58:53 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:33746 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750898AbeCHU6v (ORCPT ); Thu, 8 Mar 2018 15:58:51 -0500 Received: by mail-wr0-f195.google.com with SMTP id v18so7043079wrv.0 for ; Thu, 08 Mar 2018 12:58:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=brLY6f2fxH9oiyPU71UsEE46Qqsgz+biuiowpMAGfOc=; b=TZJZB3dRczW4by7zN+Bp1dUEWyCEXuAtASvuMTk4Sz+LMfLI+1gMndLcAuHbfsce6U B0Rm03iUSQ0gfwx5INsqvLmn97kdAs299aP+qwp3TfGhmS8/OSyVXpy0OHV4/IenV7Gq AU/SbMK9WAK4/GLQwYUC1MFvdwlUIDLzWDeN/p5AzFD+Egu/OEct597lHlEAZgp1qDd3 PY0pRglh9Sgr87gBLwht5USzTbPhRs+p35CwJDVzkLVsBc6G5jcV7hDrgeGrVbBw4c4c E1kiTu4ThiNuirc/aU9tnqeea7tOUp3TD+zm/Bzl7Jr9VKcQh05Z6RW6jRHplX3D2tBy Bjnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=brLY6f2fxH9oiyPU71UsEE46Qqsgz+biuiowpMAGfOc=; b=FPnusZ8OmuZvMgBj6BC8Qt5Xg0tnz2DL5BUSZ400jj8BmU2q0mctxyTXzI+LM+ZEF6 GDaT7jhgTTi9UQ2seK2LqGqyOtWdqKBAFM6KIXk4J+MAIdRJsH2MiU8wkIO68lY1pWMc oZQKxtCA87kP2qUb8Pb80co7k70d8DdgR3j68jZh5/VLGHPurGCzmcad/X/SMzPmBSro kM6kDvplJf4GAGEEnpX0xR06bwON1FOEPGEhgqWsta2AGm1sJtvbEGwzES2DmVZ7dOgC +GiuBwVd2GDj8kcgGeXbLCmm4bcR/khI73NxPdagrHYjFegwRJ21vmzUMIuqhD4G6lUa +0ug== X-Gm-Message-State: APf1xPAg0sH3CHq2FDYwJ/nEDGixLbsCi3ojHgG49j9QlmOm6ERZeNE3 zzBouRzw+AH6qakA5ILP8rg= X-Received: by 10.223.160.157 with SMTP id m29mr23786295wrm.119.1520542730608; Thu, 08 Mar 2018 12:58:50 -0800 (PST) Received: from macbookpro.malat.net (bru31-1-78-225-226-121.fbx.proxad.net. [78.225.226.121]) by smtp.gmail.com with ESMTPSA id d8sm13960088wmd.20.2018.03.08.12.58.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Mar 2018 12:58:49 -0800 (PST) Received: by macbookpro.malat.net (Postfix, from userid 1000) id F12E610C03F3; Thu, 8 Mar 2018 21:58:48 +0100 (CET) From: Mathieu Malaterre To: Steven Rostedt Cc: Mathieu Malaterre , Ingo Molnar , linux-kernel@vger.kernel.org Subject: [PATCH] trace: Use __printf markup to silence compiler Date: Thu, 8 Mar 2018 21:58:43 +0100 Message-Id: <20180308205843.27447-1-malat@debian.org> X-Mailer: git-send-email 2.11.0 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 Silence warnings (triggered at W=1) by adding relevant __printf attributes. CC kernel/trace/trace.o kernel/trace/trace.c: In function ‘__trace_array_vprintk’: kernel/trace/trace.c:2979:2: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] len = vscnprintf(tbuffer, TRACE_BUF_SIZE, fmt, args); ^~~ AR kernel/trace/built-in.o Signed-off-by: Mathieu Malaterre --- kernel/trace/trace.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 926718fa846d..117e246d0a49 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -2949,6 +2949,7 @@ int trace_vbprintk(unsigned long ip, const char *fmt, va_list args) } EXPORT_SYMBOL_GPL(trace_vbprintk); +__printf(3, 0) static int __trace_array_vprintk(struct ring_buffer *buffer, unsigned long ip, const char *fmt, va_list args) @@ -3003,12 +3004,14 @@ __trace_array_vprintk(struct ring_buffer *buffer, return len; } +__printf(3, 0) int trace_array_vprintk(struct trace_array *tr, unsigned long ip, const char *fmt, va_list args) { return __trace_array_vprintk(tr->trace_buffer.buffer, ip, fmt, args); } +__printf(3, 0) int trace_array_printk(struct trace_array *tr, unsigned long ip, const char *fmt, ...) { @@ -3024,6 +3027,7 @@ int trace_array_printk(struct trace_array *tr, return ret; } +__printf(3, 4) int trace_array_printk_buf(struct ring_buffer *buffer, unsigned long ip, const char *fmt, ...) { @@ -3039,6 +3043,7 @@ int trace_array_printk_buf(struct ring_buffer *buffer, return ret; } +__printf(2, 0) int trace_vprintk(unsigned long ip, const char *fmt, va_list args) { return trace_array_vprintk(&global_trace, ip, fmt, args); -- 2.11.0