Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp499386pxu; Fri, 11 Dec 2020 07:19:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzI2DPIG/XmD5i6h16r/3QvdS/HxOpqy5FUh/Y0XiHjdbNWRxk3HglUFL+GhKN7Vm/IO+ut X-Received: by 2002:a50:d2c8:: with SMTP id q8mr11786145edg.375.1607699989786; Fri, 11 Dec 2020 07:19:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607699989; cv=none; d=google.com; s=arc-20160816; b=spYqY49ZR6Wk8jFC5QW9sXv1X/b72C+7Chk7wbAZFAOAfT1shZZQIhpQnWHILhJ5WJ qRYM1jiQnkEDaQATLUR5DX5o14tSLjGsI8HPvp5iSRjeyk4oVOs9BVBSoLVLbfhhafyB TS5DLnzvRkO+lnI397uZxPDcp/D1AeG13VAkCqp/T30gsASYulJBuefjwfqMRgwPElhp AXOdtI6QODNv2IJ27utz0DiwRESLFU+cBEA5m4pQJco9x0gYn/TsKDQDxUSGrph0TMtR 1ZmFyQlxCLHubTPWWjNJahTfxjxveHCUtPaQUdtDXar7+Ggf6uQlT715TV2CLw328rR5 ZruQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=TESHmCn+Bq2WpObkLNWdzchC5q4V2waVFFQ0aqRxjls=; b=YzMlbONERE+i4+7KpV9sgfc9eWi/WcUGx/xbnE4V2J0nys3uYAJr+zAM3rAA+6LX1R naSJG6HNW1S26diJweMtD5yq/h+EfENfCyWbbEI390xwEQLTsfqOkj58ueSpumQv5IUA QnqSYVdyA9fWnX2kM57L5hxmRyF9yzzmdsMcmcotERKspK3wfTnyqzVok/jChq5eD3a1 pS66Hd6opBgzUFcimE0jp4n4UOnB1RLjz0DZ3AYcn+E3LZHUdrigC7lL79nZpGTssD+3 I2SGATOYkhXQ8JBzBymt8z8ziSUovZIrQL9yv6eq2S7yKTKtkNUkZTrVYCNp6gfDNZdj LIUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt4si4631974ejc.439.2020.12.11.07.19.21; Fri, 11 Dec 2020 07:19:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390797AbgLJSbd (ORCPT + 99 others); Thu, 10 Dec 2020 13:31:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:42258 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390793AbgLJOeJ (ORCPT ); Thu, 10 Dec 2020 09:34:09 -0500 From: Greg Kroah-Hartman Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Randy Dunlap , Mike Snitzer Subject: [PATCH 4.19 36/39] dm writecache: remove BUG() and fail gracefully instead Date: Thu, 10 Dec 2020 15:27:15 +0100 Message-Id: <20201210142604.063339535@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201210142602.272595094@linuxfoundation.org> References: <20201210142602.272595094@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mike Snitzer commit 857c4c0a8b2888d806f4308c58f59a6a81a1dee9 upstream. Building on arch/s390/ results in this build error: cc1: some warnings being treated as errors ../drivers/md/dm-writecache.c: In function 'persistent_memory_claim': ../drivers/md/dm-writecache.c:323:1: error: no return statement in function returning non-void [-Werror=return-type] Fix this by replacing the BUG() with an -EOPNOTSUPP return. Fixes: 48debafe4f2f ("dm: add writecache target") Reported-by: Randy Dunlap Signed-off-by: Mike Snitzer Signed-off-by: Greg Kroah-Hartman --- drivers/md/dm-writecache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/md/dm-writecache.c +++ b/drivers/md/dm-writecache.c @@ -318,7 +318,7 @@ err1: #else static int persistent_memory_claim(struct dm_writecache *wc) { - BUG(); + return -EOPNOTSUPP; } #endif