Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4421851ybg; Mon, 21 Oct 2019 08:46:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4SlOi1GnMhMezowYssFl6RaM6blQLjfDhdogcVG1TaJVWeW8oM3/oyXclptTyTDOOTTiE X-Received: by 2002:a17:906:5407:: with SMTP id q7mr23172958ejo.24.1571672772227; Mon, 21 Oct 2019 08:46:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571672772; cv=none; d=google.com; s=arc-20160816; b=M82E9kAAdqBFLWBVP+VMjlQ3wbwDUBemAftm0Cj0jmxf2Xw70f5DtCUbiD9RviYrms ihwsWxkzKODag6TbpGiQoig47qMXOHup0yx7lv0rJJaS5oDmRb/qFc+VUrDvgS4SRY0/ tmwknm7uyf/s8B30IPSXq2s++6kYD/1EZrvPYpK952W9f6YVFWG/3Ovgmnk8Hq/SCQna wCQNFEd3E787hqcd/2dhHiTFc2lJZl+8jhtjRKr/HasTqDTVSJL3Yn/yoh4v+7jbA9iB +S6uhqZu44P2srIocM4KkdjMR3QCAzx1yAt3f3dAn5OfQVYX8jHtLDuoafwAfoQk8B8I qLBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-disposition:mime-version:references:in-reply-to:subject:cc :to:from:message-id:date:dkim-signature; bh=HDhjOqeUfgWVXbHfFP5ui5Vyb/A5QMYbGddkw3X1g+4=; b=KypwdKurLoCwgQdjX4W0BUeqPKRmyoNtdaYXPGCy6VB7e5BRjWqwuw7lyL5MNWlxBe N0PgQiuUmguhvTG0nBEcQjfXdQROmAcM22IQiX1ciw6kKG4YGFV5uh+MU8TkJqac0rHv y3DlCbFxOOdpHOQJ984RPFQZs5oj74TJPHF+fyT0Y5IrJzzwVjpCavES+hzGe7zZmAf+ 5CTQCfLydkspPSNZMVppR3rn3wGDOZFr5bxmUrxGG48TvsIjCvQF407nCAIgMBWziUho VBg2Yr4scQauj0LmDpGFDfNEDPVeTeA7E8tCDdbzpARStrmGXd+swGncmM89vv5F4Dab ue2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tstJpzji; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ov32si8393242ejb.411.2019.10.21.08.45.46; Mon, 21 Oct 2019 08:46:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tstJpzji; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1729667AbfJUPog (ORCPT + 99 others); Mon, 21 Oct 2019 11:44:36 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:40166 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726847AbfJUPog (ORCPT ); Mon, 21 Oct 2019 11:44:36 -0400 Received: by mail-qk1-f195.google.com with SMTP id y81so9158615qkb.7; Mon, 21 Oct 2019 08:44:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:from:to:cc:subject:in-reply-to:references :mime-version:content-disposition:content-transfer-encoding; bh=HDhjOqeUfgWVXbHfFP5ui5Vyb/A5QMYbGddkw3X1g+4=; b=tstJpzjiDKsHUQBIP2k3qmQ/qN6Bkh1W29mbiyx1daQZqX0KJGiDKK93z3I/ruIIcn EYMJvKUCeifUVZkb/cCz9pSATl7+rIlrmrsIRe6k9vVyAVpYfRuzf89vOjxiYPeeJTZP /37pnfS/SdJ7ZrdtWs//rj4v/OioZwRvfR7hcwvok8OIYJDxVmKoimTZP7KGnmtMJfPC dG677pD2lBG9eg4Mu/7teRMmCboDS9MeDlsg9jCamkpU5uRv7/IftuYBmBF64ck5kbA4 Yfp5Q2acK/NCEOEtwNbMM0npLpsnO09XvrrFEqwsLljHOXPQ96DQc/8a8ydztCApoD9D 4Hrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:from:to:cc:subject:in-reply-to :references:mime-version:content-disposition :content-transfer-encoding; bh=HDhjOqeUfgWVXbHfFP5ui5Vyb/A5QMYbGddkw3X1g+4=; b=OuVYFxVAEBaIKPlMyPsF2Uj8nzj9Gq8YtKJ0hPe0jjZQ155Y/ECqhU9YIpfA5QZqrv Xv4dtFqFPZr05vNgjT/7tok6upDPeqxEGvbNGAHXliQ5qDBGBK9CvsmBKpSeprRuo0ZK yIbAneJmEobVpBElQW7PZC+jGF77x2lSV0YU76m3IywA4QgASIIfVw87KQjIOPlzRt8w aYqximYHIizE0PkJGRldDPqGX1fDQWd1+B63UUxaBnzyiPHU1spLmAT16++PRQe0Q6au laMwzjkT+sFfcK1Oh+HJDCbX1pleTU0IORqMD9mOb8BKgUszigkfoT5PInL3V/hZNblS jDmw== X-Gm-Message-State: APjAAAXrN25oBABs3EqDNYVzbovhRGO3IF68iIjUoxXBMUuRwzQWFrPt IxzO8wxj5vF1Oo4IWdGvwDc= X-Received: by 2002:a37:5257:: with SMTP id g84mr6659288qkb.247.1571672674869; Mon, 21 Oct 2019 08:44:34 -0700 (PDT) Received: from localhost (modemcable249.105-163-184.mc.videotron.ca. [184.163.105.249]) by smtp.gmail.com with ESMTPSA id y62sm3530823qtd.62.2019.10.21.08.44.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2019 08:44:34 -0700 (PDT) Date: Mon, 21 Oct 2019 11:44:33 -0400 Message-ID: <20191021114433.GB6522@t480s.localdomain> From: Vivien Didelot To: Andrew Lunn Cc: "David S. Miller" , linux-kernel@vger.kernel.org, Florian Fainelli , netdev@vger.kernel.org Subject: Re: [PATCH net-next 01/16] net: dsa: use dsa_to_port helper everywhere In-Reply-To: <20191021123149.GB16084@lunn.ch> References: <20191020031941.3805884-1-vivien.didelot@gmail.com> <20191020031941.3805884-2-vivien.didelot@gmail.com> <20191021123149.GB16084@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrew, On Mon, 21 Oct 2019 14:31:49 +0200, Andrew Lunn wrote: > On Sat, Oct 19, 2019 at 11:19:26PM -0400, Vivien Didelot wrote: > > Do not let the drivers access the ds->ports static array directly > > while there is a dsa_to_port helper for this purpose. > > > > At the same time, un-const this helper since the SJA1105 driver > > assigns the priv member of the returned dsa_port structure. > > Hi Vivien > > Is priv the only member we expect drivers to change? Is the rest > private to the core/RO? Rather then remove the const, i wonder if it > would be better to add a helper to set priv? > > Otherwise: > > Reviewed-by: Andrew Lunn I had the same thought but actually since the SJA1105 driver is the only user, I was thinking about maybe getting rid of it, I don't really see the point of having some "dp->priv = priv, priv->dp = dp" kind of code... In the meantime I kept the eventual helper or priv removal for a future series. Thank you, Vivien