Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp644093rdb; Fri, 6 Oct 2023 14:17:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE522Ejjn6rHpWAPKKyaiHxUCTQQXNNvKrKZfkOVMz3ANcxDlzSf+8LOH6Ga56+P4n3R2et X-Received: by 2002:a17:902:e886:b0:1c5:f7e2:c5e0 with SMTP id w6-20020a170902e88600b001c5f7e2c5e0mr10001165plg.51.1696627054623; Fri, 06 Oct 2023 14:17:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696627054; cv=none; d=google.com; s=arc-20160816; b=ztg3uttOe2F7sXIWwMZDjQi4gl0X4Q8mAdoGvr9Zj6qxEcsjuqybluAHgu0MSnYgEv PVgaotX1X0etJM3r7T31DBMDWue8ngCLrCWEP/YAA+i4vS3KYG0YwaRIUzpcE11OaO9m VbzW9QIgMDM6tAyB1Lu4cwsXZ5WgII3VxyJXQSMuWZS0T6jjaJce9//gmddkDY1X3Lt/ RIbOdTrobrEKcXYhtBb+Hrj4Agu2Xf4Oek0HY6CEt4J3o2qY0z63QMq30ZbABSNpcunr PeDS84suXLkPhFg63GHqekyfgp0m31KpJz/lRfQq/DKCoHwBTrsRaFay0bek6xAPMNaH msZg== 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=HfLAikNcN/XdzSVOoxGWLWMaWoCAfh069Z2FHErmp8fnYzEcIHPJKiHNoR/0JOTw1F pCdvuJoTtlOl1mBmgPBoyndPB6Yf/vscThP8UVwjXc4WW07Pbu3Q8qmpaY0yHW/qwH19 9S6vn5CDmGlb6C27cfFbTk44G2poUfWNuKa2kLjMrR14Qi8htaKeCqqIz4Z97BDcsmyI q05D4/YRqVdinuNaTbF7ZUpfVyhsR6qi5LQ3TyYIusSXGpbs+J5u4XkrjTQsG//Doq1i AG+LwR9jk2FBpkZfCMt03STZ6uObJOMLXU6MXjEo+qigb/qJQvHXfDKl9ZoTR1/zfyc1 CYTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FbGoBOTL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id w9-20020a1709026f0900b001c7342b46e4si4274324plk.23.2023.10.06.14.17.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 14:17:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FbGoBOTL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 fry.vger.email (Postfix) with ESMTP id 5341380698DE; Fri, 6 Oct 2023 14:17:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233651AbjJFVRY (ORCPT + 99 others); Fri, 6 Oct 2023 17:17:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233624AbjJFVRX (ORCPT ); Fri, 6 Oct 2023 17:17:23 -0400 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C442BD for ; Fri, 6 Oct 2023 14:17:22 -0700 (PDT) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-9b9a494cc59so458301166b.3 for ; Fri, 06 Oct 2023 14:17:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696627041; x=1697231841; 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=FbGoBOTLgCodvlX9rJMGaVOF9zvtIJcApEkWtVpyjh4fXWM4tT1x9DsrqhnbrEOChl +6u1jONlYpBjxv8FJ3jO+PP4Fn9r2GJutoLTadtjvntD6JWilT1bEZjWvW6PE0SeDKln pT04Fn/W8vhR+WNoHZndM81BFN7wkaJwtBd+Ar0GNmAJ2MjbunZusTprUaQd3PFzxfO+ yokD8Ll5qCM6sxXLH2mpi3b2rRFrGZ4r25EE2OuCx+KkbHg+1juv+OYN5fZVJuqDEhWO mkA5br80agm4nRWrsk7HbYue0lC3kVg1lGNqlFsD3DIIPeCK9tCrPhh6dlwlhDkxfrYB P1TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696627041; x=1697231841; 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=dbIVRD+L0177CA5FRdeslcGveBOVkAz9j1ry0zxdUDvD8boq7pWeJQ0FCtWCEL+GOm ND1Q3PbNdN4WxF9EXxAaL5lmC1KnbD9vPdeeMFCR9RhA0Ed6EJmkSArihVvoLivKE/ai fi8pqNs2bjYibE4IhPfLcgbXURtzK00E4rbLv+mmskl1phzeuR3SZavWvdq1D2MoXceC 2YSx9qomzs6ulOylj9wFqjCenfh7HRHOxPAni34wS4jLk1rteODUloGPjfQY5Vx4vil8 Xo3f1e2N4Qfw3WHJPP/MkWjyDwMHr2y3OtTdsSJaqxnsV2c0Q1QNgUYIxjMxLkEgQbkn WsLw== X-Gm-Message-State: AOJu0YyLcFAQl957xaEXJqzIBHJ6b37MBqQWEHKr7e0ZOeM9zINRXo0o n+EBKIyecafjT1Ay13xkTFrFDw== X-Received: by 2002:a17:906:ef90:b0:9b8:8f9e:1827 with SMTP id ze16-20020a170906ef9000b009b88f9e1827mr7268312ejb.74.1696627040881; Fri, 06 Oct 2023 14:17:20 -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.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 06 Oct 2023 14:17:20 -0700 (PDT) Message-ID: <45982c83-07d5-4ffa-8f29-5e6a379b222c@linaro.org> Date: Fri, 6 Oct 2023 23:17:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 1/3] PCI: qcom: 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> From: Kon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B7k86pBs5IDLAXmW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <20231004164430.39662-1-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 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]); Fri, 06 Oct 2023 14:17:32 -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