Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp578317rdb; Thu, 30 Nov 2023 12:17:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IGhwYSiz2iLdKrbUhXEP6ucRh7kvcj7NUr4AHIRpoeP/s7vqoxBW5b5j5JLMpXPUQvu4PHW X-Received: by 2002:a05:6a00:2d86:b0:6cd:da30:4d6e with SMTP id fb6-20020a056a002d8600b006cdda304d6emr5916719pfb.1.1701375469763; Thu, 30 Nov 2023 12:17:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701375469; cv=none; d=google.com; s=arc-20160816; b=H62d1p12lg0dgX9iwQsy71XcFcS9zDTYpF85UIcPt6JmN5dOf/9rsAC5ulqPcuBATZ q1LasFEJLOaMUnGyKyY/l0UoZ3Ce0ptIj/x8cJHxpCzm+ZT7AWSZcraiiqkZIwC6VUxw lEhDtYKEJKiMuYwd1rTqwUxgln8+TPH3eik4cqZrVZanSRHBfLdwk46GgS3OqcDW/PJr 76DqBASIMKRdOtiYr7OnX9UExWtJJ+ahlC0n+NFd5REQ3K23ErS6Yzuc88bdytQtz4UA 0CxzPSlUzNqUz2Qba7zKBu1FqVHBzy1PcRg2soUNwz3l2NptqVGabB4TkamMAvfbJrFN Bf7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=waTuU+JMhDMOpvOv0LxAJ6RE8CxcXlL1R8YReRzQvPY=; fh=blP244f2qDVx6ecrqRHRijTQ//q0zrVclzBMiY9YQ5c=; b=rh8zl0kuu2OJkmcDnThCTMhwci4h1PAj0EcZU6DWA1rrZixq3hwXvHR4EAhrHEo+E/ uJdcIfODhfgbp+fyz8I6H0vCal6ulU3EbjrDOb6r+ensmiVdHN7SnqTRzxpz8Gxi8ZVE tdLYvOXOT0wQnlTJnE0bMxzQNicSAyVHJCjUYTdMrMnYEq8FssmtIDhPeFA4ogmrmcgK cZuUUcF6SYuYzgmVYMpfbzCqnym8RIBwFbal5cq6lEMfqDgHXUODlywWct9hqEDLy606 mDUM5f0SqIOu0/YiseoJB8c9Z9WkWIpdzuXYbBVnenaqgLBfQqpaNFWrO1RQK7cate/X 1Pfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id h27-20020a63575b000000b00565f0e9cfbbsi1983818pgm.382.2023.11.30.12.17.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 12:17:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 3F70A807406E; Thu, 30 Nov 2023 12:17:47 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232278AbjK3URc (ORCPT + 99 others); Thu, 30 Nov 2023 15:17:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235228AbjK3URT (ORCPT ); Thu, 30 Nov 2023 15:17:19 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 381591BC6; Thu, 30 Nov 2023 12:16:59 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id BB9321042; Thu, 30 Nov 2023 12:17:45 -0800 (PST) Received: from bogus (unknown [10.57.42.162]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C9D1F3F73F; Thu, 30 Nov 2023 12:16:56 -0800 (PST) Date: Thu, 30 Nov 2023 20:14:54 +0000 From: Sudeep Holla To: Sibi Sankar Cc: Cristian Marussi , Sudeep Holla , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, quic_mdtipton@quicinc.com, linux-arm-kernel@lists.infradead.org, quic_asartor@quicinc.com, quic_lingutla@quicinc.com Subject: Re: [PATCH 2/3] firmware: arm_scmi: Fix freq/power truncation in the perf protocol Message-ID: <20231130201454.jhh72rmrf6bumw2x@bogus> References: <20231129065748.19871-1-quic_sibis@quicinc.com> <20231129065748.19871-3-quic_sibis@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 30 Nov 2023 12:17:47 -0800 (PST) On Fri, Dec 01, 2023 at 01:02:25AM +0530, Sibi Sankar wrote: > > On 11/30/23 21:55, Cristian Marussi wrote: > > > > Ah right > > > > freq *= dom->multi_fact; > > > > does the trick..but cannot this by itself (under unplausibl conds) > > overflow and does not fit into a u32 mult_factor ? > > > > dom_info->mult_factor = > > (dom_info->sustained_freq_khz * 1000UL) > > wouldn't having the 1000UL ensure that we don't truncate though? Correct but the point was mult_factor itself can be >= 2^32 > Anyway will drop the patch when I re-spin the series. > Are you re-spining just to change 24 to 32 in PATCH 3/3, if so no need. I have already applied 1 and 3 here[1]. Just waiting for the builder results to confirm it -- Regards, Sudeep [1] https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux.git/log/?h=for-next/scmi/updates