From patchwork Fri Jun 22 08:01:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 139579 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp572575lji; Fri, 22 Jun 2018 01:01:26 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLQwaviE4oy4/zPlhq+nNHDdEq5Kiv+/aPH80LBpDhjcMOvrqSUvI4pum/rEwGKUXN4msud X-Received: by 2002:a17:902:206:: with SMTP id 6-v6mr581572plc.294.1529654486759; Fri, 22 Jun 2018 01:01:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529654486; cv=none; d=google.com; s=arc-20160816; b=lVsaXZ4AHoExv81zs+CSGM0aiNbsCj04/mWAv7bBDr1ak+1PwQ8Vb34LongQzmRfT9 mhy+ulJY+N2lwBqXNpQZEaJ1Cwodti52afAnAI0QNWM6kya7qEx4/dHd3NwVg72HITB4 WK2qG9k2JBDPnNCPCrSFpsQvAz4HZHkEViWfe3eqHEds423m/i4IBCH5Z7k05FhDrT1G BmsamuEAHh5zzXdooxjCWcAYdrL/p5XyzRvgqdF6iQeRmo46awnUU/LytrtNGKruLafn WBGC2zYAAxDp9AUhfVvkdGYvmhsgZVOMumK1iRcXVV4wGl9uVN59AwSzQfFkJ0wE1Jpx KfoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=0m4L30Q2ij4N39mDGoUqNSOtWa9eB8+V6K7+uIFI5fc=; b=ASPCPRgFpsWLKMpz0njGHUITym6DP/3yjUG8fDmupkl7KgglUYhJmLoGck/2ALV4aN CF8pc++WIvja0PueyE+z+qaAa8jtvirY/514QaxRDQziNEpjX4cAxjhUtD8hEuj5fV3q 2OQyuQbyc8SHGaTcypwcJUiz2CpJJB5zmEdJPIOAntS0pP3ctRtEHxI0SL8Yw8dqAa9z WR8etSLiFYPDA3GVLpyc+f6x5ETHa9pW21QUdHJ0InXrGtBcgf/vzO+Q+n6fRPHLL8uc x6R+/AJTMQVMNpCj/WoWcLnXAgZk8RAGS3x/dSAzVZcHkTdEXxcseKJWFAUk7gqeOxGB YTTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v11-v6si5738572pgr.136.2018.06.22.01.01.26; Fri, 22 Jun 2018 01:01:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752569AbeFVIBY (ORCPT + 30 others); Fri, 22 Jun 2018 04:01:24 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:44808 "EHLO andre.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751182AbeFVIBX (ORCPT ); Fri, 22 Jun 2018 04:01:23 -0400 Received: from ayla.of.borg ([84.194.111.163]) by andre.telenet-ops.be with bizsmtp id 1k1N1y0043XaVaC01k1NSJ; Fri, 22 Jun 2018 10:01:22 +0200 Received: from rox.of.borg ([192.168.97.57]) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1fWH0T-0008OL-U4; Fri, 22 Jun 2018 10:01:21 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1fWH0T-0004QV-Rz; Fri, 22 Jun 2018 10:01:21 +0200 From: Geert Uytterhoeven To: Alasdair Kergon , Mike Snitzer , Arnd Bergmann Cc: dm-devel@redhat.com, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] dm raid: don't use 'const' in function return Date: Fri, 22 Jun 2018 10:01:19 +0200 Message-Id: <20180622080119.16970-1-geert@linux-m68k.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann 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") Signed-off-by: Mike Snitzer Fixes: 552aa679f2657431 ("dm raid: use rs_is_raid*()") Signed-off-by: Geert Uytterhoeven --- Cherry-picked from 68c1c4d5eafc65dd ("dm raid: don't use 'const' in function return") with new Fixes tag, as the issue has been reintroduced. --- drivers/md/dm-raid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index ab13fcec3fca046c..75df4c9d8b541de4 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -588,7 +588,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;