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 4515CC6FD1F for ; Thu, 16 Mar 2023 18:37:31 +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:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aYyWCV0eU1m4/8qgl6O7zyht+v4la/ocMMB9Z8AYalU=; b=kLiJ5IDnYg3dHd MGVIE/MH0Yhg7JWL4JXQYhbG7x3LzpQ0ofCWMIcrXnh/pZ5a+YwOYWRXxBKH2i4RDomtvyDgPetSZ ms0tqoGa6Xy2Tdmys+b+q8l2/QmQ3WwTELfoqyTCtvuAHs4l8oO9PmPYN5RgsoTFpTrjU3r+xzXb4 jgHieBbhvQfRPwcogS1uVGBYx9iOzTOyKndv31wONdSYlbRe68U0LznUePydVP9IizE8lJORzmRz7 DCJm7WYH44qexD9+27M4/AU68TqPJ8wlCd8Tappzq6Qu+72NzY/BOez6b8xPt/LPxjfYuNZd4TKLC fiHA+dus9+8WXK5wU0lg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pcsSd-00HGaE-07; Thu, 16 Mar 2023 18:36:23 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcsSa-00HGZQ-0N for linux-arm-kernel@lists.infradead.org; Thu, 16 Mar 2023 18:36:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678991778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KyRYif1MrPgavn2zFlvhl2OTR1d8rOcAGT7lsOp4AaU=; b=KrOHD2s/HyEZa/PJ9XNhuXOwxjV2Zwad/YnWdx1NplzEPGIhrejA+7PMGapmvHJfa4ClPf vZq3HOgOE8aMGhklTTR/Rkghpxfce6MwUlkBokT2FHJSg1mmiHrqT9l3BgHRtHE22Xr/Pe R0ITtK91mIs/lLaQbZeRAf03UWCDWl8= Received: from mail-oa1-f70.google.com (mail-oa1-f70.google.com [209.85.160.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-255-Scst2psBPx6-DfJ8fn1Pvw-1; Thu, 16 Mar 2023 14:36:16 -0400 X-MC-Unique: Scst2psBPx6-DfJ8fn1Pvw-1 Received: by mail-oa1-f70.google.com with SMTP id 586e51a60fabf-17abfe9fd10so1684831fac.0 for ; Thu, 16 Mar 2023 11:36:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678991776; 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=KyRYif1MrPgavn2zFlvhl2OTR1d8rOcAGT7lsOp4AaU=; b=gFq0c8jRDspz6NAywG2NXQZ1IGw5jRELQLmDTufo+geSHjJ/a/q5SJkltRw0gIp6zr KQ+4mv8g0tG6cIuwn1sVb8UJl23KqqfrF9+j2P8AzvEU48JWWEWFNeD6OoLMuj4qaVwJ qxzFRq8UyJmNb8MSfyG4y0mwjpt9crr9TeZntkMyzFPyW+fHzCDwD2bFc8ezvOzUad4y 37JFNDVNCJ1TPf69fqDVLMUVuTniOMCjUGzSQhXrYb3OqP2evwGuR2J7Fd2KA8L/BKMX M0sq02qGkT3AskqK6PDYA5KWJ5wwDSyO3iNx3ByvjOeAol+2ac4Jty3It/z3DAb3g1c1 nx/Q== X-Gm-Message-State: AO0yUKUypkJasw3MUtpyBOi3uNwTsPQR/YzT9fxeRX9cWLs9g8Gi0Tzw 5i+S3LARXz/Y0LPSQx7jhdu67HIf64c9P8Q9y721dZvKNKPENnjmoY9E9c1HwoYuLC0HB49QW43 SNTOBmPZiVnYUY2DqrJOCMfczBGtnu8L/ki8= X-Received: by 2002:a54:481a:0:b0:383:ee1d:f489 with SMTP id j26-20020a54481a000000b00383ee1df489mr3780289oij.0.1678991776244; Thu, 16 Mar 2023 11:36:16 -0700 (PDT) X-Google-Smtp-Source: AK7set+6u2IcSrwCQvmuCLBcaVgSXFJVKayRRTtTKp7bwyaSZEGBvWuzrI2bCwi60By8ACrUJ/gVmQ== X-Received: by 2002:a54:481a:0:b0:383:ee1d:f489 with SMTP id j26-20020a54481a000000b00383ee1df489mr3780239oij.0.1678991774493; Thu, 16 Mar 2023 11:36:14 -0700 (PDT) Received: from halaney-x13s (104-53-165-62.lightspeed.stlsmo.sbcglobal.net. [104.53.165.62]) by smtp.gmail.com with ESMTPSA id x82-20020acae055000000b00369a721732asm24184oig.41.2023.03.16.11.36.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Mar 2023 11:36:13 -0700 (PDT) Date: Thu, 16 Mar 2023 13:36:09 -0500 From: Andrew Halaney To: Jakub Kicinski Cc: linux-kernel@vger.kernel.org, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, davem@davemloft.net, edumazet@google.com, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, vkoul@kernel.org, bhupesh.sharma@linaro.org, mturquette@baylibre.com, sboyd@kernel.org, peppe.cavallaro@st.com, alexandre.torgue@foss.st.com, joabreu@synopsys.com, mcoquelin.stm32@gmail.com, richardcochran@gmail.com, linux@armlinux.org.uk, veekhee@apple.com, tee.min.tan@linux.intel.com, mohammad.athari.ismail@intel.com, jonathanh@nvidia.com, ruppala@nvidia.com, bmasney@redhat.com, andrey.konovalov@linaro.org, linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, ncai@quicinc.com, jsuraj@qti.qualcomm.com, hisunil@quicinc.com Subject: Re: [PATCH net-next 08/11] net: stmmac: Add EMAC3 variant of dwmac4 Message-ID: <20230316183609.a3ymuku2cmhpyrpc@halaney-x13s> References: <20230313165620.128463-1-ahalaney@redhat.com> <20230313165620.128463-9-ahalaney@redhat.com> <20230313173904.3d611e83@kernel.org> MIME-Version: 1.0 In-Reply-To: <20230313173904.3d611e83@kernel.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230316_113620_234871_A72EEA8C X-CRM114-Status: GOOD ( 14.10 ) 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 Mon, Mar 13, 2023 at 05:39:04PM -0700, Jakub Kicinski wrote: > On Mon, 13 Mar 2023 11:56:17 -0500 Andrew Halaney wrote: > > EMAC3 is a Qualcomm variant of dwmac4 that functions the same, but has a > > different address space layout for MTL and DMA registers. This makes the > > patch a bit more complicated than we would like so let's explain why the > > current approach was used. > > Please drop all the static inlines in C sources, you're wrapping > a single function call, the compiler will do the right thing. > > Please no more than 6 function arguments. > Thanks for the feedback! With respect to <= 6 function arguments, if I counted right the only violation is this: static void do_config_cbs(struct mac_device_info *hw, u32 send_slope, u32 idle_slope, u32 high_credit, u32 low_credit, u32 queue, u32 etsx_ctrl_base_addr, u32 send_slp_credx_base_addr, u32 high_credx_base_addr, u32 low_credx_base_addr, void (*set_mtl_tx_queue_weight)(struct mac_device_info *hw, u32 weight, u32 queue)) (...) static void emac3_config_cbs(struct mac_device_info *hw, u32 send_slope, u32 idle_slope, u32 high_credit, u32 low_credit, u32 queue) I agree, that's quite gnarly to read. the emac3_config_cbs is the callback, so it's already at 6 arguments, so there's nothing I can trim there. I could create some struct for readability, populate that, then call the do_config_cbs() func with it from emac3_config_cbs. Is that the sort of thing you want to see? Thanks, Andrew _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel