Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp121035rwb; Sat, 17 Sep 2022 02:02:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5wfuK57qXQnDkRJlgtduztcI1MS7Xkjo57GKE+RHIXSsUyc24QLt1XpCy+TDSKO6afQKMr X-Received: by 2002:a17:90b:1810:b0:202:c6d7:98a4 with SMTP id lw16-20020a17090b181000b00202c6d798a4mr9475518pjb.16.1663405373287; Sat, 17 Sep 2022 02:02:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663405373; cv=none; d=google.com; s=arc-20160816; b=vqT+r3r4s3PYM5CjCydG/X2dfl01XQ8Cl0HSiBujZUrie79LYDauFI0WEPALXdpyP8 2N1HJSI+n/M8yLoWYHUqH5KAEU/9hyiWJx3SJqCbDaetSquQILc30mcLoW87S1F1Q/GD w+C3WTSUjIIhlW4R/d1g3wsGK9RbJ0Rd2aLtNLr3C517xbK1cK83v27AXh/YtwRQ2/6a U5kDXZqZBUrqc76wwrC8oEqRrVJAc0Tu3ai5/hM1mDiN2+fTG7P2ykx4zkITDOoqjb8m GHzFI8qGJeCJoGCm6Kjei7gri0Y7W7sQxM3Dn7S36u8hbGFIhIqRgefbOiAC7Wao3bdx 5qGw== 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=YHdx/6gmPjB0lW9gk123clXM4PERhfOCRZN9axf3Nig=; b=LCKFknAmlIUe1FAY0v+xF8Ewn7oWPDoqC2H6B8JsuPbEgiXgEY1Z29zumcvENp5JJN z+mKm0rhvQ17/zWUa5CzOYkU9wF4v4U239pBipx+5j8d+7W5AfqbGdq5Xxly3nBJdN5m WdG5oH30utHLSyHsovh8h1Ge44uXZsW5xAdBT4F7+Iv5FIWGhdzvI81BG464Hsfworyf mmD42GWrQYQDtP0T2rQJfbG1SdnZYxKk7tsrHZbsjnsricqlb/dEQx3+OAgeu1XUrXUV F/hRDpUtDJ37P494vpf5Ci2i6Jpg8VlcrWJTG3yCGMRdOtQ+BmTQgKYxzkpaBooLueNR dWIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=EuHz1ZI0; 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=163.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bn20-20020a056a02031400b0042baacc8086si25424990pgb.282.2022.09.17.02.02.41; Sat, 17 Sep 2022 02:02:53 -0700 (PDT) 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=@163.com header.s=s110527 header.b=EuHz1ZI0; 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=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229714AbiIQIos (ORCPT + 99 others); Sat, 17 Sep 2022 04:44:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229515AbiIQIol (ORCPT ); Sat, 17 Sep 2022 04:44:41 -0400 Received: from mail-m972.mail.163.com (mail-m972.mail.163.com [123.126.97.2]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0B3FFAE47 for ; Sat, 17 Sep 2022 01:44:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=YHdx/ 6gmPjB0lW9gk123clXM4PERhfOCRZN9axf3Nig=; b=EuHz1ZI0blFDWognHByBy pNzFPhAtwzAhvlzO9veVVJbXBG2StWIbNTeDwlrMtdxKB/H1c9zZE9lUwcEhRWDG qvffwoueLPdWwi7nPMR1LnNrMY30TzytKQapuCcE2wVipfbU0XzoOzQd7ukQobPe E/JYjCNHAzx5yFZdVFT5dM= Received: from DESKTOP-CE2KKHI.localdomain (unknown [124.160.210.227]) by smtp2 (Coremail) with SMTP id GtxpCgDnoQvviCVjOqJTeQ--.56S2; Sat, 17 Sep 2022 16:44:32 +0800 (CST) From: williamsukatube@163.com To: linux-kernel@vger.kernel.org Cc: haren@us.ibm.com, William Dean Subject: [PATCH -next] crypto: simplify code in process_next Date: Sat, 17 Sep 2022 16:44:30 +0800 Message-Id: <20220917084430.4131-1-williamsukatube@163.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: GtxpCgDnoQvviCVjOqJTeQ--.56S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7GFWDuw4DZrWkWrWxWFWfKrg_yoWfJFXEk3 WIgaykGr4rZF47A34UGF4ktaya9rs7uF13uFsYqw43AFyxAa1ruryDWwsxGrZ3Zryvg347 Wws8Jrsakr9xWjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRBHDd3UUUUU== X-Originating-IP: [124.160.210.227] X-CM-SenderInfo: xzlozx5dpv3yxdwxuvi6rwjhhfrp/xtbB6Ah-g2BHKJNCKAAAsq X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 From: William Dean It could directly return 'add_template' to simplify code. Signed-off-by: William Dean --- lib/842/842_compress.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/842/842_compress.c b/lib/842/842_compress.c index c02baa4168e1..168950bd00af 100644 --- a/lib/842/842_compress.c +++ b/lib/842/842_compress.c @@ -441,7 +441,7 @@ static void update_hashtables(struct sw842_param *p) */ static int process_next(struct sw842_param *p) { - int ret, i; + int i; p->index8[0] = INDEX_NOT_CHECKED; p->index4[0] = INDEX_NOT_CHECKED; @@ -457,11 +457,7 @@ static int process_next(struct sw842_param *p) break; } - ret = add_template(p, i); - if (ret) - return ret; - - return 0; + return add_template(p, i); } /** -- 2.25.1