From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751470AbdKLVTt (ORCPT ); Sun, 12 Nov 2017 16:19:49 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35956 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751274AbdKLVTp (ORCPT ); Sun, 12 Nov 2017 16:19:45 -0500 X-Google-Smtp-Source: AGs4zMYSnIWCvwpxJ5s2foB5UvI46C9UE3yngwApS/XgUsIYGBxcChW+DSUEIkkmoLsWYW9e3XISkQ== From: Rasmus Villemoes To: Kees Cook , Greg Kroah-Hartman Cc: Rasmus Villemoes , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] USB: Add format_template attribute to struct usb_class_driver Date: Sun, 12 Nov 2017 22:19:11 +0100 Message-Id: <20171112211911.27779-5-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-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- include/linux/usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/usb.h b/include/linux/usb.h index 9c63792a8134..8d48c0cd1c01 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -1236,7 +1236,7 @@ extern struct bus_type usb_bus_type; * parameters used for them. */ struct usb_class_driver { - char *name; + char *name __format_template("foobar_%d"); char *(*devnode)(struct device *dev, umode_t *mode); const struct file_operations *fops; int minor_base; -- 2.11.0