public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Greg KH <greg@kroah•com>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
	Jiri Pirko <jiri@resnulli•us>, David Miller <davem@davemloft•net>,
	netdev@vger•kernel.org
Subject: linux-next: manual merge of the driver-core tree with the net-next tree
Date: Thu, 1 Aug 2013 15:21:48 +1000	[thread overview]
Message-ID: <20130801152148.c98a281ec6e076646edeb7cb@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 4226 bytes --]

Hi Greg,

Today's linux-next merge of the driver-core tree got a conflict in
net/core/net-sysfs.c between commit ff80e519ab1b ("net: export physical
port id via sysfs") from the net-next tree and commit 6be8aeef348a ("net:
core: convert class code to use dev_groups") from the driver-core tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au

diff --cc net/core/net-sysfs.c
index 8826b0d,707c313..0000000
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@@ -237,9 -250,9 +250,31 @@@ static ssize_t operstate_show(struct de
  
  	return sprintf(buf, "%s\n", operstates[operstate]);
  }
+ static DEVICE_ATTR_RO(operstate);
+ 
++static ssize_t phys_port_id_show(struct device *dev,
++				 struct device_attribute *attr, char *buf)
++{
++	struct net_device *netdev = to_net_dev(dev);
++	ssize_t ret = -EINVAL;
++
++	if (!rtnl_trylock())
++		return restart_syscall();
++
++	if (dev_isalive(netdev)) {
++		struct netdev_phys_port_id ppid;
++
++		ret = dev_get_phys_port_id(netdev, &ppid);
++		if (!ret)
++			ret = sprintf(buf, "%*phN\n", ppid.id_len, ppid.id);
++	}
++	rtnl_unlock();
++
++	return ret;
++}
++static DEVICE_ATTR_RO(phys_port_id);
 +
  /* read-write attributes */
- NETDEVICE_SHOW(mtu, fmt_dec);
  
  static int change_mtu(struct net_device *net, unsigned long new_mtu)
  {
@@@ -333,52 -344,32 +366,33 @@@ static ssize_t group_store(struct devic
  {
  	return netdev_store(dev, attr, buf, len, change_group);
  }
- 
- static ssize_t show_phys_port_id(struct device *dev,
- 				 struct device_attribute *attr, char *buf)
- {
- 	struct net_device *netdev = to_net_dev(dev);
- 	ssize_t ret = -EINVAL;
- 
- 	if (!rtnl_trylock())
- 		return restart_syscall();
- 
- 	if (dev_isalive(netdev)) {
- 		struct netdev_phys_port_id ppid;
- 
- 		ret = dev_get_phys_port_id(netdev, &ppid);
- 		if (!ret)
- 			ret = sprintf(buf, "%*phN\n", ppid.id_len, ppid.id);
- 	}
- 	rtnl_unlock();
- 
- 	return ret;
- }
- 
- static struct device_attribute net_class_attributes[] = {
- 	__ATTR(addr_assign_type, S_IRUGO, show_addr_assign_type, NULL),
- 	__ATTR(addr_len, S_IRUGO, show_addr_len, NULL),
- 	__ATTR(dev_id, S_IRUGO, show_dev_id, NULL),
- 	__ATTR(ifalias, S_IRUGO | S_IWUSR, show_ifalias, store_ifalias),
- 	__ATTR(iflink, S_IRUGO, show_iflink, NULL),
- 	__ATTR(ifindex, S_IRUGO, show_ifindex, NULL),
- 	__ATTR(type, S_IRUGO, show_type, NULL),
- 	__ATTR(link_mode, S_IRUGO, show_link_mode, NULL),
- 	__ATTR(address, S_IRUGO, show_address, NULL),
- 	__ATTR(broadcast, S_IRUGO, show_broadcast, NULL),
- 	__ATTR(carrier, S_IRUGO | S_IWUSR, show_carrier, store_carrier),
- 	__ATTR(speed, S_IRUGO, show_speed, NULL),
- 	__ATTR(duplex, S_IRUGO, show_duplex, NULL),
- 	__ATTR(dormant, S_IRUGO, show_dormant, NULL),
- 	__ATTR(operstate, S_IRUGO, show_operstate, NULL),
- 	__ATTR(mtu, S_IRUGO | S_IWUSR, show_mtu, store_mtu),
- 	__ATTR(flags, S_IRUGO | S_IWUSR, show_flags, store_flags),
- 	__ATTR(tx_queue_len, S_IRUGO | S_IWUSR, show_tx_queue_len,
- 	       store_tx_queue_len),
- 	__ATTR(netdev_group, S_IRUGO | S_IWUSR, show_group, store_group),
- 	__ATTR(phys_port_id, S_IRUGO, show_phys_port_id, NULL),
- 	{}
+ NETDEVICE_SHOW(group, fmt_dec);
+ static DEVICE_ATTR(netdev_group, S_IRUGO | S_IWUSR, group_show, group_store);
+ 
+ static struct attribute *net_class_attrs[] = {
+ 	&dev_attr_netdev_group.attr,
+ 	&dev_attr_type.attr,
+ 	&dev_attr_dev_id.attr,
+ 	&dev_attr_iflink.attr,
+ 	&dev_attr_ifindex.attr,
+ 	&dev_attr_addr_assign_type.attr,
+ 	&dev_attr_addr_len.attr,
+ 	&dev_attr_link_mode.attr,
+ 	&dev_attr_address.attr,
+ 	&dev_attr_broadcast.attr,
+ 	&dev_attr_speed.attr,
+ 	&dev_attr_duplex.attr,
+ 	&dev_attr_dormant.attr,
+ 	&dev_attr_operstate.attr,
++	&dev_attr_phys_port_id.attr,
+ 	&dev_attr_ifalias.attr,
+ 	&dev_attr_carrier.attr,
+ 	&dev_attr_mtu.attr,
+ 	&dev_attr_flags.attr,
+ 	&dev_attr_tx_queue_len.attr,
+ 	NULL,
  };
+ ATTRIBUTE_GROUPS(net_class);
  
  /* Show a given an attribute in the statistics group */
  static ssize_t netstat_show(const struct device *d,

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

             reply	other threads:[~2013-08-01  5:21 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-01  5:21 Stephen Rothwell [this message]
2013-08-02  0:28 ` linux-next: manual merge of the driver-core tree with the net-next tree Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2023-01-30  4:32 Stephen Rothwell
2023-01-30 12:31 ` Andy Shevchenko
2023-01-30 16:00   ` Greg KH
2018-07-23  5:12 Stephen Rothwell
2018-07-23  6:20 ` Greg KH
2018-08-15 23:42   ` Stephen Rothwell
2018-08-16  0:05     ` Rajat Jain
2014-12-01  7:19 Stephen Rothwell
2014-12-01  7:34 ` Arend van Spriel
2014-12-03  8:36   ` Jeremiah Mahler
2014-12-03 10:51     ` Jeremiah Mahler
2014-12-03 12:49       ` Arend van Spriel
2014-12-03 16:21         ` Greg KH
2014-12-03 20:07           ` Arend van Spriel
2014-12-03 21:06         ` Jeremiah Mahler
2013-02-04  4:38 Stephen Rothwell
2013-02-04  4:59 ` Greg KH
2013-02-04  4:34 Stephen Rothwell
2011-10-25  8:07 Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130801152148.c98a281ec6e076646edeb7cb@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=davem@davemloft$(echo .)net \
    --cc=greg@kroah$(echo .)com \
    --cc=jiri@resnulli$(echo .)us \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox