Skip to contentSkip to conversation

linux-next: manual merge of the iio tree with the staging.current tree

DISCUSSION Stephen Rothwell 2 participants 3 messages May 12, 2021 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

Today's linux-next merge of the iio tree got a conflict in:

drivers/iio/industrialio-core.c

between commit:

901f84de0e16 ("iio: core: fix ioctl handlers removal")

from the staging.current tree and commit:

919a6adf8107 ("iio: core: move @chrdev from struct iio_dev to struct iio_dev_opaque")

from the iio tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

Signature · 34 lines
Cheers,
Stephen Rothwell

diff --cc drivers/iio/industrialio-core.c
index 59efb36db2c7,efb4cf91c9e4..000000000000
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@@ -1785,10 -1811,10 +1810,10 @@@ static long iio_ioctl(struct file *filp
  	}
  
  	if (ret == IIO_IOCTL_UNHANDLED)
 -		ret = -EINVAL;
 +		ret = -ENODEV;
  
  out_unlock:
- 	mutex_unlock(&indio_dev->info_exist_lock);
+ 	mutex_unlock(&iio_dev_opaque->info_exist_lock);
  
  	return ret;
  }
@@@ -1925,9 -1951,12 +1950,9 @@@ EXPORT_SYMBOL(__iio_device_register)
   **/
  void iio_device_unregister(struct iio_dev *indio_dev)
  {
- 	cdev_device_del(&indio_dev->chrdev, &indio_dev->dev);
 -	struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);
 -	struct iio_ioctl_handler *h, *t;
 -
+ 	cdev_device_del(&iio_dev_opaque->chrdev, &indio_dev->dev);
  
- 	mutex_lock(&indio_dev->info_exist_lock);
+ 	mutex_lock(&iio_dev_opaque->info_exist_lock);
  
  	iio_device_unregister_debugfs(indio_dev);
#1 lore raw

Hi all,

Quoted 44 lines · On Wed, 12 May 2021 11:43:42 +1000 Stephen Rothwell <[email protected]>…

Today's linux-next merge of the iio tree got a conflict in:

drivers/iio/industrialio-core.c

between commit:

901f84de0e16 ("iio: core: fix ioctl handlers removal")

from the staging.current tree and commit:

919a6adf8107 ("iio: core: move @chrdev from struct iio_dev to struct iio_dev_opaque")

from the iio tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

drivers/iio/industrialio-core.c +1 -1
diff --cc drivers/iio/industrialio-core.c
index 59efb36db2c7,efb4cf91c9e4..000000000000
@@@ -1785,10 -1811,10 +1810,10 @@@ static long iio_ioctl(struct file *filp
  	}
 
  	if (ret == IIO_IOCTL_UNHANDLED)
 -		ret = -EINVAL;
 +		ret = -ENODEV;
 
  out_unlock:
- 	mutex_unlock(&indio_dev->info_exist_lock);
+ 	mutex_unlock(&iio_dev_opaque->info_exist_lock);
 
  	return ret;
  }
@@@ -1925,9 -1951,12 +1950,9 @@@ EXPORT_SYMBOL(__iio_device_register)
   **/
  void iio_device_unregister(struct iio_dev *indio_dev)
  {

drivers/iio/industrialio-core.c

Quoted 10 lines
drivers/iio/industrialio-core.c +2 -2
- 	cdev_device_del(&indio_dev->chrdev, &indio_dev->dev);
 -	struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);
 -	struct iio_ioctl_handler *h, *t;
 -
+ 	cdev_device_del(&iio_dev_opaque->chrdev, &indio_dev->dev);
 
- 	mutex_lock(&indio_dev->info_exist_lock);
+ 	mutex_lock(&iio_dev_opaque->info_exist_lock);
 
  	iio_device_unregister_debugfs(indio_dev);

Actually, I had to add back the iio_dev_opaque declaration line.

Signature · 2 lines
Cheers,
Stephen Rothwell
#2 lore raw
Quoted 52 lines · On Wed, 12 May 2021 11:48:05 +1000 Stephen Rothwell <[email protected]>…

Hi all,

Quoted 49 lines · On Wed, 12 May 2021 11:43:42 +1000 Stephen Rothwell <[email protected]>…

Today's linux-next merge of the iio tree got a conflict in:

drivers/iio/industrialio-core.c

between commit:

901f84de0e16 ("iio: core: fix ioctl handlers removal")

from the staging.current tree and commit:

919a6adf8107 ("iio: core: move @chrdev from struct iio_dev to struct iio_dev_opaque")

from the iio tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

drivers/iio/industrialio-core.c +2 -2
diff --cc drivers/iio/industrialio-core.c
index 59efb36db2c7,efb4cf91c9e4..000000000000
@@@ -1785,10 -1811,10 +1810,10 @@@ static long iio_ioctl(struct file *filp
  	}
 
  	if (ret == IIO_IOCTL_UNHANDLED)
 -		ret = -EINVAL;
 +		ret = -ENODEV;
 
  out_unlock:
- 	mutex_unlock(&indio_dev->info_exist_lock);
+ 	mutex_unlock(&iio_dev_opaque->info_exist_lock);
 
  	return ret;
  }
@@@ -1925,9 -1951,12 +1950,9 @@@ EXPORT_SYMBOL(__iio_device_register)
   **/
  void iio_device_unregister(struct iio_dev *indio_dev)
  {
- 	cdev_device_del(&indio_dev->chrdev, &indio_dev->dev);
 -	struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);
 -	struct iio_ioctl_handler *h, *t;
 -
+ 	cdev_device_del(&iio_dev_opaque->chrdev, &indio_dev->dev);
Quoted 8 lines

drivers/iio/industrialio-core.c

Quoted 5 lines
drivers/iio/industrialio-core.c +1 -1
- 	mutex_lock(&indio_dev->info_exist_lock);
+ 	mutex_lock(&iio_dev_opaque->info_exist_lock);
 
  	iio_device_unregister_debugfs(indio_dev);

Actually, I had to add back the iio_dev_opaque declaration line.

Makes sense. I'll deal with this in the IIO tree after rc2.

thanks,

Jonathan