From patchwork Thu Oct 10 18:10:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Everest K.C." X-Patchwork-Id: 13830637 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 C64D0CFC5EB for ; Thu, 10 Oct 2024 18:12:59 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1D50A6B0085; Thu, 10 Oct 2024 14:12:59 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 184CD6B0088; Thu, 10 Oct 2024 14:12:59 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 04C446B0089; Thu, 10 Oct 2024 14:12:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id DC5356B0085 for ; Thu, 10 Oct 2024 14:12:58 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 2B8BE80B9E for ; Thu, 10 Oct 2024 18:12:55 +0000 (UTC) X-FDA: 82658488836.26.345F536 Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by imf04.hostedemail.com (Postfix) with ESMTP id 1AF9740014 for ; Thu, 10 Oct 2024 18:12:53 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=everestkc-com-np.20230601.gappssmtp.com header.s=20230601 header.b=hlBS6N6L; spf=pass (imf04.hostedemail.com: domain of everestkc@everestkc.com.np designates 209.85.214.195 as permitted sender) smtp.mailfrom=everestkc@everestkc.com.np; dmarc=pass (policy=none) header.from=everestkc.com.np ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1728583838; 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=j2Ikuhi33gkCIoLfXtInuXs32ry1GdG7/p1R2O08x7Q=; b=76qRItvt8oNSBjaoURJRaFISlAYCIk3JRQzozoZ4mCn5QxidxyMu1Gy6QWQl6h6it9lNxg v9JLunGZxDQZbBHx7fivA2jttxcss83K03ZmZRWTwNx86UCxoBUhica0YNF9zdcrZIp2MZ ZWb3ELhtT0tQqdcyQ64pPT3Z4BOT6zw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1728583838; a=rsa-sha256; cv=none; b=FStSCldG7WwViwCyyK5Nte3Ndmotrc0p+BVnQTUORBRpNqZO6ccJJHkXpyCXzY3Ux8XJi4 cJtgOOub9F1yy3JMGye3ymKGOUwvwzWz4yloqVgq9w9Cj06J9BFHpDyFMfJoWMOLeFZhPc 6+Xcky8UNDYHOx0yMgCWXd3BrmNEC9g= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=everestkc-com-np.20230601.gappssmtp.com header.s=20230601 header.b=hlBS6N6L; spf=pass (imf04.hostedemail.com: domain of everestkc@everestkc.com.np designates 209.85.214.195 as permitted sender) smtp.mailfrom=everestkc@everestkc.com.np; dmarc=pass (policy=none) header.from=everestkc.com.np Received: by mail-pl1-f195.google.com with SMTP id d9443c01a7336-20c6f492d2dso12371775ad.0 for ; Thu, 10 Oct 2024 11:12:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=everestkc-com-np.20230601.gappssmtp.com; s=20230601; t=1728583972; x=1729188772; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=j2Ikuhi33gkCIoLfXtInuXs32ry1GdG7/p1R2O08x7Q=; b=hlBS6N6Lc1xXe2eKSFSuGQV0qSHQgUOxmXWSKqaS1yy3UmvG2AijzEfgVcbgwbUZ4n q9wvzsj+kgMiowDv/fqF85n/yk2TXIvLrFuwd0LzV7jl5a0NCZ3b/xNqWdyTRFDRE3Ks Ac2IaMskxCODt2IAbP0wyN36NOOCM2Q4LwHdJ4GXUPQPKdkpfR7VjAXQDCSgz99vaRcX 1qVHT6FMbWUarGOS5oWCuot3DW6a7obZJ+TzgpwJGCH0SIUK32vCuBFVyxhM8jLHVlgV gxAxmM19CMCJ5llwFTonOihv9v3jGotBR+2qKGPjEC8g2NCeKe1pfq15tkliYpcdtXFa 92XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728583972; x=1729188772; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=j2Ikuhi33gkCIoLfXtInuXs32ry1GdG7/p1R2O08x7Q=; b=Zu0+3W3Q3CtdXj+ktiGPsRvGINMYbKGeHzHiEiU3eqGMAwtsNKWicrKjiiSn8wI8EM 7PQZVnlg1oh1vK1kPQ79iNHHQBlz9ZstecWwLyokOQIsL15awi9R0ilYkktKcqNN9tJk IBvHrS9VsbYGpQU/bBsDppGs7OeP9W7rhnb9baWTGz3O5XUuF5rzxICeVAdrihixFyAt Jc6halU1It0eXTEPQ8+syvpoA2MezPZrg3yNOMbnQzwxWMHq9i8vqiXa4dRU/0eYrfCA phomyK08rW3042z616Jd1Jblr744/7ur06m+9ZemVweN6rw+rItTHj7eo6yh0Ed5vP7c k34Q== X-Forwarded-Encrypted: i=1; AJvYcCXNqJOWYrVinjDVQ/9r3S4iQXKBJpwBl4UKuwEw549k1aKP0XLo9HrfxBHuKDGQ3Ed2yXnEPJYF4w==@kvack.org X-Gm-Message-State: AOJu0YzR94QL38I3tBgVRZ849BjMtv8f3rGe/BdlRFkdQHUcdf84L+qz z3DGsWTIhmN0953Eac3jHt+Bv7X9HArG92aZT/9t2k1dzbZkD1k1mj65pxY1lDI= X-Google-Smtp-Source: AGHT+IGrb5VGtSEu9KmvvevlzQDjJSErZq0lhnojNnBzr72kJlQ7bv63piP0wdViZzr+N15omjEafw== X-Received: by 2002:a17:903:244e:b0:20c:5b98:8cd7 with SMTP id d9443c01a7336-20c637f84aemr120365205ad.38.1728583971732; Thu, 10 Oct 2024 11:12:51 -0700 (PDT) Received: from localhost.localdomain ([81.17.122.16]) by smtp.googlemail.com with ESMTPSA id 41be03b00d2f7-7ea448e468asm1306575a12.4.2024.10.10.11.12.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 11:12:50 -0700 (PDT) From: "Everest K.C." To: akpm@linux-foundation.org Cc: "Everest K.C." , skhan@linuxfoundation.org, linux-mm@kvack.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH][next] mm/execmem: Remove logically deadcode in execmem.c Date: Thu, 10 Oct 2024 12:10:58 -0600 Message-ID: <20241010181102.5522-1-everestkc@everestkc.com.np> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 1AF9740014 X-Stat-Signature: accfqg4q57j356z5emafn77cs1r4oxp7 X-HE-Tag: 1728583973-125293 X-HE-Meta: U2FsdGVkX1/GKnbF73o0lFi7TmiPGZxPcu1oMGrV1hfVGaxy3eN1MUkBEZx9/Wklzp/tlaugNTd6hhQXBKhd5cbHmA8BbWhSs0Y2CaKDK0gT4htGMc9lw7z99tRbjhivx2fA6fxs1k0swYxSN4VI7afD1njiEWTH3AdRrI7zTtJXC7t4mcV4Fdiw6FaJtU752w9akemDTYkYqvXVyOQyrQw9biNeMc23uHoElNnGH2iDXYxkDfI/qLnDD3389n2XBtwjtPl29hISYAsG04VK/IFwiWFIxdo9dJs6LzWmafBRuBiEeus7mcVzp5q/PjzF4QkHuvCxEaqp5itu3w3AnnQ2YlYMdyEHJiBankFm72rrHhXZ8sk7nH+zTc69pHCz70aGyg/yuD6uG1uepjv10HJNE4IBdW3sUoTtDkTnu9iBr8typE6hlu44t1Em18Al7gCbX+uoOoHx1zoRjnQ3Wi2fYZQ/BjHk9MwHz17FgftAfJCOENwR526lZdKVv5OuArKlDzVUDThysUZrrJd8xPYukBFGHyLLct4sZm5rVhv3fcqW3Br8dl5j4dwbWeiCVktCyxzNj0UjuS0vD4dWdNHnfSMa8F9+QTcauq7/mdPiDMRZ/gu4imBBkkQzXlr2vu+65Y82fMYmgOO/b74sdTy5arlgJh0c6X+7htrGkqJwqcNTAfTTrzAFeKseKz6n79KJo0v9vLwDykKQKK0jGe9H8dM2FBbCz+KEuPkr2GTUXfkabTJZlShvwBVuEYOPIZyx3HC37mws/vtBtB8ZsblkDa3FCoHUinr08UdhGW+kRuwZuw6MT0G6ocia0MVvhy1YGzNmUT94l3jl57Nq3F/G7GTXx4xX7RZMUD6UmXVevLDTmg0RoLGEMg1KQ5u+alJAj9KM5k3VTozpBI86E8bD50bS38KjugcuiQUM90GD8Hjjxr7G6S3u1Eya2KBBJT+MIKHzSjFZiSUnHQh E+sm8N/m sJ5/SVrrlo7TB/Lxx0jwbOZJ3nSrnZRJcqGYhuPSsQkaPNQ2n7nVu5EbcnV2t93z320GDV6aeY5alfGXyRQjNmDTD4e+SU/VeDK7EfjWzI729noXzS/n4Nf0YteHQz3q6nRemDq5ReD/TLp+ImYKvPboF1jDuO/TMk6OQX8JTDl0K47CcG1oYOFpUlS20NVDvu6w6E+4HbErD2BRB2Ez7X8GhmSOJr50GO32U4mP5mxMJBp/xQHY8gw2MlBPi+XGmMUrA74qya7LV8I9Mrzamy66/YLPWYboqsM+JeP75LgyHiwAcSyGltoAbQQQICy9wBhli23CnhXDGV8OibnYcpTU/5gm9tI/UbBCt2mPlHpglP59xr6iFDNoKww== X-Bogosity: Ham, tests=bogofilter, spamicity=0.058406, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: NULL check of variable `area` within the `mas_for_each` loop is unnecessary, as the varialbe `area` can never be NULL. So, the `continue` statement inside the if block is never reached. Remove the if block that performs the NULL check. This was reported by Coverity Scan: https://scan7.scan.coverity.com/#/project-view/51525/11354?selectedIssue=1600362 Fixes: d44c3485820e ("execmem: add support for cache of large ROX pages") Signed-off-by: Everest K.C. --- mm/execmem.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/mm/execmem.c b/mm/execmem.c index 9c6ff9687860..97706d8ed720 100644 --- a/mm/execmem.c +++ b/mm/execmem.c @@ -75,9 +75,6 @@ static void execmem_cache_clean(struct work_struct *work) mas_for_each(&mas, area, ULONG_MAX) { size_t size; - if (!area) - continue; - size = mas_range_len(&mas); if (IS_ALIGNED(size, PMD_SIZE) &&