Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4362453ioa; Wed, 27 Apr 2022 01:59:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuBFstVgQO3pPPwMVKAGz6DcKeWsls2wmEjQgLjUd48/faA67rJs5NKqQqSsntObA0kd9j X-Received: by 2002:a63:4e59:0:b0:39d:69fe:eaa with SMTP id o25-20020a634e59000000b0039d69fe0eaamr23444243pgl.340.1651049975614; Wed, 27 Apr 2022 01:59:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651049975; cv=none; d=google.com; s=arc-20160816; b=GzZ0xkMZDYPRZ5B5CD1z+5E8A+g0dQ9/wsGdoYqVbegx845Xrsmsqgx9BFfWw40vwT 4/TaRQPQn7GO0GHxrrKqcpItHNwi709xEjVpu6HT6DKNo/7hAMUeyom+QsCGIqgGsgQc icFfAL7zYUkRHT2jmG+Wx/TTkb2Il1Ce20q9/hr4G5k249A9GOB8CNUcbrDchcU2/JfQ ZdKsL0asjuXm4hsJgThQhN7eV/N6uMi9MNWyRK3VMYfQOXpzTzmgJ112DnshCEKSjlwE kQAsS5/aUKwiCTNKuos5ZhkeroEf/Q57PESWYFEGXgu0n817EdIBIlUIV/yjxgWlvTI3 yf1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=f7QlGTZkTiPkyZCo9VOYbn7rAJMT2E/yiDWCachOjVo=; b=CCZHroG8ztdAB5j6kD6UkdFx15NopIV5dNlojFV4XqF5t5PjWGTNE7+T0mW3G11aH4 Eepf8X2ul48EON0Mziocj2kIwA5k7muH42iqZ+vgNUN0fi3M1EKSrsSZFkzMWJhvM84F zjmry2tBsXLwSfUXvbgybGyOr5gN7eK/zaKfoDZIEaluYoCeOEweHjDgbkm+fGg+2Tbs huJfGx9K/y7JEjTYctypQVDKh983uT9oAMOG1CCMzw5CChYOZCArmv/420v1q4vL0BGu K919l9dJ4FnGJgivFezCYrlqNO3XvaQRNOoWCmHwnYc0u5B9UJ2Ot7PmJiL42Uj6e2Ol 03Pw== 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:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id y23-20020a056a00181700b0050d8a3ba636si267121pfa.6.2022.04.27.01.59.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 01:59:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A0BAE1D38B5; Wed, 27 Apr 2022 01:55:02 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358909AbiD0HjZ (ORCPT + 99 others); Wed, 27 Apr 2022 03:39:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358915AbiD0HjT (ORCPT ); Wed, 27 Apr 2022 03:39:19 -0400 Received: from mail.nfschina.com (unknown [IPv6:2400:dd01:100f:2:72e2:84ff:fe10:5f45]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 300959BACF for ; Wed, 27 Apr 2022 00:36:06 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id E25951E80D5E; Wed, 27 Apr 2022 15:32:43 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TNAfY1qQKF8J; Wed, 27 Apr 2022 15:32:41 +0800 (CST) Received: from localhost.localdomain (unknown [117.136.0.154]) (Authenticated sender: kunyu@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id E01EA1E80D2D; Wed, 27 Apr 2022 15:32:40 +0800 (CST) From: Li kunyu To: ebiederm@xmission.com, keescook@chromium.org, tglx@linutronix.de, elver@google.com Cc: oleg@redhat.com, legion@kernel.org, linux-kernel@vger.kernel.org, Li kunyu Subject: [PATCH] kernel: Optimize unused integer return values Date: Wed, 27 Apr 2022 15:34:48 +0800 Message-Id: <20220427073448.10730-1-kunyu@nfschina.com> X-Mailer: git-send-email 2.18.2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE 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 Optimize unused integer return values Signed-off-by: Li kunyu --- kernel/signal.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kernel/signal.c b/kernel/signal.c index 30cd1ca43bcd..ae58a966c8de 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -3464,7 +3464,7 @@ int __copy_siginfo_to_user32(struct compat_siginfo __user *to, return 0; } -static int post_copy_siginfo_from_user32(kernel_siginfo_t *to, +static void post_copy_siginfo_from_user32(kernel_siginfo_t *to, const struct compat_siginfo *from) { clear_siginfo(to); @@ -3548,7 +3548,8 @@ static int __copy_siginfo_from_user32(int signo, struct kernel_siginfo *to, return -EFAULT; from.si_signo = signo; - return post_copy_siginfo_from_user32(to, &from); + post_copy_siginfo_from_user32(to, &from); + return 0; } int copy_siginfo_from_user32(struct kernel_siginfo *to, @@ -3559,7 +3560,8 @@ int copy_siginfo_from_user32(struct kernel_siginfo *to, if (copy_from_user(&from, ufrom, sizeof(struct compat_siginfo))) return -EFAULT; - return post_copy_siginfo_from_user32(to, &from); + post_copy_siginfo_from_user32(to, &from); + return 0; } #endif /* CONFIG_COMPAT */ -- 2.18.2