From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751516AbdKLVUk (ORCPT ); Sun, 12 Nov 2017 16:20:40 -0500 Received: from mail-wm0-f65.google.com ([74.125.82.65]:32899 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751099AbdKLVTn (ORCPT ); Sun, 12 Nov 2017 16:19:43 -0500 X-Google-Smtp-Source: AGs4zMY/RkGjkLA+pQgQWpvuDC1OdgRY8+4Djaqmyu3Z1W8xN5TYucppdR1rByH1bg1YohbcR3vN/Q== From: Rasmus Villemoes To: Kees Cook , Greg Kroah-Hartman Cc: Rasmus Villemoes , speakup@linux-speakup.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] staging: speakup: Apply format_template attribute Date: Sun, 12 Nov 2017 22:19:09 +0100 Message-Id: <20171112211911.27779-3-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 --- drivers/staging/speakup/spk_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/speakup/spk_types.h b/drivers/staging/speakup/spk_types.h index c50de6035a9a..156000c0c4d3 100644 --- a/drivers/staging/speakup/spk_types.h +++ b/drivers/staging/speakup/spk_types.h @@ -108,7 +108,7 @@ struct st_var_header { }; struct num_var_t { - char *synth_fmt; + char *synth_fmt __format_template("%d"); int default_val; int low; int high; -- 2.11.0