From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DC427C64EC4 for ; Fri, 3 Mar 2023 10:07:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uJn4zJAw6u+58Ti3jWpA/+VqCJabAm3o9g3bKKNip6E=; b=UM3DZAQuLSYXVh 8jzPNlXkG1OTs/xBFRjWjEvtNfrEKmN0iiO1Ct7FWiQJwziWT/guaKRVuiTHbemfNWAkXi2UyNlRz TukdJBQSRCPw1BWV0v5OFsReui953VC85dtlxf+gSOwlrxiHPcjjCLp5VWW6IlL+WWK/TOnaWoKBt zT7zLqnRl/mg2X7qUj+Gp58xcHphdTZaUXxYFF6QrwefdKWa4Q9e8HL8YpUFyNT/9S675D+O/z+lr Lkrpp0s9QdNC+E9gY8CrByv+YPZyWH1vOhwDwaUoCR4C3EfU5ywJa/jm6wCt+n7BOfOnQjtY/UnQJ EMGKs7DdMb2XVnqLGDmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pY2Ix-005wld-4K; Fri, 03 Mar 2023 10:06:23 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pY2It-005wkO-CG for linux-arm-kernel@lists.infradead.org; Fri, 03 Mar 2023 10:06:20 +0000 Received: by mail-ed1-x533.google.com with SMTP id d30so8164306eda.4 for ; Fri, 03 Mar 2023 02:06:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1677837978; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=A52iRvnx5c7MGijeXJmmv5mrghysldEPBrnjdkAkJZ4=; b=yr1lGj5AdVK9kPgEvrtJdc3zZz5bDs0BSUoUjg+sHzLPIMJTsPXA3OQ9nUqXxlNLZ+ ZmLGPmzovNOCnWNSKxurap8WIvGeWrYRu80UjGAyRj8vm7cBTLTgMBajvllO4gZItrnQ XPfoX8g7C0Hp0ZZQ1dJQUG0uZXCHumzAVxP+yqxR5oWNsrDatY0vYddtrdgUSGV9PdMm 4EGZnFcJJ7WNoEGWhA5TE2hgwKollJcggbKcpjnWUHpOs1Mcjtz/9AvkcIE0byxowqAo 0LgC7WvNUc9Omqt0Nk9AZ7VOjPQlO2n555IuBNXFRTIvxJ/Z+q6BvNFEojv5DTF9Tz/1 P8QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677837978; h=content-transfer-encoding:in-reply-to: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=A52iRvnx5c7MGijeXJmmv5mrghysldEPBrnjdkAkJZ4=; b=rGquGfJ5kaGFjjhQvXxgTZQrmIiQj8+XCp3O5MZUygt+ZuBHcN3SbpJj1ax31TcNTJ zu1eadanwBRI6LjUcSLnOzPMQWurI5TMt7geuAnxuMCK30b703jH/ts4UsfPcToYA2ZS /nw+qgBU7KPbUK/pHXErqouS4KNTT/Nzx5cW4iFNqHCb8jV6ZdJpZ87eiiyvU8NXKmay P75OrtL7wkOOIH1s3v/aYumaYy+Nx/pDAoaQ2l7maMD+P7TqSFr+knReNTL0Au3sDhVe psy1nTdIH4OyqHIdw6702J2/9wLOyUvpYAISfvOFRmnofrEWOekpw73I4HarEUCwKoDk DIrQ== X-Gm-Message-State: AO0yUKUUQaoM53ENRQII4le5tbmgRhyAGOANeVPwUBvz0fDU6UY59U3Y 6uWyM1B75RGDubuu/KUdMcTHZw== X-Google-Smtp-Source: AK7set+ehJpZq1NePXVYHcpcgCL/tQBG+1grBrCeNQPJL4QzQpW6BkSTT9hiFKaiWt2LgNJT6dtWTA== X-Received: by 2002:aa7:c392:0:b0:4ac:d2b4:5e37 with SMTP id k18-20020aa7c392000000b004acd2b45e37mr1173029edq.39.1677837977750; Fri, 03 Mar 2023 02:06:17 -0800 (PST) Received: from [192.168.1.20] ([178.197.216.144]) by smtp.gmail.com with ESMTPSA id v5-20020a50d085000000b004af5968cb3bsm969650edd.17.2023.03.03.02.06.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 03 Mar 2023 02:06:17 -0800 (PST) Message-ID: Date: Fri, 3 Mar 2023 11:06:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH 08/16] PCI: samsung: Rename exynos_pcie to samsung_pcie Content-Language: en-US To: Pankaj Dubey , 'Shradha Todi' , lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, alim.akhtar@samsung.com, jingoohan1@gmail.com, Sergey.Semin@baikalelectronics.ru, lukas.bulwahn@gmail.com, hongxing.zhu@nxp.com, tglx@linutronix.de, m.szyprowski@samsung.com, jh80.chung@samsung.co Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230214121333.1837-1-shradha.t@samsung.com> <20230214121333.1837-9-shradha.t@samsung.com> <146301d94d03$002ba040$0082e0c0$@samsung.com> From: Krzysztof Kozlowski In-Reply-To: <146301d94d03$002ba040$0082e0c0$@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230303_020619_472915_6B7DECC9 X-CRM114-Status: GOOD ( 20.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 02/03/2023 13:32, Pankaj Dubey wrote: > > >> -----Original Message----- >> From: Krzysztof Kozlowski >> Sent: Thursday, February 16, 2023 4:37 PM >> To: Shradha Todi ; lpieralisi@kernel.org; >> kw@linux.com; robh@kernel.org; bhelgaas@google.com; >> krzysztof.kozlowski+dt@linaro.org; alim.akhtar@samsung.com; >> jingoohan1@gmail.com; Sergey.Semin@baikalelectronics.ru; >> lukas.bulwahn@gmail.com; hongxing.zhu@nxp.com; tglx@linutronix.de; >> m.szyprowski@samsung.com; jh80.chung@samsung.co; >> pankaj.dubey@samsung.com >> Cc: linux-pci@vger.kernel.org; devicetree@vger.kernel.org; linux-arm- >> kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org; linux- >> kernel@vger.kernel.org >> Subject: Re: [PATCH 08/16] PCI: samsung: Rename exynos_pcie to >> samsung_pcie >> >> On 14/02/2023 13:13, Shradha Todi wrote: >>> The platform specific structure being used is named exynos_pcie. >>> Changing it to samsung_pcie for making it generic. >>> >>> Suggested-by: Pankaj Dubey >>> Signed-off-by: Shradha Todi >>> --- >>> drivers/pci/controller/dwc/pci-samsung.c | 190 >>> +++++++++++------------ >>> 1 file changed, 95 insertions(+), 95 deletions(-) >>> >>> diff --git a/drivers/pci/controller/dwc/pci-samsung.c >>> b/drivers/pci/controller/dwc/pci-samsung.c >>> index d5adf1017a05..be0177fcd763 100644 >>> --- a/drivers/pci/controller/dwc/pci-samsung.c >>> +++ b/drivers/pci/controller/dwc/pci-samsung.c >>> @@ -23,7 +23,7 @@ >>> >>> #include "pcie-designware.h" >>> >>> -#define to_exynos_pcie(x) dev_get_drvdata((x)->dev) >>> +#define to_samsung_pcie(x) dev_get_drvdata((x)->dev) >>> >>> /* PCIe APPL registers */ >>> #define EXYNOS_PCIE_IRQ_PULSE 0x000 >>> @@ -51,7 +51,7 @@ >>> #define EXYNOS_PCIE_APPL_SLV_ARMISC 0x120 >>> #define EXYNOS_PCIE_APPL_SLV_DBI_ENABLE BIT(21) >>> >>> -struct exynos_pcie { >>> +struct samsung_pcie { >> >> No, I don't see benefit of this at all. How we call stuff inside driver is not related >> whether this is for Tesla or Exynos. We could even call it "pony". :) Thus >> renamings just to support new variant of Samsung device is not a good reason. >> > Whole intention of this whole series was to make exynos-pcie driver to support for all Samsung manufactured SoCs be it Exynos series or custom ASIC such as fsd, artpect-v8. But the patches does not do it, at least mostly. It only renames which does not bring any support... what's more, such renames without actual context - support for the new devices - is a bit pointless. > > While doing so, we feel for better readability and conveying better names for files, structs, internal APIs will help developers for understanding and reusing it. For example we know that clock initialization will remain common (thanks for bulk_clk_xxx APIs) so we kept APIs for handling clocks starting with samsung_clk_xxxx, but if we have to implement two variant of APIs, or struct targeting different platforms it would be good if they have platform specific prefixes. This will help in grep or future code maintenance. Without context it's impossible to judge whether this makes any sense. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel