Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp2030679lqe; Tue, 9 Apr 2024 07:45:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUBbzmUWEs2oo1BcjuAc4QT+96NnMnqMVodAb+OYOttUQSCIV10e+OxFTCaySTAIrmOurE20wENMKSvIHtKeGZkwItF/vyVL4R/Iqm5LQ== X-Google-Smtp-Source: AGHT+IEf6TYiKYfOzfu/8oYTElRocijUAfcFtQDyd3jI5Srt66ikDgALJE5bL7JPzoMHCu2iskJT X-Received: by 2002:a17:906:da07:b0:a51:9575:e566 with SMTP id fi7-20020a170906da0700b00a519575e566mr7371458ejb.33.1712673908990; Tue, 09 Apr 2024 07:45:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712673908; cv=pass; d=google.com; s=arc-20160816; b=QybNKIrlopS34JbPv4TsOAWpAwVNY6Xn7n02f8fOupkYxhRRJzSZaVsynoNafMyTaN vu5U0TXxP2g4gNEEQBL53sp608qrPOB0T8kPcus/6LWbEhQyAMoyUrlFv6AGAH2krsX8 CLc698O6/qsMIxOGpHkOuT5CtC0OYBE6RM1CvDYThvUom2hLgDwsm9N9jXxLEAsbipKh WIJ18PauGArguL+1BymB2jd//P4nJOSSM/pO8tsNX4ixfhlKbUDIiG18x9cySnlCdSdg 6IH87nAXkpzXlIPoI5RITcJKmGrHfNL+e+kPh7I7L9zwUWiqZlYKvI+/dHiGx30Yeuk2 GupQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:references:in-reply-to :message-id:cc:to:from:date:dkim-signature; bh=oHL0RXFr2CJfinyZBuEKsLTHwq4/wJAcA1+55f/eT84=; fh=+Hcv+utLH/8lhBCQ0avnt9fg6TgANN/dwuiT8Q41BYU=; b=i/DDyXwq14BI4JdNm2gRbmofI9JLhqW68PL6jl1O2bRPoS0ZKJXaqeFGaO2QRV701G KgZyncAf7CkurZkhVptcsL+ZTfuorDqNJ9irOnzgQ8pRRuyk2TMijLPuvyYMjCxMo9sp b5CheZitm7Ufs1cRUtPNe7aSWBELy/ttvJAy0EwFYHrNAZNKBPklQ6ej0C6Bgy8Y8Z64 p7J4hggx/30E16Ww0vmNTrKqe3FD08PC7X/K7mY1hLpaS8OkCOOOaonxQCxWhtZHvTNH y7xilT50oUOQuWLLYgBj8fuxZHLjA9eVN3ccW+GZALSSubVXU4WAEq5oGjOc186nMSlo MS0A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Alofp5dw; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-137111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137111-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id qf14-20020a1709077f0e00b00a473d8ebf99si5137836ejc.277.2024.04.09.07.45.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 07:45:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Alofp5dw; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-137111-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137111-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 8BAB41F25B27 for ; Tue, 9 Apr 2024 14:45:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 10E8E131180; Tue, 9 Apr 2024 14:44:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Alofp5dw" Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8BADA50275; Tue, 9 Apr 2024 14:44:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712673842; cv=none; b=qTIdOGK72g/XznKMU2xdSrpuHgElAH57mMh9oGkf4DpnLJnIu6zJuL68mHHpAjmTuM4PIDH9p1zcCnivmpVtkEJ1rXH8Cpg2gAROLPq4HDAcBvBDyj/2LP+leQm670Qj4laM/kKkbBTgvbWfXv1as8paC9lPU7aY7Bom2BQSvFQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712673842; c=relaxed/simple; bh=TX7drptoizj7yMo7tlk2MRiASPssDjpb1m0JlS/t/KY=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: Mime-Version:Content-Type; b=Y1ok1ioTQWwIxhdVS7q/C+FE/ZTw1DMT34MazuCQKEvVT1m7P53wPFmibejy1MHZ63wJflOcIvB/+97I5lHNHJi5ZkjYd8E+n6H7UCcKRuPAEGhzK0RhDk314i7EXr2As9xulPxUnN1Apy19FdHt762JQ9NyJXuJxs/rJEfXmko= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Alofp5dw; arc=none smtp.client-ip=209.85.160.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qt1-f182.google.com with SMTP id d75a77b69052e-434925427c6so9780031cf.1; Tue, 09 Apr 2024 07:44:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712673839; x=1713278639; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=oHL0RXFr2CJfinyZBuEKsLTHwq4/wJAcA1+55f/eT84=; b=Alofp5dwcQ4HFF3tC+bzA8ooj5UKbyx1AF/QICKOHTygxcLTCvOjGz4eQdk0uE9Q3k vwWzFZA3Kp3fsanyxEwIXCbhwItasXZ4usb/N7jmTsqPVLJFoUYna7bhgI774g5lC9GR NShic+zAJvdcujUjeEBnrNKyoDAIyniI4RoWUu9zQYcpoz6MHjeWMtggJKfc/1LLmVG4 ZCZstH0nzBJw7iAH29s3xYCSUdGjWdW/w/H5nrAiS9JginQ2Jds+1aEwu7F07lTO3laz V3ytmywhBcd+FzfEuUTipN4PU33fwosw//Gj/nDEgsu8kTZmt2DgTqhhsP8kNTDMvEJA SYpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712673839; x=1713278639; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=oHL0RXFr2CJfinyZBuEKsLTHwq4/wJAcA1+55f/eT84=; b=tHsXzPuU3FUsQGhvwmRUyYVJ8ogrXvAXxyKHXWroD8Tx7eb78vwuiPeOcH8q9ENfec MojYsTqIRtCp8FLWeTPpMTBmMNdjoKajAvunn/FCSlS99njjTvXvtR4KPh5yzvrYsGxr sxFW1x3r3nWYp6kD/SoZxc+1a0wh1TiuINh1/Nf+Icg1OWPu7nEzGX9HB1yS5Q9R6DZp dv1czOW5bwe1J4Q4rAjbICbW4CiFA5tDBp/NB+P7yPrJraeTv2ODAUgBsrncH92RQ8ws vgqaVlCeFemXpFdo8ytfvaOLWyktUaGpEOxg9MKZk0IxV3o7NedK/hpm5lllGufU1JV8 OVag== X-Forwarded-Encrypted: i=1; AJvYcCV1lQyHrqJlqm6NzZB9nlhXRnIOLX5/XFXtXQ3av12MvzhKQpNY6JJ6mqsGEbdj3mZM6HZ2nBTUksJ9WDY0Lgk4ZK6YznSoFnL+hmb3XW/5Uui5q2ziKhWc9didLDByzpp7ff8wuyteS9xIvWi7eRx3y4PbSkiV5nJqnnLhkcaM X-Gm-Message-State: AOJu0Yy3vTfgX9EisHG8ktzUmTlmxJpBbDhmq0TYLpa5Mfie0kWYbxqo RKVCX8FGCmfdociBO+5u1nu9WGv3Ut8hYh/T3y9wKNfDrcJNDT8Y X-Received: by 2002:a05:622a:389:b0:432:f69d:aa1c with SMTP id j9-20020a05622a038900b00432f69daa1cmr14283424qtx.49.1712673839387; Tue, 09 Apr 2024 07:43:59 -0700 (PDT) Received: from localhost (73.84.86.34.bc.googleusercontent.com. [34.86.84.73]) by smtp.gmail.com with ESMTPSA id bw9-20020a05622a098900b004330090b874sm4672604qtb.95.2024.04.09.07.43.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 07:43:59 -0700 (PDT) Date: Tue, 09 Apr 2024 10:43:58 -0400 From: Willem de Bruijn To: Kory Maincent , Florian Fainelli , Broadcom internal kernel review list , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Radu Pirea , Jay Vosburgh , Andy Gospodarek , Nicolas Ferre , Claudiu Beznea , Willem de Bruijn , Jonathan Corbet , Horatiu Vultur , UNGLinuxDriver@microchip.com, Simon Horman , Vladimir Oltean Cc: Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Maxime Chevallier , Rahul Rameshbabu , Kory Maincent Message-ID: <6615542edc90f_23a2b2294ee@willemb.c.googlers.com.notmuch> In-Reply-To: <20240409-feature_ptp_netnext-v10-2-0fa2ea5c89a9@bootlin.com> References: <20240409-feature_ptp_netnext-v10-0-0fa2ea5c89a9@bootlin.com> <20240409-feature_ptp_netnext-v10-2-0fa2ea5c89a9@bootlin.com> Subject: Re: [PATCH net-next v10 02/13] net: Move dev_set_hwtstamp_phylib to net/core/dev.h Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Kory Maincent wrote: > This declaration was added to the header to be called from ethtool. > ethtool is separated from core for code organization but it is not really > a separate entity, it controls very core things. > As ethtool is an internal stuff it is not wise to have it in netdevice.h. > Move the declaration to net/core/dev.h instead. > > Remove the EXPORT_SYMBOL_GPL call as ethtool can not be built as a module. > > Signed-off-by: Kory Maincent Reviewed-by: Willem de Bruijn At this point this function does not need to be defined in a header at all. But patch 12 will change that. net/ethtool can be built-in or not, but cannot be built as module, so no need for the EXPORT_SYMBOL_GPL indeed. > --- > > Change in v10: > - New patch. > --- > include/linux/netdevice.h | 3 --- > net/core/dev.h | 4 ++++ > net/core/dev_ioctl.c | 1 - > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h > index d45f330d083d..9a4b92b49fac 100644 > --- a/include/linux/netdevice.h > +++ b/include/linux/netdevice.h > @@ -3901,9 +3901,6 @@ int generic_hwtstamp_get_lower(struct net_device *dev, > int generic_hwtstamp_set_lower(struct net_device *dev, > struct kernel_hwtstamp_config *kernel_cfg, > struct netlink_ext_ack *extack); > -int dev_set_hwtstamp_phylib(struct net_device *dev, > - struct kernel_hwtstamp_config *cfg, > - struct netlink_ext_ack *extack); > int dev_ethtool(struct net *net, struct ifreq *ifr, void __user *userdata); > unsigned int dev_get_flags(const struct net_device *); > int __dev_change_flags(struct net_device *dev, unsigned int flags, > diff --git a/net/core/dev.h b/net/core/dev.h > index 8572d2c8dc4a..39819fffece7 100644 > --- a/net/core/dev.h > +++ b/net/core/dev.h > @@ -167,4 +167,8 @@ static inline void dev_xmit_recursion_dec(void) > __this_cpu_dec(softnet_data.xmit.recursion); > } > > +int dev_set_hwtstamp_phylib(struct net_device *dev, > + struct kernel_hwtstamp_config *cfg, > + struct netlink_ext_ack *extack); > + > #endif > diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c > index 9a66cf5015f2..b9719ed3c3fd 100644 > --- a/net/core/dev_ioctl.c > +++ b/net/core/dev_ioctl.c > @@ -363,7 +363,6 @@ int dev_set_hwtstamp_phylib(struct net_device *dev, > > return 0; > } > -EXPORT_SYMBOL_GPL(dev_set_hwtstamp_phylib); > > static int dev_set_hwtstamp(struct net_device *dev, struct ifreq *ifr) > { > > -- > 2.34.1 >