Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3542109rdb; Sun, 10 Dec 2023 09:44:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IGxj9IIY8KJSS/f4Ae2+vK1wzjA2fvOAMvVAwGRF7rdq40p/UCtURJaxvUBgtUm3O0So4BT X-Received: by 2002:a9d:6b09:0:b0:6d9:ec35:a234 with SMTP id g9-20020a9d6b09000000b006d9ec35a234mr3258479otp.10.1702230262484; Sun, 10 Dec 2023 09:44:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702230262; cv=none; d=google.com; s=arc-20160816; b=MEY+dcpLEb6A06uYq1zgUIxrXl22H13NxmwZ23wmt0oLMDcgOlA6tcePkxfvUEvkS8 TVZn34f+5hychiG7xJPq6TOoZhp86nUoauqa1E9VKkA8mfU57/GavDjxuSew9Ae43j8m xe7T9+jiNQMkLMV/l4/+mXgJKRYVOmcNCNYVUlalzTQsASY1uPTR2KhbBgHff6Uqax7K hPZMUlMNpRxLqhAyBcpAi7G/rreUVU2F76tVY3xSvt/Bleg4l6pC2614R8QAMrEmbsWg jzalXemtzBJcktTyXwF5MzAvMZj/VfobA1hb9jNWfzpwNea4M3lBzd6pyNH6YSWqXoE7 k6sQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=2DakXtZBtjglxJAoYvjwjPdRqQfAlWSOjON3AQhn3rc=; fh=izp3OAViHUMOg0EndViVZnoTPeCEg82A2BNWKw70Q20=; b=AI7w7M4Wv2I34+cZZvtUstoWmJEZagkB3yUZYhx60mh+phOjwF5yrVxrsqyAjfmYHO UCwWNmx4klqYu+EdMCBc2fZjXh9Ry9hEtvsdZ+EB+JFuKQwQG2VYO4QZARMydQ5EYPcL 8CeR8ly0XeQSKd2G35RPnLheavm1OpTzLjXd9Gt4Kmf3bGYqSgbqrxtG1bpp4uOVxZqD 3kCaH5mEJ2qWXS9tEsgRCztur6v1Z1/tHWCR1h6Ni83Irm+HeuTf6eU9QRGOsBst8/hT yAan7vZknHvtmmKcFJ1U1ysDEp5tUYYl1TdPtWOAjzLCrPPoEZUQmhJ3Zr8Sq6LOJEea bVjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=NvTFoZCV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id o3-20020a655203000000b005c66c662801si4665494pgp.182.2023.12.10.09.44.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 09:44:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=NvTFoZCV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 462AE8066572; Sun, 10 Dec 2023 09:44:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231920AbjLJRn4 (ORCPT + 99 others); Sun, 10 Dec 2023 12:43:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229643AbjLJRnz (ORCPT ); Sun, 10 Dec 2023 12:43:55 -0500 Received: from smtp.smtpout.orange.fr (smtp-13.smtpout.orange.fr [80.12.242.13]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7580FFA for ; Sun, 10 Dec 2023 09:44:01 -0800 (PST) Received: from pop-os.home ([92.140.202.140]) by smtp.orange.fr with ESMTPA id CNqQrGkpo4QGMCNqQrBwSr; Sun, 10 Dec 2023 18:43:59 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1702230239; bh=2DakXtZBtjglxJAoYvjwjPdRqQfAlWSOjON3AQhn3rc=; h=From:To:Cc:Subject:Date; b=NvTFoZCVJvQwlvL0Wn2x7DmMrz9pm1f7rxr9S2sRlJ7Ik3bHV4UDmoR2sT1tZ3gcm OGN5dfyRznLHL6WNUcAY4K1d3x/c9RO12yQNzNYKdO2620eUQkpYKn/hBxt3jmCsFY KBUVyR9wjT6ov2dsFLYBZs8HBAnJcraQEtiLDFEaQGaWuyzcAW/w6BagmKh8pcVgL0 6+A2QWM5QrASpfVdyUSXqZYIaNdFPHusarZSoUYKLNA8G9lrNfFrhNJMiimVYcs7iv mHgUbufvuYYsUodNXvagfkksysGEPcB8oTy+h87DXsEXhL++wRYWQOsXAYdCIZYMvP SXchW/Uz6p0YQ== X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 10 Dec 2023 18:43:59 +0100 X-ME-IP: 92.140.202.140 From: Christophe JAILLET To: Peter Chen , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-usb@vger.kernel.org Subject: [PATCH] usb: chipidea: Remove usage of the deprecated ida_simple_xx() API Date: Sun, 10 Dec 2023 18:43:56 +0100 Message-Id: <8bf382976c0ba0986c0dbe93427266273f0776ef.1702230217.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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 agentk.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 (agentk.vger.email [0.0.0.0]); Sun, 10 Dec 2023 09:44:20 -0800 (PST) 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 --- 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