From patchwork Mon Jan 22 10:20:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Bulwahn X-Patchwork-Id: 13525101 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 C2104C47DAF for ; Mon, 22 Jan 2024 10:22:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3B3976B0072; Mon, 22 Jan 2024 05:22:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 364478D0002; Mon, 22 Jan 2024 05:22:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 22BC58D0001; Mon, 22 Jan 2024 05:22:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 131496B0072 for ; Mon, 22 Jan 2024 05:22:09 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 52E5C8062F for ; Mon, 22 Jan 2024 10:22:08 +0000 (UTC) X-FDA: 81706556736.13.609AB8E Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) by imf28.hostedemail.com (Postfix) with ESMTP id BA1A3C0008 for ; Mon, 22 Jan 2024 10:22:06 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=idZ7w31X; spf=pass (imf28.hostedemail.com: domain of lukas.bulwahn@gmail.com designates 209.85.218.44 as permitted sender) smtp.mailfrom=lukas.bulwahn@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1705918926; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:dkim-signature; bh=+l3hpIXrtxKnx8RauByBgH/wM2mrQyb5OF4gwa22a14=; b=mTnwiGEDHtwNYj68ZRtZiIZFJtrTsAvx/5fOmZz8dliF+kgXdCZtPModpFKFtfFOSoAM70 EtUh55akR0NA5OQD38yoiTKQqNbadXi+/j4lsDPzFYE0eur58RaFtOZsQ345BDPZY1zM9D viySariA9yHoOCHFLtQTLulkMTKkfI0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1705918926; a=rsa-sha256; cv=none; b=jiAoCFXR3eVaoGxM8CDXdjmpO/61UmdiU12JtNqjLugzAy5Hlr2zPCtRjcGx0qvD9CkgbV arQmj0Ce4WPDO/u2Tl7ftTlLcZZnPGT0PCdO806cM8cByV1nvi0ltBaULbTgWe/LtRH2pz QewVOIV6BRh4gXUzdDqMQWwU5poDRII= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=idZ7w31X; spf=pass (imf28.hostedemail.com: domain of lukas.bulwahn@gmail.com designates 209.85.218.44 as permitted sender) smtp.mailfrom=lukas.bulwahn@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a28ab7ae504so232658066b.3 for ; Mon, 22 Jan 2024 02:22:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705918925; x=1706523725; darn=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+l3hpIXrtxKnx8RauByBgH/wM2mrQyb5OF4gwa22a14=; b=idZ7w31XlSUKjVC7PgChMrFDn8Z8Axag2UbkLnlVFT5KT2co3X+y3Zc5UzGF0znVx6 1B2uSBk72SYbfMewOGJ/7eTQKIZW63CM2IfEw+0uFEMBtbqc/L0GFPrDW0pf5Q6YxOEB Og9kTjc5hv9awD8rBcuhMi6xvLDHsMuJeY1lMwhdxAj6JfotL3jjVCFAEKJ1RcM7F5pR 3RmFM4y0meK33b27G41UU0GFe7gK5Lr2wPn92UPyxiE68vfd9W6R+RAzUeC4yQBJGJjv +3WzHf/dvfbnxh+yBfRiM1Ft9uzfoaVsgt2SsrqXubmrE6jdjLN3Ooa2DPfeY/IUAFCo Pq3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705918925; x=1706523725; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+l3hpIXrtxKnx8RauByBgH/wM2mrQyb5OF4gwa22a14=; b=sNhOIS6KRmz2wNmBHtKSEW0Sr0Jv7gZMkmu1dMu0fshaO7/pHnSl3KJ5uPVoGiZBnl f/pjXMrBWwV9X3dx68IuvgHGXE5jrypUxsoTgoGugklmy+fj76XGelkzqRMwYH7Pmb8x 0LeYWn+PPvnrzusmrnalhxMT0N3lN9BlQg7hq+aOLFBjwbTIcilr1JgcxCLsx0xdrdF8 zThwhnon0AEz3eciutkPdotYswBNNyckN6hQZo8avxkVAzzW+PomrUStNW23yRdV2zOu J6kx7scboYh7Au6l5ghqa646N5+1LEFfyzvAjKmR3Zm/AO6ixee0nggQDPdVzVj76J0U n1UQ== X-Gm-Message-State: AOJu0YxmosWVcggLLw3vDvGLlOKJ0rhmHQGLCApPls4jDcEr4A1HIODH LyfpNhO3ooYLqVNe4rYdJjZa2El7S52InpRd8O4s0oEyAHiJAhue X-Google-Smtp-Source: AGHT+IF/DWzpPmqhfpScAyTW781DslON0afk8yZy8yujCJxwx7eFh0os6G6EihsvhD4QzgMVGC5U7Q== X-Received: by 2002:a17:907:8687:b0:a26:9534:92f9 with SMTP id qa7-20020a170907868700b00a26953492f9mr2783682ejc.106.1705918924985; Mon, 22 Jan 2024 02:22:04 -0800 (PST) Received: from felia.fritz.box (ipb2191d3b.dynamic.kabel-deutschland.de. [178.25.29.59]) by smtp.gmail.com with ESMTPSA id c21-20020a17090654d500b00a2ad1182e36sm13241303ejp.9.2024.01.22.02.22.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 02:22:04 -0800 (PST) From: Lukas Bulwahn To: Andrew Morton , "Liam R . Howlett" , maple-tree@lists.infradead.org, linux-mm@kvack.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Lukas Bulwahn Subject: [PATCH] maple_tree: avoid duplicate variable init in mast_spanning_rebalance() Date: Mon, 22 Jan 2024 11:20:00 +0100 Message-Id: <20240122102000.29558-1-lukas.bulwahn@gmail.com> X-Mailer: git-send-email 2.17.1 X-Rspamd-Queue-Id: BA1A3C0008 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: ezu9fprzu73fkn6ut6pjmhymigbfe9aa X-HE-Tag: 1705918926-771750 X-HE-Meta: U2FsdGVkX19cR4PijapMgZzeZvh0Ojf3xQJkIwyyDvuLNoriEIX97jTqxjAdKQeIEXdB7Rp/jPCADKLyuVngRcnsYFMq/UQcmtbREM4hLW9DJxWIaoKj6hAXMJJfpmXgf9DYVug9m+HQoA/QkXe+Cz7ykmQZY/zwUf5nAmNlfPGaVZXoYZRWI/+OnIbI3S+aia9CGFASXpyenda8iVCtTKaSNcoEHciISkKH485Tjk2GquS4mNOjtylZScFvwgE32ZCnepFztc9jjdqQsOAymXUc6Ljm+4Si/+Yuc7nOvh/Qd1vBqpmyBaDeAO/M0X80cca9E28ZuYdbvXOqQWDCqu0aZvKxgnJnwhpGLRPMiNQrrGlvIlC06YTcKLXVkcICKi/EOWBG388qUg2q72TFHToXA7hviBc1dVXFGbcs+R9NAhHesSW8pZdoUu5JzHO0h/pGW9jvkSMUT9aJZ2LcNYAVghr1+4VBTbsA/k5uwdR7ApJKsxATtpwylKo8/3TI04nBxcSoAIzcKMj5jdZPdYAzHnrk/46c3y04+sa/me1ueNzSHOxnvz9S7h9EXvNDRGCAPNBHxGOYVQkpaZfD8z7AFlWQCSox62ElXoPJt9c02zFbEw4n7AxfU/3DlzSwhWbVnEaKgMOtGdf4Bphkp6uWHQjGVgYhsofA1ycnZSC7Ea0woUG885l3EbEn53CJPurkKB9DNTQIN28a9vFIN0PbgfpE4l23UlfEtyJmlB6qiM8go/5jdMsL3kT+XoF10uuI8R9JAVOR/k7AxFyrpqo26s9fOOUhm839QaHBz1lL8BObXpJKix9da/X3HbCzNHEU+hQFYzhhuY8VPmd4dZO55eIml3xGAl0Hj3ZbvzOXyXV7+/wt0xnX0N/V/SB5/Cg1Vf0B4SzRpwv7GgojP/omfqlkGJTs/XLitafyNdsbzHS96wdyWMNNzV6QVhjDfmvwoOON28TIojRVJnu DgVGHOha p6xRJRzW38/DTR2GNgbeDMy2mDy/anTlYTpeBaEAvYrU7kYY8dsORTILfAl6f6PxU9Z4KGyPKk4JMY2S3CgqIxkEgbOhZcDwStxBr1ctGLE6ryVJZtH85P8PuuGFPX39kd5zJOAgRLcavGNLI+yFx6DAg1yx91Yp9z78v9QW8VbHMqjriMHHAcFGLZqgfLZWKcRQBxh7iF6Tgo+FUY3UYwDu6HIMTX6FLSpGD X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, 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 local variables r_tmp and l_tmp in mast_spanning_rebalance() are already initialized at its declaration; there is no need to assign the value again. Remove the duplicate initialization of {r,l}_tmp. No functional change. Due to common compiler optimizations, also no change to object code. This issue was identified with clang-analyzer's dead stores analysis. Signed-off-by: Lukas Bulwahn Reviewed-by: Liam R. Howlett --- lib/maple_tree.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 7b161802860b..82fb5195c235 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -2271,8 +2271,6 @@ bool mast_spanning_rebalance(struct maple_subtree_state *mast) struct ma_state l_tmp = *mast->orig_l; unsigned char depth = 0; - r_tmp = *mast->orig_r; - l_tmp = *mast->orig_l; do { mas_ascend(mast->orig_r); mas_ascend(mast->orig_l);