From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30B83C4361B for ; Sat, 19 Dec 2020 08:20:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0404423BE2 for ; Sat, 19 Dec 2020 08:20:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726415AbgLSIUI (ORCPT ); Sat, 19 Dec 2020 03:20:08 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:9230 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726362AbgLSIUH (ORCPT ); Sat, 19 Dec 2020 03:20:07 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Cydsh31pmzksDV; Sat, 19 Dec 2020 16:18:32 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.9) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.498.0; Sat, 19 Dec 2020 16:19:13 +0800 From: Zhen Lei To: Dan Williams , Vishal Verma , Dave Jiang , linux-nvdimm , linux-kernel CC: Zhen Lei Subject: [PATCH v2 0/1] device-dax: avoid an unnecessary check in alloc_dev_dax_range() Date: Sat, 19 Dec 2020 16:18:39 +0800 Message-ID: <20201219081840.1149-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.174.177.9] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org v1 --> v2: In v1, I use the "goto" statement to merge two identical __release_region() calls. However, the new patch https://lkml.org/lkml/2020/12/18/735 deletes one of them, the "goto" becomes worthless. So when krealloc() failed, directly call __release_region() and return error code. Zhen Lei (1): device-dax: avoid an unnecessary check in alloc_dev_dax_range() drivers/dax/bus.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) -- 2.26.0.106.g9fadedd