mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next] net: ipa: Drop unused qmi_elem_info arrays
@ 2026-10-29 11:11 Krzysztof Kozlowski
  2026-10-29 18:02 ` Alex Elder
  0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-10-29 11:11 UTC (permalink / raw)
  To: Alex Elder, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
  Cc: Krzysztof Kozlowski

From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

'ipa_mem_array_ei' is not used anywhere, so can be dropped completely.
'ipa_mem_bounds_ei' and 'ipa_mem_range_ei' are not used outside of their
units, so they can be narrowed to file-scope.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/net/ipa/ipa_qmi_msg.c | 25 ++-----------------------
 drivers/net/ipa/ipa_qmi_msg.h |  3 ---
 2 files changed, 2 insertions(+), 26 deletions(-)

diff --git a/drivers/net/ipa/ipa_qmi_msg.c b/drivers/net/ipa/ipa_qmi_msg.c
index 51dc13a577a5..e2401d8475b6 100644
--- a/drivers/net/ipa/ipa_qmi_msg.c
+++ b/drivers/net/ipa/ipa_qmi_msg.c
@@ -188,7 +188,7 @@ const struct qmi_elem_info ipa_init_complete_ind_ei[] = {
 };
 
 /* QMI message structure definition for struct ipa_mem_bounds */
-const struct qmi_elem_info ipa_mem_bounds_ei[] = {
+static const struct qmi_elem_info ipa_mem_bounds_ei[] = {
 	{
 		.data_type	= QMI_UNSIGNED_4_BYTE,
 		.elem_len	= 1,
@@ -208,29 +208,8 @@ const struct qmi_elem_info ipa_mem_bounds_ei[] = {
 	},
 };
 
-/* QMI message structure definition for struct ipa_mem_array */
-const struct qmi_elem_info ipa_mem_array_ei[] = {
-	{
-		.data_type	= QMI_UNSIGNED_4_BYTE,
-		.elem_len	= 1,
-		.elem_size	=
-			sizeof_field(struct ipa_mem_array, start),
-		.offset		= offsetof(struct ipa_mem_array, start),
-	},
-	{
-		.data_type	= QMI_UNSIGNED_4_BYTE,
-		.elem_len	= 1,
-		.elem_size	=
-			sizeof_field(struct ipa_mem_array, count),
-		.offset		= offsetof(struct ipa_mem_array, count),
-	},
-	{
-		.data_type	= QMI_EOTI,
-	},
-};
-
 /* QMI message structure definition for struct ipa_mem_range */
-const struct qmi_elem_info ipa_mem_range_ei[] = {
+static const struct qmi_elem_info ipa_mem_range_ei[] = {
 	{
 		.data_type	= QMI_UNSIGNED_4_BYTE,
 		.elem_len	= 1,
diff --git a/drivers/net/ipa/ipa_qmi_msg.h b/drivers/net/ipa/ipa_qmi_msg.h
index 644b8c27108b..1924ac2dfa90 100644
--- a/drivers/net/ipa/ipa_qmi_msg.h
+++ b/drivers/net/ipa/ipa_qmi_msg.h
@@ -253,9 +253,6 @@ extern const struct qmi_elem_info ipa_indication_register_rsp_ei[];
 extern const struct qmi_elem_info ipa_driver_init_complete_req_ei[];
 extern const struct qmi_elem_info ipa_driver_init_complete_rsp_ei[];
 extern const struct qmi_elem_info ipa_init_complete_ind_ei[];
-extern const struct qmi_elem_info ipa_mem_bounds_ei[];
-extern const struct qmi_elem_info ipa_mem_array_ei[];
-extern const struct qmi_elem_info ipa_mem_range_ei[];
 extern const struct qmi_elem_info ipa_init_modem_driver_req_ei[];
 extern const struct qmi_elem_info ipa_init_modem_driver_rsp_ei[];
 
-- 
2.53.0


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

* Re: [PATCH net-next] net: ipa: Drop unused qmi_elem_info arrays
  2026-10-29 11:11 [PATCH net-next] net: ipa: Drop unused qmi_elem_info arrays Krzysztof Kozlowski
@ 2026-10-29 18:02 ` Alex Elder
  2026-10-29 19:17   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Elder @ 2026-10-29 18:02 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Alex Elder, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
  Cc: Krzysztof Kozlowski

On 10/29/26 6:11 AM, Krzysztof Kozlowski wrote:
> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Did you send this before?  (Why the From:?)

> 'ipa_mem_array_ei' is not used anywhere, so can be dropped completely.
> 'ipa_mem_bounds_ei' and 'ipa_mem_range_ei' are not used outside of their
> units, so they can be narrowed to file-scope.

I wonder why ipa_mem_array_ei was still defined.  It must have
been used at some point...  Anyway, you're right, it's not
used, so good riddance.

Did you find these by inspection?

Reviewed-by: Alex Elder <elder@riscstar.com>

> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>   drivers/net/ipa/ipa_qmi_msg.c | 25 ++-----------------------
>   drivers/net/ipa/ipa_qmi_msg.h |  3 ---
>   2 files changed, 2 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/net/ipa/ipa_qmi_msg.c b/drivers/net/ipa/ipa_qmi_msg.c
> index 51dc13a577a5..e2401d8475b6 100644
> --- a/drivers/net/ipa/ipa_qmi_msg.c
> +++ b/drivers/net/ipa/ipa_qmi_msg.c
> @@ -188,7 +188,7 @@ const struct qmi_elem_info ipa_init_complete_ind_ei[] = {
>   };
>   
>   /* QMI message structure definition for struct ipa_mem_bounds */
> -const struct qmi_elem_info ipa_mem_bounds_ei[] = {
> +static const struct qmi_elem_info ipa_mem_bounds_ei[] = {
>   	{
>   		.data_type	= QMI_UNSIGNED_4_BYTE,
>   		.elem_len	= 1,
> @@ -208,29 +208,8 @@ const struct qmi_elem_info ipa_mem_bounds_ei[] = {
>   	},
>   };
>   
> -/* QMI message structure definition for struct ipa_mem_array */
> -const struct qmi_elem_info ipa_mem_array_ei[] = {
> -	{
> -		.data_type	= QMI_UNSIGNED_4_BYTE,
> -		.elem_len	= 1,
> -		.elem_size	=
> -			sizeof_field(struct ipa_mem_array, start),
> -		.offset		= offsetof(struct ipa_mem_array, start),
> -	},
> -	{
> -		.data_type	= QMI_UNSIGNED_4_BYTE,
> -		.elem_len	= 1,
> -		.elem_size	=
> -			sizeof_field(struct ipa_mem_array, count),
> -		.offset		= offsetof(struct ipa_mem_array, count),
> -	},
> -	{
> -		.data_type	= QMI_EOTI,
> -	},
> -};
> -
>   /* QMI message structure definition for struct ipa_mem_range */
> -const struct qmi_elem_info ipa_mem_range_ei[] = {
> +static const struct qmi_elem_info ipa_mem_range_ei[] = {
>   	{
>   		.data_type	= QMI_UNSIGNED_4_BYTE,
>   		.elem_len	= 1,
> diff --git a/drivers/net/ipa/ipa_qmi_msg.h b/drivers/net/ipa/ipa_qmi_msg.h
> index 644b8c27108b..1924ac2dfa90 100644
> --- a/drivers/net/ipa/ipa_qmi_msg.h
> +++ b/drivers/net/ipa/ipa_qmi_msg.h
> @@ -253,9 +253,6 @@ extern const struct qmi_elem_info ipa_indication_register_rsp_ei[];
>   extern const struct qmi_elem_info ipa_driver_init_complete_req_ei[];
>   extern const struct qmi_elem_info ipa_driver_init_complete_rsp_ei[];
>   extern const struct qmi_elem_info ipa_init_complete_ind_ei[];
> -extern const struct qmi_elem_info ipa_mem_bounds_ei[];
> -extern const struct qmi_elem_info ipa_mem_array_ei[];
> -extern const struct qmi_elem_info ipa_mem_range_ei[];
>   extern const struct qmi_elem_info ipa_init_modem_driver_req_ei[];
>   extern const struct qmi_elem_info ipa_init_modem_driver_rsp_ei[];
>   


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

* Re: [PATCH net-next] net: ipa: Drop unused qmi_elem_info arrays
  2026-10-29 18:02 ` Alex Elder
@ 2026-10-29 19:17   ` Krzysztof Kozlowski
  2026-10-29 21:05     ` Alex Elder
  0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2026-10-29 19:17 UTC (permalink / raw)
  To: Alex Elder, Alex Elder, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
  Cc: Krzysztof Kozlowski

On 29/10/2026 19:02, Alex Elder wrote:
> On 10/29/26 6:11 AM, Krzysztof Kozlowski wrote:
>> From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> Did you send this before?  (Why the From:?)

Old commit I forgot to send at some point.

> 
>> 'ipa_mem_array_ei' is not used anywhere, so can be dropped completely.
>> 'ipa_mem_bounds_ei' and 'ipa_mem_range_ei' are not used outside of their
>> units, so they can be narrowed to file-scope.
> 
> I wonder why ipa_mem_array_ei was still defined.  It must have
> been used at some point...  Anyway, you're right, it's not
> used, so good riddance.
> 
> Did you find these by inspection?

I was going once through all these QMI arrays through multiple drivers.

> 
> Reviewed-by: Alex Elder <elder@riscstar.com>
> 
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>> ---


Best regards,
Krzysztof

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

* Re: [PATCH net-next] net: ipa: Drop unused qmi_elem_info arrays
  2026-10-29 19:17   ` Krzysztof Kozlowski
@ 2026-10-29 21:05     ` Alex Elder
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Elder @ 2026-10-29 21:05 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Alex Elder, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
  Cc: Krzysztof Kozlowski

On 10/29/26 2:17 PM, Krzysztof Kozlowski wrote:
>>
>> Did you find these by inspection?
> I was going once through all these QMI arrays through multiple drivers.

What I'd really like to do is define these things in "source
form" and have the C files containing structures like this
one be generated.  I'm pretty sure Bjorn has a tool that
does this (maybe he doesn't want to use it though).

Anyway, thanks Krzysztof.
					-Alex

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

end of thread, other threads:[~2026-10-29 21:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-29 11:11 [PATCH net-next] net: ipa: Drop unused qmi_elem_info arrays Krzysztof Kozlowski
2026-10-29 18:02 ` Alex Elder
2026-10-29 19:17   ` Krzysztof Kozlowski
2026-10-29 21:05     ` Alex Elder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®