From patchwork Sat Jan 28 16:50:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 49872 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1424387wrn; Sat, 28 Jan 2023 09:03:54 -0800 (PST) X-Google-Smtp-Source: AMrXdXtXFAvQzwD/C/mJAmHFP46QDUc+ifP4uh8dLHlUjeHIsfePfh3owKxnsloYuVSruU6reTDH X-Received: by 2002:a17:90a:7884:b0:229:118f:2f67 with SMTP id x4-20020a17090a788400b00229118f2f67mr45338455pjk.37.1674925434150; Sat, 28 Jan 2023 09:03:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674925434; cv=none; d=google.com; s=arc-20160816; b=Ek77EoC8J065zen+DTF1XwgaZ8wb6tuuJqjXp4y/+aROK5xAofShLkdyfxcL5WV6Fx E0HxQuY+cMQp5kn5Ofb06H5FtUwtmXhM98+sJERLRsvIppEHqNN0/lsKcLbp6eMA9syL vr92kOwM30D2uizqi3M8V/hLrV0aFV+f/U+7z0ztS+WJNFlLx4fE4g6IoFrZj6ZcO9pl d07v0hASdHCiYC9NKK4d0rKGsV7c64BckmBOBodu+RjhP2TRgJBP3q+kQxJYSOjgHkDe mgJ6uP9cMKaom8HqC4K/YTXpc3pI5v5WQNpFRQq4VzzwNZHF/wPE0+y2avrKb9dKL0QR t2sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=wH+a1RoqV8gkvget5JfXDGZAoMbcGdg92N025k4ReP8=; b=QSGo5UvCC4DpBsQl70D8YOiQsvJmEgvh33gUawRbJlBoll8YmHjhN/DgECwr2s6Z2T SHJFYNBanxM4JGXOeEK1Jut94212quDTWLoBln3JIqATKrV3QSwtMR2ZO1Jvn3ZQpSjT kOA6GMM4qwvA4+slIAyvgeykfu+ZLtDO/FXISUd1FKBb69hRYE1+efhd1Ih+EUtWsCjE NThpCOooJwA9EB2d1JEjarBT8dKz5932sRY1LWKutFyiaaIH8LOsQzDp6CgxqcD7pPUP FFTXgE3wjoy/A13S0l7HIQ/S6/RbH6kD9BbUf/CcoETfEgLIDqD+blF3t/v804PKMMxx blNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BoVxgEdd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lt17-20020a17090b355100b00225fc594eacsi12015025pjb.80.2023.01.28.09.03.41; Sat, 28 Jan 2023 09:03:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BoVxgEdd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234586AbjA1Qvq (ORCPT + 99 others); Sat, 28 Jan 2023 11:51:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234077AbjA1Qvp (ORCPT ); Sat, 28 Jan 2023 11:51:45 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B783B2B0A0 for ; Sat, 28 Jan 2023 08:50:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674924657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=wH+a1RoqV8gkvget5JfXDGZAoMbcGdg92N025k4ReP8=; b=BoVxgEddQ7uJRCVa7pQKFTbtn7XkpfkzbZP+baN/KJAbSTNM9cphlU9B5LCRQ78ITc9JO4 eP0kYwHjdXf8X6fccpxnVCJ75Xkdvr29WeURuGmxUpOg7/WpaVec9HJWQyFMwyswY4wNBu GZ2CE+O3o8GbR+JBAOZFehtnnMNFObI= Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-359-_ewpaXeoN9mVn6uce_q8oA-1; Sat, 28 Jan 2023 11:50:54 -0500 X-MC-Unique: _ewpaXeoN9mVn6uce_q8oA-1 Received: by mail-qt1-f199.google.com with SMTP id x16-20020ac87ed0000000b003b82d873b38so1549603qtj.13 for ; Sat, 28 Jan 2023 08:50:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wH+a1RoqV8gkvget5JfXDGZAoMbcGdg92N025k4ReP8=; b=ctBMefWqFviS9cmzyarHqvbDHMqbzNhdYgcZvLP0GOk3D52xgqJdHQrZXNFn7LFNTB QoIQOrids2clFeLlTX3FtwQOXApmBVBeTK/aCS98f4pJ8IPRmQbR57yersd1Df7xGxe4 r3QLI07ZZaWLneSlNJ5wIAQrc69j0762Z4KiAR/xb9wY5MSHEH27+FenSgzYGguG1aOe hbKP8thfRLXMSurQRuDl+SMaMmO4nO9sZlYaGYds5WsNkGxClXLfy3lnvnxm3pb0FCu+ hKj9NRE1+wt+g9ikZegf0AMjFWMTQG4giEkVmTUKwKizGFDL0g8WhtQpOt8oVIt6wG6g wHAQ== X-Gm-Message-State: AFqh2kqTNThQyaVGGFAzK2rtx2Pn/5uCyWCzp966tynyMwU9xkRoroWU Ouim80Aj0XECbeZHyA26ZTXqHf5dW0Joq2Tt8M/sWLVINujVUxk16iQyXSu3bVDxTmuqWdsEtDX lTAGUkOvs9yZGJDj4ksInPctc X-Received: by 2002:ac8:4c84:0:b0:3b6:31e2:f537 with SMTP id j4-20020ac84c84000000b003b631e2f537mr56737709qtv.8.1674924653595; Sat, 28 Jan 2023 08:50:53 -0800 (PST) X-Received: by 2002:ac8:4c84:0:b0:3b6:31e2:f537 with SMTP id j4-20020ac84c84000000b003b631e2f537mr56737693qtv.8.1674924653338; Sat, 28 Jan 2023 08:50:53 -0800 (PST) Received: from localhost.localdomain.com (024-205-208-113.res.spectrum.com. [24.205.208.113]) by smtp.gmail.com with ESMTPSA id f9-20020a05620a408900b0070eb5766a9fsm5157059qko.10.2023.01.28.08.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Jan 2023 08:50:52 -0800 (PST) From: Tom Rix To: zaslonko@linux.ibm.com, akpm@linux-foundation.org, iii@linux.ibm.com Cc: linux-kernel@vger.kernel.org, Tom Rix Subject: [PATCH] lib/zlib: remove redundation assignement of avail_in dfltcc_gdht() Date: Sat, 28 Jan 2023 08:50:48 -0800 Message-Id: <20230128165048.1245792-1-trix@redhat.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756286612213962695?= X-GMAIL-MSGID: =?utf-8?q?1756286612213962695?= 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 Acked-by: Ilya Leoshkevich Acked-by: Mikhail Zaslonko --- 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,