From patchwork Thu Oct 31 03:00:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiapeng Chong X-Patchwork-Id: 13857417 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3BC9E68949 for ; Thu, 31 Oct 2024 03:00:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4EBB16B0098; Wed, 30 Oct 2024 23:00:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 49B906B0099; Wed, 30 Oct 2024 23:00:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 389FF6B009A; Wed, 30 Oct 2024 23:00:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 1A19E6B0098 for ; Wed, 30 Oct 2024 23:00:39 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 8D99D412C0 for ; Thu, 31 Oct 2024 03:00:38 +0000 (UTC) X-FDA: 82732394304.29.63FA0D8 Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) by imf10.hostedemail.com (Postfix) with ESMTP id A4E18C001B for ; Thu, 31 Oct 2024 03:00:23 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=linux.alibaba.com header.s=default header.b="cxO/AhSC"; spf=pass (imf10.hostedemail.com: domain of jiapeng.chong@linux.alibaba.com designates 115.124.30.111 as permitted sender) smtp.mailfrom=jiapeng.chong@linux.alibaba.com; dmarc=pass (policy=none) header.from=linux.alibaba.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1730343422; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=KihwTcXniMbyEQE4I1zarxhI+C9GMZdwYjrvSYvYi+0=; b=0pf/NpE1h6kCLVgvmUBGhHUCzfy9ZBOF5T4JGAhhJ5HMhMjUrzrkJlzWBkXgNdEcU0B4th ky2NX1F8fDTAlfV2EFZTMXQsOpffE0tl/JOWlYk17LwIe8guxEAUqicXJfFA0VT7DdAKtX Jyl01Jd0+oLbyKdfrX4cdel0VGskFkA= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=linux.alibaba.com header.s=default header.b="cxO/AhSC"; spf=pass (imf10.hostedemail.com: domain of jiapeng.chong@linux.alibaba.com designates 115.124.30.111 as permitted sender) smtp.mailfrom=jiapeng.chong@linux.alibaba.com; dmarc=pass (policy=none) header.from=linux.alibaba.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1730343422; a=rsa-sha256; cv=none; b=0L8Z4yJDywAP9MwzwYDLbjIuaAqgw/LEKAgijfU6xbHYZ4syBv4CGTnJzhJHsGPO6bivaR Q8YXhrQXBd5HEL/YMZiNzcQlOZksq0VLkNGAR4jnavOy4Ga4imYPUPj6clHA8QCCIjhb2T d9zMPCdDFPAYP+o0cf0UpkG4dHukNto= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1730343631; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=KihwTcXniMbyEQE4I1zarxhI+C9GMZdwYjrvSYvYi+0=; b=cxO/AhSCZAaqC/KvZ6/diem804rWbBxDJ9t2RczP70kXxx38sy16pn71enabgB4m3EKZqwl8xHdgeBwwnnRESvc16lfZgWfDoD0zML4S12UD5YXYiDgv8Oxv5VcqEhBf2cC4ANCGqKrhFNkzy6b8tk6LXilJEBHAZ67bT3eFw3I= Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0WIGhwJy_1730343625 cluster:ay36) by smtp.aliyun-inc.com; Thu, 31 Oct 2024 11:00:30 +0800 From: Jiapeng Chong To: hughd@google.com Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH -next] mm: shmem: Fix an incorrect type in shmem_parse_opt_casefold() Date: Thu, 31 Oct 2024 11:00:25 +0800 Message-Id: <20241031030025.32217-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.32.0.3.g01195cf9f MIME-Version: 1.0 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: A4E18C001B X-Stat-Signature: 8n1qxrnyfdthhpup4uyh8byqbdzq9s66 X-Rspam-User: X-HE-Tag: 1730343623-442504 X-HE-Meta: U2FsdGVkX19O6UVDkJwsy7lhcZiRG7F8CL53BekwXS0BmMAMkTJu+cV9R1hWDitWNLSI3ldqSK2OeBbNbjxPwWQdw2AiD1hHKkKz/bATe4WweeGJGpOayi5fimD1SQTz40MPzBCjnN2Fmpy2K7sE+1Nl2XzUvmzCyW6v8bkaIdTus5PFivmbL+ON6yet5k85vI/oEpIHqZffxE6d5cIGGVf+IFOMMxKHVL2KLonGMR84EVX2NkMDQG6i+s7gG9tAkU1v9un+bAQkOrcSEsxpaD7ebf4Uuy6g/nVISzkfKZyVuSbckmQeOK6/0LGioP/9i8+oYG8/sCkUfjQnYJEAQ47zvIK67ZFdZQT1O3qxOopHS+Gvc3oFp1vAL06Ai1WoMTAGUpQWIzPSPyWlv61wsKooZLmnYrXjlcY2UuU7mIXrPSQSU2IkaKWLAsLAjjb4QAA3+3QSmiACzTK7fr1BIQ/b9l6k281h1lAf1MKWQIxUh6WLMwx0bBaePc/3kDFkclWh3/w+YYj5ZJJnLQMvF+wOLve1iS0Cl4hFT6mpLVqEMfFH/E5MyqeyuzOFhLAyzjeMoxikCZNrX3NpSTpUAieFkEhXvGL070L5dQRQ8KXQJm+iLhGxqcJiQ5l4krNPTH/PTRc5o5cxI/c3UEFFLglplRdHgcU/UywsGZmycbTTFeqgJMTAuF+x5VaZo5coLfSUJFDWebMhqELfHewY94YHHPXIs2y0eY+7AksQ7P6QO6ro9gCQL8DlX44PKRLiMsMqP3LR4aGb7/51dJCG5wgAbXSLOOm83ntDAYdRCH9Wc2iAKAOruHaCxy/hc52ONre5IjfzxOevt5VD5BcO4+q6ORBhnUINnLi0DFzP6siHuLqw2Si2JbWIey27mtLv+7dKHRQhlnugqEbgrx92/8G0PiG/YB7nDnDjIbVzcH0GOjr7Ib/Xyk5DNAowB0VMJibnksGtUCH8NjtPA7+ IBK3EWeM z2hs2LXhS5TGDEmLStdnogldixdiMAZcFcCZgeAOpJqL6ESFemDP8UY7gxVS4/NtMy0cD0BRwURBb+op34X7NfWZS2IgagF6NL/IdrH2Z7PZbcPSGb3mmQ8j/YIy1HcqNGjhij2ZN1pJuo5XyDMqBsMy3/ki6lN4GGjIxZvD1HiEtkJZaLBuTaY6MJjhRbx9rYJWRPSAx12RBacwvfBdV7dUkJUeKtNQQCDfXP2wckF6SzIWlQfd8dAJTPyT+LLiDvleCFT1FjCVqw964wedwjcavqbrMO/ZFVEqAsDFzeVaZICRZVj+M1//LN5P6TJRd/BjC8zkto5kxEpI= X-Bogosity: Ham, tests=bogofilter, spamicity=0.015735, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The return value from the call to utf8_parse_version() is int. However, the return value is being assigned to an unsiged int variable 'version', so making 'version' an int. ./mm/shmem.c:4368:6-13: WARNING: Unsigned expression compared with zero: version < 0. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11587 Signed-off-by: Jiapeng Chong --- mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/shmem.c b/mm/shmem.c index 3560188fe329..a1835f528581 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -4355,7 +4355,7 @@ static int shmem_parse_opt_casefold(struct fs_context *fc, struct fs_parameter * bool latest_version) { struct shmem_options *ctx = fc->fs_private; - unsigned int version = UTF8_LATEST; + int version = UTF8_LATEST; struct unicode_map *encoding; char *version_str = param->string + 5;