Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2479196rdb; Thu, 21 Sep 2023 22:41:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGeNxF3v5P5145zgN07L+Fpmy6wBZabyx8MfhOZGXA44WgWZyv285KaIIyl/uCX9G5CCzjl X-Received: by 2002:a67:e8da:0:b0:44d:476b:3bbd with SMTP id y26-20020a67e8da000000b0044d476b3bbdmr7453999vsn.0.1695361282004; Thu, 21 Sep 2023 22:41:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695361281; cv=none; d=google.com; s=arc-20160816; b=zKEaqPSMpFGDmsREXU6G+QdBfDyANQ6lgTtri2tZ+wJo2i6v0dQUEAuORW+hERSd88 eHvi2inPEu8iWFSn9zWOovLxc6SCh+UwEyx+0++YpRfj0rY1YAnDI4kCUxpH8WUwaSsv YLNM7dtciw9x2CQ85FnnZ8DmefMdAlMuJV0Z2KQYhJ94gMVTyoppKlikLlR8COr5294m qbF4y+mGBTiZaQruMGPyCd/f2sBxXMHx0amD7ICjc7xIRVSMAnNchYvRXG9va2OjmyTw WboyQ5+6ZieMxWVmQHgdiXtQOv82n3yfhESNBUDswRj+PP95sYVZqRJSNFQHzZjz51od tBwQ== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=y6FcigXJsdBYuopdJxzqdyc5vjBqucHksGMym4CYbwI=; fh=9p2Xdd4SpwuFHgY3DQxtkwFz17e/Z4OewEIo7vC16Ug=; b=OQ9VqBtj7qoQmkWczghzESoVOmnJZ4UAjGrjceKaKHNWxkiOfWoOEdHj5VGF16CzMr 3TeY+cyTCC0o+sXKVYdij9jjWYu95Da16uDput9rPM1jdD1UR2aFQTbqRLqa1ciWPEQE EdIPugbSjSvj1Wf10lPhyzXZerXZOXPrnuxdDx12qz+YFk7c+/qjp8Us/sLNqODi++19 Y4kXlNk3kRAazQDgjY/cP2uZKVHzFYpATB7TUPkSm29bj+xEB+Lz4F40VI/V+ilCmPPz 3/XbSEfZGCgZLf3AXP2AKN24Auk1upn8/t0P5AchiwK/73U6r59epyqnRsM4jXCUu6Nw Zuug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=a1GX0xFk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id o15-20020a656a4f000000b00577f87e6210si3413390pgu.332.2023.09.21.22.41.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 22:41:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=a1GX0xFk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 6CB32829E5F7; Thu, 21 Sep 2023 12:42:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230268AbjIUTmD (ORCPT + 99 others); Thu, 21 Sep 2023 15:42:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230146AbjIUTlz (ORCPT ); Thu, 21 Sep 2023 15:41:55 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E9386FEBB; Thu, 21 Sep 2023 10:51:11 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1c465d59719so10307235ad.1; Thu, 21 Sep 2023 10:51:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695318670; x=1695923470; darn=vger.kernel.org; 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=y6FcigXJsdBYuopdJxzqdyc5vjBqucHksGMym4CYbwI=; b=a1GX0xFkvD7Ue+OmUisIE3vullsQjvAlFvpqDp2QLpt8OpnlNWoGqsMOAcCMgKI+Qv BMQeL5sa6BD8fmFnzozFd9wdoPjhjSvTxkEJeZjL8IZ22tEsBZSA6AL3NekeJF7h8ml8 zouEUAro3eZRtlQr/RS1M6ySR4Ahf7dIW3vgldcSOc9MdKBPgUcMPB3gMJK05cuu8Jw1 AhQj3HSGfGQa359IQNnfN4YxpsuFIrfRusIlgAhb3IhcddLM/8V5oGjlagWX1GPZD8eJ crHuUWJlKTt/cXk4sFa1LZ+saCEXtrGUC0XFnkiAMNU6sO9BDIL5F+hvTO0eCE/jebSN V/BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695318670; x=1695923470; 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=y6FcigXJsdBYuopdJxzqdyc5vjBqucHksGMym4CYbwI=; b=daizfSa2J2LPYM1SgV0YWFEg8+ee39pyZe/rF7NKZZ/KRBS66IYAc2IZ9VqzQbBTK4 c99CRY0O0lQPkjeFFOwZbMuDgzzH5pfBHqWY4ZTFMDiyi8RZfLYoXBs9uAJ9AP4ScQiY cG+qZVihCLsdGhReotB+oAKH16uzcjMvkQB5jS9tRfUXzK4BzKb1qd2wR199L2ybFayh a0iI+44RHC2nb+WAQIZWKdcrOEkCLbXfotLG95HwbnmcJxyP4ViHryzDnPv8smorWcJ5 qUsYLZls/fXZYPFlfmT82hlNdn32LoVm6EAa6abfWLO8AEpKnifMePf7idQ048UC3WAW NeRg== X-Gm-Message-State: AOJu0Ywfv0i0TzFxsJTlbmFEyFR/69IwWfxIis5V7xWSonL2Ln8ycMDR Tahg2/FjjUwKl1zTfMXQG1c= X-Received: by 2002:a17:902:8c93:b0:1c3:94a4:34bd with SMTP id t19-20020a1709028c9300b001c394a434bdmr5164091plo.40.1695318670555; Thu, 21 Sep 2023 10:51:10 -0700 (PDT) Received: from [10.67.48.245] ([192.19.223.252]) by smtp.googlemail.com with ESMTPSA id l19-20020a170902d35300b001bf5e24b2a8sm1787856plk.174.2023.09.21.10.50.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 21 Sep 2023 10:51:10 -0700 (PDT) Message-ID: <63152382-b614-c960-888e-723c955bb109@gmail.com> Date: Thu, 21 Sep 2023 10:50:55 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v5 net-next 4/5] net: dsa: microchip: move REG_SW_MAC_ADDR to dev->info->regs[] Content-Language: en-US To: Lukasz Majewski , Tristram.Ha@microchip.com, Eric Dumazet , Andrew Lunn , davem@davemloft.net, Woojung Huh , Vladimir Oltean , Oleksij Rempel Cc: Jakub Kicinski , Paolo Abeni , UNGLinuxDriver@microchip.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Vladimir Oltean References: <20230920114343.1979843-1-lukma@denx.de> <20230920114343.1979843-5-lukma@denx.de> From: Florian Fainelli In-Reply-To: <20230920114343.1979843-5-lukma@denx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 21 Sep 2023 12:42:05 -0700 (PDT) On 9/20/23 04:43, Lukasz Majewski wrote: > From: Vladimir Oltean > > Defining macros which have the same name but different values is bad > practice, because it makes it hard to avoid code duplication. The same > code does different things, depending on the file it's placed in. > Case in point, we want to access REG_SW_MAC_ADDR from ksz_common.c, but > currently we can't, because we don't know which kszXXXX_reg.h to include > from the common code. > > Remove the REG_SW_MAC_ADDR_{0..5} macros from ksz8795_reg.h and > ksz9477_reg.h, and re-add this register offset to the dev->info->regs[] > array. > > Signed-off-by: Vladimir Oltean > Signed-off-by: Lukasz Majewski Reviewed-by: Florian Fainelli -- Florian