Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp80050rbb; Fri, 23 Feb 2024 12:26:18 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXXcfvE3fttn3sd+0isNgfn7s6H6X6VjPiWlubM07IKzAkSu3pFFhZ28VIDppyW5x1B+b1e+re+kU3XuAlAvTdeYM/UNMZPFK4ncRsB/w== X-Google-Smtp-Source: AGHT+IHPnlDPIpsxUvfoedSOTDsKoACc9SJ2ifPrdVL0euRmsZznK5bYfQ7uStY4WOSW35xAPVUL X-Received: by 2002:a05:6402:1b0d:b0:565:6ddf:32d0 with SMTP id by13-20020a0564021b0d00b005656ddf32d0mr601298edb.35.1708719977980; Fri, 23 Feb 2024 12:26:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708719977; cv=pass; d=google.com; s=arc-20160816; b=nzw+tHSMnFAMA7cnLeME6W05qsjPCV7BsD2X3k+BEQexryK0CN/NEmvYiPeBji/m0u CjX+lAGWPZHOj6E0fN1THQiLsDGKP5zGGanffk71tTWMtiMXVXgOdbQGZndIVBbfxwyS u7M+JZXPlKod6g3e9C/1liUEDzZWTl97Td2+lJmFG1C0zvAd1f9fn/FHEMlwc37+3OEp +R4ftLiZXTEBQZHGbG0nROt5keVth2pxWgvY8H678ASW6Jm9ggAn48rMOqY/mCpoqPkj UkdZXPoXhUVGmtqB8hCYyrACAD6dS6VEwUImZYU1MK64a1wYlRENmL1SKxKcxRVb1iwO p1Ag== 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=ELo61iNggaJd8H+vmlyxU8usSJUKc3KMqz9mv4tkzzM=; fh=HpaP88lEOpyQF+0jemFWNRxowbzS6ey+1D5CgLoLUMo=; b=H4CoGHvt9aIzFiw4mRoUBVI3/XdFAcTtOVmhPYtwdF4J6sYMnGSZ2rPRLjmup8hrR5 YXFHFchDtcqIyeIieehulXb94GWk/rsxf2P3X/1fyoBI0rLXRQ3DySFq26odvan0hb36 4Jl5cLoQYmfHVl3R0URdypS/T6kD3FVXvgNxtXOm2QIVsPjblN6Nj5oZOvIP7CTcc4+Y W0sp3t1cwJN9mY/3CXRQMGq+yfxC5FHbRT3VLoFRwOBS0fyCqUIsWYDh6Tl9bKD6McPz dl/fCaNHM5H7gPnl5ND27v20Y2j+wChIKWjL7Kspy7Idm5zPQKPn43oN5i7Aah/k26vB NrIQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="J/UpwaZc"; 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-79100-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79100-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id t29-20020a508d5d000000b005645a23547csi5395596edt.560.2024.02.23.12.26.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 12:26:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-79100-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="J/UpwaZc"; 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-79100-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-79100-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 am.mirrors.kernel.org (Postfix) with ESMTPS id B14B81F22DD0 for ; Fri, 23 Feb 2024 20:26:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B715146E76; Fri, 23 Feb 2024 20:26:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="J/UpwaZc" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) (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 6C6D6EAD2; Fri, 23 Feb 2024 20:26:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708719969; cv=none; b=Fa45nRif6qycAmaqHHJcIRGh11HzDHRlQnh0epDfvSuuqDY8lrbg5iMg9MwxvJ5ZMBXLOdk+yVHKjHlXyACP2IcEHPQi8AngbpLmwyDktuChKZ6xhoZj0JWwGWRPoG69xFHu8+A5kaNHMISDPsbBM/+IFVop+erfmr2oVTFPTBg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708719969; c=relaxed/simple; bh=otrj2HG0uwGiWEAyJmF5JytS/AtQRVWKEWaHEN3Z8Sk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=l/M4bvvGIlCV+ZP2ozeypjNzmEL+RFhSHLJLyHjzSnhhwQzn/tBR5nGDfqSiRHU14TebuMv7/hcSJ2qepOHXjQNlYe5SJMUw/YQuOytr9yu00eRTsiKAw0TpEpmwxOvXYvJDuzDCXur6kw1DQGY3t8rpM1HxhFUWpyybFDqkVQc= 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=J/UpwaZc; arc=none smtp.client-ip=198.175.65.12 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=1708719965; x=1740255965; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=otrj2HG0uwGiWEAyJmF5JytS/AtQRVWKEWaHEN3Z8Sk=; b=J/UpwaZc9BJUd+NettQn7aaxKj0MF2DHZ5OehaLTktr7YM/b6MM3ww9j gML0SqcZ/zFz17FIbxeVStPqKHNIK9hpngrxGGmWCmZFlH1fw8rdE8Fij WFTz6x0Bv1bpbDfv4Ep2HqNC7p6buHsvT4K4K/kll5VEBFqm1O7mYK0l0 +9SpcTnb3ta16EUSkljAV6ShOjg/jOUMVeQ7Aktw9nk83HMLX3TELv9OJ zqOipgmg/auP/sz4Pwm+k4KOMjL1viBM5mHuFTW5h/n2yBktB6IjNHUCh khDbHTroo3vcpMzA2WKWH2ZYkxmJlRQhk7mFAf7uxDFvXs+IKTxgRlJks Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10993"; a="14487209" X-IronPort-AV: E=Sophos;i="6.06,180,1705392000"; d="scan'208";a="14487209" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2024 12:26:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,180,1705392000"; d="scan'208";a="10713422" Received: from awvttdev-05.aw.intel.com ([10.228.212.156]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2024 12:26:03 -0800 From: "Michael J. Ruhl" To: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Russell King , Michael Turquette , Stephen Boyd , andriy.shevchenko@linux.intel.com, "Michael J. Ruhl" , Russell King Subject: [PATCH v3] clkdev: Update clkdev id usage to allow for longer names Date: Fri, 23 Feb 2024 15:25:56 -0500 Message-ID: <20240223202556.2194021-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. Reviewed-by: Russell King (Oracle) Signed-off-by: Michael J. Ruhl --- v2: Removed CON_ID update and added example to commit V3: Add r-b and move version info 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