From patchwork Mon Dec 30 12:33:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 182608 Delivered-To: patch@linaro.org Received: by 2002:a92:815a:0:0:0:0:0 with SMTP id e87csp6283172ild; Mon, 30 Dec 2019 04:31:47 -0800 (PST) X-Google-Smtp-Source: APXvYqz3PZCtQ9XxjyNS6FOLkVBHA9YmuTUNT9NmEGAbnPFNw8yHiNh7x1sea/cIyC1H5UGe0Arl X-Received: by 2002:a05:6830:20c6:: with SMTP id z6mr70075615otq.272.1577709106980; Mon, 30 Dec 2019 04:31:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577709106; cv=none; d=google.com; s=arc-20160816; b=aQzFewNHfxqfsz5w/Pv58erSW6qGVoZNYEDVwfCNOQGZU7DsG9boqBlMyl1VK6Kdgt 6ZN3Ra1MGUQZbCUH9WjRlXKN+j5LgqxHV5w/SXd8eMFYSVKkYig4zfANjqRhcpyACzl7 cwPIQGQYsM7H6VJsvfRagixmsxjgZiMKJuxuVy8G+wctEjDnU/l1j8FSWzp56mPRr4B0 ofaNt61E724AIJobnGh43W6EoW9iIkevwdNyPkMb1KvRPIiZ4LtkokG4TpWEzi11Y0yC d837wUOKg1yB8HiVJA5c7LG2d3pQJYvJLnkzHgQoo4L6B+WYAj24PM79SH2H/6SsK7FJ Q0UA== 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=Dykt1nNdxSlaBSScgYbBExjvH9iWIh6LdXzuuGC21fs=; b=WtLQvbX8TsvIkKid0uMS/tVn8mPF3Eo45WoQe+Vte2ab2S0EB8ceq1QXs8wAATsCs+ ro60Gs22+AlLdWTExJBEckbNTsO32WuD56LS/fLDo3rprY+S+5kfSEyqPHhFuuh3G4d4 ewhFntGeP++lKnDijxInofYlZ9OO0SsVITsxROVXWDyuwb3no5Sr2TOcwE5pyzm9V5OK IfHRTYK/UPlJO0feh8PSkcW/t1dtqX7lsIZqLy5KCoCD/LVlJNzuDReLbywi6P2in6BE r+Bof6JPr71BIjx7Jk4ALEkAAwyZzI+3NW7JPqQvxvb62Au5wYx/b9tTHmhiKUWIzj3a qmYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=KPuSKbVP; 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 d188si16789582oib.273.2019.12.30.04.31.44; Mon, 30 Dec 2019 04:31:46 -0800 (PST) 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=KPuSKbVP; 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 S1727505AbfL3Mbn (ORCPT + 27 others); Mon, 30 Dec 2019 07:31:43 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:60366 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727487AbfL3Mbi (ORCPT ); Mon, 30 Dec 2019 07:31:38 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xBUCVVD1039095; Mon, 30 Dec 2019 06:31:31 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1577709091; bh=Dykt1nNdxSlaBSScgYbBExjvH9iWIh6LdXzuuGC21fs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=KPuSKbVPR6zbcYDDgbh/5JZtO8V6nH9bAZK2BK3aEPrAj25xA+68ZR4pEzldrF32o 0HzMt3MU1eRoqYfbcS7PsZeb1dtFhDF7ZZx96FN9wpxvDfOt+I6UWzI3rA6EZjLEwk xR+A2Ihzvo9F5p3xU7mA7kCjk3QMmpXto9vLseDY= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xBUCVV0Y058813 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 30 Dec 2019 06:31:31 -0600 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Mon, 30 Dec 2019 06:31:30 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE109.ent.ti.com (157.170.170.41) 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; Mon, 30 Dec 2019 06:31:30 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBUCVEhR002491; Mon, 30 Dec 2019 06:31:28 -0600 From: Kishon Vijay Abraham I To: Kishon Vijay Abraham I , Lorenzo Pieralisi , Arnd Bergmann CC: Greg Kroah-Hartman , Bjorn Helgaas , , Subject: [PATCH 5/7] misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices Date: Mon, 30 Dec 2019 18:03:13 +0530 Message-ID: <20191230123315.31037-6-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191230123315.31037-1-kishon@ti.com> References: <20191230123315.31037-1-kishon@ti.com> MIME-Version: 1.0 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") Signed-off-by: Kishon Vijay Abraham I --- drivers/misc/pci_endpoint_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c index 861b3d0cea19..b622e234f57c 100644 --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -652,7 +652,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;