Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp644231rdb; Fri, 6 Oct 2023 14:17:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGE8g8nksOlEaX032gT5UeZb+1Kzaeh+ixq3WgxthpLy6/OisQbEF321JqzUavjQ0yoG0mh X-Received: by 2002:a05:6358:8a0:b0:143:27e:d3cf with SMTP id m32-20020a05635808a000b00143027ed3cfmr10545978rwj.4.1696627074700; Fri, 06 Oct 2023 14:17:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696627074; cv=none; d=google.com; s=arc-20160816; b=zbjckA4VqGFCq1wq15ckw8HVOyxznK/iVfPmllUnQml6VCHjndRFq42KZRyxzs86Yf Sd1MrIkvKjFdmwEIBQH/4rGvRgRIKx/B1nKHcgXoX/hGUw5014+Ce4Dt4QKRbG1Cf3Uv kBxtOsN0hjp1AVMJkfGLKrUYRA0anoGqO6vIS01IabvnqFXaplwm2PLA+o5oF+X0sZ3P KlJb8AopkCgWOds6O5kSRKYncVFzt5e1+WbrebNqezD2RN+08//C10gMHceC5oisVAZn 3arbsn9PhrmaqzObnTtuARvQG2CfLb9jCQec+qzbU+i8+ITm3UesMp/yqumCa71+YPBA K81w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:dkim-signature; bh=Wfo4YqiJevFxT2ANmYz9EDuFHXzL9pI4Z9ll56yG/84=; fh=x5b8+TQr+ZfNT5tuauhsyXZwC5Xfg+omrmuywlYfLlY=; b=aQMlh8qjvK3sZRJNKNaUPlvFFvaiFQZifOses03PWDne2366w/cVsviWs2VW4asSaz 6+GKZV0vOsG6rb+hrtp8aQCU48YE5EwSXq/qncU0XlGQvUZJc5NNBVXH+QIMBklWTEwW z5XasdJbkEjMyrkOXT9xhA1SXzFOCLcXSOLwT+Ht2z0B+VlWD1DYBz2p/l1KfQNlzCUV m9fssvzyXcIdOv3ix7SnSmi+xqBpWwCPZmR6oWgMTUPCMLkLyo/X3IhZ0xgjuOT2kQ/q I9hK39NR5m1T41dCBw7HEu3KQMPuJR/F7YyeyB05YSHjp2tm0vf1Vvn8x1CxpsKlW2Va AOTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rFilQbMR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id z65-20020a17090a6d4700b002776a60ea68si4598616pjj.1.2023.10.06.14.17.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 14:17:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rFilQbMR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A2A4D81B016D; Fri, 6 Oct 2023 14:17:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233668AbjJFVRn (ORCPT + 99 others); Fri, 6 Oct 2023 17:17:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233624AbjJFVRm (ORCPT ); Fri, 6 Oct 2023 17:17:42 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B26E3C5 for ; Fri, 6 Oct 2023 14:17:40 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-9b974955474so462982266b.1 for ; Fri, 06 Oct 2023 14:17:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696627059; x=1697231859; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Wfo4YqiJevFxT2ANmYz9EDuFHXzL9pI4Z9ll56yG/84=; b=rFilQbMRyrI11jXv3rew07tbsSWJ5EwTvWkbAYUGP3SyF1YSmhHFeTFWNjz/W44b6M 8UPzWUdK56Ti6q3qtVqsCAwe2ntLoQVTw7VrdaxCtUZLGlHNrwaNCev3ko1/Q0iRXQ4l FiERf49JsIQYjODGO7NXDgbFH5VX+KFkWksGOz0Zgm3loWO61stXMI9Ym7GCIfKCbIvB Igc4vGKwxzzHfaMNfsWCEupTee5unKR1iilgqhElciLMurdtyJUT06gSDoFNU7H/fSCt xYAHFWINmyEPQumhHhhj68mpUWIzeGJMAVzkiRt3huBWD9agejqjKwXgWwfzjcySH4/B kQjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696627059; x=1697231859; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Wfo4YqiJevFxT2ANmYz9EDuFHXzL9pI4Z9ll56yG/84=; b=hbJo2ZQ2CqFP7FSJaJsCn5ko+c38SJaioyokQrTjDfRuXsSzL7YHdoeAAHpCwdkJDu A2eMCoYlmxldAA/LaTS5aS5xjDbBF2Qgcov1EUBnYve8vKcX29cIKK9Ek2TDAK9vP9xi h0qGhn26UWrGtbFKY5Ui3GRQRUJgHLoyyOrDOvckIQ5bjzsuE6zCca1zJEVyfV4qDsVb R84Cm8vns5lp+IEvJp5UYMj50tevmEfm9n5lgiNwYWxREZiloDEW78/DtbFMhb7lRv48 v8/iIh/vZfHP9quf1zQhTT9xse0VLF/BtzDnCCeUX3LIi/dipJGi72HBb8YInwtoIc1T OmNQ== X-Gm-Message-State: AOJu0Yz8OxFqrwrhVjBZfGtmgcQ30xJycPY3wVGfZ/PEDuzM9EAX8zrA eNx0D5ZvM3fpFqEVydYdQ2swFg== X-Received: by 2002:a17:906:51ca:b0:9b8:9838:1df9 with SMTP id v10-20020a17090651ca00b009b898381df9mr8532029ejk.59.1696627059244; Fri, 06 Oct 2023 14:17:39 -0700 (PDT) Received: from [192.168.200.140] (178235177147.dynamic-4-waw-k-1-1-0.vectranet.pl. [178.235.177.147]) by smtp.gmail.com with ESMTPSA id ca9-20020a170906a3c900b009ae587ce128sm3414983ejb.216.2023.10.06.14.17.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Oct 2023 14:17:38 -0700 (PDT) Message-ID: <8f243944-f836-4f80-9ff4-cc936ef57bed@linaro.org> Date: Fri, 6 Oct 2023 23:17:38 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 2/3] PCI: qcom-ep: Use PCIE_SPEED2MBS_ENC() macro for encoding link speed Content-Language: en-US To: Manivannan Sadhasivam , lpieralisi@kernel.org, kw@linux.com Cc: andersson@kernel.org, bhelgaas@google.com, linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, abel.vesa@linaro.org References: <20231004164430.39662-1-manivannan.sadhasivam@linaro.org> <20231004164430.39662-2-manivannan.sadhasivam@linaro.org> From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9XpDbt1hNwKQfiidmPh5e7VNAWRnW1iCMMoKqzM1Anzq7e5Afyeifz zRcQPLaqrPjnKqZGL2BKQSZDh6NkI5ZLRhhHQf61fkWcUpTp1oDC6jWVfT7hwRVIQLrrNj9G MpPzrlN4YuAqKeIer1FMt8cq64ifgTzxHzXsMcUdclzq2LTk2RXaPl6Jg/IXWqUClJHbamSk t1bfif3SnmhA6TiNvEpDKPiT3IDs42THU6ygslrBxyROQPWLI9IL1y8S6RtEh8H+NZQWZNzm UQ3imZirlPjxZtvz1BtnnBWS06e7x/UEAguj7VHCuymVgpl2Za17d1jj81YN5Rp5L9GXxkV1 aUEwONM3eCI3qcYm5JNc5X+JthZOWsbIPSC1Rhxz3JmWIwP1udr5E3oNRe9u2LIEq+wH/toH kpPDhTeMkvt4KfE5m5ercid9+ZXAqoaYLUL4HCEw+HW0DXcKDwARAQABzShLb25yYWQgRHli Y2lvIDxrb25yYWQuZHliY2lvQGxpbmFyby5vcmc+wsGOBBMBCAA4FiEEU24if9oCL2zdAAQV R4cBcg5dfFgFAmQ5bqwCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQR4cBcg5dfFjO BQ//YQV6fkbqQCceYebGg6TiisWCy8LG77zV7DB0VMIWJv7Km7Sz0QQrHQVzhEr3trNenZrf yy+o2tQOF2biICzbLM8oyQPY8B///KJTWI2khoB8IJSJq3kNG68NjPg2vkP6CMltC/X3ohAo xL2UgwN5vj74Qnl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NJYN/MxY8wuukq877DWB7k86pBs5IDLAXmW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <20231004164430.39662-2-manivannan.sadhasivam@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Fri, 06 Oct 2023 14:17:52 -0700 (PDT) X-Spam-Level: ** On 4.10.2023 18:44, Manivannan Sadhasivam wrote: > Instead of hardcoding the link speed in MBps, use existing > PCIE_SPEED2MBS_ENC() macro that does the encoding of the link speed for us. > Also, let's Wrap it with QCOM_PCIE_LINK_SPEED_TO_BW() macro to do the > conversion to ICC speed. > > This eliminates the need for a switch case in qcom_pcie_icc_update() and > also works for future Gen speeds without any code modifications. > > Suggested-by: Bjorn Helgaas > Signed-off-by: Manivannan Sadhasivam > --- Reviewed-by: Konrad Dybcio Konrad