From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 5C10B412266 for ; Fri, 18 Sep 2026 09:53:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789725228; cv=none; b=NNHPTjTEd8VdAgjk9+ZtcXTlaAPpNmkblaSK7/T2tkLIS6x9cnliDgqSZAQVO75SXPNmdxUadyoYTcYnjGO9nQmvaEWaMmkR+zby7ihp+ONBFyR7kFcosyfnmnkWmf2vM7AhJxO5eHZs16D4bMoqCFGDiBeuYmaQ0Dq2zv+Qbmk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789725228; c=relaxed/simple; bh=JOc4F8hkT++Suh2u1rGaZrB9TIGD6H1rr+XUW/Do3FE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Wwfp1of7IC7N17TbRlmAYqHqWPYWNF1M9jUBDrRyRdKEGTTDm9PQ/DzOJwd3mo2pzHtl9hQp6eV8fptu8TvbpFOGu7DI+kY/biuy91oHcRorlOlajxat5TQXQfb6fmkQh+wCaw8qPd/x9GgP7bXi4UZD6bBtqp2Myr9PuF4I/Lg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=kKCGluDo; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=aBHHxJqG; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="kKCGluDo"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="aBHHxJqG" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 68I9dsBj139300 for ; Fri, 18 Sep 2026 09:53:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 9H0b15hwR+X1R3+E8CNb2EtpvuqC0WA2TxRhDhiiOrY=; b=kKCGluDo1Uauwfwu G0gRnEKi8K2C0N6JHL8isiwVgVXPRkjqevT70AoxlTBWmS5mm4fZ10D4ORYZTAF+ 5r0maBrfZ3dngbKGO/jF8d60s/RryTl1SIN6Q+Qze7kRV26cmRd1yjBBLh3CZdPC epe1ogOHmCjRbt+Bn510qLLTelH2dhVzBexleiQ0T+lW+x/zZ6CrkUEOnTSbd5k3 IRH3CC87Ch7XLdEo44BzUR4G3x9U1KDXVCO4V9gQ+/RKsGf7uTT2zjPjrrpztx5G /rL1Du/Y8aIwotzOaHzhAemEoaFxVzadEkElwZk8gKhEq7LdCB9qKFrw6je9P3Yd +an1RQ== Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4gry2bs2r5-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 18 Sep 2026 09:53:45 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-936708f129aso88286385a.0 for ; Fri, 18 Sep 2026 02:53:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1789725224; x=1790330024; darn=lists.linux.dev; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=9H0b15hwR+X1R3+E8CNb2EtpvuqC0WA2TxRhDhiiOrY=; b=aBHHxJqGyUqjI18Rj1TV7v9zvsH1/3kBQWvtN0+iGLD61mVGhoeYcFBTviKP+4h1ql Cy3J81is2e1835Vp9fwoJxV54I6fd0OhVKBqiDemn9cKEv9PcislSgr50nFuLNRylrEO Gh5lEsWXT85GrlqRRqryzRl0fwb+G0TxPXUBGoxKWL8iY3ivo0xaEAsPg495jrOCh5mt LU+oMnahGPJ5uwtWb6gH+sylzzHiIy7gH5O9OfZwV5vdFLnAYbD64XjJKutz2SMXRClK NOJvORJX3SR7e3Cbp+aFWU3Z5iEsiXWvFdka5meo7JAru2L+oBsGX9gQVHt89sej1C5u JHQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789725224; x=1790330024; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=9H0b15hwR+X1R3+E8CNb2EtpvuqC0WA2TxRhDhiiOrY=; b=rvL5ZIWvOG3CS3G7hLLoU8z37eutGgUOnCn1Sx9R5ChDyN19Y1rW1ayJ6Y3Q57rAjw mI6qwUieabugN5SkLQ7DOpGFEdSPmmbRKshYc1292v174jbtMVsauS9su3+eHO3U7XlN b3vhcN5W5ygX570vlJqW+t7QuOXZBLh7gOxsI4Qb+7f+dhr0H54Iu5aBgGyxgYD2ebb8 hJJLJ6Ygn1bRUudr3s46ujXxd2TRGV3Jr56NTNBN6lBK8sx8AYerl7M1Sb8TNBemvyXW MU50v29ze8p3ab/F1df4v6uU+BqF2RP/QmqLX1R4/7uopTN1eCUY5kqQnYNxxr3AIUtT YRDA== X-Forwarded-Encrypted: i=1; AKwUvBxs6beE+0y/Quw3dxw9q8y0xIhNDU43WnfRkN8YPCgDGh02LC4DSGgSWX0id+2g62nkw5E=@lists.linux.dev X-Gm-Message-State: AFuF++ll4W+TdJORNaUg3u8IN4YMSBuXt3SUm1Swa94VcpSffVaSV8/e 4OAJXJGSF9gSgEBITzS0dZxIi46cg8ZdIvYUakuepzEmq8aDhJHpgvhW/XvnrrxwGXJWR9nRA/8 vDtG9EvyGt58sXGNAnHzd/HM2ouo4yFh0CrCEBtRNUqZdpbuofThfCLI= X-Gm-Gg: AYBFou1VjMqwqqXeRhgvIaElWHxZKWeCyyRf55a/Y/+wIW8Z5r/zrpp8U4r2jpNioRM 0FmueBj72hdvmyTo2OC6Fb82wvolQcS+Uuj0ub8faRfWc6q35M81FceCZsU9zf8xHl/nbb5ugue ScOS5KkANjzh3rNb7yP+BCLIyaZVEPfF0l6GT4qIo1G5zSnvtH+Csz71WrwhwouSj9SmFyD/xhX 8KmELBRiRq2V7zQpY6r3Qcv4tLi11vYfeJ1oAcLTuZ5u7xlJO98eshpdVQzNhUcQdoQhdGFuA0D FQs8ZgRtd8nq3XvauvribVP7qT2E62xJAjGDczKDTFVtYiKKyfpVrwrvwB6GntTa2wSaIOfATt1 y2WPq2BPb855grjiMf70YSK03da0WToZ1OOJLy3JjUn94E8RXTMwpW/R5y/pV7sA= X-Received: by 2002:a05:620a:1a0d:b0:93a:c10c:6b5a with SMTP id af79cd13be357-93bdc7237d9mr245917085a.29.1789725224503; Fri, 18 Sep 2026 02:53:44 -0700 (PDT) X-Received: by 2002:a05:620a:1a0d:b0:93a:c10c:6b5a with SMTP id af79cd13be357-93bdc7237d9mr245916185a.29.1789725224114; Fri, 18 Sep 2026 02:53:44 -0700 (PDT) Received: from ?IPV6:2a05:6e02:1041:c10:82ae:cd75:d970:e66f? ([2a05:6e02:1041:c10:82ae:cd75:d970:e66f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4871feb5d63sm3071523f8f.3.2026.09.18.02.53.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 18 Sep 2026 02:53:43 -0700 (PDT) Message-ID: <2104f437-e960-4e55-b0e1-2b37126e8c2f@oss.qualcomm.com> Date: Fri, 18 Sep 2026 11:53:42 +0200 Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 1/2] module: add SCMI device table alias support To: Hans de Goede , Bjorn Andersson , Cristian Marussi , Sudeep Holla Cc: Bjorn Andersson , Frank.Li@kernel.org, arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, imx@lists.linux.dev, linux-kernel@vger.kernel.org References: <20260918092951.5656-1-johannes.goede@oss.qualcomm.com> <20260918092951.5656-2-johannes.goede@oss.qualcomm.com> Content-Language: en-US From: Daniel Lezcano In-Reply-To: <20260918092951.5656-2-johannes.goede@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTE4MDEzNiBTYWx0ZWRfX4p2HM7DFOw3P jowvwc6+G2cDsp1T1rSPobxMJf4R2Z2bHcy4BAklmjx6wakRNyYGUACzflVY6ibZWJxkNdYhuIX 9xHuDMZokEdXZhteB2BsnREEwFaAE8SV+nvfCIzgwf2/hQ+aWHVVlGc5j43AUIxVn5A1Cvzyn8M LaoFm1ayocqnlGdaquytJDCp+Ovlxx1IFuQVeIICJQz+mvvybgXH1+SShw8KWEg0SaGei6PqyAx HogjFWZG+Mu4FGduBy9xffY1/6P13Rw+bWohJy6xx3AoZ4uyVMMqFRNEwZhgrI+OULPugU6wBSG 3d8yGUClwoSr2G/TmK+LdeWLlZWy1U1iEeRya4+p4pnvOD2Iy3V3TB4Z7C9xNjcAhNwE8pxvzVY MfquHQxv/chCa9uICH0K9J+OwJN4MGCwVcSI26QD37Up0TLATpYN4DaEWu7wKCGoQAwAbwmN5tD y/tB4Cf1aR4VNXJyYBA== X-Proofpoint-GUID: rq719TD1Pt52Jzdt7l8K6i0DWSpJa3VS X-Authority-Analysis: v=2.4 cv=bYP+w+PB c=1 sm=1 tr=0 ts=6aad0a29 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=VdqzKS8jKosA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=Qub20nr9Pen87uBCr1QA:9 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwOTE4MDEzNiBTYWx0ZWRfX/5MQGFDLSYHr 4F37kW5P1SU1vE+kz+7xIn3b1JSAleeQrya4Wu9Msz78vuWrZQQTvh+kPfIAykWcokrxNG1cUuK W8pl8P2rZsmeZsnes5Yrkfy6EV7CgRw= X-Proofpoint-ORIG-GUID: rq719TD1Pt52Jzdt7l8K6i0DWSpJa3VS X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-18_03,2026-09-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 impostorscore=0 bulkscore=0 clxscore=1015 suspectscore=0 spamscore=0 lowpriorityscore=0 phishscore=0 malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2609040000 definitions=main-2609180136 Hi Hans, thanks for taking care of that On 9/18/26 11:29, Hans de Goede wrote: > From: Bjorn Andersson > > SCMI client drivers already describe their bus match data with > MODULE_DEVICE_TABLE(scmi, ...), but modpost does not know how to consume > SCMI device tables. As a result, SCMI modules do not get generated module > aliases from their id tables. > > Move struct scmi_device_id to mod_devicetable.h so it has a fixed layout > visible to modpost, add the corresponding generated offsets and teach > file2alias to emit scmi:: aliases. > > Use the same stable alias format for SCMI device uevents and sysfs > modaliases. The previous string included the instance-specific device > name, which is not useful for matching modules. > > Assisted-by: Codex:GPT-5.5 > Reviewed-by: Hans de Goede > Tested-by: Hans de Goede > Signed-off-by: Bjorn Andersson > Signed-off-by: Hans de Goede > --- [ ... ] > > -#define SCMI_UEVENT_MODALIAS_FMT "%s:%02x:%s" > +#define SCMI_UEVENT_MODALIAS_FMT SCMI_MODULE_PREFIX "%02x:%s" > > BLOCKING_NOTIFIER_HEAD(scmi_requested_devices_nh); > EXPORT_SYMBOL_GPL(scmi_requested_devices_nh); > @@ -185,7 +186,7 @@ static int scmi_protocol_table_register(const struct scmi_device_id *id_table) > const struct scmi_device_id *entry; > int ret; > > - for (entry = id_table; entry->name; entry++) { > + for (entry = id_table; entry->name[0]; entry++) { Is it possible to rely on a NULL sentinel? Here if the id_table is NULL, entry->name | entry->name[0] dereference the NULL pointer for (entry = id_table; entry != NULL; entry++) > ret = scmi_protocol_device_request(entry); [ ... ] > #include > +#include > #include > #include > #include > @@ -951,11 +952,6 @@ struct scmi_device { > > #define to_scmi_dev(d) container_of_const(d, struct scmi_device, dev) > > -struct scmi_device_id { > - u8 protocol_id; > - const char *name; > -}; > - What is the reason of converting the char * to a fixed array? That limits the name and may result in truncation and potentially name collision, no ? [ ... ]