From patchwork Fri Jun 9 18:28:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li zeming X-Patchwork-Id: 104793 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp611225vqr; Wed, 7 Jun 2023 19:06:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6VVSLN2YjBkpwp6xI3q0bq2OiWwpeBgpJTISis7YLujmONHY4Oe8dJDpPq/r1f8TcN3JqR X-Received: by 2002:a17:902:ec88:b0:1b2:46b9:d42a with SMTP id x8-20020a170902ec8800b001b246b9d42amr6149858plg.27.1686189966047; Wed, 07 Jun 2023 19:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686189966; cv=none; d=google.com; s=arc-20160816; b=aM1+FExvc0Y6oyGF709NCz+6HhzV29VQyOwcqePLKcmJK4Bg+F27PsCrvGJlVsyh0Y zV9u0I1rNleZmsOdfrNBP161Doby8aNvLgAPdCjkuJPGC2LXLEWbjoTV3fXz/LyyHL5p m+uDWFPOPDFnuB/D5eTjPT4nI+o6TID8LEiHaYlNeGUwcCuPGjsymhydGKZh0wYz2YFh nFP40sxGHn7lE1k8m0Sx/KMbJ2wWxd/eO/cx51DNSlotd3iCS/JBaU0zqU5gm7n0qKcR VMXIypswXg4ilerOaWdPCmdBlH7qQyv9ne69/xIiTsNE4kT1hoE51HXjfR/fJQeDKR/A XuZQ== 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=Dc2GS2mnL4F/u9/EdzvDuXx3IM+OuF+Lozlmuabs8h8=; b=uEUl3s53fJ0Fx0Q3pBxzfo6NRXpvNcd9fADFSKw1jeAR0NebNKvdyBx8Ooq6uMzzm4 1rlr/REGR8TTxF/bi7/Z0kGoqzhX7JB8Ez69ume6l2q4x7JVMjdPnL79XcvKqzcEoLRU E3vq5Vilc9VKVlTGMYEn2o4X7JW3uS8XC8z62Zrzsf5k/Ahqp/NFuVRBIJav8vEhDFMw /fsYo1lUDwau3wPDDQVR4DLLT3jw0A8SITIm7fjfTi4eIIeDJdiQVOqgZZUVaIWrv9eO eq91Wq9akgwrIJ2lZfrtxB9WbZZe0nhAfkQzG3oVJ96NSZaFFUlSEfWq5CdGiLT2XmcB bf6A== 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 h5-20020a170902f54500b001b0450241d1si278578plf.283.2023.06.07.19.05.53; Wed, 07 Jun 2023 19:06:06 -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 S232466AbjFHB5k (ORCPT + 99 others); Wed, 7 Jun 2023 21:57:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229991AbjFHB5i (ORCPT ); Wed, 7 Jun 2023 21:57:38 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 032B72685 for ; Wed, 7 Jun 2023 18:57:37 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 674D1180112B05; Thu, 8 Jun 2023 09:57:35 +0800 (CST) X-MD-Sfrom: zeming@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li zeming To: jstultz@google.com, tglx@linutronix.de, sboyd@kernel.org Cc: linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] =?utf-8?q?time=3A_alarmtimer=3A_remove_unnecessary_?= =?utf-8?q?=E2=80=980=E2=80=99_values_from_ret?= Date: Sat, 10 Jun 2023 02:28:56 +0800 Message-Id: <20230609182856.4660-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Spam-Status: No, score=4.3 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_24_48, RCVD_IN_SBL_CSS,RDNS_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: **** 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?1768098330017484659?= X-GMAIL-MSGID: =?utf-8?q?1768098330017484659?= ret is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li zeming --- kernel/time/alarmtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c index 65c20c4f0b7f..8d7ead245089 100644 --- a/kernel/time/alarmtimer.c +++ b/kernel/time/alarmtimer.c @@ -847,7 +847,7 @@ static int alarm_timer_nsleep(const clockid_t which_clock, int flags, struct restart_block *restart = ¤t->restart_block; struct alarm alarm; ktime_t exp; - int ret = 0; + int ret; if (!alarmtimer_get_rtcdev()) return -EOPNOTSUPP;