From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754963AbdCaTZy (ORCPT ); Fri, 31 Mar 2017 15:25:54 -0400 Received: from mx1.polytechnique.org ([129.104.30.34]:44220 "EHLO mx1.polytechnique.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753724AbdCaTZx (ORCPT ); Fri, 31 Mar 2017 15:25:53 -0400 From: Nicolas Iooss To: Benjamin Gaignard , Vincent Abriou Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Nicolas Iooss Subject: [PATCH 1/1] drm/sti: use seq_puts to display a string Date: Fri, 31 Mar 2017 21:25:07 +0200 Message-Id: <20170331192507.20538-1-nicolas.iooss_linux@m4x.org> X-Mailer: git-send-email 2.11.1 X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Fri Mar 31 21:25:49 2017 +0200 (CEST)) X-Spam-Flag: No, tests=bogofilter, spamicity=0.000023, queueID=EB96456497E Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org gdp_dbg_ctl() uses seq_printf() to display a color format name even though there is no format string. When using -Wformat-string, gcc reports the following warning: drivers/gpu/drm/sti/sti_gdp.c: In function 'gdp_dbg_ctl': drivers/gpu/drm/sti/sti_gdp.c:150:18: warning: format not a string literal and no format arguments [-Wformat-security] seq_printf(s, gdp_format_to_str[i].name); ^~~~~~~~~~~~~~~~~ Silence this warning by using seq_puts() instead. Signed-off-by: Nicolas Iooss --- drivers/gpu/drm/sti/sti_gdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sti/sti_gdp.c b/drivers/gpu/drm/sti/sti_gdp.c index 86279f5022c2..1bbfcf01d401 100644 --- a/drivers/gpu/drm/sti/sti_gdp.c +++ b/drivers/gpu/drm/sti/sti_gdp.c @@ -147,7 +147,7 @@ static void gdp_dbg_ctl(struct seq_file *s, int val) seq_puts(s, "\tColor:"); for (i = 0; i < ARRAY_SIZE(gdp_format_to_str); i++) { if (gdp_format_to_str[i].format == (val & 0x1F)) { - seq_printf(s, gdp_format_to_str[i].name); + seq_puts(s, gdp_format_to_str[i].name); break; } } -- 2.11.1