Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp957771rbd; Fri, 23 Feb 2024 08:38:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV9U3iOQsrdIecA4jc+bVDF0XhJRzJw7dG6VbDS9RwUIO1/eDb25OOoB5Wmj1kPCW0Aw011Im7HE2g7LIbFgEqcfKhhCpJt8gAr7LRWDg== X-Google-Smtp-Source: AGHT+IEMKoscHCHsl4DfR6K9ANv/V/g6fOpFSjomzcsTjmpD4vwE+HabgBRuettXSRtmA0kVo8xq X-Received: by 2002:a17:902:8494:b0:1db:ea23:9ee6 with SMTP id c20-20020a170902849400b001dbea239ee6mr325316plo.12.1708706295662; Fri, 23 Feb 2024 08:38:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708706295; cv=pass; d=google.com; s=arc-20160816; b=fFoYwVOW3Z37i3s3/3MUgR/6Z0fGfWBEem/PyvA1vAts2YxMbeSpLP7NZ0+qeLyKI8 S6d9nmFu5IXAJMzJhB5R1BKutRIy7ZQs4/Aqpca0bMXPa7ghQwI+qs4mI/Fw8EvnVcA4 RuWbPVKb0+kfdnH7B6YxPriM456uIMflOyQrt/rOFU3Ss3dIFNpGpeXv42NkDXWJFteS wMLQ56tE0nklVyEcIlCQRRFV6EIZm/QPRJ6f5tQ8MiC79exWEylKzVFJIRvksnSFWRVg 4Oc18SpRZJvW/Qae22dowoBBAFIpceaFXHGXYZf1aCLNa1EVrfpk0fopMOIs2owhl32a mWEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=S5EJOGrgAm8aquG/Ab1nE0MaxS6rH0LCI6ijpwSDUSo=; fh=DeZ+4TrSaJ2WQ12PGxX9DEGARaHR24EoqAjUm1KSpqE=; b=pEd8kVZwnNQuMwT9nXb60eoAnXWOB5lagZQqDLeZ7ZuNPMlpbLeTfuHHLxx8eoyJX6 5OrpwgAINozBcE6LtN1+TtCsPqWaxWobfsKe2gVKYr/iKN5mRv7Jg/3xBxmoNDumt0QN swANlDWCfO9t3rXngxMCyszvj9v+FBgKmkyr7qb7cIzppvfCUL9qpbVacZD5pTKv95mC gotEAkI/KnYMBu3ximMzTQuOKA9bz34mqMJaJd2I3f6leDPouoyBUqgR7zBicg1FgbY1 PF+jI2E4JGZQSG1vToh9Xs8qahP7pQNP+ljlfOEEPQiU7sMVk27T7gkxlNKP68xLWAVD 2IFg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UL1yHmJr; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-78735-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78735-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c8-20020a170902d48800b001dc7c4e11c1si310plg.556.2024.02.23.08.38.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 08:38:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78735-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UL1yHmJr; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-78735-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78735-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A892B28488E for ; Fri, 23 Feb 2024 16:35:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF1B4126F2C; Fri, 23 Feb 2024 16:35:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="UL1yHmJr" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F41E25B1E0 for ; Fri, 23 Feb 2024 16:35:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708706126; cv=none; b=a0aZT5ZW+MM+oCaseRs+WrwkgNu0f8Knk1FY9Z/ZsTLadzeEkeHFipXHDpnrlPHvVP/fjPXkDXUKbWg5g3lmsQubGBSHxVRzqBWj0MCq0lLEYFGWQivM0ONowtu4iLbeMvubcytWx/xERmjqH+9+rVk0dlB7FRMmiZcn8P/I/eM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708706126; c=relaxed/simple; bh=N+xBnxQ1ExC9SLflSQYfvZ+wQb7LNsdhHsn3A2kmeH4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Eje+ElIZEJtPERYrSJJ5T0X5KNhpPPZFGqcnF5MGxSEiibs8AojQh7vfjHJG0ysVhaV42F+3wuT9SuRYm/EqVKqeOq8SqLuwFkhxv0himVqwdCyQvzr+8Fp9Sl2I8kaEMVjfsi15G+UtrJZlPPMNFYk0gtxV5Xcf+6iu0IODrlA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=UL1yHmJr; arc=none smtp.client-ip=192.198.163.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708706125; x=1740242125; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=N+xBnxQ1ExC9SLflSQYfvZ+wQb7LNsdhHsn3A2kmeH4=; b=UL1yHmJrnqyf98Sw1S+5kMUlW3k4HOxnQA8TKUmqq0k+LbEs2EnxZsWh q58JV8KHfcmXLRyFFL2eQChvgcf1h0bJbE2mYDwiF6xvyQxAnPvcwnFZU 1ywJvP257yTU+kzdtwSTQFVyV+0bLCGpuqDJHQV6mjy9AXhnl3trtWvwG /n9qojuA/fAx1cN2q311mvzkjKttxHHIxfuXww7TfZwrbfen5HETXZcT0 pWsDhFTUdhj+1xDrMDBrsUSFzsIG1qvucqY2QbjIGDErjSixiL6uo74j0 SmQByJUOvxqdNvc32mRUq9eEasj1wcRDpmHxnYrhAoSXUTnmM4e7WsFYc A==; X-IronPort-AV: E=McAfee;i="6600,9927,10993"; a="3189535" X-IronPort-AV: E=Sophos;i="6.06,180,1705392000"; d="scan'208";a="3189535" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2024 08:35:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,180,1705392000"; d="scan'208";a="6168351" Received: from awvttdev-05.aw.intel.com ([10.228.212.156]) by fmviesa006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2024 08:35:23 -0800 From: "Michael J. Ruhl" To: linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, andriy.shevchenko@linux.intel.com Cc: "Michael J. Ruhl" Subject: [PATCH v2] clkdev: Update clkdev id usage to allow for longer names Date: Fri, 23 Feb 2024 11:35:16 -0500 Message-ID: <20240223163516.796606-1-michael.j.ruhl@intel.com> X-Mailer: git-send-email 2.41.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit clkdev DEV ID information is limited to an array of 20 bytes (MAX_DEV_ID). It is possible that the ID could be longer than that. If so, the lookup will fail because the "real ID" will not match the copied value. For instance, generating a device name for the I2C Designware module using the PCI ID can result in a name of: i2c_designware.39424 clkdev_create() will store: i2c_designware.3942 The stored name is one off and will not match correctly during probe. Increase the size of the ID to allow for a longer name. v2: Removed CON_ID update and added example to commit Signed-off-by: Michael J. Ruhl --- drivers/clk/clkdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c index ee37d0be6877..9cd80522ca2d 100644 --- a/drivers/clk/clkdev.c +++ b/drivers/clk/clkdev.c @@ -144,7 +144,7 @@ void clkdev_add_table(struct clk_lookup *cl, size_t num) mutex_unlock(&clocks_mutex); } -#define MAX_DEV_ID 20 +#define MAX_DEV_ID 24 #define MAX_CON_ID 16 struct clk_lookup_alloc { -- 2.41.0