Hi all,
Today's linux-next merge of the char-misc tree got a conflict in:
drivers/misc/mei/debugfs.c
between commit:
5666d896e838 ("mei: no need to check return value of debugfs_create functions")
from the driver-core tree and commit:
b728ddde769c ("mei: Convert to use DEFINE_SHOW_ATTRIBUTE macro")
from the char-misc 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.
--
Cheers,
Stephen Rothwell
diff --cc drivers/misc/mei/debugfs.c
index df6bf8b81936,47cfd5005e1b..000000000000
--- a/drivers/misc/mei/debugfs.c
+++ b/drivers/misc/mei/debugfs.c
@@@ -233,22 -154,46 +154,21 @@@ void mei_dbgfs_deregister(struct mei_de
*
* @dev: the mei device structure
* @name: the mei device name
- *
- * Return: 0 on success, <0 on failure.
*/
-int mei_dbgfs_register(struct mei_device *dev, const char *name)
+void mei_dbgfs_register(struct mei_device *dev, const char *name)
{
- struct dentry *dir, *f;
+ struct dentry *dir;
dir = debugfs_create_dir(name, NULL);
- if (!dir)
- return -ENOMEM;
-
dev->dbgfs_dir = dir;
- f = debugfs_create_file("meclients", S_IRUSR, dir,
- dev, &mei_dbgfs_meclients_fops);
- if (!f) {
- dev_err(dev->dev, "meclients: registration failed\n");
- goto err;
- }
- f = debugfs_create_file("active", S_IRUSR, dir,
- dev, &mei_dbgfs_active_fops);
- if (!f) {
- dev_err(dev->dev, "active: registration failed\n");
- goto err;
- }
- f = debugfs_create_file("devstate", S_IRUSR, dir,
- dev, &mei_dbgfs_devstate_fops);
- if (!f) {
- dev_err(dev->dev, "devstate: registration failed\n");
- goto err;
- }
- f = debugfs_create_file("allow_fixed_address", S_IRUSR | S_IWUSR, dir,
- &dev->allow_fixed_address,
- &mei_dbgfs_allow_fa_fops);
- if (!f) {
- dev_err(dev->dev, "allow_fixed_address: registration failed\n");
- goto err;
- }
- return 0;
-err:
- mei_dbgfs_deregister(dev);
- return -ENODEV;
+ debugfs_create_file("meclients", S_IRUSR, dir, dev,
- &mei_dbgfs_fops_meclients);
++ &mei_dbgfs_meclients_fops);
+ debugfs_create_file("active", S_IRUSR, dir, dev,
- &mei_dbgfs_fops_active);
++ &mei_dbgfs_active_fops);
+ debugfs_create_file("devstate", S_IRUSR, dir, dev,
- &mei_dbgfs_fops_devstate);
++ &mei_dbgfs_devstate_fops);
+ debugfs_create_file("allow_fixed_address", S_IRUSR | S_IWUSR, dir,
+ &dev->allow_fixed_address,
- &mei_dbgfs_fops_allow_fa);
++ &mei_dbgfs_allow_fa_fops);
}
-
On Thu, Jun 20, 2019 at 03:35:52PM +1000, Stephen Rothwell wrote:
> Hi all,
>
> Today's linux-next merge of the char-misc tree got a conflict in:
>
> drivers/misc/mei/debugfs.c
>
> between commit:
>
> 5666d896e838 ("mei: no need to check return value of debugfs_create functions")
>
> from the driver-core tree and commit:
>
> b728ddde769c ("mei: Convert to use DEFINE_SHOW_ATTRIBUTE macro")
>
> from the char-misc 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.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc drivers/misc/mei/debugfs.c
> index df6bf8b81936,47cfd5005e1b..000000000000
> --- a/drivers/misc/mei/debugfs.c
> +++ b/drivers/misc/mei/debugfs.c
> @@@ -233,22 -154,46 +154,21 @@@ void mei_dbgfs_deregister(struct mei_de
> *
> * @dev: the mei device structure
> * @name: the mei device name
> - *
> - * Return: 0 on success, <0 on failure.
> */
> -int mei_dbgfs_register(struct mei_device *dev, const char *name)
> +void mei_dbgfs_register(struct mei_device *dev, const char *name)
> {
> - struct dentry *dir, *f;
> + struct dentry *dir;
>
> dir = debugfs_create_dir(name, NULL);
> - if (!dir)
> - return -ENOMEM;
> -
> dev->dbgfs_dir = dir;
>
> - f = debugfs_create_file("meclients", S_IRUSR, dir,
> - dev, &mei_dbgfs_meclients_fops);
> - if (!f) {
> - dev_err(dev->dev, "meclients: registration failed\n");
> - goto err;
> - }
> - f = debugfs_create_file("active", S_IRUSR, dir,
> - dev, &mei_dbgfs_active_fops);
> - if (!f) {
> - dev_err(dev->dev, "active: registration failed\n");
> - goto err;
> - }
> - f = debugfs_create_file("devstate", S_IRUSR, dir,
> - dev, &mei_dbgfs_devstate_fops);
> - if (!f) {
> - dev_err(dev->dev, "devstate: registration failed\n");
> - goto err;
> - }
> - f = debugfs_create_file("allow_fixed_address", S_IRUSR | S_IWUSR, dir,
> - &dev->allow_fixed_address,
> - &mei_dbgfs_allow_fa_fops);
> - if (!f) {
> - dev_err(dev->dev, "allow_fixed_address: registration failed\n");
> - goto err;
> - }
> - return 0;
> -err:
> - mei_dbgfs_deregister(dev);
> - return -ENODEV;
> + debugfs_create_file("meclients", S_IRUSR, dir, dev,
> - &mei_dbgfs_fops_meclients);
> ++ &mei_dbgfs_meclients_fops);
> + debugfs_create_file("active", S_IRUSR, dir, dev,
> - &mei_dbgfs_fops_active);
> ++ &mei_dbgfs_active_fops);
> + debugfs_create_file("devstate", S_IRUSR, dir, dev,
> - &mei_dbgfs_fops_devstate);
> ++ &mei_dbgfs_devstate_fops);
> + debugfs_create_file("allow_fixed_address", S_IRUSR | S_IWUSR, dir,
> + &dev->allow_fixed_address,
> - &mei_dbgfs_fops_allow_fa);
> ++ &mei_dbgfs_allow_fa_fops);
> }
> -
Looks good to me, thanks!
greg k-h
Hi all,
On Thu, 20 Jun 2019 15:35:52 +1000 Stephen Rothwell <[email protected]> wrote:
>
> Today's linux-next merge of the char-misc tree got a conflict in:
>
> drivers/misc/mei/debugfs.c
>
> between commit:
>
> 5666d896e838 ("mei: no need to check return value of debugfs_create functions")
>
> from the driver-core tree and commit:
>
> b728ddde769c ("mei: Convert to use DEFINE_SHOW_ATTRIBUTE macro")
>
> from the char-misc 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.
>
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc drivers/misc/mei/debugfs.c
> index df6bf8b81936,47cfd5005e1b..000000000000
> --- a/drivers/misc/mei/debugfs.c
> +++ b/drivers/misc/mei/debugfs.c
> @@@ -233,22 -154,46 +154,21 @@@ void mei_dbgfs_deregister(struct mei_de
> *
> * @dev: the mei device structure
> * @name: the mei device name
> - *
> - * Return: 0 on success, <0 on failure.
> */
> -int mei_dbgfs_register(struct mei_device *dev, const char *name)
> +void mei_dbgfs_register(struct mei_device *dev, const char *name)
> {
> - struct dentry *dir, *f;
> + struct dentry *dir;
>
> dir = debugfs_create_dir(name, NULL);
> - if (!dir)
> - return -ENOMEM;
> -
> dev->dbgfs_dir = dir;
>
> - f = debugfs_create_file("meclients", S_IRUSR, dir,
> - dev, &mei_dbgfs_meclients_fops);
> - if (!f) {
> - dev_err(dev->dev, "meclients: registration failed\n");
> - goto err;
> - }
> - f = debugfs_create_file("active", S_IRUSR, dir,
> - dev, &mei_dbgfs_active_fops);
> - if (!f) {
> - dev_err(dev->dev, "active: registration failed\n");
> - goto err;
> - }
> - f = debugfs_create_file("devstate", S_IRUSR, dir,
> - dev, &mei_dbgfs_devstate_fops);
> - if (!f) {
> - dev_err(dev->dev, "devstate: registration failed\n");
> - goto err;
> - }
> - f = debugfs_create_file("allow_fixed_address", S_IRUSR | S_IWUSR, dir,
> - &dev->allow_fixed_address,
> - &mei_dbgfs_allow_fa_fops);
> - if (!f) {
> - dev_err(dev->dev, "allow_fixed_address: registration failed\n");
> - goto err;
> - }
> - return 0;
> -err:
> - mei_dbgfs_deregister(dev);
> - return -ENODEV;
> + debugfs_create_file("meclients", S_IRUSR, dir, dev,
> - &mei_dbgfs_fops_meclients);
> ++ &mei_dbgfs_meclients_fops);
> + debugfs_create_file("active", S_IRUSR, dir, dev,
> - &mei_dbgfs_fops_active);
> ++ &mei_dbgfs_active_fops);
> + debugfs_create_file("devstate", S_IRUSR, dir, dev,
> - &mei_dbgfs_fops_devstate);
> ++ &mei_dbgfs_devstate_fops);
> + debugfs_create_file("allow_fixed_address", S_IRUSR | S_IWUSR, dir,
> + &dev->allow_fixed_address,
> - &mei_dbgfs_fops_allow_fa);
> ++ &mei_dbgfs_allow_fa_fops);
> }
> -
I am still getting this conflict (the commit ids may have changed).
Just a reminder in case you think Linus may need to know.
--
Cheers,
Stephen Rothwell
>
> Hi all,
>
> On Thu, 20 Jun 2019 15:35:52 +1000 Stephen Rothwell <[email protected]>
> wrote:
> >
> > Today's linux-next merge of the char-misc tree got a conflict in:
> >
> > drivers/misc/mei/debugfs.c
> >
> > between commit:
> >
> > 5666d896e838 ("mei: no need to check return value of debugfs_create
> > functions")
> >
> > from the driver-core tree and commit:
> >
> > b728ddde769c ("mei: Convert to use DEFINE_SHOW_ATTRIBUTE macro")
> >
> > from the char-misc 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.
> >
> > --
> > Cheers,
> > Stephen Rothwell
> >
> > diff --cc drivers/misc/mei/debugfs.c
> > index df6bf8b81936,47cfd5005e1b..000000000000
> > --- a/drivers/misc/mei/debugfs.c
> > +++ b/drivers/misc/mei/debugfs.c
> > @@@ -233,22 -154,46 +154,21 @@@ void mei_dbgfs_deregister(struct
> mei_de
> > *
> > * @dev: the mei device structure
> > * @name: the mei device name
> > - *
> > - * Return: 0 on success, <0 on failure.
> > */
> > -int mei_dbgfs_register(struct mei_device *dev, const char *name)
> > +void mei_dbgfs_register(struct mei_device *dev, const char *name)
> > {
> > - struct dentry *dir, *f;
> > + struct dentry *dir;
> >
> > dir = debugfs_create_dir(name, NULL);
> > - if (!dir)
> > - return -ENOMEM;
> > -
> > dev->dbgfs_dir = dir;
> >
> > - f = debugfs_create_file("meclients", S_IRUSR, dir,
> > - dev, &mei_dbgfs_meclients_fops);
> > - if (!f) {
> > - dev_err(dev->dev, "meclients: registration failed\n");
> > - goto err;
> > - }
> > - f = debugfs_create_file("active", S_IRUSR, dir,
> > - dev, &mei_dbgfs_active_fops);
> > - if (!f) {
> > - dev_err(dev->dev, "active: registration failed\n");
> > - goto err;
> > - }
> > - f = debugfs_create_file("devstate", S_IRUSR, dir,
> > - dev, &mei_dbgfs_devstate_fops);
> > - if (!f) {
> > - dev_err(dev->dev, "devstate: registration failed\n");
> > - goto err;
> > - }
> > - f = debugfs_create_file("allow_fixed_address", S_IRUSR | S_IWUSR,
> dir,
> > - &dev->allow_fixed_address,
> > - &mei_dbgfs_allow_fa_fops);
> > - if (!f) {
> > - dev_err(dev->dev, "allow_fixed_address: registration
> failed\n");
> > - goto err;
> > - }
> > - return 0;
> > -err:
> > - mei_dbgfs_deregister(dev);
> > - return -ENODEV;
> > + debugfs_create_file("meclients", S_IRUSR, dir, dev,
> > - &mei_dbgfs_fops_meclients);
> > ++ &mei_dbgfs_meclients_fops);
> > + debugfs_create_file("active", S_IRUSR, dir, dev,
> > - &mei_dbgfs_fops_active);
> > ++ &mei_dbgfs_active_fops);
> > + debugfs_create_file("devstate", S_IRUSR, dir, dev,
> > - &mei_dbgfs_fops_devstate);
> > ++ &mei_dbgfs_devstate_fops);
> > + debugfs_create_file("allow_fixed_address", S_IRUSR | S_IWUSR, dir,
> > + &dev->allow_fixed_address,
> > - &mei_dbgfs_fops_allow_fa);
> > ++ &mei_dbgfs_allow_fa_fops);
> > }
> > -
>
> I am still getting this conflict (the commit ids may have changed).
> Just a reminder in case you think Linus may need to know.
The conflict is resolved correctly, the conflicts are between Greg's misc-char and driver-core git trees.
Actually I've asked Greg this git expertise question: how the **exact** conflict resolution is carried between git trees (before it is finally resolved in upstream for all.).
For next time If anyone has the answer, please let me know.
Thanks
Tomas
Hi Tomas,
On Tue, 9 Jul 2019 07:12:34 +0000 "Winkler, Tomas" <[email protected]> wrote:
>
> Actually I've asked Greg this git expertise question: how the
> **exact** conflict resolution is carried between git trees (before it
> is finally resolved in upstream for all.). For next time If anyone
> has the answer, please let me know.
When I see a conflict, I fix it up and report it, then "git rerere"
will remember the resolution for me so that the next day it is fixed up
automatically. When Linus merges the same trees he will do the same
(or a similar) merge resolution. I depend on the maintainers to inform
Linus if the conflict is any anyway difficult to resolve.
--
Cheers,
Stephen Rothwell