From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 49658C5478C for ; Fri, 23 Feb 2024 16:20:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2l+LorB3tPThtLEdkTLrEj/kfCk3o5wSo+0YMEF2I6Y=; b=TTIR6+jxKX99kI AI4bTjDk68a1VCgXllt/fb+NVoJ5SEzPeH8ktCvn/x31CkNO0psYOM97Wg5SiuiLrNhGIsN0SS/AI noVK2LhBrC86m8+k4wVdAowFYf9bcz3fh2xEmp5YbljnbQ22WVuuoLWhtDi/W21b8O7/GGrVA1vuI X6JrNFOtzny4OPAlgE9JEOrGW396ZWOTni71FtN9dZ+kfZd4IjJSIM8P+84/hLwG6Ht3jCRcdVXFM ShsvqFt5xGrUQAESxtR9tso2q8R75Srxft+B5dKUAGjLf0T5L5hUywsN7JgE09Ow6ZQ8nXUYTh9Ya 0EjcAX3RlXu0af8FZ19w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdYHC-0000000ACeo-3vUi; Fri, 23 Feb 2024 16:19:54 +0000 Received: from mgamail.intel.com ([198.175.65.15]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rdYH9-0000000ACcu-3Dvk for linux-arm-kernel@lists.infradead.org; Fri, 23 Feb 2024 16:19:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708705191; x=1740241191; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=2jIGbrnkTFMbc7sLPfZtnESMOMkF6x2jJ+UzBpPr4jE=; b=DVxdadRuJ6zrbVKpkNe3teAXtI+ocQbuAlUva1pgQlR/NGTXF1O+tE0A 2dmqbA8eUB0U2CS0cZuNVVkWM2J2DbPpzkJ6QhmnRiiU5dc1JPPdBTqW4 5DGYdDq50C2GiUHURfEL0yENt+XsJQYpTJbBfLY9fJpStl4PoJKLD5FPS K1BczVsYvBRqIRSGZgdrA89BX/r92bgcvc2I6qYkx6uRncqev93UUUcHn i1TmJ2OQ5uMHSEf73DX6sR0hjp/sLoUa8BOtE7paVDvfgcS5yFvl+UUca p4XqgRy7t9gNbwhAUiDeiLzlYC17b66r4ZMsmG17OJGwJHZ5km8JvrOd2 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10993"; a="6844432" X-IronPort-AV: E=Sophos;i="6.06,180,1705392000"; d="scan'208";a="6844432" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2024 08:19:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10993"; a="913750327" X-IronPort-AV: E=Sophos;i="6.06,180,1705392000"; d="scan'208";a="913750327" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga002.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Feb 2024 08:19:47 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rdYH2-00000006wgK-3hBc; Fri, 23 Feb 2024 18:19:44 +0200 Date: Fri, 23 Feb 2024 18:19:44 +0200 From: Andy Shevchenko To: "Ruhl, Michael J" Cc: "linux@armlinux.org.uk" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] clkdev: Update clkdev id usage to allow for longer names Message-ID: References: <20240223141857.3794855-1-michael.j.ruhl@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240223_081951_863615_EC2B9C08 X-CRM114-Status: GOOD ( 19.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Feb 23, 2024 at 04:09:03PM +0000, Ruhl, Michael J wrote: > >From: Andy Shevchenko > >Sent: Friday, February 23, 2024 10:48 AM > >On Fri, Feb 23, 2024 at 09:18:14AM -0500, Michael J. Ruhl wrote: > >> 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. > > > >Perhaps you need to add a real example. > > How about: > > 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: clkdev_create() > i2c_designware.3942 > > The stored name is one off and will not match correctly during probe. > > >> Increase the size of the IDs to allow for longer names. ... > >> -#define MAX_DEV_ID 20 > >> -#define MAX_CON_ID 16 > >> +#define MAX_DEV_ID 32 So with the above example increasing by 4 is enough, right? Maybe we can be modest for now as it will solve your issue? #define MAX_DEV_ID 24 > >> +#define MAX_CON_ID 32 > > > >Do we need to alter both? > > It wasn't clear to why there was a difference in sizes. At the moment the CON_ID isn't > causing me an issue. Shall I drop that part of the change? I think so. -- With Best Regards, Andy Shevchenko _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel