From patchwork Tue Jul 11 19:43:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li zeming X-Patchwork-Id: 117564 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp4749096vqx; Sun, 9 Jul 2023 20:24:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlEA46UiMTeNML2UkHgl4o57pYdtCARKX4WZ04wjlPc0qlQo2Q8zEWvYYEDcvC43Fl28Faxo X-Received: by 2002:a05:6402:8d6:b0:51e:1638:e52f with SMTP id d22-20020a05640208d600b0051e1638e52fmr8178100edz.40.1688959488463; Sun, 09 Jul 2023 20:24:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688959488; cv=none; d=google.com; s=arc-20160816; b=TWkFwXhS+RG4En5bm/OJ4lfw2CRJNQ5h+UB8owjmTFbMFUABt8ihG+CI+QBjJCvwbb h4l0uiov0KTdyk72t8EGYGYRO6HVUCDXUc78eKs3KZ6O5Z2f8Qa84/pA9LlaqJyNjRv0 p21qfKYq8vAsW7Wr1MRpfuKv1uEONkegc5sQJUeGRqHQRoRRwhKJBp5wM8r9nUSIAdh1 k4ou6kzBKEL8ATsX6x8P4XkDCC5gsbd2qaGKXcAU1npSIeUEC//ygG+pXxMCfNB00Zh9 zwOWE5ZwCZasTOLTQu8leG8sgy80ZUbSXaXJVpeehauR+KtS5ECgZWBQsWxzcgq1OJ45 noHQ== 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; bh=Apg2bYnL9Ugj3S9txj3a8PO2ZXZEzjLB2AoBMwJMl54=; fh=LC12ZFiPK1jg+9BVY1g6CFKGwZpTgGCBtPecy0pNBoQ=; b=RcFh8gPqYNc3JZ9K9UZe6WUkDiP7/j+5xyB/xM/Q6y9Fg7UNasN7SGQVkSFFPcJZ2L Jgve7keLfO0LajlpH8GjlBjtICGIX8etZbtrQyKXFvszukYN15RqzLzeI45db6d4C1ZF zd8SCYYVLa1H2c7ZuPWFgs/BoY1EjK6PiLlWWe0qalKFoJg+o/GU1S2npAX6CaJt9JHk 5XC8HhkxN2145x7/nZOv1CWtcyQiqrw9gQbNf+pP1CR7SfQleyLRulmkAqnROAgXeRAk nfVyIpN4kVnMfMzkLvHTzK/KtCRJQKC4QMOkoteXfQwVrNRQ5Bf002W0cQ6hsae3Mj+V tBtw== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f20-20020a056402151400b0051e57e864b2si2250995edw.339.2023.07.09.20.24.25; Sun, 09 Jul 2023 20:24:48 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229558AbjGJDNn (ORCPT + 99 others); Sun, 9 Jul 2023 23:13:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbjGJDNl (ORCPT ); Sun, 9 Jul 2023 23:13:41 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 3462B1B0 for ; Sun, 9 Jul 2023 20:13:06 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 9D4896028429D; Mon, 10 Jul 2023 11:13:01 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: mcgrof@kernel.org, linux@rasmusvillemoes.dk, mbenes@suse.cz, rafael@kernel.org, linux@weissschuh.net, gregkh@linuxfoundation.org, christophe.jaillet@wanadoo.fr Cc: linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?utf-8?q?kernel=3A_params=3A_Remove_unnecessary_=E2=80=980?= =?utf-8?q?=E2=80=99_values_from_err?= Date: Wed, 12 Jul 2023 03:43:31 +0800 Message-Id: <20230711194331.4361-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_24_48, RDNS_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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: INBOX X-GMAIL-THRID: 1771002384186825649 X-GMAIL-MSGID: 1771002384186825649 err is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming Reviewed-by: Randy Dunlap --- kernel/params.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/params.c b/kernel/params.c index 6a7548979aa9..f8837a5f2c3e 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -331,7 +331,7 @@ EXPORT_SYMBOL(param_ops_bool); int param_set_bool_enable_only(const char *val, const struct kernel_param *kp) { - int err = 0; + int err; bool new_value; bool orig_value = *(bool *)kp->arg; struct kernel_param dummy_kp = *kp;