Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1688556rdg; Sat, 14 Oct 2023 12:32:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHGTSq+Wcf3rhmWLyskMj9X7oqTAkV2FhDO4NPFk8HE7zFetLraaZqV8qIztc5dhNuyaCa0 X-Received: by 2002:a17:903:192:b0:1c9:bfdb:aad5 with SMTP id z18-20020a170903019200b001c9bfdbaad5mr15680422plg.24.1697311969264; Sat, 14 Oct 2023 12:32:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697311969; cv=none; d=google.com; s=arc-20160816; b=cCpeMc5kMROAtofXOF8fYktXST/xRz8AMxN3Uj7UcPG5cZZZcFy60YNMAXMIOCWjt+ bbwQAdFkJlq33c+etQEuj+gPwqeFpjdR6oSbOuegDmI8QLtwc94kMqpTg1RkoqNoZ7YI KSkCg1ertuz1Q8ljW4lVqdxScr//9dP4+o5Ol4bku6igGfxB5aQTKdW+hMGKAc8TIhO1 8W4oLNjcYJaYjuAAPETFjtwEeCEZamnJUJseaZLLbP2fIz3XSjqEMseE8un1ybzfAQm8 s/CI//bcCXPHMRD+4Q4hylgHf58026u38sV8mmK9/oM+LFFES746OQg+pcgiGVr1qk7w 4SfQ== 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=iKhePuOAptoWjKe6TXhvKtMSGVzQ/bretd2U0V8ZT00=; fh=uHRtXzXnvf6nNJh7EuQ7DCScLGu6sYSKNJ/i6m2/6OU=; b=isRS5iFfaq7t+/IEfIFE035ux32tDJPwu9n1dEbgS7KBR4Qp0QjxUo1fwh0N8T0YhC btZZym7zWeM4w1xtibDEVgAucgI3msPj8A0HtutRmUuabo0S+pxaRXeJ6lYE5LfCyozv JqUc4HbwJX90lDooDL+CyPDMlYgOyftaTrYj5uHMUM0l6SaxAjYOKJBrs3j9pDtiAtqa zkv0+EohbLq7otts2OuxvmiSJ9QOY5EwWvaDmTmC+XdeXI8Jv6YdKgDVuCA6Yfo+JVjb dxPWQHwRYonQghgTK1cv+Y2O2R2K5MX14eqg5Re+R3og/nWb/iH3qnmieDrkj4MTLACd onPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id i16-20020a170902c95000b001c9ff840285si4345643pla.414.2023.10.14.12.32.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Oct 2023 12:32:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linux.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 65F1480A9997; Sat, 14 Oct 2023 12:32:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229598AbjJNTcY (ORCPT + 99 others); Sat, 14 Oct 2023 15:32:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbjJNTcW (ORCPT ); Sat, 14 Oct 2023 15:32:22 -0400 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC7E1B7; Sat, 14 Oct 2023 12:32:21 -0700 (PDT) Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-1ca3a54d2c4so3915295ad.3; Sat, 14 Oct 2023 12:32:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697311941; x=1697916741; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=iKhePuOAptoWjKe6TXhvKtMSGVzQ/bretd2U0V8ZT00=; b=T3MIxVqTx5OQMYUB4hqV0keslkkqN4MIbRfPvi1+BRLAOWqbOA5gTZiRBLHf2rxHDx Asd2LULsB6jHcauFjYx/3Fmk4EINOp+RxsnqBjZYM5XrMoUjQjfvB5vVfVn/tmdCBwjV yMiHLDRjubcBx7IrFPF6VSyfLMZCRlxwG/Zn8VN75J2l00hz/stDhxBB28WysW1WCDpy LbMf8BgFHuEvkz4IvN27Fq/1A9O6FQBTbpReF8vmnQ12YH45hqgjO9c5aq/XcT/bfHNA IjPlGS/UuT6DrIjMd9Jv6A5ifHv9L5E373YZv1weOTt029rd560Vixmi29hb2opa3TxC BbGg== X-Gm-Message-State: AOJu0YzI/H5rh3QXUKlhNjrPQ/87/jjg1+UiH3TC49YpPR1RvV80Z4gz jNc0qCqZM9MUf3e2yc4fGNRRfv9TDRE= X-Received: by 2002:a17:902:c408:b0:1c5:f0fd:51b5 with SMTP id k8-20020a170902c40800b001c5f0fd51b5mr38241398plk.40.1697311940967; Sat, 14 Oct 2023 12:32:20 -0700 (PDT) Received: from localhost (fpd11144dd.ap.nuro.jp. [209.17.68.221]) by smtp.gmail.com with ESMTPSA id n6-20020a170902d2c600b001b9be3b94d3sm5840358plc.140.2023.10.14.12.32.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Oct 2023 12:32:20 -0700 (PDT) Date: Sun, 15 Oct 2023 04:32:19 +0900 From: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= To: Manivannan Sadhasivam Cc: lpieralisi@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, bhelgaas@google.com, linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, abel.vesa@linaro.org Subject: Re: [PATCH v4 1/3] PCI: qcom: Use PCIE_SPEED2MBS_ENC() macro for encoding link speed Message-ID: <20231014193219.GA1190809@rocinante> References: <20231004164430.39662-1-manivannan.sadhasivam@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231004164430.39662-1-manivannan.sadhasivam@linaro.org> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Sat, 14 Oct 2023 12:32:46 -0700 (PDT) Hello, > 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. [...] Applied to controller/speed, thank you! [1/3] PCI: qcom: Use PCIE_SPEED2MBS_ENC() macro for encoding link speed https://git.kernel.org/pci/pci/c/8da2e9af0bb5 [2/3] PCI: qcom-ep: Use PCIE_SPEED2MBS_ENC() macro for encoding link speed https://git.kernel.org/pci/pci/c/dc2f2a9d1cf2 [3/3] PCI: tegra194: Use Mbps_to_icc() macro for setting icc speed https://git.kernel.org/pci/pci/c/85e9eb3e7727 Krzysztof