From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754434AbcFPQVb (ORCPT ); Thu, 16 Jun 2016 12:21:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38787 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751490AbcFPQV3 (ORCPT ); Thu, 16 Jun 2016 12:21:29 -0400 Subject: Re: [PATCH] dm raid: don't use 'const' in function return To: Arnd Bergmann , Mike Snitzer References: <20160616090359.984712-1-arnd@arndb.de> Cc: Alasdair Kergon , dm-devel@redhat.com, Shaohua Li , linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org From: Heinz Mauelshagen Message-ID: <5762D205.9090706@redhat.com> Date: Thu, 16 Jun 2016 18:21:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: <20160616090359.984712-1-arnd@arndb.de> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 16 Jun 2016 16:21:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks Arnd. On 06/16/2016 11:03 AM, Arnd Bergmann wrote: > A newly introduced function has 'const int' as the return type, > but as "make W=1" reports, that has no meaning: > > drivers/md/dm-raid.c:510:18: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers] > > This changes the return type to plain 'int'. > > Signed-off-by: Arnd Bergmann > Fixes: 33e53f06850f ("dm raid: introduce extended superblock and new raid types to support takeover/reshaping") > --- > drivers/md/dm-raid.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c > index 96bcff7a0b94..55d25ac87bda 100644 > --- a/drivers/md/dm-raid.c > +++ b/drivers/md/dm-raid.c > @@ -507,7 +507,7 @@ static const char *raid10_md_layout_to_format(int layout) > } > > /* Return md raid10 algorithm for @name */ > -static const int raid10_name_to_format(const char *name) > +static int raid10_name_to_format(const char *name) > { > if (!strcasecmp(name, "near")) > return ALGORITHM_RAID10_NEAR;