Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3589127ybh; Tue, 17 Mar 2020 02:58:25 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvwPcK1b50vbLrt+O2NBJsuDzGU7GgxREwAPKaIIeG83nsmyzfHY5smrj6StsiFkpwu/fMH X-Received: by 2002:aca:cf8a:: with SMTP id f132mr2685349oig.151.1584439105439; Tue, 17 Mar 2020 02:58:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584439105; cv=none; d=google.com; s=arc-20160816; b=Hxd7DOgws+MJZDC7Q10Zw9vw9OhKsIKgid9EGpalWyV9ECHDYbRKy1NFngooUDtg2i LCnpSLAU2yQ3dWohhadcS0f2niVY5KsmUbrlU1W50z7WOZBGwSb3HlKPM1kPeJFrIu5a 66dyXn5vhiBbdTRfdNWFzibUTOwnhOkuEZgI5gWr0muHN7n2fDMicg2HWMbAVwykihdT uf6BWox7Ivv1oXtcfWVb6t/qwVfgjOq8Ay6+/oiKqyVI4XUarL+O0sx7x5AHDnD9yRVn 8GEbslNAh1+LeNtPnrvNrMB7iOsWwxpZnN7ZxMesqZ2WRTA6oiPx6ABSEMMYytrcnU05 NH5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=inOa9YadtuHCp1DLaC0SWlL5XKzD4ViNp1jWipFw0Co=; b=GQyM5CIx5UkVF2riokLGzNLYkOPnx5UVfYpnA5Hx9ckuAWwLaSqu3QUTXHF5EOjMMw xndvVU9BOl+GyiEmEAkwkCmZj88cEdREf0al5p/7HjUmYiyGtimsLWxiMYfmHE7Xp86p 6mFKnL7PNQ9cdkWG/CCHuVdukOOr9hHwNmW42gwr0dYIvewImFSL78+Tgl+7+C0BIPnT ne21aZ1jjKJtqS3V0ZGLJhLQgH7QFprmu55S/WeEbWGKMlarL6ElJmQ+z6oRLrj+6SlP axOSiFD0StWULmVdZ6dXrb7wgwVte2oZH7yNzAdTwi8sP/nhSRgyYyduyFizXtRJ0IMj iR0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=daD68VTy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a11si1429192oib.154.2020.03.17.02.58.13; Tue, 17 Mar 2020 02:58:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=daD68VTy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726593AbgCQJ5o (ORCPT + 99 others); Tue, 17 Mar 2020 05:57:44 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:35352 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726571AbgCQJ5n (ORCPT ); Tue, 17 Mar 2020 05:57:43 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 02H9vZcp102399; Tue, 17 Mar 2020 04:57:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1584439055; bh=inOa9YadtuHCp1DLaC0SWlL5XKzD4ViNp1jWipFw0Co=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=daD68VTyUA2lvwMXchOFQq+FTDET/SmyeQZXP2CsgxCJpJNnztFdMjR5DMKCCmXJK ooysCBgp+zY5D1T/kTbbEliWpAn9LW0vZHmcGQsly99mOlAEZv8enhTV6iKgVi55OQ /DXI8g53nOur/VDz5KcjiTFPKqs/LOw+Iiz9Ih0I= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 02H9vYJe117763 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 17 Mar 2020 04:57:34 -0500 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Tue, 17 Mar 2020 04:57:34 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Tue, 17 Mar 2020 04:57:34 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 02H9vIKV095155; Tue, 17 Mar 2020 04:57:31 -0500 From: Kishon Vijay Abraham I To: Bjorn Helgaas , Andrew Murray , Gustavo Pimentel , Lorenzo Pieralisi CC: Greg Kroah-Hartman , Arnd Bergmann , , , Kishon Vijay Abraham I , Subject: [PATCH v2 4/5] misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices Date: Tue, 17 Mar 2020 15:31:57 +0530 Message-ID: <20200317100158.4692-5-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200317100158.4692-1-kishon@ti.com> References: <20200317100158.4692-1-kishon@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Adding more than 10 pci-endpoint-test devices results in "kobject_add_internal failed for pci-endpoint-test.1 with -EEXIST, don't try to register things with the same name in the same directory". This is because commit 2c156ac71c6b ("misc: Add host side PCI driver for PCI test function device") limited the length of the "name" to 20 characters. Change the length of the name to 24 in order to support upto 10000 pci-endpoint-test devices. Fixes: 2c156ac71c6b ("misc: Add host side PCI driver for PCI test function device") Cc: stable@vger.kernel.org # v4.14+ Signed-off-by: Kishon Vijay Abraham I --- drivers/misc/pci_endpoint_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c index bb8b94ac8d3b..ef21d2d2f8ae 100644 --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -749,7 +749,7 @@ static int pci_endpoint_test_probe(struct pci_dev *pdev, { int err; int id; - char name[20]; + char name[24]; enum pci_barno bar; void __iomem *base; struct device *dev = &pdev->dev; -- 2.17.1