Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp5375555pxb; Mon, 28 Mar 2022 11:37:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzj//IKQ+I5ZkoqXC1stLRDLC6DomoKi/oHhS9H5qQhKzZjsOIxVR+yRcGiorSmVlbdJClO X-Received: by 2002:a05:6808:1a88:b0:2da:5795:b3e with SMTP id bm8-20020a0568081a8800b002da57950b3emr274261oib.15.1648492649301; Mon, 28 Mar 2022 11:37:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648492649; cv=none; d=google.com; s=arc-20160816; b=z9p3xBZ909S+VmonRIdVCdp3pBsS8tQ/j/LYMOHXGy4sTJixKvt9a9SB8Ut02ZaTmY j0Ps2WsNMf2NgHUqTJ6obgvAXAG6IM40TZCwh6LW6Bl+M4zutnKzAbum1GR9bFjHAq65 jkzAKz2s3CDIQMecWTfylZ/WetE4mQdyGIZwOnLH0XA1IRVaJUCSXB6WezqQs8AG08tz Yp47qj9NV9JSjCWkMzIZMJOr4oTpqLSYovM0zKmbgkztJeNYNJUhKM15MZpJ1Xbpn0EV fFFNQihyiM+l9Os3t0WteYfrq1BLxpigdJ61gHB079Aibdq0METDCJmWs5nOxoRbOdCv SK/Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=3e1+1tFv3A6LczjMZmrXCQeWQsa/F1+go6sk/FaVpC8=; b=0d8vmXiCHsIo/nHmebDt/m1lgdqBWdBnjUOfj7NUE1EtOdVXSqM/ZRAjBwy5H7q/qY pWNcuCdgW4AuM+O+4U46VtTlGIuI9RBUxGkQ2uiHvZysChqkgnDD8PLnPM+bVFRg4nMo EfR4LlDt3yVmS4yuPqEUar30wHn7JRkgxQwD1hmYTnZQxq4Owh3YRfLhp3iK4DeMcDII +onI/EA2BKHsgavBZ4HFr8q/mEG+cWX/kH3ycXH+pgxh0nYNU6tEwr1vvA/fAkGE4+aL Lsklcod9vdvdEDsz9Wi3UH4t5PMuup794x0TlQW14l94qHC6nzPUGWAyYMHfwEXE8ufK PM/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y8-20020a9d6348000000b005cb2fc1381dsi10266419otk.153.2022.03.28.11.37.07; Mon, 28 Mar 2022 11:37:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236393AbiC0SuZ (ORCPT + 99 others); Sun, 27 Mar 2022 14:50:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236367AbiC0SuV (ORCPT ); Sun, 27 Mar 2022 14:50:21 -0400 Received: from smtp.smtpout.orange.fr (smtp04.smtpout.orange.fr [80.12.242.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2813511C0B for ; Sun, 27 Mar 2022 11:48:42 -0700 (PDT) Received: from pop-os.home ([90.126.236.122]) by smtp.orange.fr with ESMTPA id YXwOnGdAcnyGdYXwOnJOlQ; Sun, 27 Mar 2022 20:48:40 +0200 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Sun, 27 Mar 2022 20:48:40 +0200 X-ME-IP: 90.126.236.122 From: Christophe JAILLET To: Jens Axboe Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-block@vger.kernel.org Subject: [PATCH 2/2] null_blk: Update ida_simple_get()/ida_simple_remove() to the newer ida API Date: Sun, 27 Mar 2022 20:48:38 +0200 Message-Id: <0e758e026fae17eaaae7a5d918cce3490e476a2e.1648406899.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.32.0 In-Reply-To: <876904b8334049a3be89d8bd278b04a421601baa.1648406899.git.christophe.jaillet@wanadoo.fr> References: <876904b8334049a3be89d8bd278b04a421601baa.1648406899.git.christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ida_simple_get() and ida_simple_remove() are deprecated. Use ida_alloc() and ida_free() instead. It is less verbose. Signed-off-by: Christophe JAILLET --- drivers/block/null_blk/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c index a330a118659d..6b4248cc310a 100644 --- a/drivers/block/null_blk/main.c +++ b/drivers/block/null_blk/main.c @@ -1724,7 +1724,7 @@ static void null_del_dev(struct nullb *nullb) dev = nullb->dev; - ida_simple_remove(&nullb_indexes, nullb->index); + ida_free(&nullb_indexes, nullb->index); list_del_init(&nullb->list); @@ -2044,7 +2044,7 @@ static int null_add_dev(struct nullb_device *dev) blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, nullb->q); mutex_lock(&lock); - nullb->index = ida_simple_get(&nullb_indexes, 0, 0, GFP_KERNEL); + nullb->index = ida_alloc(&nullb_indexes, GFP_KERNEL); dev->index = nullb->index; mutex_unlock(&lock); -- 2.32.0