Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752132AbcDUTxe (ORCPT ); Thu, 21 Apr 2016 15:53:34 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:34553 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751806AbcDUTxb (ORCPT ); Thu, 21 Apr 2016 15:53:31 -0400 Date: Thu, 21 Apr 2016 12:53:29 -0700 From: Kees Cook To: James Morris Cc: Andy Shevchenko , Mimi Zohar , Joe Perches , Andrew Morton , "Serge E. Hallyn" , Jonathan Corbet , Kalle Valo , Mauro Carvalho Chehab , Guenter Roeck , Jiri Slaby , Paul Moore , Stephen Smalley , Casey Schaufler , Andreas Gruenbacher , Rasmus Villemoes , Ulf Hansson , Vitaly Kuznetsov , linux-security-module , LKML , "linux-doc@vger.kernel.org" Subject: [PATCH] fs: fix over-zealous use of "const" Message-ID: <20160421195329.GA10362@www.outflux.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1127 Lines: 34 When I was fixing up const recommendations from checkpatch.pl, I went overboard. This fixes the warning (during a W=1 build): include/linux/fs.h:2627:74: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] static inline const char * const kernel_read_file_id_str(enum kernel_read_file_id id) Reported-by: Andy Shevchenko Signed-off-by: Kees Cook --- This is for linux-security next --- include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 518716b4834e..82f9a2db3b1a 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2610,7 +2610,7 @@ static const char * const kernel_read_file_str[] = { __kernel_read_file_id(__fid_stringify) }; -static inline const char * const kernel_read_file_id_str(enum kernel_read_file_id id) +static inline const char *kernel_read_file_id_str(enum kernel_read_file_id id) { if (id < 0 || id >= READING_MAX_ID) return kernel_read_file_str[READING_UNKNOWN]; -- 2.6.3 -- Kees Cook Chrome OS & Brillo Security