From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B690F212B2D for ; Wed, 22 Jan 2025 12:41:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737549708; cv=none; b=pvWWXFmT+7JHrSniPNQS1aDoJy5O49HmolQQNcK9E9zWeB/QmwQZTkMK0uYyueiWWi1PZPPtEBH4/hhVGxsJkYGWqnRxLKlZW35EukkKNWJPuSt8IfuVSJDfmuYhOl0kLsY3Subzt7SuQbZmEOAMdJRXsirH7UNf5W3N4XRwbFM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737549708; c=relaxed/simple; bh=gvmqpricEpcg0Aj9+/F7NuMM8j4Q1897JU9gOAgFPL8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QSngEjMwrW45kp73rAZYmSaPiQQLMDwiLQxpt8k8+FG2ma4Nl2NGVRu7pibacNWOKKs7sTxy2THzbD6pcdgSPl/dPcVHF/Da8mTUIFXZI/OYEc1X3baD96yxbY00Ngro9bWHZw8LD5dbvrwE0QpewdGfg2SIUzBOBalEoUSl2jA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=h24IWfox; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="h24IWfox" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-436a39e4891so47091365e9.1 for ; Wed, 22 Jan 2025 04:41:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737549705; x=1738154505; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=pqkiUxCJwEipzWMbLEZbrYeDUBAJLus2EzOeMcJUspI=; b=h24IWfox3GdaHriYYXetYiyXgPcldy5B5T2EoOyDtwVCMSSqDDhHmwlneVd1jNJHTg zqZYZWGUV4U/CSaR3xiMSMcbGuQHxPx38rNy0+DB2q6ZkxFpzvQYwH+EuY85mcFlzPH7 Vo6H7w8sQe1xa8G1RTTmVf77QN4WeCTL/QUQOrSGUcjkt5f6as/1vU8tNTg2NxuAbw6p P/oP1vpUMLsHw+S+VHeG50Mf6mNubnVFZBxwdAoS1HNLvKM3jvVwIDflnX/N3KYS83Gg E92LwxyMuAqzSN70niH91yY1WJiuZGhiuJmep0Jb2U9hij6pQFZ6TSnwCq8rGgzWZMjw cOfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737549705; x=1738154505; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=pqkiUxCJwEipzWMbLEZbrYeDUBAJLus2EzOeMcJUspI=; b=kby+nurn7qs6oimsAHJ1DOEbChj1eAV1EKhjTUA6raaT5lWCDFF7VYn7Inf+mt2QsD R5WIh3jClCdPw9BqKOFKJ2sZve02D9PlgB9UOYW/QDkkUlbvBv8+ptF3Ib0WP5jZH8lx 55JiUeDTWgVdfRVNseMikHGPqvZBuqqS6ORzJDDsLvytbAuPWZYiHAk13o17QmHx9ryW +3lRhos/k0FBeh+3c50H4TXzAoTJh5hgQQX4HH8+6vClD6ReNI8VmjrWTIUdS3I8Q1NM RVeaVor1yxvNS3Pu1h7wEK5sq5nZZLGdV6TZ/08Rd110HDnhKL54nTaA95TM8cnxFebw p6Pg== X-Forwarded-Encrypted: i=1; AJvYcCV4CC+zcOutRr8AUbyc+tlHQBii4eLTjR7w64JmwjgSIx3uuw1qsolnXOEZW0iWx+RgZDzAS/Ew7sKgLiw=@vger.kernel.org X-Gm-Message-State: AOJu0Yw1oH0y8ypqrudbB47q1fj3KtxkZ3yw/VmTYw6uomVCpb+hiL9e M0xQO+zeWN3Ir+aHKFXXIpnrN5qjDhIGhvj4FcItKUkASnhMU0s53bXb+2aWUsM= X-Gm-Gg: ASbGncvUREw0FaIP05VL+CeoZigqyeGEx1Cx5QGwqApIuQJuBT4cc0eZmTrTLWvBRjV KC7f4TtMJRqinaEnqhMAVM89aIC0I/h7egch4gDVAEph//nFDK2LaEWHql3l9axy0Cn9vdixPrS DLKd28vatMKq7f5t/bHOJsYhM770JoMaJ5YIJCxoPbDTjuRZvQ41Y2Zlz5ihaF7VHokvUU67tV0 LtOOlmlQOLRtsTBjK5lFRjD16M4cJi70zIk2i3mDZndrDnCJ+dianPrn5fVQ1MNQRL6/RVAGnA= X-Google-Smtp-Source: AGHT+IEA2+PefGbBDd9kf5Ode3Is1wr6+YVdf3H9X/PUUkYizot9mKm50rI9cF5I9tp7GaNN+guivw== X-Received: by 2002:a05:600c:1d28:b0:434:9f81:76d5 with SMTP id 5b1f17b1804b1-43891434081mr186013305e9.22.1737549705023; Wed, 22 Jan 2025 04:41:45 -0800 (PST) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438b3124a14sm23456405e9.0.2025.01.22.04.41.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jan 2025 04:41:44 -0800 (PST) Date: Wed, 22 Jan 2025 15:41:41 +0300 From: Dan Carpenter To: Cristian Marussi Cc: "Peng Fan (OSS)" , Sudeep Holla , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , linux-kernel@vger.kernel.org, arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, Peng Fan Subject: Re: [PATCH 2/5] firmware: arm_scmi: imx: Add i.MX95 CPU Protocol Message-ID: References: <20250121-imx-lmm-cpu-v1-0-0eab7e073e4e@nxp.com> <20250121-imx-lmm-cpu-v1-2-0eab7e073e4e@nxp.com> <3b9a7392-8ebe-4d43-a111-68bb6d2f93b6@stanley.mountain> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Jan 22, 2025 at 12:22:18PM +0000, Cristian Marussi wrote: > > > +struct scmi_msg_imx_cpu_attributes_out { > > > + __le32 attributes; > > > +#define CPU_MAX_NAME 16 > > > + u8 name[CPU_MAX_NAME]; > > > > char is always unsigned in the kernel these days but strings should > > still always be char. Same thing in patch 1, there were a couple u8 > > names. > > > > While it is certainly true that char is the way to go for strings and, as > such, it is used elsewhere to hold the resource names across all SCMI > protocols, in this context it is a field of structure representing > exactly the layout of message reply coming from the server, and defined > in the SCMI spec as a uint8 array, so, we have generally preferred to > used u8 to represent such fixed size array all across the SCMI stack > protocols implementation.... > > .... not saying that it is necessarily completelt right, but that is the > reason we are guilty :D Fine. I don't have intense emotions about this. It does slightly bother me when we assume that the SCMI server NUL terminates these when we do things like: dev_info(ph->dev, "i.MX CPU: name: %s\n", out->name); But from a practical perspective we have to trust the SCMI server. regards, dan carpenter