linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] mux drivers improvements for v6.16
@ 2025-05-13 10:50 Krzysztof Kozlowski
  2025-05-13 10:53 ` [PATCH PULL] w1: Avoid -Wflex-array-member-not-at-end warnings Krzysztof Kozlowski
  2025-05-15 13:34 ` [GIT PULL] mux drivers improvements for v6.16 Krzysztof Kozlowski
  0 siblings, 2 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-13 10:50 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Krzysztof Kozlowski, linux-kernel, Krzysztof Kozlowski,
	Peter Rosin

Hi Greg,

Please pull mux drivers patches - mostly minor improvements and one new feature
(regulator support for Lenovo T14s laptop).  These were on mailing lists for
some time (one even from 2024) and they were never picked up, acknowledged nor
rejected.

Best regards,
Krzysztof


The following changes since commit 0af2f6be1b4281385b618cb86ad946eded089ac8:

  Linux 6.15-rc1 (2025-04-06 13:11:33 -0700)

are available in the Git repository at:

  https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git tags/mux-drv-6.16

for you to fetch changes up to 9761037d28327e0d4ee9586a8210ef6462c2c757:

  mux: adgs1408: fix Wvoid-pointer-to-enum-cast warning (2025-05-08 17:12:08 +0200)

----------------------------------------------------------------
Mux drivers for v6.16

Few cleanups and fixes for the mux drivers:
1. Simplify with spi_get_device_match_data().
2. Fix -Wunused-const-variable and -Wvoid-pointer-to-enum-cast warnings.
3. GPIO mux: add optional regulator for Lenovo T14s laptop headset.
4. MMIO mux: avoid using syscon's device_node_to_regmap(), due to
   changes in the syscon code.

----------------------------------------------------------------
Andrew Davis (1):
      mux: mmio: Do not use syscon helper to build regmap

Arnd Bergmann (1):
      mux: adg792a: remove incorrect of_match_ptr annotation

Krzysztof Kozlowski (2):
      mux: adgs1408: simplify with spi_get_device_match_data()
      mux: adgs1408: fix Wvoid-pointer-to-enum-cast warning

Srinivas Kandagatla (2):
      dt-bindings: mux: add optional regulator binding to gpio mux
      mux: gpio: add optional regulator support

Thorsten Blum (1):
      mux: mmio: Add missing word in error message

 Documentation/devicetree/bindings/mux/gpio-mux.yaml |  4 ++++
 drivers/mux/adg792a.c                               |  2 +-
 drivers/mux/adgs1408.c                              |  4 +---
 drivers/mux/gpio.c                                  |  5 +++++
 drivers/mux/mmio.c                                  | 15 +++++++++++++--
 5 files changed, 24 insertions(+), 6 deletions(-)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH PULL] w1: Avoid -Wflex-array-member-not-at-end warnings
  2025-05-13 10:50 [GIT PULL] mux drivers improvements for v6.16 Krzysztof Kozlowski
@ 2025-05-13 10:53 ` Krzysztof Kozlowski
  2025-05-21 12:13   ` Greg Kroah-Hartman
  2025-05-15 13:34 ` [GIT PULL] mux drivers improvements for v6.16 Krzysztof Kozlowski
  1 sibling, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-13 10:53 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Gustavo A. R. Silva, linux-kernel, krzk, Kees Cook,
	Krzysztof Kozlowski

From: "Gustavo A. R. Silva" <gustavoars@kernel.org>

-Wflex-array-member-not-at-end was introduced in GCC-14, and we are
getting ready to enable it, globally.

Use the `DEFINE_RAW_FLEX()` helper for on-stack definitions of
a flexible structure where the size of the flexible-array member
is known at compile-time, and refactor the rest of the code,
accordingly.

So, with these changes, fix the following warnings:

drivers/w1/w1_netlink.c:198:31: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
drivers/w1/w1_netlink.c:219:31: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]

Reviewed-by: Kees Cook <kees@kernel.org>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/Z_RflBe5iDGTMFjV@kspp
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---

Hi Greg,

I have one patch in w1 tree for you for v6.16.

Krzysztof

 drivers/w1/w1_netlink.c | 42 ++++++++++++++++++++---------------------
 1 file changed, 20 insertions(+), 22 deletions(-)

diff --git a/drivers/w1/w1_netlink.c b/drivers/w1/w1_netlink.c
index 691978cddab7..e6b59d921076 100644
--- a/drivers/w1/w1_netlink.c
+++ b/drivers/w1/w1_netlink.c
@@ -194,16 +194,16 @@ static void w1_netlink_queue_status(struct w1_cb_block *block,
 static void w1_netlink_send_error(struct cn_msg *cn, struct w1_netlink_msg *msg,
 	int portid, int error)
 {
-	struct {
-		struct cn_msg cn;
-		struct w1_netlink_msg msg;
-	} packet;
-	memcpy(&packet.cn, cn, sizeof(packet.cn));
-	memcpy(&packet.msg, msg, sizeof(packet.msg));
-	packet.cn.len = sizeof(packet.msg);
-	packet.msg.len = 0;
-	packet.msg.status = (u8)-error;
-	cn_netlink_send(&packet.cn, portid, 0, GFP_KERNEL);
+	DEFINE_RAW_FLEX(struct cn_msg, packet, data,
+			sizeof(struct w1_netlink_msg));
+	struct w1_netlink_msg *pkt_msg = (struct w1_netlink_msg *)packet->data;
+
+	*packet = *cn;
+	*pkt_msg = *msg;
+	packet->len = sizeof(*pkt_msg);
+	pkt_msg->len = 0;
+	pkt_msg->status = (u8)-error;
+	cn_netlink_send(packet, portid, 0, GFP_KERNEL);
 }
 
 /**
@@ -215,22 +215,20 @@ static void w1_netlink_send_error(struct cn_msg *cn, struct w1_netlink_msg *msg,
  */
 void w1_netlink_send(struct w1_master *dev, struct w1_netlink_msg *msg)
 {
-	struct {
-		struct cn_msg cn;
-		struct w1_netlink_msg msg;
-	} packet;
-	memset(&packet, 0, sizeof(packet));
+	DEFINE_RAW_FLEX(struct cn_msg, packet, data,
+			sizeof(struct w1_netlink_msg));
+	struct w1_netlink_msg *pkt_msg = (struct w1_netlink_msg *)packet->data;
 
-	packet.cn.id.idx = CN_W1_IDX;
-	packet.cn.id.val = CN_W1_VAL;
+	packet->id.idx = CN_W1_IDX;
+	packet->id.val = CN_W1_VAL;
 
-	packet.cn.seq = dev->seq++;
-	packet.cn.len = sizeof(*msg);
+	packet->seq = dev->seq++;
+	packet->len = sizeof(*msg);
 
-	memcpy(&packet.msg, msg, sizeof(*msg));
-	packet.msg.len = 0;
+	*pkt_msg = *msg;
+	pkt_msg->len = 0;
 
-	cn_netlink_send(&packet.cn, 0, 0, GFP_KERNEL);
+	cn_netlink_send(packet, 0, 0, GFP_KERNEL);
 }
 
 static void w1_send_slave(struct w1_master *dev, u64 rn)
-- 
2.45.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [GIT PULL] mux drivers improvements for v6.16
  2025-05-13 10:50 [GIT PULL] mux drivers improvements for v6.16 Krzysztof Kozlowski
  2025-05-13 10:53 ` [PATCH PULL] w1: Avoid -Wflex-array-member-not-at-end warnings Krzysztof Kozlowski
@ 2025-05-15 13:34 ` Krzysztof Kozlowski
  2025-05-21 12:14   ` Greg Kroah-Hartman
  1 sibling, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-15 13:34 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Greg Kroah-Hartman; +Cc: linux-kernel, Peter Rosin

On 13/05/2025 12:50, Krzysztof Kozlowski wrote:
> Hi Greg,
> 


...

>   https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git tags/mux-drv-6.16
> 
> for you to fetch changes up to 9761037d28327e0d4ee9586a8210ef6462c2c757:
> 
>   mux: adgs1408: fix Wvoid-pointer-to-enum-cast warning (2025-05-08 17:12:08 +0200)
> 
> ----------------------------------------------------------------
> Mux drivers for v6.16
> 
> Few cleanups and fixes for the mux drivers:
> 1. Simplify with spi_get_device_match_data().
> 2. Fix -Wunused-const-variable and -Wvoid-pointer-to-enum-cast warnings.
> 3. GPIO mux: add optional regulator for Lenovo T14s laptop headset.
> 4. MMIO mux: avoid using syscon's device_node_to_regmap(), due to
>    changes in the syscon code.
> 
> ----------------------------------------------------------------
> Andrew Davis (1):
>       mux: mmio: Do not use syscon helper to build regmap
I received LKP build error report for some specific configuration:
https://lore.kernel.org/oe-kbuild-all/202505150312.dYbBqUhG-lkp@intel.com/

I will send a follow up fix for that and then later updated pull
request, if you do not pull it till that time.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH PULL] w1: Avoid -Wflex-array-member-not-at-end warnings
  2025-05-13 10:53 ` [PATCH PULL] w1: Avoid -Wflex-array-member-not-at-end warnings Krzysztof Kozlowski
@ 2025-05-21 12:13   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 7+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-21 12:13 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Gustavo A. R. Silva, linux-kernel, krzk, Kees Cook

On Tue, May 13, 2025 at 12:53:26PM +0200, Krzysztof Kozlowski wrote:
> From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
> 
> -Wflex-array-member-not-at-end was introduced in GCC-14, and we are
> getting ready to enable it, globally.
> 
> Use the `DEFINE_RAW_FLEX()` helper for on-stack definitions of
> a flexible structure where the size of the flexible-array member
> is known at compile-time, and refactor the rest of the code,
> accordingly.
> 
> So, with these changes, fix the following warnings:
> 
> drivers/w1/w1_netlink.c:198:31: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> drivers/w1/w1_netlink.c:219:31: warning: structure containing a flexible array member is not at the end of another structure [-Wflex-array-member-not-at-end]
> 
> Reviewed-by: Kees Cook <kees@kernel.org>
> Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
> Link: https://lore.kernel.org/r/Z_RflBe5iDGTMFjV@kspp
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
> 
> Hi Greg,
> 
> I have one patch in w1 tree for you for v6.16.

A "PATCH PULL"?  I'll take this as a patch, thanks :)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [GIT PULL] mux drivers improvements for v6.16
  2025-05-15 13:34 ` [GIT PULL] mux drivers improvements for v6.16 Krzysztof Kozlowski
@ 2025-05-21 12:14   ` Greg Kroah-Hartman
  2025-05-21 12:19     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Greg Kroah-Hartman @ 2025-05-21 12:14 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Krzysztof Kozlowski, linux-kernel, Peter Rosin

On Thu, May 15, 2025 at 03:34:51PM +0200, Krzysztof Kozlowski wrote:
> On 13/05/2025 12:50, Krzysztof Kozlowski wrote:
> > Hi Greg,
> > 
> 
> 
> ...
> 
> >   https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git tags/mux-drv-6.16
> > 
> > for you to fetch changes up to 9761037d28327e0d4ee9586a8210ef6462c2c757:
> > 
> >   mux: adgs1408: fix Wvoid-pointer-to-enum-cast warning (2025-05-08 17:12:08 +0200)
> > 
> > ----------------------------------------------------------------
> > Mux drivers for v6.16
> > 
> > Few cleanups and fixes for the mux drivers:
> > 1. Simplify with spi_get_device_match_data().
> > 2. Fix -Wunused-const-variable and -Wvoid-pointer-to-enum-cast warnings.
> > 3. GPIO mux: add optional regulator for Lenovo T14s laptop headset.
> > 4. MMIO mux: avoid using syscon's device_node_to_regmap(), due to
> >    changes in the syscon code.
> > 
> > ----------------------------------------------------------------
> > Andrew Davis (1):
> >       mux: mmio: Do not use syscon helper to build regmap
> I received LKP build error report for some specific configuration:
> https://lore.kernel.org/oe-kbuild-all/202505150312.dYbBqUhG-lkp@intel.com/
> 
> I will send a follow up fix for that and then later updated pull
> request, if you do not pull it till that time.

I've taken this now, do you have a fix somewhere?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [GIT PULL] mux drivers improvements for v6.16
  2025-05-21 12:14   ` Greg Kroah-Hartman
@ 2025-05-21 12:19     ` Krzysztof Kozlowski
  2025-05-21 15:25       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-21 12:19 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Krzysztof Kozlowski, linux-kernel, Peter Rosin

On 21/05/2025 14:14, Greg Kroah-Hartman wrote:
> On Thu, May 15, 2025 at 03:34:51PM +0200, Krzysztof Kozlowski wrote:
>> On 13/05/2025 12:50, Krzysztof Kozlowski wrote:
>>> Hi Greg,
>>>
>>
>>
>> ...
>>
>>>   https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git tags/mux-drv-6.16
>>>
>>> for you to fetch changes up to 9761037d28327e0d4ee9586a8210ef6462c2c757:
>>>
>>>   mux: adgs1408: fix Wvoid-pointer-to-enum-cast warning (2025-05-08 17:12:08 +0200)
>>>
>>> ----------------------------------------------------------------
>>> Mux drivers for v6.16
>>>
>>> Few cleanups and fixes for the mux drivers:
>>> 1. Simplify with spi_get_device_match_data().
>>> 2. Fix -Wunused-const-variable and -Wvoid-pointer-to-enum-cast warnings.
>>> 3. GPIO mux: add optional regulator for Lenovo T14s laptop headset.
>>> 4. MMIO mux: avoid using syscon's device_node_to_regmap(), due to
>>>    changes in the syscon code.
>>>
>>> ----------------------------------------------------------------
>>> Andrew Davis (1):
>>>       mux: mmio: Do not use syscon helper to build regmap
>> I received LKP build error report for some specific configuration:
>> https://lore.kernel.org/oe-kbuild-all/202505150312.dYbBqUhG-lkp@intel.com/
>>
>> I will send a follow up fix for that and then later updated pull
>> request, if you do not pull it till that time.
> 
> I've taken this now, do you have a fix somewhere?
Fix is being discussed on the lists, because it exposes Kconfig circular
dependency:

1. The actual fix which also tries to break circular dependency:
https://lore.kernel.org/all/20250515140555.325601-2-krzysztof.kozlowski@linaro.org/

2. A better way to break circular dependency:
https://lore.kernel.org/all/20250516141722.13772-1-afd@ti.com/

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [GIT PULL] mux drivers improvements for v6.16
  2025-05-21 12:19     ` Krzysztof Kozlowski
@ 2025-05-21 15:25       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2025-05-21 15:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Krzysztof Kozlowski, linux-kernel, Peter Rosin, Mark Brown

On 21/05/2025 14:19, Krzysztof Kozlowski wrote:
>>>>
>>>> ----------------------------------------------------------------
>>>> Andrew Davis (1):
>>>>       mux: mmio: Do not use syscon helper to build regmap
>>> I received LKP build error report for some specific configuration:
>>> https://lore.kernel.org/oe-kbuild-all/202505150312.dYbBqUhG-lkp@intel.com/
>>>
>>> I will send a follow up fix for that and then later updated pull
>>> request, if you do not pull it till that time.
>>
>> I've taken this now, do you have a fix somewhere?
> Fix is being discussed on the lists, because it exposes Kconfig circular
> dependency:
> 
> 1. The actual fix which also tries to break circular dependency:
> https://lore.kernel.org/all/20250515140555.325601-2-krzysztof.kozlowski@linaro.org/
> 
> 2. A better way to break circular dependency:
> https://lore.kernel.org/all/20250516141722.13772-1-afd@ti.com/

+Cc Mark Brown,

Above circular-dependency-break (2) was applied by Mark for v6.16-rc1:
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git/commit/?h=for-6.16&id=c5a219395b4e6312102a505bfe73aac8f8bada8c

This means that my fix for LKP build error, should come after. My
proposal is to live with the LKP build error till v6.16-rc1 and then
apply my fix. I just sent v2 of my fix for LKP build error:
https://lore.kernel.org/r/20250521152354.92720-2-krzysztof.kozlowski@linaro.org/

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-05-21 15:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-13 10:50 [GIT PULL] mux drivers improvements for v6.16 Krzysztof Kozlowski
2025-05-13 10:53 ` [PATCH PULL] w1: Avoid -Wflex-array-member-not-at-end warnings Krzysztof Kozlowski
2025-05-21 12:13   ` Greg Kroah-Hartman
2025-05-15 13:34 ` [GIT PULL] mux drivers improvements for v6.16 Krzysztof Kozlowski
2025-05-21 12:14   ` Greg Kroah-Hartman
2025-05-21 12:19     ` Krzysztof Kozlowski
2025-05-21 15:25       ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).