Received: by 2002:a05:7208:3188:b0:7e:5202:c8b4 with SMTP id r8csp874618rbd; Fri, 23 Feb 2024 06:20:37 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUMes/EBNGhOuQ3vxIvZc05RaL1JWCVf0FOyh3h6jX2cmQBoIwvZUUz982he59Yht9o0UbcXxuSms1zgJSrW2o985qAWtQjEc8jHPQNrg== X-Google-Smtp-Source: AGHT+IEb6B2KZoWx/i+8C/dmb2JJnoVOgkOeBwXUR9oiZg3/0XlWZDYeGkbprSIBImISIeduPb2z X-Received: by 2002:a05:6358:2623:b0:17b:57f3:3b9 with SMTP id l35-20020a056358262300b0017b57f303b9mr2410rwc.14.1708698037183; Fri, 23 Feb 2024 06:20:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708698037; cv=pass; d=google.com; s=arc-20160816; b=JdTEpAgxR9Tzg8OLxLvEv3FUvHw4UlpJfxrVFqoceWaHxFbtwoEqr+bb6YRmksW5HU srmMABC1t2oB6hlPTlRFdnfj3YSBYh+qUUwINKYlJUIObLQvjoRbRXZt8eRs+ZQuzV9o 20iyAWcj5B7oF4aiHLesNIEWn5UyXShBzs06DIiTrHntqxx7lf9f2/ryF7SmtGeyxnYL +fK9QvOVt+0Gg7T3ErYvh6V3bbmG8FZzSrr0HbzYNjZ1uvWym74rKHVMDtUUUcXBGRtu IJxSM09jcQNKwRAKGOS3XvNhgidY9OF/Vn5WSulcoG3FmepbRRhhMd/peqbmvFBeR1tm YV1w== 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=GEJRTIdNa3XJSRbLxPPGDt6DB91wXStTJXH1yVZtklk=; fh=DeZ+4TrSaJ2WQ12PGxX9DEGARaHR24EoqAjUm1KSpqE=; b=SlrzPAXex7qera6CzurJ1N/15vHP89vlQl+FI0noHWi3fpveRrmwLDFz4+GmNBAruP /ngzVscVgmRNeGhQLrIZHjsDabz3gPOTUseIPrzR69julFhxbNFZzyrIeHMMglo+0UMt TazkJNkmC7On5MFpvY7iPCdy4ijC8iBxUNMaC8/l0eyDi7hJoiAMUsk2iJxmTmi0PboN r4z3HvHRNcyiHJW78WVifM+IlOfws2wfCZX1QgjygCYU8X5DJELsS5gNbBq32mdceqwS GS8rXmqVahjKNOc8/LXGhYUhQJ/tG35kZpI91ie9io07vvC1wQu0m1ZiTuIHpSFV6/Ye AKFA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CnFOH73S; 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-78470-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78470-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. [139.178.88.99]) by mx.google.com with ESMTPS id k67-20020a633d46000000b005dbed76d0b0si12156638pga.779.2024.02.23.06.20.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 06:20:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78470-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CnFOH73S; 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-78470-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78470-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 D35C5281AF5 for ; Fri, 23 Feb 2024 14:20:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3619781ACE; Fri, 23 Feb 2024 14:19:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="CnFOH73S" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (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 18451823BC for ; Fri, 23 Feb 2024 14:19:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708697954; cv=none; b=fj6/KiQ6+Ot3oukzwEyZF48z5tfbkNMNSU4Hmi8VjXr4XdPULde5RXDdG4UjRRJoawLU7nuZdO7/yYtU9D7s6rBXwlaSBhp/scMkzyB24lzXtXUzluAQo13iEQZPURobq1luAPoIzoBtxdxyB52ARBcjNrbUBdjw1caDuY+1YwM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708697954; c=relaxed/simple; bh=tYze8IrJ1yAvzoappL3XtvPJ27bpcIPpI0JnZ5rnTDI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HsSgjd54vvSPzU1L+VtNNWMtPy/PrWjnrQ91PaKMAH6XXwD478Qh5ocq91hHL7yEEkuhjvlZf0HFZ2BVt7IBlDYryQq1uGA0S2NaVzOr6tQ+LbFSI2cXll8rpUNnZ8YrMy3N+fHbU323P4nneUEJrYU0BVSVrsFMe/ucBmDUdj8= 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=CnFOH73S; arc=none smtp.client-ip=198.175.65.10 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=1708697952; x=1740233952; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=tYze8IrJ1yAvzoappL3XtvPJ27bpcIPpI0JnZ5rnTDI=; b=CnFOH73SCQkUCVDTEHvttHi6GXKCfoEzUSkQVT/4cb1Umh3OwxZcbVvJ /btc+4QbR1+JJuykQpjULXmlzSikPGu75iqr+vWGcM0rrysSGJC3yy221 GNeZxBCBUYKjfi27aYgGi7i8yNJ/EHKnPpeWoMg5ig34K2coPsyPLutaD vYAuTTUkndHUMCyl6ik+O6Z0yiGphqp0Cy6taxTAj4XbcZMm4lI+H2eLG oAKfFM8Sobfy1aY0OTGKnzZfUei9P5KtYrP/RK6Tm326A9tUjAY3VoAVZ fUp7L7sQDQLdUuKrWovpEue117xkRW0Jn6HBU1LpI+quQsLcGXuzLBuCQ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10992"; a="20451886" X-IronPort-AV: E=Sophos;i="6.06,180,1705392000"; d="scan'208";a="20451886" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2024 06:19:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,180,1705392000"; d="scan'208";a="6291708" Received: from awvttdev-05.aw.intel.com ([10.228.212.156]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2024 06:19:11 -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] clkdev: Update clkdev id usage to allow for longer names Date: Fri, 23 Feb 2024 09:18:14 -0500 Message-ID: <20240223141857.3794855-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 ID information is limited to arrays of 20 and 16 bytes (MAX_DEV_ID/MAX_CON_ID). It is possible that the IDs could be longer that. If so, the lookup will fail because the "real ID" will not match the copied value. Increase the size of the IDs to allow for longer names. Signed-off-by: Michael J. Ruhl --- drivers/clk/clkdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c index ee37d0be6877..38549db691f4 100644 --- a/drivers/clk/clkdev.c +++ b/drivers/clk/clkdev.c @@ -144,8 +144,8 @@ void clkdev_add_table(struct clk_lookup *cl, size_t num) mutex_unlock(&clocks_mutex); } -#define MAX_DEV_ID 20 -#define MAX_CON_ID 16 +#define MAX_DEV_ID 32 +#define MAX_CON_ID 32 struct clk_lookup_alloc { struct clk_lookup cl; -- 2.41.0