Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4488344rwd; Sun, 4 Jun 2023 06:26:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4yieDIr7W+oo5P9Y/IEdixoS9Bi01C0RipuZbzpsh1LLgaeMOIh2awcVx8bkKweTAB0M3N X-Received: by 2002:a05:6a20:728e:b0:10b:78d7:502 with SMTP id o14-20020a056a20728e00b0010b78d70502mr1011952pzk.36.1685885207629; Sun, 04 Jun 2023 06:26:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685885207; cv=none; d=google.com; s=arc-20160816; b=oXGKxs+P3Sw1Xq3q95/uWHglUOspdj9CZ7jQMg8yMNHtxbMPklMjsl6rGdKN/QZgud A40oHMXWPLasrl7egKf559fqCMyBN4ko2mrwxNxYUns/6qeIaq7C90gpuNYINzXB/9sZ QsztuFTtt+E0RMq8povOEwzAF5Cphn4vgvLfHjYA8ze8S6imDgNQaNt4xr3L6OjbHaM/ KYw4Iyz8ipTg/6kPb344cF65HcgBD0CM09Tka428aqmUnPHl6/4f9QRzE/SoAbi4tyd5 s/3MPvRZGCaFJtPV1NHmTGWcVRpmczCblcnRrYSvEWKXoew/x9dJ88gz00tqMW9pb2xc imeg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=7koqCf4VFYg5A/2SlKvWQmfNZkGvHu+fwrX65NT2BI4=; b=AFLqET7reYDXul6nutjWytnrhVOOBOapkxZNoUb4U2UcGLqxthZghQLyITXLhix5ha a0M36cujoqYhwXdO+s5XAQBnAOYbHAIdGZ690wzOFOHKeTN20YP67KodxIdu5LIYBXvH EoJRMKTWVHWD5AYl3Tzn571SmLagKEYzQPOmqYfc9hCFhqGWRelqzmqv33WP3GQwJGmv ay+3VOeKcanXMRlVehnOcFcZtQgtmHzna23xU8s/aPtTW3LMaWsdXpKERp8cFp1nzfUD BePmr2g3yLh55sH0pB3QQrAhhHrvzKnRaI2yxae8NvvLPLGpTSLz6RJcq/oAgxQhoRjA 00MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jMZgvtnF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020aa79f8b000000b0064d3e651979si3827372pfr.233.2023.06.04.06.26.36; Sun, 04 Jun 2023 06:26:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jMZgvtnF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231321AbjFDNRm (ORCPT + 99 others); Sun, 4 Jun 2023 09:17:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229954AbjFDNRl (ORCPT ); Sun, 4 Jun 2023 09:17:41 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0B63B8; Sun, 4 Jun 2023 06:17:40 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-977c88c9021so164109766b.3; Sun, 04 Jun 2023 06:17:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685884659; x=1688476659; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=7koqCf4VFYg5A/2SlKvWQmfNZkGvHu+fwrX65NT2BI4=; b=jMZgvtnFApMUryc5DT7S8bjme4Qu0G0eeb8MHj7I7ZZSFcLIIEE66aQJvSX9v/PjSK Qla4Dhh0sY0o4psUyfZVUyJl8vHiKe/wIKZk9rBAtRzpjgjE5gTEWS/BbzRI8g6sd64d 52OB/NWm8zms+Xw8EzaCDLo4GxvRLVV+aGWKQyjFGPX9zY8W7cmVcuijwWSqM9iZ5CAe kPVZh48BVRYR8ehICFc1RRXkSnnFRip4jEY9ZAwd21rD+yil3n//VdMNcJFN/nUnf8mv wCy4L/3tCKgikqc2Abaji7GTuVRmjqd3dstJg0uitXWM1WlmUZMINZGlkY3qZwngIDob fUeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685884659; x=1688476659; h=in-reply-to:content-transfer-encoding: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=7koqCf4VFYg5A/2SlKvWQmfNZkGvHu+fwrX65NT2BI4=; b=Gmesh5OfdRc0WM7dwnpNHKnyQyS7mSaL6dsfcuiD4QDF7rwDKu3sUJNUJJZFdsGvsh jMIbjatPX678eAoHpnc+NvZKYodDrSam8NO15nfP2ROgPdwv6/9hTF1avvd6nodsvNpp n3N7SwZuHdHst/Mfu2hKo+uHXaQ61bpTU6x+rAmE9qnfbei4liCNzi1WQYFMzkBl8kS2 aZiC3JBNbR9wE4BKs5LjVzyEPaLugymOepd8pGUhBW7lVbh1mADTYcbaeHC5b0BcxFCK 7bg/MY4L1wPnkxTZw5Pv8L5D6Yo9ySApPkW8PqC6XiCJfNnS3dcrYf4/MdYQ/IJ4h/x3 6B5Q== X-Gm-Message-State: AC+VfDxOBtHu3M/TxwZKKj3Pm6LvdHpBbepp5YtteKxZ57H2S7TEfkrx gqlnyR5TIVi4srQyYFCiMUk= X-Received: by 2002:a17:907:720c:b0:973:ff8d:2a46 with SMTP id dr12-20020a170907720c00b00973ff8d2a46mr4415968ejc.3.1685884658963; Sun, 04 Jun 2023 06:17:38 -0700 (PDT) Received: from skbuf ([188.27.184.189]) by smtp.gmail.com with ESMTPSA id s18-20020a056402165200b00510b5051f95sm2730393edx.90.2023.06.04.06.17.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Jun 2023 06:17:38 -0700 (PDT) Date: Sun, 4 Jun 2023 16:17:35 +0300 From: Vladimir Oltean To: =?utf-8?B?QXLEsW7DpyDDnE5BTA==?= Cc: "Russell King (Oracle)" , Sean Wang , Landen Chao , DENG Qingfang , Daniel Golle , Andrew Lunn , Florian Fainelli , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Richard van Schagen , Richard van Schagen , Frank Wunderlich , Bartel Eerdekens , erkin.bozoglu@xeront.com, mithat.guner@xeront.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH net-next 24/30] net: dsa: mt7530: rename MT7530_MFC to MT753X_MFC Message-ID: <20230604131735.f2clcinq67wspuun@skbuf> References: <20230522121532.86610-1-arinc.unal@arinc9.com> <20230522121532.86610-25-arinc.unal@arinc9.com> <20230526154258.skbkk4p34ro5uivr@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Sun, Jun 04, 2023 at 11:06:32AM +0300, Arınç ÜNAL wrote: > > Even better are: > > #define MT7531_MIRROR_PORT_GET(x) FIELD_GET(MT7531_MIRROR_MASK, x) > > > > > > +#define MT7531_MIRROR_PORT_SET(x) (((x) & 0x7) << 16) > > > > > > and here: (((x) << 16) & GENMASK(18, 16)) > > > > #define MT7531_MIRROR_PORT_SET(x) FIELD_PREP(MT7531_MIRROR_MASK, x) > > > > No need to add parens around "x" in either of these uses as we're not > > doing anything with x other than passing it into another macro. > > Thanks. I suppose the GENMASK, FIELD_PREP, and FIELD_GET macros can be > widely used on mt7530.h? Like GENMASK(2, 0) on MT7530_MIRROR_MASK and > FIELD_PREP(MT7530_MIRROR_MASK, x) on MT7530_MIRROR_PORT(x)? I suppose the answer would be "yes, they can be used", but then, I'm not really sure what answer you're expecting.