* [PATCH] lib/zlib: remove redundation assignement of avail_in dfltcc_gdht()
@ 2023-01-28 16:50 Tom Rix
2023-01-29 19:07 ` Ilya Leoshkevich
2023-01-30 9:29 ` Zaslonko Mikhail
0 siblings, 2 replies; 3+ messages in thread
From: Tom Rix @ 2023-01-28 16:50 UTC (permalink / raw)
To: zaslonko, akpm, iii; +Cc: linux-kernel, Tom Rix
cppcheck reports
lib/zlib_dfltcc/dfltcc_deflate.c:65:21: warning: Redundant assignment of 'avail_in' to itself. [selfAssignment]
size_t avail_in = avail_in = strm->avail_in;
Only setting avail_in once is needed.
Fixes: aa5b395b69b6 ("lib/zlib: add s390 hardware support for kernel zlib_deflate")
Signed-off-by: Tom Rix <trix@redhat.com>
---
lib/zlib_dfltcc/dfltcc_deflate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/zlib_dfltcc/dfltcc_deflate.c b/lib/zlib_dfltcc/dfltcc_deflate.c
index 80924f067c24..b732b6d9e35d 100644
--- a/lib/zlib_dfltcc/dfltcc_deflate.c
+++ b/lib/zlib_dfltcc/dfltcc_deflate.c
@@ -62,7 +62,7 @@ static void dfltcc_gdht(
{
deflate_state *state = (deflate_state *)strm->state;
struct dfltcc_param_v0 *param = &GET_DFLTCC_STATE(state)->param;
- size_t avail_in = avail_in = strm->avail_in;
+ size_t avail_in = strm->avail_in;
dfltcc(DFLTCC_GDHT,
param, NULL, NULL,
--
2.26.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] lib/zlib: remove redundation assignement of avail_in dfltcc_gdht()
2023-01-28 16:50 [PATCH] lib/zlib: remove redundation assignement of avail_in dfltcc_gdht() Tom Rix
@ 2023-01-29 19:07 ` Ilya Leoshkevich
2023-01-30 9:29 ` Zaslonko Mikhail
1 sibling, 0 replies; 3+ messages in thread
From: Ilya Leoshkevich @ 2023-01-29 19:07 UTC (permalink / raw)
To: Tom Rix, zaslonko, akpm; +Cc: linux-kernel
On Sat, 2023-01-28 at 08:50 -0800, Tom Rix wrote:
> cppcheck reports
> lib/zlib_dfltcc/dfltcc_deflate.c:65:21: warning: Redundant assignment
> of 'avail_in' to itself. [selfAssignment]
> size_t avail_in = avail_in = strm->avail_in;
>
> Only setting avail_in once is needed.
>
> Fixes: aa5b395b69b6 ("lib/zlib: add s390 hardware support for kernel
> zlib_deflate")
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
> lib/zlib_dfltcc/dfltcc_deflate.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/zlib_dfltcc/dfltcc_deflate.c
> b/lib/zlib_dfltcc/dfltcc_deflate.c
> index 80924f067c24..b732b6d9e35d 100644
> --- a/lib/zlib_dfltcc/dfltcc_deflate.c
> +++ b/lib/zlib_dfltcc/dfltcc_deflate.c
> @@ -62,7 +62,7 @@ static void dfltcc_gdht(
> {
> deflate_state *state = (deflate_state *)strm->state;
> struct dfltcc_param_v0 *param = &GET_DFLTCC_STATE(state)->param;
> - size_t avail_in = avail_in = strm->avail_in;
> + size_t avail_in = strm->avail_in;
>
> dfltcc(DFLTCC_GDHT,
> param, NULL, NULL,
Thanks for spotting this!
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] lib/zlib: remove redundation assignement of avail_in dfltcc_gdht()
2023-01-28 16:50 [PATCH] lib/zlib: remove redundation assignement of avail_in dfltcc_gdht() Tom Rix
2023-01-29 19:07 ` Ilya Leoshkevich
@ 2023-01-30 9:29 ` Zaslonko Mikhail
1 sibling, 0 replies; 3+ messages in thread
From: Zaslonko Mikhail @ 2023-01-30 9:29 UTC (permalink / raw)
To: Tom Rix, akpm, iii; +Cc: linux-kernel
On 28.01.2023 17:50, Tom Rix wrote:
> cppcheck reports
> lib/zlib_dfltcc/dfltcc_deflate.c:65:21: warning: Redundant assignment of 'avail_in' to itself. [selfAssignment]
> size_t avail_in = avail_in = strm->avail_in;
>
> Only setting avail_in once is needed.
>
> Fixes: aa5b395b69b6 ("lib/zlib: add s390 hardware support for kernel zlib_deflate")
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
> lib/zlib_dfltcc/dfltcc_deflate.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/zlib_dfltcc/dfltcc_deflate.c b/lib/zlib_dfltcc/dfltcc_deflate.c
> index 80924f067c24..b732b6d9e35d 100644
> --- a/lib/zlib_dfltcc/dfltcc_deflate.c
> +++ b/lib/zlib_dfltcc/dfltcc_deflate.c
> @@ -62,7 +62,7 @@ static void dfltcc_gdht(
> {
> deflate_state *state = (deflate_state *)strm->state;
> struct dfltcc_param_v0 *param = &GET_DFLTCC_STATE(state)->param;
> - size_t avail_in = avail_in = strm->avail_in;
> + size_t avail_in = strm->avail_in;
>
> dfltcc(DFLTCC_GDHT,
> param, NULL, NULL,
Acked-by: Mikhail Zaslonko <zaslonko@linux.ibm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-30 9:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-28 16:50 [PATCH] lib/zlib: remove redundation assignement of avail_in dfltcc_gdht() Tom Rix
2023-01-29 19:07 ` Ilya Leoshkevich
2023-01-30 9:29 ` Zaslonko Mikhail
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).