Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1824706rdb; Tue, 3 Oct 2023 01:59:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE4yPNguZZ3D9eSr4JCQSn+K/BCdhKkNwLIJlk4Ty3wCbObaIkxHE5wCZdLtjg8eyRF7b2n X-Received: by 2002:a9d:6a03:0:b0:6bf:2476:a97e with SMTP id g3-20020a9d6a03000000b006bf2476a97emr15757765otn.5.1696323591478; Tue, 03 Oct 2023 01:59:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696323591; cv=none; d=google.com; s=arc-20160816; b=G1c2O9yOSAhtsv59vg/UiVNsGCLdgy3EiPPwZ69XBDZfAz/dzPe4vKfrZtmSInK1TD o9odAPJ+FnSTGtyDIvUTcEXyZbTDt5Je3RNss4UrQJ4U1Tb0L1uNrVzaUtezQ4oIdzLr vJiVK6TXlB9JLlE7kmL2sVLmoSnrgIcko550bHbZU5U6nNzgTNvYaMMMfX4v27BSqDEQ XurISysq0jenq3KPa7MTr0fVg1+opTunlx0kWTkhapgkeBgwfl3Gas7I/31tMy49eXja yzKaWC2MjBCt561sQuBWsInD55gf4PPU/bb96v5FzWuxDib/5CZ3gRjmRiNeFbul5DUA R5Mw== 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; bh=C+w7FZA6GAqQFZ3hSwiHxxhwbHi9yQ+pE0dhmaKi+Ls=; fh=8wdCmbH7TENECu2Y9XX2qrvkGwI2eztyOSuV+IwhEz8=; b=HYzBjvx/HC5j9Sp+yyR1SUdPBNqItarqfyaPHtuyG041X7qJzGotweSpMyCmJ6RE62 Mog/koRNT52y6CFl22WPyL5rJnrdMS4rubNkxdMLCzGLBL08BEJFj6mSIxgftp5S/i+M +zg9QT8pukkTnKhqnm7vjG9Rp1NX0+rv07rlEBxW++Ki/rxiOE6VUxv3eqak1VZKOb0p V1pUvSMHJN9G/O9kIaXF6N0gaiFlvpDpZijp6ggMQuGECIl3mCL4BO7gkRtFTJlXTdFQ QaZe/cspLk6iHKYlDAQoHTsBWx7rC3C7wG1yYtP33c1QAPiNchZVsJEty5pULApCCQSU 30lg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id m1-20020a656a01000000b0056a670ebd73si1099871pgu.498.2023.10.03.01.59.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 01:59:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 60216826C4E4; Tue, 3 Oct 2023 01:59:50 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231347AbjJCI7q (ORCPT + 99 others); Tue, 3 Oct 2023 04:59:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231136AbjJCI7o (ORCPT ); Tue, 3 Oct 2023 04:59:44 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 352AFAF for ; Tue, 3 Oct 2023 01:59:40 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2061CC15; Tue, 3 Oct 2023 02:00:18 -0700 (PDT) Received: from usa.arm.com (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 1A99E3F5A1; Tue, 3 Oct 2023 01:59:38 -0700 (PDT) From: Sudeep Holla To: linux-arm-kernel@lists.infradead.org Cc: Sudeep Holla , linux-kernel@vger.kernel.org Subject: [PATCH] firmware: arm_ffa: Assign the missing IDR allocation ID to the FFA device Date: Tue, 3 Oct 2023 09:59:32 +0100 Message-ID: <20231003085932.3553985-1-sudeep.holla@arm.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 01:59:50 -0700 (PDT) Commit 19b8766459c4 ("firmware: arm_ffa: Fix FFA device names for logical partitions") added an ID to the FFA device using ida_alloc() and append the same to "arm-ffa" to make up a unique device name. However it missed to stash the id value in ffa_dev to help freeing the ID later when the device is destroyed. Due to the missing/unassigned ID in FFA device, we get the following warning when the FF-A device is unregistered. Fix the same by actually assigning the ID in the FFA device this time for real. Fixes: 19b8766459c4 ("firmware: arm_ffa: Fix FFA device names for logical partitions") Signed-off-by: Sudeep Holla --- drivers/firmware/arm_ffa/bus.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/firmware/arm_ffa/bus.c b/drivers/firmware/arm_ffa/bus.c index 2b8bfcd010f5..7865438b3696 100644 --- a/drivers/firmware/arm_ffa/bus.c +++ b/drivers/firmware/arm_ffa/bus.c @@ -193,6 +193,7 @@ struct ffa_device *ffa_device_register(const uuid_t *uuid, int vm_id, dev->release = ffa_release_device; dev_set_name(&ffa_dev->dev, "arm-ffa-%d", id); + ffa_dev->id = id; ffa_dev->vm_id = vm_id; ffa_dev->ops = ops; uuid_copy(&ffa_dev->uuid, uuid); -- 2.42.0