Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1245742lqe; Mon, 8 Apr 2024 03:24:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXtmxC/rOTQsrs7KrozKH31BaLmXJJEOp49B3UYIYcdMckmBS/org5+1WNjVYRLRQo3ArVcqvL8kAdFYIqJqgMCwfMBGP9YnUds9ZoOYQ== X-Google-Smtp-Source: AGHT+IGaAIYwS0rAgT9W569mz+3PXOX1Ac58xIJu3UaiQAlng7RsnThaN5IveD6xmtHgiuQx/Krd X-Received: by 2002:a17:906:bc8c:b0:a51:a28e:837e with SMTP id lv12-20020a170906bc8c00b00a51a28e837emr5064490ejb.31.1712571851987; Mon, 08 Apr 2024 03:24:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712571851; cv=pass; d=google.com; s=arc-20160816; b=MB7pW472BoiMzlaxyVvosZSlOKD88Bl4JYx/DqTzY7RHdNpvPLoXBDSNjs78qV4p6X hQSAmTNEa00Q6O8vc78iZ6osILC9xvkl0iaTt9b/IKW6fRycfCVD+mcdgukZu9vWItA/ ag8UxpNNcCvrL+5LIOrdFUggWhfOE3gfhhNyP2sbJHpS1jCWbBfe9SiWZQUcbM12UTx4 zZz9HHv2ddKxuxepIZ3jVflJ0B4ZevI739ThSqnRPAZe7zxnlKKwa4nBc14NCPlKDK61 nzXB6b39d38SdVyoxVSNBlavSFI4I2VYGq/N2k1hDaqD7jgZ3PvYteQ3dVkHkzdHweoe JL9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=V6vWmXTnIuRI/4gpiOh/ZT7mEvfeSp6w0CufOzbujAA=; fh=CGvxyIZMqqDD+W4JbDY5r3cns2fTgnycg3JXpq6fw74=; b=mbbw3TsOxYiUebsm/UNRoxjx/Urq43PuiGMmeGKzNb4aAgELVHvSB/hxQorCs0IREX c3tos4zxZZTsgOpG21914xcdPsOcebLy9WcS4MFNCr5si0PCc4cpGpIjmyK6iLinTRgN yOszcvMABRb83jHzFkOMP0A7dSsuAcf/hVAUXjVZKduwRRMm4w0DYT+PllA03ENSguPE gPkEikmVGk6NEGNNwVjPzVE98D8Asot8HsmgTKNazmYX+i+zcR9YOgMWpBSwdVK6q8lv Drfuy3DCm3V+6qN1rDMJ0wkR4xzkkin84Fq39EseMDiWoCYZMTNMiHOQPRx2bT1lQzbu /pgQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=d2kxEXwo; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-135221-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135221-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id gn34-20020a1709070d2200b00a51d6db14cesi783999ejc.401.2024.04.08.03.24.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 03:24:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135221-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=@ti.com header.s=ti-com-17Q1 header.b=d2kxEXwo; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-135221-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135221-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.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 A08051F226EC for ; Mon, 8 Apr 2024 10:24:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62350535D1; Mon, 8 Apr 2024 10:24:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="d2kxEXwo" Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 D0D4152F82; Mon, 8 Apr 2024 10:23:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712571841; cv=none; b=TZ0qJ05PbIJtrvovgiqYpveYcRYn4qE8rdgahPocIFa+SdKGfX2p6heoHoNc8H4pklXJbEHh/j5GHGbu30uwWUNAxgWnxmdMhgUXcaMvDnx00J1sBrUgOSTt0DLQIQRIbB3fkUD7a7s8QVyZ0xDO8TwGZTImKNS40RsYo+lNlLk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712571841; c=relaxed/simple; bh=sMw/aCXO7lYISwDTZK7qydxkKg61DpDEmB/fTt38OmE=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=F/lXFqvCM+5IB2abRebjBVBj3NuX+Bk9TFz8SZUKrBN8Y/toy/eOg8xGql/0Liqu0P6ogqMngqDzz7XMDCg+0p8WSlNn2RQRLjoW62YBEUeIfWRb5hfmbdiXDKVfg05B2S35Z/hP0Il6WICifmE/xb5IZn3iNpEC4yA2Hunctt4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=d2kxEXwo; arc=none smtp.client-ip=198.47.23.248 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 438AMjY4049014; Mon, 8 Apr 2024 05:22:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1712571765; bh=V6vWmXTnIuRI/4gpiOh/ZT7mEvfeSp6w0CufOzbujAA=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=d2kxEXwotmC2OTE8c9G8+rRanvh9ajhnpW9SWxxxJWioch4VxJlXccYWkhOmBCsUY g5tQjVQnKnIrsFxyMO1PXeGzQjE2rNgKEoBxZYaJ/3zfAESxGvAcZCSKAWKDmDZbK0 mT1rE1OhOqRGjnBN/dWvoe7WZq+WBhJZ92/Ge+Ak= Received: from DLEE102.ent.ti.com (dlee102.ent.ti.com [157.170.170.32]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 438AMje0042797 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 8 Apr 2024 05:22:45 -0500 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 8 Apr 2024 05:22:44 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 8 Apr 2024 05:22:44 -0500 Received: from localhost (dhruva.dhcp.ti.com [172.24.227.68]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 438AMicH017293; Mon, 8 Apr 2024 05:22:44 -0500 Date: Mon, 8 Apr 2024 15:52:43 +0530 From: Dhruva Gole To: "Peng Fan (OSS)" CC: Sudeep Holla , Cristian Marussi , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , Dan Carpenter , Andy Shevchenko , , , , , Peng Fan Subject: Re: [PATCH v8 1/4] firmware: arm_scmi: introduce helper get_max_msg_size Message-ID: <20240408102243.py24oa26ycnjha3m@dhruva> References: <20240405-pinctrl-scmi-v8-0-5fc8e33871bf@nxp.com> <20240405-pinctrl-scmi-v8-1-5fc8e33871bf@nxp.com> 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: <20240405-pinctrl-scmi-v8-1-5fc8e33871bf@nxp.com> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 On Apr 05, 2024 at 09:59:32 +0800, Peng Fan (OSS) wrote: > From: Peng Fan > > When Agent sending data to SCMI server, the Agent driver could check > the size to avoid protocol buffer overflow. So introduce the helper > get_max_msg_size. > > Reviewed-by: Cristian Marussi > Signed-off-by: Peng Fan > --- > drivers/firmware/arm_scmi/driver.c | 15 +++++++++++++++ > drivers/firmware/arm_scmi/protocols.h | 2 ++ > 2 files changed, 17 insertions(+) [...] Reviewed-by: Dhruva Gole -- Best regards, Dhruva