Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp287788iof; Mon, 6 Jun 2022 03:35:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyI33chEwi4PNiB5x0pNoFF/cjQHHASPmAY1K5tQplZgCEhgb6vstpE5DSriosRi3oQxnDQ X-Received: by 2002:a63:483:0:b0:3fc:9128:60a5 with SMTP id 125-20020a630483000000b003fc912860a5mr21017757pge.606.1654511706257; Mon, 06 Jun 2022 03:35:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654511706; cv=none; d=google.com; s=arc-20160816; b=0XW2xs06IOOvUZ6iRn2vRt8gIHCUKHzkAiU69mOcECG+fpgmQd5nbgESDLZaSdpopv WxpPF1yQNad8E7f9ixItRbo+Jf/ScoeF0rpMJtryvidITZjiso5Er4ISJJsgHPryDVTR 0O13HrI1pAySvB8SWa+/jZMLQkMFxRYeopcoLvnxwyB+6PV0rSaN60hnXxYhP7CQHxdX 04+lVDTW4iO8Y/rT+h3EwppwGwJLtd5pSNRgQFRLkYDbo8gtzf/iooYcM737gOzups5p 6dyxa95EoOIsQuWtJuMZ3UNfqvNKPaltcB8V9jRsm5qp5iTFPQ5SY5bhEVSdYLz5/ahn ynhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=EEtIczXOb290W+pz7uEsvHrOu4FcL6xx1WeEBPLY3Hw=; b=YzNZYVH6e9j6BBedZ0m1JfH0KGCgw0ediSCZdNKU6rwdimdwN5PdbzF8+ZJaPbd/Fp lsPsX23yFa8agc3LmZ0H16tlzZ2igOXNTpdDc+md9iByVCr6w+jQOvOHE7NJPcwopBgH l5osFqMELy/L/WvWgxXm39zX1VU9H5SW9utl4UdkeUGpkNXY99I6K+6YYeWKyb5xB6Sc kIWg1M2dBRUwQOAyrQ1hFCpTJ0YE7NNCvd5o+R5cvjzUKhC+JmnTknJ/wSt6fbPJV1bv gokMkA+HwxxO98qbEvn0vky9u7gp8dmfLxUMgJSGRzjvvt+A0WWLiSBIDQDW4Y6esTAp 9pEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k+0ldaxs; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d185-20020a621dc2000000b0051c20f51870si2727977pfd.320.2022.06.06.03.35.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 03:35:06 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k+0ldaxs; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4BA07A503E; Mon, 6 Jun 2022 03:14:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233572AbiFFKNr (ORCPT + 99 others); Mon, 6 Jun 2022 06:13:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233673AbiFFKNc (ORCPT ); Mon, 6 Jun 2022 06:13:32 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0CE7179C3F for ; Mon, 6 Jun 2022 03:10:26 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id x17so19176427wrg.6 for ; Mon, 06 Jun 2022 03:10:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=EEtIczXOb290W+pz7uEsvHrOu4FcL6xx1WeEBPLY3Hw=; b=k+0ldaxsPStEdYkYtq1feLWsz9sDXg7qx7pwcgrtt+joqLVBPgMCa3QRHr2WCmXLw3 93vbDgVNXS1/A4pljwJI95bsvtzl8vE6uZIPIKhEvxjmgTaSEKIkstoM9KWI9BoZIKBZ khKu+rjUT+j3UMdbbWNcyaXdVwEJ6EkngIL0UR3C6uaKMXBIUPwXwbLMcdxWQ1RxSL4K hILIo+a0vs8qfcjygC41tTQQLy0Yeyo5z+pMGVggHM0KgW9SlGZcHjbDKAd9Ik0tsk1k Ohb1Jy8s81aMtJBNBZLiew/9C5Rkl5wrkJlHKn1xf3pRSo1YFt92OqrGAqc6hlmdmKgp +RUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=EEtIczXOb290W+pz7uEsvHrOu4FcL6xx1WeEBPLY3Hw=; b=b2BVaBI/E26Dr1f9sGuEucCzTuHaZ3nHhPPbCxUFmWKg0L3scvmv7W69WIM7uqfReP ZC/IG+B7xm+hzqd68L7unQn31AcsAbAbgtU+H7kz3wgMhBAUH0Tq267PQTkkbbZ6QRAo Tspjkw5tpoK+X0HZveZIyXDbmjCesBaKNW04hvBzeZPaoYL4Na6tngzkc5mjrzL/NW5M mdIJypc7IGS6NKpHPuHrg2MX1uFALhUn53AjFrYbXrIAWh+jbSxmLJOdheDtQcELxOuI e+brxW/z1mBJipqMGe3j/DDOEn61fMU4/lsB6SvrymQhmtwM8/8n2IPk29eXwrDfv8HN ttXQ== X-Gm-Message-State: AOAM533t6ps+pfTksqUM/kcpLdr/8cphmi+XWVQkStaXT2/rTh/XAtOd gGtNvzVpNNGjiWZPDNbkGxUrfygpE2KVWeGR X-Received: by 2002:a05:6000:1091:b0:213:b515:f46f with SMTP id y17-20020a056000109100b00213b515f46fmr17644027wrw.632.1654510224309; Mon, 06 Jun 2022 03:10:24 -0700 (PDT) Received: from [192.168.86.238] (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.googlemail.com with ESMTPSA id b12-20020a5d4b8c000000b0020feb9c44c2sm14955968wrt.20.2022.06.06.03.10.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Jun 2022 03:10:23 -0700 (PDT) Message-ID: Date: Mon, 6 Jun 2022 11:10:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH] drivers: slimbus: Directly use ida_alloc()/free() Content-Language: en-US To: keliu , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org References: <20220527073053.2402630-1-liuke94@huawei.com> From: Srinivas Kandagatla In-Reply-To: <20220527073053.2402630-1-liuke94@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_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 On 27/05/2022 08:30, keliu wrote: > Use ida_alloc()/ida_free() instead of deprecated > ida_simple_get()/ida_simple_remove() . > > Signed-off-by: keliu Applied thanks, --srini > --- > drivers/slimbus/core.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c > index 78480e332ab8..219483b79c09 100644 > --- a/drivers/slimbus/core.c > +++ b/drivers/slimbus/core.c > @@ -250,7 +250,7 @@ int slim_register_controller(struct slim_controller *ctrl) > { > int id; > > - id = ida_simple_get(&ctrl_ida, 0, 0, GFP_KERNEL); > + id = ida_alloc(&ctrl_ida, GFP_KERNEL); > if (id < 0) > return id; > > @@ -299,7 +299,7 @@ int slim_unregister_controller(struct slim_controller *ctrl) > { > /* Remove all clients */ > device_for_each_child(ctrl->dev, NULL, slim_ctrl_remove_device); > - ida_simple_remove(&ctrl_ida, ctrl->id); > + ida_free(&ctrl_ida, ctrl->id); > > return 0; > } > @@ -323,7 +323,7 @@ void slim_report_absent(struct slim_device *sbdev) > sbdev->is_laddr_valid = false; > mutex_unlock(&ctrl->lock); > if (!ctrl->get_laddr) > - ida_simple_remove(&ctrl->laddr_ida, sbdev->laddr); > + ida_free(&ctrl->laddr_ida, sbdev->laddr); > slim_device_update_status(sbdev, SLIM_DEVICE_STATUS_DOWN); > } > EXPORT_SYMBOL_GPL(slim_report_absent);