From patchwork Wed Oct 28 00:38:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 311293 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=-12.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, 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 A921DC4363A for ; Thu, 29 Oct 2020 00:13:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6F43920780 for ; Thu, 29 Oct 2020 00:13:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390778AbgJ2ANS (ORCPT ); Wed, 28 Oct 2020 20:13:18 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:50732 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725940AbgJ2ANO (ORCPT ); Wed, 28 Oct 2020 20:13:14 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1kXZUR-003toZ-5U; Wed, 28 Oct 2020 01:38:59 +0100 From: Andrew Lunn To: Jakub Kicinski Cc: netdev , Gerrit Renker , Jon Maloy , Ying Xue , Andrew Lunn Subject: [PATCH net-next 1/2] net: dccp: Add __printf() markup to fix -Wsuggest-attribute=format Date: Wed, 28 Oct 2020 01:38:48 +0100 Message-Id: <20201028003849.929490-2-andrew@lunn.ch> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201028003849.929490-1-andrew@lunn.ch> References: <20201028003849.929490-1-andrew@lunn.ch> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org net/dccp/ccid.c: In function ‘ccid_kmem_cache_create’: net/dccp/ccid.c:85:2: warning: function ‘ccid_kmem_cache_create’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] 85 | vsnprintf(slab_name_fmt, CCID_SLAB_NAME_LENGTH, fmt, args); Signed-off-by: Andrew Lunn --- net/dccp/ccid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/dccp/ccid.c b/net/dccp/ccid.c index 1e9bb121ba72..6beac5d348e2 100644 --- a/net/dccp/ccid.c +++ b/net/dccp/ccid.c @@ -76,7 +76,7 @@ int ccid_getsockopt_builtin_ccids(struct sock *sk, int len, return err; } -static struct kmem_cache *ccid_kmem_cache_create(int obj_size, char *slab_name_fmt, const char *fmt,...) +static __printf(3, 4) struct kmem_cache *ccid_kmem_cache_create(int obj_size, char *slab_name_fmt, const char *fmt,...) { struct kmem_cache *slab; va_list args;