Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3702171rdb; Sun, 10 Dec 2023 17:45:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IH23PKKEh4fA1qUkx0iTRquW2jN5W6Y0GZG7pMqA9X1EiP+WerjNlWXfWR8HGkhI57VAq0K X-Received: by 2002:a05:6359:2c43:b0:170:2c52:2b4d with SMTP id qv3-20020a0563592c4300b001702c522b4dmr947275rwb.19.1702259130294; Sun, 10 Dec 2023 17:45:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702259130; cv=none; d=google.com; s=arc-20160816; b=DyrVrhpLBoGaxFoc8gK179V7G6g5Nh7WfLwhW2IzcYQebU/q2uhEy9DRgfFis0zSsa puaHUqefjED5S8XPgQfzUZnzW4St2h7WOW6kNsZf5XRxgpd3o64dnCgqiOVZAxzoUZBS EfW342UTe7VMd6PaBbK4Oija1MS1EVLMXxkBoU94JeD6DXV9K4PQwWr/VHYTaK6bw9Wj WcUpB9Yd4hCWsLbc1bXhm0+p+i1ox52+kpjHpRf4vJvG9mJ4jAB/r/xS7FbwL3DaeU7F sKtXMLxyz7kczu3/AeFyRoLa4Oqc8QTXMbuYAPqmyYDKvtPLLJLr+sC/vlPYdGZ/SL0j GtLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=cjHZI/LtGLTYhJWnYC/nplq+EzeKFiCp8DJvZFT9X34=; fh=x/JIgSNwqB89cP9kjM4dcdKodA+pwq62OXT0yY06kfI=; b=s1W5QEuyr9CPQT58j1f+BSibHMLBDLAhhuOdjefs9L2NOmkVv+AiOogigm1YrESWov beMeWN5VsTCBOjDRhhrMwSa5e6tZE+vFhpdP3ksiVqi7d4LRzs54x+ylvWbuCqFhRlJj TMmcZhNakmOAp3ZssW/aA4rjbvRwrn3T3cUwu1Kg/0MwH481BRsjkHKlCqsvE3kqOS03 5Jr/os2LiEJqeW7ULq+x4pB2DehEUJrvjNuIRXXeRAN1ptds7Yif/INfax1rZFdLXJG7 yMNNhVjcjI1U53CW5ejPnDuoBY7mC29s90C/fbcMcWbQr/iZ8CztiTfWGMdgFRNh92gT L6iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=enojSTRb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id j3-20020a170902c08300b001cf68d3e90csi5253302pld.98.2023.12.10.17.45.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 17:45:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=enojSTRb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id A5B36807BA39; Sun, 10 Dec 2023 17:45:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232290AbjLKBpB (ORCPT + 99 others); Sun, 10 Dec 2023 20:45:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbjLKBpA (ORCPT ); Sun, 10 Dec 2023 20:45:00 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24A16E9 for ; Sun, 10 Dec 2023 17:45:07 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2004CC433C8; Mon, 11 Dec 2023 01:45:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702259106; bh=/jf3ec7E9hlGrUOPKNv/BrysUMxQfNuXUfDv4GGeYHg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=enojSTRbQ2ytH0mpAXRcNTAjmXjNW8o47GiBqpr8cmGghNgi6FAB4C98bbDplpe0v /mfy8cjzUNSJFD4Ec8puzAsgN8nveFuDlGYuYuMb9XrbYNLrq+yKzrxWyw2tFvDt4C A0Ts6xN4pQnMwXOCdZY84ACaTfd1eGt/S2JmBhCNZR9NYfwheby76BcTVc7Z09W8WL ojM0ymPHGPAumZT0sp9N7cuHCleHH0Nr1yYt5SE9MoYpb0QznL1PEfP9kmydmUPRlB LIzvN9RH5x8pZMGUi3jaNwzF9+U8yDeGPt823iWxOgkbAE+vY6shxUYNqNcVozKKfC I3fFERD/cLQDQ== Date: Mon, 11 Dec 2023 09:44:56 +0800 From: Peter Chen To: Christophe JAILLET Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-usb@vger.kernel.org Subject: Re: [PATCH] usb: chipidea: Remove usage of the deprecated ida_simple_xx() API Message-ID: <20231211014456.GA1197808@nchen-desktop> References: <8bf382976c0ba0986c0dbe93427266273f0776ef.1702230217.git.christophe.jaillet@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8bf382976c0ba0986c0dbe93427266273f0776ef.1702230217.git.christophe.jaillet@wanadoo.fr> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,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 groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Sun, 10 Dec 2023 17:45:16 -0800 (PST) On 23-12-10 18:43:56, Christophe JAILLET wrote: > ida_alloc() and ida_free() should be preferred to the deprecated > ida_simple_get() and ida_simple_remove(). > > This is less verbose. > > Signed-off-by: Christophe JAILLET Acked-by: Peter Chen > --- > drivers/usb/chipidea/core.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c > index 7ac39a281b8c..0af9e68035fb 100644 > --- a/drivers/usb/chipidea/core.c > +++ b/drivers/usb/chipidea/core.c > @@ -862,7 +862,7 @@ struct platform_device *ci_hdrc_add_device(struct device *dev, > if (ret) > return ERR_PTR(ret); > > - id = ida_simple_get(&ci_ida, 0, 0, GFP_KERNEL); > + id = ida_alloc(&ci_ida, GFP_KERNEL); > if (id < 0) > return ERR_PTR(id); > > @@ -892,7 +892,7 @@ struct platform_device *ci_hdrc_add_device(struct device *dev, > err: > platform_device_put(pdev); > put_id: > - ida_simple_remove(&ci_ida, id); > + ida_free(&ci_ida, id); > return ERR_PTR(ret); > } > EXPORT_SYMBOL_GPL(ci_hdrc_add_device); > @@ -901,7 +901,7 @@ void ci_hdrc_remove_device(struct platform_device *pdev) > { > int id = pdev->id; > platform_device_unregister(pdev); > - ida_simple_remove(&ci_ida, id); > + ida_free(&ci_ida, id); > } > EXPORT_SYMBOL_GPL(ci_hdrc_remove_device); > > -- > 2.34.1 > -- Thanks, Peter Chen