From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sender4-op-o12.zoho.com (sender4-op-o12.zoho.com [136.143.188.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9588419A; Thu, 12 Jun 2025 19:17:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.12 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749755858; cv=pass; b=eKHooeyMXedpSGtviLVpi9Nvz5c9Xp0UzHJRmbOWvr2KkwcaPbqFDlq0rsplglm0C0wYYQps9Ve6PjB3wJp0qEu+Wx9tfmV28QoSosDJZbkBGkixpHdOALpJ/VaPPT6YgAxJYNl4b/OJajobucRCs/0DDR+6TRcXz5QCb47jorM= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749755858; c=relaxed/simple; bh=sXrcw6tTsI/Mmww8u6JL7diNrWJf4Q7mj9O1jvIgM/8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=baVXVUxTlbuV5yoQ2vlBKoN5wexwTUBEqdx3ASe39uHB6pNgmuIGmtI3RGmNpYw1IEx4bWozSnlYcLhKXZmIkDzyhBsS/jQHPG2V7SA5S9+OzGsGaAsfiL95THvICMHjkN8jaUzXRZ0FQIgOccobxgF3meTT16fziSRprb8WHoY= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (1024-bit key) header.d=collabora.com header.i=nicolas.frattaroli@collabora.com header.b=jdBSKwBQ; arc=pass smtp.client-ip=136.143.188.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=collabora.com header.i=nicolas.frattaroli@collabora.com header.b="jdBSKwBQ" ARC-Seal: i=1; a=rsa-sha256; t=1749755784; cv=none; d=zohomail.com; s=zohoarc; b=EFH1gBrXRxnEbdwN8NuKJttxVfo8otLAVWOqMjccSlAJPieQGoreQOALJFOFSNWr7sTm1nnCQDuu/HsQkPOtQ/3OSYvQ4RyjyXBtSHjqSQpOvG+rol3y4CMkvAvX4S8y9ER4JY1+I1De1RTZCspz3nMo9hgIs9GEa29Bt5D3wzA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749755784; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=sAz8u8Of8VgXN3BQQ00U/F57NlhrS7p1nuOTfYJkSLY=; b=gx56POiNw+tPyzwOMUrXJdu8LXA3Wx0Fc7fpLgAxdL2NAvF06jUmFzQXXgdclEPvSot/sq5wjbKw4wosmJTvqvr3D2Ol7BcVPeIHRceQLb93o93NE842mu2MIU+ewqzhHXcOyn6sA+I1W7R4ndFqRO48pbEglbjFxLxjTpMHRfE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=nicolas.frattaroli@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1749755783; s=zohomail; d=collabora.com; i=nicolas.frattaroli@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Reply-To; bh=sAz8u8Of8VgXN3BQQ00U/F57NlhrS7p1nuOTfYJkSLY=; b=jdBSKwBQJwbK7Wgb1BeOkKDHoXCKiMSRe7vNwtqecSYRDrLuqn7O5OZawJAn+DCb 1ShpLyDr//VBXzQCMKFW7XHKGS1I5U54aXGur+fPFzehkfen3wY4iloFKJZGU5HBeiY CPvZ+rLtAcn7WQvK9zh7a9yesjqizAMrfxYGbQiQ= Received: by mx.zohomail.com with SMTPS id 1749755781436118.00228707547853; Thu, 12 Jun 2025 12:16:21 -0700 (PDT) From: Nicolas Frattaroli To: Andrew Lunn Cc: Yury Norov , Rasmus Villemoes , Jaehoon Chung , Ulf Hansson , Heiko Stuebner , Shreeya Patel , Mauro Carvalho Chehab , Sandy Huang , Andy Yan , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Vinod Koul , Kishon Vijay Abraham I , Nicolas Frattaroli , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Shawn Lin , Lorenzo Pieralisi , Krzysztof =?UTF-8?B?V2lsY3p5xYRza2k=?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Chanwoo Choi , MyungJoo Ham , Kyungmin Park , Qin Jian , Michael Turquette , Stephen Boyd , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , kernel@collabora.com, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-phy@lists.infradead.org, linux-sound@vger.kernel.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-pci@vger.kernel.org, linux-pm@vger.kernel.org, linux-clk@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH 15/20] net: stmmac: dwmac-rk: switch to HWORD_UPDATE macro Date: Thu, 12 Jun 2025 21:16:09 +0200 Message-ID: <10689894.nUPlyArG6x@workhorse> In-Reply-To: <5947475f-ef38-44cb-857e-0c7378023ccd@lunn.ch> References: <20250612-byeword-update-v1-0-f4afb8f6313f@collabora.com> <20250612-byeword-update-v1-15-f4afb8f6313f@collabora.com> <5947475f-ef38-44cb-857e-0c7378023ccd@lunn.ch> Precedence: bulk X-Mailing-List: linux-clk@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" On Thursday, 12 June 2025 21:08:20 Central European Summer Time Andrew Lunn wrote: > On Thu, Jun 12, 2025 at 08:56:17PM +0200, Nicolas Frattaroli wrote: > > The era of hand-rolled HIWORD_UPDATE macros is over, at least for those > > drivers that use constant masks. > > > > Like many other Rockchip drivers, dwmac-rk has its own HIWORD_UPDATE > > macro. Its semantics allow us to redefine it as a wrapper to the shared > > bitfield.h HWORD_UPDATE macros though. > > > > Replace the implementation of this driver's very own HIWORD_UPDATE macro > > with an instance of HWORD_UPDATE from bitfield.h. This keeps the diff > > easily reviewable, while giving us more compile-time error checking. > > > > The related GRF_BIT macro is left alone for now; any attempt to rework > > the code to not use its own solution here would likely end up harder to > > review and less pretty for the time being. > > > > Signed-off-by: Nicolas Frattaroli > > Please split this out into a patch for net-next. I would be surprised if it didn't apply to net-next. > Also, Russell King has just posted a number of patches for this driver, > so you will probably want to wait for them to be merged, so you post > something which will merged without any fuzz. I would be surprised if an automatic merge did not produce correct code here, as I specifically replaced the implementation of the macro with an instance of the new macro and adjusted semantics on purpose. If it compiles, it's correct. Would you still prefer for me to re-send this patch based against net-next once the new macro is merged and within net-next? > > Andrew > Best regards, Nicolas Frattaroli 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 6E482C7114A for ; Thu, 12 Jun 2025 19:48:27 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IHeXF7ba4eA2eIqOJpmiPwc9+WXXkbAJfoDS2HEfBNM=; b=NLbN0Wt9n0/XbI HExlqWWoYyqDUb1eTWjWbqvpmUplkZgagX9TMn3eTqOz1mF9V81bsJkFwSX/lrNz4bQw5YjjaES8D AZGJhbuij1uhDjfbsE8c21Z2SOqm+RxSqeERMoDLR6E9xP+fNYNZoVh0pTDprbTzyXnz5M5iuXYwo Mn6ILsHpddIt3MV87P4BJYpA7yC0OLvuz6dRflKG3RAJdJjZA+bJG7SJE3Vd83kUw3PKO7ljXkoW9 H/f1nR0F0lQLu3tYCPMT4XexZXpwfTa/eCtKaBFaAVRuhZj4By14umRHX23ePpLNQqqCM+p9iqi7J OEysPNDNkAiGYzdH7Tbw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uPnuU-0000000EPDT-3jRc; Thu, 12 Jun 2025 19:48:26 +0000 Received: from sender4-op-o12.zoho.com ([136.143.188.12]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uPnQN-0000000ECZ5-1oKT; Thu, 12 Jun 2025 19:17:20 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1749755784; cv=none; d=zohomail.com; s=zohoarc; b=EFH1gBrXRxnEbdwN8NuKJttxVfo8otLAVWOqMjccSlAJPieQGoreQOALJFOFSNWr7sTm1nnCQDuu/HsQkPOtQ/3OSYvQ4RyjyXBtSHjqSQpOvG+rol3y4CMkvAvX4S8y9ER4JY1+I1De1RTZCspz3nMo9hgIs9GEa29Bt5D3wzA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749755784; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=sAz8u8Of8VgXN3BQQ00U/F57NlhrS7p1nuOTfYJkSLY=; b=gx56POiNw+tPyzwOMUrXJdu8LXA3Wx0Fc7fpLgAxdL2NAvF06jUmFzQXXgdclEPvSot/sq5wjbKw4wosmJTvqvr3D2Ol7BcVPeIHRceQLb93o93NE842mu2MIU+ewqzhHXcOyn6sA+I1W7R4ndFqRO48pbEglbjFxLxjTpMHRfE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=nicolas.frattaroli@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1749755783; s=zohomail; d=collabora.com; i=nicolas.frattaroli@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Reply-To; bh=sAz8u8Of8VgXN3BQQ00U/F57NlhrS7p1nuOTfYJkSLY=; b=jdBSKwBQJwbK7Wgb1BeOkKDHoXCKiMSRe7vNwtqecSYRDrLuqn7O5OZawJAn+DCb 1ShpLyDr//VBXzQCMKFW7XHKGS1I5U54aXGur+fPFzehkfen3wY4iloFKJZGU5HBeiY CPvZ+rLtAcn7WQvK9zh7a9yesjqizAMrfxYGbQiQ= Received: by mx.zohomail.com with SMTPS id 1749755781436118.00228707547853; Thu, 12 Jun 2025 12:16:21 -0700 (PDT) From: Nicolas Frattaroli To: Andrew Lunn Cc: Yury Norov , Rasmus Villemoes , Jaehoon Chung , Ulf Hansson , Heiko Stuebner , Shreeya Patel , Mauro Carvalho Chehab , Sandy Huang , Andy Yan , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Vinod Koul , Kishon Vijay Abraham I , Nicolas Frattaroli , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Shawn Lin , Lorenzo Pieralisi , Krzysztof =?UTF-8?B?V2lsY3p5xYRza2k=?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Chanwoo Choi , MyungJoo Ham , Kyungmin Park , Qin Jian , Michael Turquette , Stephen Boyd , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , kernel@collabora.com, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-phy@lists.infradead.org, linux-sound@vger.kernel.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-pci@vger.kernel.org, linux-pm@vger.kernel.org, linux-clk@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH 15/20] net: stmmac: dwmac-rk: switch to HWORD_UPDATE macro Date: Thu, 12 Jun 2025 21:16:09 +0200 Message-ID: <10689894.nUPlyArG6x@workhorse> In-Reply-To: <5947475f-ef38-44cb-857e-0c7378023ccd@lunn.ch> References: <20250612-byeword-update-v1-0-f4afb8f6313f@collabora.com> <20250612-byeword-update-v1-15-f4afb8f6313f@collabora.com> <5947475f-ef38-44cb-857e-0c7378023ccd@lunn.ch> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250612_121719_495087_4F70343E X-CRM114-Status: GOOD ( 22.60 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org On Thursday, 12 June 2025 21:08:20 Central European Summer Time Andrew Lunn wrote: > On Thu, Jun 12, 2025 at 08:56:17PM +0200, Nicolas Frattaroli wrote: > > The era of hand-rolled HIWORD_UPDATE macros is over, at least for those > > drivers that use constant masks. > > > > Like many other Rockchip drivers, dwmac-rk has its own HIWORD_UPDATE > > macro. Its semantics allow us to redefine it as a wrapper to the shared > > bitfield.h HWORD_UPDATE macros though. > > > > Replace the implementation of this driver's very own HIWORD_UPDATE macro > > with an instance of HWORD_UPDATE from bitfield.h. This keeps the diff > > easily reviewable, while giving us more compile-time error checking. > > > > The related GRF_BIT macro is left alone for now; any attempt to rework > > the code to not use its own solution here would likely end up harder to > > review and less pretty for the time being. > > > > Signed-off-by: Nicolas Frattaroli > > Please split this out into a patch for net-next. I would be surprised if it didn't apply to net-next. > Also, Russell King has just posted a number of patches for this driver, > so you will probably want to wait for them to be merged, so you post > something which will merged without any fuzz. I would be surprised if an automatic merge did not produce correct code here, as I specifically replaced the implementation of the macro with an instance of the new macro and adjusted semantics on purpose. If it compiles, it's correct. Would you still prefer for me to re-send this patch based against net-next once the new macro is merged and within net-next? > > Andrew > Best regards, Nicolas Frattaroli -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy 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 A76FDC71136 for ; Thu, 12 Jun 2025 20:55:42 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jzyX52W29/CqYfug6mObKynCdBL3aBhqjJi3OoSlnL0=; b=hizMka1rvXmWZb 0CvKhSL0sTu8ljHKoKscgr8zJ6H+kHSqUfuDYHC3PJ3xIZ2+niu1zEz0PA0nW8Qa+vK9FY2y8/OLY 4pvf6mu2pTghAKX6KAUe8Cxkolggikf8BnVOOOZQ6lMuqyEWSewsiRPfRpJnyAE2rjcroKQVBzDQp 5PqZDh3luf8hotEAfDGJGR89ZHdjlX+F6Nnt50BkdOV+OQWWWDfd4SQsiJfChtaqutBF8fTmvXWnE 3+pRDg1yuwxUT/+VGMBkGfxqTkwLh3txgreEntXtM1GHE+QVnk0BvY9uvhNX7a7DtSUrC5J1JbR/F r3lrpoljK4ZOU8/cGqMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uPoxa-0000000EZxp-1KEb; Thu, 12 Jun 2025 20:55:42 +0000 Received: from sender4-op-o12.zoho.com ([136.143.188.12]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uPnQN-0000000ECZ5-1oKT; Thu, 12 Jun 2025 19:17:20 +0000 ARC-Seal: i=1; a=rsa-sha256; t=1749755784; cv=none; d=zohomail.com; s=zohoarc; b=EFH1gBrXRxnEbdwN8NuKJttxVfo8otLAVWOqMjccSlAJPieQGoreQOALJFOFSNWr7sTm1nnCQDuu/HsQkPOtQ/3OSYvQ4RyjyXBtSHjqSQpOvG+rol3y4CMkvAvX4S8y9ER4JY1+I1De1RTZCspz3nMo9hgIs9GEa29Bt5D3wzA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749755784; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=sAz8u8Of8VgXN3BQQ00U/F57NlhrS7p1nuOTfYJkSLY=; b=gx56POiNw+tPyzwOMUrXJdu8LXA3Wx0Fc7fpLgAxdL2NAvF06jUmFzQXXgdclEPvSot/sq5wjbKw4wosmJTvqvr3D2Ol7BcVPeIHRceQLb93o93NE842mu2MIU+ewqzhHXcOyn6sA+I1W7R4ndFqRO48pbEglbjFxLxjTpMHRfE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=nicolas.frattaroli@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1749755783; s=zohomail; d=collabora.com; i=nicolas.frattaroli@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Reply-To; bh=sAz8u8Of8VgXN3BQQ00U/F57NlhrS7p1nuOTfYJkSLY=; b=jdBSKwBQJwbK7Wgb1BeOkKDHoXCKiMSRe7vNwtqecSYRDrLuqn7O5OZawJAn+DCb 1ShpLyDr//VBXzQCMKFW7XHKGS1I5U54aXGur+fPFzehkfen3wY4iloFKJZGU5HBeiY CPvZ+rLtAcn7WQvK9zh7a9yesjqizAMrfxYGbQiQ= Received: by mx.zohomail.com with SMTPS id 1749755781436118.00228707547853; Thu, 12 Jun 2025 12:16:21 -0700 (PDT) From: Nicolas Frattaroli To: Andrew Lunn Cc: Yury Norov , Rasmus Villemoes , Jaehoon Chung , Ulf Hansson , Heiko Stuebner , Shreeya Patel , Mauro Carvalho Chehab , Sandy Huang , Andy Yan , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Vinod Koul , Kishon Vijay Abraham I , Nicolas Frattaroli , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Shawn Lin , Lorenzo Pieralisi , Krzysztof =?UTF-8?B?V2lsY3p5xYRza2k=?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Chanwoo Choi , MyungJoo Ham , Kyungmin Park , Qin Jian , Michael Turquette , Stephen Boyd , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , kernel@collabora.com, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-phy@lists.infradead.org, linux-sound@vger.kernel.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-pci@vger.kernel.org, linux-pm@vger.kernel.org, linux-clk@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH 15/20] net: stmmac: dwmac-rk: switch to HWORD_UPDATE macro Date: Thu, 12 Jun 2025 21:16:09 +0200 Message-ID: <10689894.nUPlyArG6x@workhorse> In-Reply-To: <5947475f-ef38-44cb-857e-0c7378023ccd@lunn.ch> References: <20250612-byeword-update-v1-0-f4afb8f6313f@collabora.com> <20250612-byeword-update-v1-15-f4afb8f6313f@collabora.com> <5947475f-ef38-44cb-857e-0c7378023ccd@lunn.ch> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250612_121719_495087_4F70343E X-CRM114-Status: GOOD ( 22.60 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org On Thursday, 12 June 2025 21:08:20 Central European Summer Time Andrew Lunn wrote: > On Thu, Jun 12, 2025 at 08:56:17PM +0200, Nicolas Frattaroli wrote: > > The era of hand-rolled HIWORD_UPDATE macros is over, at least for those > > drivers that use constant masks. > > > > Like many other Rockchip drivers, dwmac-rk has its own HIWORD_UPDATE > > macro. Its semantics allow us to redefine it as a wrapper to the shared > > bitfield.h HWORD_UPDATE macros though. > > > > Replace the implementation of this driver's very own HIWORD_UPDATE macro > > with an instance of HWORD_UPDATE from bitfield.h. This keeps the diff > > easily reviewable, while giving us more compile-time error checking. > > > > The related GRF_BIT macro is left alone for now; any attempt to rework > > the code to not use its own solution here would likely end up harder to > > review and less pretty for the time being. > > > > Signed-off-by: Nicolas Frattaroli > > Please split this out into a patch for net-next. I would be surprised if it didn't apply to net-next. > Also, Russell King has just posted a number of patches for this driver, > so you will probably want to wait for them to be merged, so you post > something which will merged without any fuzz. I would be surprised if an automatic merge did not produce correct code here, as I specifically replaced the implementation of the macro with an instance of the new macro and adjusted semantics on purpose. If it compiles, it's correct. Would you still prefer for me to re-send this patch based against net-next once the new macro is merged and within net-next? > > Andrew > Best regards, Nicolas Frattaroli _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip