[PATCH net-next v2 7/9] net/smc: Drop nr_pages_max initialization

Michal Luczaj posted 9 patches 3 months, 2 weeks ago
There is a newer version of this series
[PATCH net-next v2 7/9] net/smc: Drop nr_pages_max initialization
Posted by Michal Luczaj 3 months, 2 weeks ago
splice_pipe_desc::nr_pages_max was initialized unnecessarily in
commit b8d199451c99 ("net/smc: Allow virtually contiguous sndbufs or RMBs
for SMC-R"). Struct's field is unused in this context.

Remove the assignment. No functional change intended.

Suggested-by: Simon Horman <horms@kernel.org>
Signed-off-by: Michal Luczaj <mhal@rbox.co>
---
 net/smc/smc_rx.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/smc/smc_rx.c b/net/smc/smc_rx.c
index e7f1134453ef40dd81a9574d6df4ead95acd8ae5..bbba5d4dc7eb0dbb31a9800023b0caab33e87842 100644
--- a/net/smc/smc_rx.c
+++ b/net/smc/smc_rx.c
@@ -202,7 +202,6 @@ static int smc_rx_splice(struct pipe_inode_info *pipe, char *src, size_t len,
 			offset = 0;
 		}
 	}
-	spd.nr_pages_max = nr_pages;
 	spd.nr_pages = nr_pages;
 	spd.pages = pages;
 	spd.partial = partial;

-- 
2.49.0
Re: [PATCH net-next v2 7/9] net/smc: Drop nr_pages_max initialization
Posted by Dust Li 3 months, 1 week ago
On 2025-06-26 10:33:40, Michal Luczaj wrote:
>splice_pipe_desc::nr_pages_max was initialized unnecessarily in
>commit b8d199451c99 ("net/smc: Allow virtually contiguous sndbufs or RMBs
>for SMC-R"). Struct's field is unused in this context.
>
>Remove the assignment. No functional change intended.
>
>Suggested-by: Simon Horman <horms@kernel.org>
>Signed-off-by: Michal Luczaj <mhal@rbox.co>

Reviewed-by: Dust Li <dust.li@linux.alibaba.com>

>---
> net/smc/smc_rx.c | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/net/smc/smc_rx.c b/net/smc/smc_rx.c
>index e7f1134453ef40dd81a9574d6df4ead95acd8ae5..bbba5d4dc7eb0dbb31a9800023b0caab33e87842 100644
>--- a/net/smc/smc_rx.c
>+++ b/net/smc/smc_rx.c
>@@ -202,7 +202,6 @@ static int smc_rx_splice(struct pipe_inode_info *pipe, char *src, size_t len,
> 			offset = 0;
> 		}
> 	}
>-	spd.nr_pages_max = nr_pages;
> 	spd.nr_pages = nr_pages;
> 	spd.pages = pages;
> 	spd.partial = partial;
>
>-- 
>2.49.0
>
Re: [PATCH net-next v2 7/9] net/smc: Drop nr_pages_max initialization
Posted by Simon Horman 3 months, 1 week ago
On Thu, Jun 26, 2025 at 10:33:40AM +0200, Michal Luczaj wrote:
> splice_pipe_desc::nr_pages_max was initialized unnecessarily in
> commit b8d199451c99 ("net/smc: Allow virtually contiguous sndbufs or RMBs
> for SMC-R"). Struct's field is unused in this context.
> 
> Remove the assignment. No functional change intended.
> 
> Suggested-by: Simon Horman <horms@kernel.org>
> Signed-off-by: Michal Luczaj <mhal@rbox.co>

Reviewed-by: Simon Horman <horms@kernel.org>
Re: [PATCH net-next v2 7/9] net/smc: Drop nr_pages_max initialization
Posted by Sidraya Jayagond 3 months, 2 weeks ago

On 26/06/25 2:03 pm, Michal Luczaj wrote:
> splice_pipe_desc::nr_pages_max was initialized unnecessarily in
> commit b8d199451c99 ("net/smc: Allow virtually contiguous sndbufs or RMBs
> for SMC-R"). Struct's field is unused in this context.
> 
> Remove the assignment. No functional change intended.
> 
> Suggested-by: Simon Horman <horms@kernel.org>
> Signed-off-by: Michal Luczaj <mhal@rbox.co>
> ---
>   net/smc/smc_rx.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/net/smc/smc_rx.c b/net/smc/smc_rx.c
> index e7f1134453ef40dd81a9574d6df4ead95acd8ae5..bbba5d4dc7eb0dbb31a9800023b0caab33e87842 100644
> --- a/net/smc/smc_rx.c
> +++ b/net/smc/smc_rx.c
> @@ -202,7 +202,6 @@ static int smc_rx_splice(struct pipe_inode_info *pipe, char *src, size_t len,
>   			offset = 0;
>   		}
>   	}
> -	spd.nr_pages_max = nr_pages;
>   	spd.nr_pages = nr_pages;
>   	spd.pages = pages;
>   	spd.partial = partial;
> 
LGTM.
Reviewed-by: Sidraya Jayagond <sidraya@linux.ibm.com>