Skip to contentSkip to conversation

linux-next: manual merge of the gpio-brgl tree with the gpio-brgl-fixes tree

PATCH New Mark Brown 3 participants 4 messages Nov 16 – Nov 17

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

Hi all,

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

drivers/gpio/gpiolib-shared.c

between commit:

7d1d799d6251b ("gpio: shared: use atomic set_bit() for descriptor flags")

from the gpio-brgl-fixes tree and commits:

c402fd2961dd0 ("gpio: shared: factor out per-entry teardown helper") cda42ff53c4b5 ("gpio: shared: factor out per-entry setup helper")

from the gpio-brgl 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/gpio/gpiolib-shared.c +0 -0
diff --cc drivers/gpio/gpiolib-shared.c
index f34315a2059a2,cbb68ad646498..0000000000000
@@@ -532,7 -643,8 +643,7 @@@ int gpiochip_setup_shared(struct gpio_c
  				 * This is a shared GPIO proxy. Mark its
  				 * descriptor as such and return here.
  				 */
- 				set_bit(GPIOD_FLAG_SHARED_PROXY, &gdev->descs[0].flags);
 -				__set_bit(GPIOD_FLAG_SHARED_PROXY,
 -					  &gdev->descs[0].flags);
++				__set_bit(GPIOD_FLAG_SHARED_PROXY, &gdev->descs[0].flags);
  				return 0;
  			}
  		}
#1 lore raw

PATCH 1/1 gpio: shared: keep the atomic set_bit() in the gpio-brgl merge

Commit 7d1d799d6251 ("gpio: shared: use atomic set_bit() for descriptor flags") in the gpio-brgl-fixes tree turned the two __set_bit() calls on the descriptor flags into set_bit(). The gpio-brgl tree moved one of them into gpio_shared_setup_entry(), and the merge resolution went back to __set_bit() for both.

Use set_bit() in both places.

---
To be folded into the gpio-brgl merge, 3fbbe94ecdd0 in next-20261116.

 drivers/gpio/gpiolib-shared.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpio/gpiolib-shared.c +2 -2
index 1b76c7ce5b969..7f8b31ce4b9ec 100644
@@ -588,7 +588,7 @@ static int gpio_shared_setup_entry(struct gpio_chip *gc,
 
 		desc = &gdev->descs[entry->offset];
 
-		__set_bit(GPIOD_FLAG_SHARED, &desc->flags);
+		set_bit(GPIOD_FLAG_SHARED, &desc->flags);
 		/*
 		 * Shared GPIOs are not requested via the normal path. Make
 		 * them inaccessible to anyone even before we register the
@@ -643,7 +643,7 @@ int gpiochip_setup_shared(struct gpio_chip *gc)
 				 * This is a shared GPIO proxy. Mark its
 				 * descriptor as such and return here.
 				 */
-				__set_bit(GPIOD_FLAG_SHARED_PROXY, &gdev->descs[0].flags);
+				set_bit(GPIOD_FLAG_SHARED_PROXY, &gdev->descs[0].flags);
 				return 0;
 			}
 		}

base-commit: 749a4de370409464cf8501ec5b2451df45c84eb4

Signature · 1 line
2.53.0
#2 lore raw
In reply to Mark Brown
Quoted 29 lines · Mark Brown

Hi all,

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

drivers/gpio/gpiolib-shared.c

between commit:

7d1d799d6251b ("gpio: shared: use atomic set_bit() for descriptor flags")

from the gpio-brgl-fixes tree and commits:

c402fd2961dd0 ("gpio: shared: factor out per-entry teardown helper") cda42ff53c4b5 ("gpio: shared: factor out per-entry setup helper")

from the gpio-brgl 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/gpio/gpiolib-shared.c +0 -0
diff --cc drivers/gpio/gpiolib-shared.c
index f34315a2059a2,cbb68ad646498..0000000000000

drivers/gpio/gpiolib-shared.c

Quoted 7 lines
drivers/gpio/gpiolib-shared.c +1 -1
@@@ -532,7 -643,8 +643,7 @@@ int gpiochip_setup_shared(struct gpio_c
  				 * This is a shared GPIO proxy. Mark its
  				 * descriptor as such and return here.
  				 */
- 				set_bit(GPIOD_FLAG_SHARED_PROXY, &gdev->descs[0].flags);
 -				__set_bit(GPIOD_FLAG_SHARED_PROXY,
 -					  &gdev->descs[0].flags);
++				__set_bit(GPIOD_FLAG_SHARED_PROXY, &gdev->descs[0].flags);

This should actually keep the atomic set_bit(). In any case, I will send a PR with fixes to Torvalds this week and pull back v7.4-rc4 into gpio/for-next once tagged.

Thanks,
Bartosz

author maintainer
#3 lore raw
Quoted 10 lines · Bartosz Golaszewski

Review

Quoted 4 lines · Mark Brown
(quoted diff) +1 -1
- 				set_bit(GPIOD_FLAG_SHARED_PROXY, &gdev->descs[0].flags);
 -				__set_bit(GPIOD_FLAG_SHARED_PROXY,
 -					  &gdev->descs[0].flags);
++				__set_bit(GPIOD_FLAG_SHARED_PROXY, &gdev->descs[0].flags);

This should actually keep the atomic set_bit(). In any case, I will send a PR with fixes to Torvalds this week and pull back v7.4-rc4 into gpio/for-next once tagged.

Yeah, I didn't look up which one was atomic.