mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Kees Cook <keescook@chromium.org>, Jean Delvare <jdelvare@suse.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	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	[thread overview]
Message-ID: <20171112211911.27779-2-linux@rasmusvillemoes.dk> (raw)
In-Reply-To: <20171112211911.27779-1-linux@rasmusvillemoes.dk>

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 <linux@rasmusvillemoes.dk>
---
 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 */
-- 
2.11.0

  reply	other threads:[~2017-11-12 21:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-12 21:19 [PATCH 1/5] plugins: implement " Rasmus Villemoes
2017-11-12 21:19 ` Rasmus Villemoes [this message]
2017-11-12 21:19 ` [PATCH 3/5] staging: speakup: Apply " Rasmus Villemoes
2017-11-13 14:00   ` Greg Kroah-Hartman
2017-11-12 21:19 ` [PATCH 4/5] linux/smpboot.h: " Rasmus Villemoes
2017-11-12 23:01   ` Thomas Gleixner
2017-11-12 21:19 ` [PATCH 5/5] USB: Add format_template attribute to struct usb_class_driver Rasmus Villemoes
2017-11-13 14:00   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171112211911.27779-2-linux@rasmusvillemoes.dk \
    --to=linux@rasmusvillemoes.dk \
    --cc=jdelvare@suse.com \
    --cc=keescook@chromium.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®