From patchwork Fri Nov 11 07:18:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bo Liu X-Patchwork-Id: 18512 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp595549wru; Thu, 10 Nov 2022 23:32:23 -0800 (PST) X-Google-Smtp-Source: AA0mqf7cX2iF7O3hj3x5+4oc5nuDQGUVQw9kvZQJVxOrnkDsoDxZiHu321C32V2mczI27luUf+o7 X-Received: by 2002:a17:902:c7d1:b0:187:3157:a0ee with SMTP id r17-20020a170902c7d100b001873157a0eemr1293817pla.146.1668151943635; Thu, 10 Nov 2022 23:32:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668151943; cv=none; d=google.com; s=arc-20160816; b=0BUrj+z+a9VAI+mPDZE9LwXN7uHWiY18guX3APiGXf+E6TqaaTjm61rOQnKnVKjHOj ffU514zoKtQnVfzuyyo2o6b/OTDEil2htr31Bfd/Nb56ZkrNaCPZ4gp8SInOURXp7vbY e4oJUh4QVOZSkcZ5YsLtsZsmZIYy4a+VSyl+7E7A+ZMQ8msetErLaT9h68Bb4ht+SnpT R9LKB0hgXlK4Zh/i3iWOGKVC2meJZKgazhYF5Lc6tiTz9wz2HuRzJIwRzjUyKnFpX4HD UxO4dIq0GO2wpSIPpEGP/uCPlqaTsdGTNWnunHT2DGa8zgs3R5c8lKRe4fdUtO6JvMzA 5lrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:abuse-reports-to:tuid:mime-version:message-id :date:subject:cc:to:from; bh=43KZmdTtSJjXolPit83T1q85Ez0oBnDY6rBZc+3tWt8=; b=jKmfF9RzByf/0q+cFpfVK36tIu3I9JVGj82gz+cm5QbIC5NFKBr3GzPO7uA2UN4B5Q uXABS+zOAUW8kEIu17pPlajkoAPml98oNwzd9q8Q1NEGFSSI9FuAu0svPReI5aOfwN7y IYIZK9gctdOSZk7KMfvBebQCNVRmQGtbnGMT8KV5dG9u+ReB0uOW1eGGtl3TN2Ejz/Re iu37SGDY8qv/kTrL7EC+3Uhudw3GNJ8I6o2r6I0WV6GxcCO3jVez3MyvFX21hY44u9aP 8tB+YNSDSs2v+Y42QGIHF1TJn0g2MtaS/YxDmBL8RaJ3HAdywkdGvIrm/XHd8X6rd52P 9+2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l27-20020a63ba5b000000b0046eecbac47esi1792508pgu.28.2022.11.10.23.32.09; Thu, 10 Nov 2022 23:32:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232841AbiKKHST (ORCPT + 99 others); Fri, 11 Nov 2022 02:18:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231681AbiKKHSR (ORCPT ); Fri, 11 Nov 2022 02:18:17 -0500 Received: from ssh248.corpemail.net (ssh248.corpemail.net [210.51.61.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A2FC71F05 for ; Thu, 10 Nov 2022 23:18:16 -0800 (PST) Received: from ([60.208.111.195]) by ssh248.corpemail.net ((D)) with ASMTP (SSL) id FID00010; Fri, 11 Nov 2022 15:18:10 +0800 Received: from localhost.localdomain (10.200.104.97) by jtjnmail201603.home.langchao.com (10.100.2.3) with Microsoft SMTP Server id 15.1.2507.12; Fri, 11 Nov 2022 15:18:11 +0800 From: Bo Liu To: CC: , , Bo Liu Subject: [PATCH] clkdev: Supply __printf(x, y) formatting Date: Fri, 11 Nov 2022 02:18:09 -0500 Message-ID: <20221111071809.3440-1-liubo03@inspur.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Originating-IP: [10.200.104.97] tUid: 20221111151810a5d0e498c2970590af15f454dcaae59d X-Abuse-Reports-To: service@corp-email.com Abuse-Reports-To: service@corp-email.com X-Complaints-To: service@corp-email.com X-Report-Abuse-To: service@corp-email.com X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749184092406578501?= X-GMAIL-MSGID: =?utf-8?q?1749184092406578501?= Fixes the following W=1 kernel build warning(s): drivers/clk/clkdev.c:173:3: warning: function 'vclkdev_alloc' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] vscnprintf(cla->dev_id, sizeof(cla->dev_id), dev_fmt, ap); ^~~~~~~~~~ drivers/clk/clkdev.c:187:2: warning: function 'vclkdev_create' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] cl = vclkdev_alloc(hw, con_id, dev_fmt, ap); ^~ drivers/clk/clkdev.c:278:2: warning: function '__clk_register_clkdev' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] cl = vclkdev_create(hw, con_id, dev_id, ap); ^~ Signed-off-by: Bo Liu --- drivers/clk/clkdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c index ee37d0be6877..07f5cd49f830 100644 --- a/drivers/clk/clkdev.c +++ b/drivers/clk/clkdev.c @@ -153,6 +153,7 @@ struct clk_lookup_alloc { char con_id[MAX_CON_ID]; }; +__printf(3, 0) static struct clk_lookup * __ref vclkdev_alloc(struct clk_hw *hw, const char *con_id, const char *dev_fmt, va_list ap) @@ -177,6 +178,7 @@ vclkdev_alloc(struct clk_hw *hw, const char *con_id, const char *dev_fmt, return &cla->cl; } +__printf(3, 0) static struct clk_lookup * vclkdev_create(struct clk_hw *hw, const char *con_id, const char *dev_fmt, va_list ap) @@ -265,6 +267,7 @@ void clkdev_drop(struct clk_lookup *cl) } EXPORT_SYMBOL(clkdev_drop); +__printf(3, 4) static struct clk_lookup *__clk_register_clkdev(struct clk_hw *hw, const char *con_id, const char *dev_id, ...)