Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4196434ioa; Tue, 26 Apr 2022 20:23:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfOqmlpeIpzg21aUZVeMSNv/KijEDJGG3sRmXcTy84Gk2DL4+/4LxZ5oKw1F5rTkBd84/A X-Received: by 2002:a17:902:e84b:b0:15c:fee2:aeb6 with SMTP id t11-20020a170902e84b00b0015cfee2aeb6mr16130168plg.128.1651029832961; Tue, 26 Apr 2022 20:23:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651029832; cv=none; d=google.com; s=arc-20160816; b=m6rcWVKIuDaTS3b6mg3r7w7DMNMOPT3gRM9iJHn2o19zJsGYH7rLLV01f/opvZWEIr XYuSHOCok1mu+XwHPeY7A2solBRGV1nRa954wiRhXvvZBP3NnHnD/V4ycg2kl05sbBkL 3ntxyp2H9boz6zQV/Y83CPSJ7z0QWH8PZby7//yjxwzZcAi76dOXas0ZNZYsqg/4Q41j KtwINiujj6l26+Hw2rkv0IHs6EJDEpE0bYlPW/u/9QY7yfqEDfbYCMs53FOxZD5jvnxi xDG6qxhSdBiBoRJO8XhyLZ2Kh7sPygg2Qm7FHeTSYeh6CgR5XEPMYqvQH5Uv9Cu6n8da cDkQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cu04smHTI8WAh8mAxGDqKGSxtA/UmKcLsiJkCv971iU=; b=C2poXVSWjgnJVYzukMc8QUW2ifwaXfkS2iXQa+TYbahCbhT0lO1NIYwDipU2Fp88JG wDRpplwGQZJ5/Yt0McUhkwLS9Rub2peJF0Gyn1MoSIiiWqlWHtgvsGFSqneFT3VIpILW GgvM1Eo9eInrb/TplJyOV+h+fiMVFFj1Y6ksus8+dd0kyl4CKH+FM0pHVKYNf8X0NxkX YPw8hcWTOyRvIPZTKrt8Rvq36sbU0rTeOgYaB3BL4rP8Xm75uT85JVr+TAwA6ZNdhjN7 pwO4xMTkfMJPs7zJjFWJRPnpc9HIHCktZ77Jy7HyagVp5EjqSjNYWFA8Wp6sfrI9xloI 20iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=b7UlclMU; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o13-20020a656a4d000000b003a298545d5asi348262pgu.323.2022.04.26.20.23.37; Tue, 26 Apr 2022 20:23:52 -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=@linuxfoundation.org header.s=korg header.b=b7UlclMU; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238100AbiDZJQI (ORCPT + 99 others); Tue, 26 Apr 2022 05:16:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346694AbiDZIuQ (ORCPT ); Tue, 26 Apr 2022 04:50:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 438C416D991; Tue, 26 Apr 2022 01:38:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B5E85B81D09; Tue, 26 Apr 2022 08:38:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11FD4C385A0; Tue, 26 Apr 2022 08:38:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650962318; bh=5OERo2r+XXRBZapPjMBAUbdhmImkWNTw4gJreqwgq2c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b7UlclMUYWrYSFr6bo/Y2OPm9Czj9vu6+XJWQMiw4zOinADPpbphqxz1bmTqkpWQJ syKyJgtmL1S3xQb31RsFYqeLPgdyoinInJNQP1Po+IgtGOB/jxKq/0Bl0VHvm+HE4m GXavcG5J3K4rlhYUt+wrBhnloAq6jgc/T5cQs2yI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Abaci Robot , Jiapeng Chong , Hans de Goede , Sasha Levin Subject: [PATCH 5.15 056/124] platform/x86: samsung-laptop: Fix an unsigned comparison which can never be negative Date: Tue, 26 Apr 2022 10:20:57 +0200 Message-Id: <20220426081748.894268339@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426081747.286685339@linuxfoundation.org> References: <20220426081747.286685339@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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: Jiapeng Chong [ Upstream commit 0284d4d1be753f648f28b77bdfbe6a959212af5c ] Eliminate the follow smatch warnings: drivers/platform/x86/samsung-laptop.c:1124 kbd_led_set() warn: unsigned 'value' is never less than zero. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong Link: https://lore.kernel.org/r/20220322061830.105579-1-jiapeng.chong@linux.alibaba.com Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Sasha Levin --- drivers/platform/x86/samsung-laptop.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c index 7ee010aa740a..404bdb4cbfae 100644 --- a/drivers/platform/x86/samsung-laptop.c +++ b/drivers/platform/x86/samsung-laptop.c @@ -1121,8 +1121,6 @@ static void kbd_led_set(struct led_classdev *led_cdev, if (value > samsung->kbd_led.max_brightness) value = samsung->kbd_led.max_brightness; - else if (value < 0) - value = 0; samsung->kbd_led_wk = value; queue_work(samsung->led_workqueue, &samsung->kbd_led_work); -- 2.35.1