From patchwork Sun Nov 12 21:19:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 10054927 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 8D6BA60586 for ; Sun, 12 Nov 2017 21:19:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F02E293E8 for ; Sun, 12 Nov 2017 21:19:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7343A293F8; Sun, 12 Nov 2017 21:19:47 +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=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 0DBFE293E8 for ; Sun, 12 Nov 2017 21:19:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750961AbdKLVTp (ORCPT ); Sun, 12 Nov 2017 16:19:45 -0500 Received: from mail-wr0-f195.google.com ([209.85.128.195]:55930 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751059AbdKLVTm (ORCPT ); Sun, 12 Nov 2017 16:19:42 -0500 Received: by mail-wr0-f195.google.com with SMTP id l8so12748571wre.12 for ; Sun, 12 Nov 2017 13:19:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tfXiS1FRH+U4oTP10fNvzlqcgZBqACG2jcOvWf/BO70=; b=gcJDhA3IMB/kwR+RU6+Mogm/d5Dkb7tG8SM9toqgwMmMFVfaMdkdaLuTZBACwJSZ3s RcSuJ/OhmtIRi5ydr1BLpawJtgJTt3+QJZYZHZy6SMI7Swjko1KatH1p/ihhj+ZJHVst sEx1XcibmkpLrrXwxENaX4uSSiw4F1ujqJsLQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=tfXiS1FRH+U4oTP10fNvzlqcgZBqACG2jcOvWf/BO70=; b=LjWyylvA49u8L82bhQ4jA0945f4SzPg2CkX7UWvsbQaUsOhq9g5R6EhKNNJDC/+T0s 8ROgF74LEgHNE5H31YL7KHIJ2+YvXfslD2K0gYoJXSGgeT18WMksI696hdV8FVbLD0HL CH0Nr+/pLHYBx/GZxm5pTi3eRpl3gJkOtV1dlsegTiCYMDeCa1xTAqRQpJ5OWQIk2mgY sZym1Uwf87Kd9YyYSdD4OQoAB0Qgh1t14DVtE9wdnYS6MBPSLyxOa9ShViF5jfVK/brm /4GZfLO1VZzJqkBKqyds39p1M4YnKbKLkS/ZCGZ38yuc8M/MwmnX8Y+XXWYPmsvHQrvP kx9g== X-Gm-Message-State: AJaThX5wrVvw9gvyOvtpSx4l3Lvs00FsQ6yo0ExYA3utXJmVjHmSI/L2 fsHh8TW+vhh2yNCEWgBkvHmjpw== X-Google-Smtp-Source: AGs4zMZYSQXIjwz7/O2QQDCJj/R79T7Xd1VW7hm3D6yTjWCzvDnXBEzi/5DIGY9Quxey7KyRXo1fpA== X-Received: by 10.223.144.71 with SMTP id h65mr5706686wrh.41.1510521581437; Sun, 12 Nov 2017 13:19:41 -0800 (PST) Received: from wildmoose.dk ([2a01:488:66:1000:57e6:57d1:0:1]) by smtp.gmail.com with ESMTPSA id k69sm8763147wmg.45.2017.11.12.13.19.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Nov 2017 13:19:41 -0800 (PST) From: Rasmus Villemoes To: Kees Cook , Jean Delvare Cc: Rasmus Villemoes , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] hwmon: (applesmc) Apply format_template attribute Date: Sun, 12 Nov 2017 22:19:08 +0100 Message-Id: <20171112211911.27779-2-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171112211911.27779-1-linux@rasmusvillemoes.dk> References: <20171112211911.27779-1-linux@rasmusvillemoes.dk> Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This serves as human-readable documentation as well as allowing the format_template plugin to complain about any static initializers of this struct member that do not have the same set of printf specifiers. Signed-off-by: Rasmus Villemoes --- drivers/hwmon/applesmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c index 5c677ba44014..9e6d23cba23e 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c @@ -110,7 +110,7 @@ struct applesmc_dev_attr { /* Dynamic device node group */ struct applesmc_node_group { - char *format; /* format string */ + char *format __format_template("%d"); /* format string */ void *show; /* show function */ void *store; /* store function */ int option; /* function argument */