Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp24610pxb; Tue, 12 Apr 2022 15:45:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwN17xP4jZIoAgcIiFWH09C0U8NMAIBRRbSj2j5NsStIVVR3tGMZcNMFgKauyFDpWt2AAwm X-Received: by 2002:a17:90b:203:b0:1cb:bfe7:106 with SMTP id fy3-20020a17090b020300b001cbbfe70106mr7147213pjb.78.1649803543631; Tue, 12 Apr 2022 15:45:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649803543; cv=none; d=google.com; s=arc-20160816; b=BCjQhQgZo2GXGlP7kh7llXMADA0QPg7ZGNGTxonbu9TYKV/7jLY+PCQZqMO7Cl+UOM uinVW1gJoTzPVxFRZKCV59F2at1jJtFpHuHwQaYkdLpVM9Vd9hXTqTAzUbY4arGKODer Uxf8n8t+sYGssnEzqjPJFY2dCh1RdZCAQdmpY1QbrvNqPl5X6irgk/ph7j7+0U647uAa T6RYW/hVGIhnqlj4bDWpOHFBCHvv2Vx0g7JDQc3Xv4E0XXiuSMLGIq+DlIJCXBk0PSGP xSI9zs6YxQwvSE1L/s6rab9/CqhouUsAfA5E33gtEUWUR5M3CSBsE4dxPM+AVaFTBn7a d1lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=PSN/G7KoRGQAWHR4F43xGgEd8OPfGRRXsI08IvJD1iw=; b=WMYc5MZctc+2i/2cBBoy8t9aUSW/Bu03MAzQ1gvBvloDilny/yD3OgPwyiAk4VqGUb PSULEBhodSJM7RAtJemVw8fOuW57YoZQXsAuBKz0mfq1oJvutMEyntg7oV6DXvStZn4H G4FEDdhpQi5nKwb7kRtkHk8Q+4FuaI22aGZpWB+9c4jfjfqVw/p1phbIUpApaJSNz4s5 aC/k0ocU3dnmJWx/z2PTLHB9e2n0EJAKuIV8sw3i+gvnMCT4ziTpIsxxQpRvyIW4vk24 tFJYizjd/CTqUzhqorbc36i3jM5BQ5UW66TTVAnyBxr7Y0dPO6H1iI2Cy25qW0IVtN8T oIfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=i4SdmqPV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id m8-20020a170902f64800b001581aed9a23si13870733plg.194.2022.04.12.15.45.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 15:45:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=i4SdmqPV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 42286AC90D; Tue, 12 Apr 2022 14:27:02 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350515AbiDLPWC (ORCPT + 99 others); Tue, 12 Apr 2022 11:22:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357053AbiDLPV5 (ORCPT ); Tue, 12 Apr 2022 11:21:57 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1AB25FF0E for ; Tue, 12 Apr 2022 08:19:30 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id p10so32712817lfa.12 for ; Tue, 12 Apr 2022 08:19:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=PSN/G7KoRGQAWHR4F43xGgEd8OPfGRRXsI08IvJD1iw=; b=i4SdmqPVAwCqWESWwmY6MXcUpY1VZFR2pdu7XSUg9+IOVt1o0bHs7m+/oz32NtwrhY j2CHxlntzJri+QTf/5esfdtWT/Yjqdm4ODWzvSF7QMOhavynjxTqRzr21KJX4y0Peofe MF7PxvB7w8bI1SiInG0DYbec8i/KE90EyWy7N4luk1pdmwYFwilKMQzVtHCyZXoMMQtc YVStWP97a8WXTff+ptMrI6pMRKxCBYQ1N88CPkx7lfgFAk5/ZUyDq9GyxYBCjmGJRxwm UIfihpHfVeOAILqaUlv5Sf8nnK+H6bwHondzj6rQjSIO0/rmF8PYofc9gwUsoAKnfGtt J9Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=PSN/G7KoRGQAWHR4F43xGgEd8OPfGRRXsI08IvJD1iw=; b=AzKhSJyImmduZy7nKYUWk+EMDQsNi1xv9QMnI/bd/MnpBdZQjxpOogIHbkF16qByTf r0EFlNELCf3IGMNkuI62hHF5KKFX6apWXc2wFyggdSYm5NYxsnhn7MdycjN+Ns+rPOJc zCvnz/pjyFgPDaov5csn86NGM96lRQ8YgP3XhuV+bLWy+mkQJeyV3jcr8c/i1BelnDDO WiT2qEuSp0xxFA+d4XHdubOwtGgbQhB0Dc+OYBtYg+R+KQzmP1MtkJlcTWBXvoul1YAY GUP89/vqDTVr1RDqYuMeXOI/HMt7gG8OGx3NmjfrYsNyavSeh8EgiaGDn5lbbERT5BDA Iwgg== X-Gm-Message-State: AOAM5309vE+xghp+Zgn15tc11QTVf5C18Wfq5niqK33InZ84846xqW6d FTWboeLIDYI1JkgTziyw2hE= X-Received: by 2002:a05:6512:c01:b0:448:6aec:65c5 with SMTP id z1-20020a0565120c0100b004486aec65c5mr26121654lfu.193.1649776768427; Tue, 12 Apr 2022 08:19:28 -0700 (PDT) Received: from [192.168.31.104] (static-91-225-135-18.devs.futuro.pl. [91.225.135.18]) by smtp.gmail.com with ESMTPSA id l13-20020a19494d000000b0046ba0e38750sm876671lfj.3.2022.04.12.08.19.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Apr 2022 08:19:27 -0700 (PDT) Message-ID: <7d6893a9-01d2-e1ab-06c2-745aa8bcd2b0@gmail.com> Date: Tue, 12 Apr 2022 17:19:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] ipc/sem: Remove redundant assignments Content-Language: en-US To: Nathan Chancellor Cc: Nick Desaulniers , Tom Rix , linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Andrew Morton References: <20220409101933.207157-1-michalorzel.eng@gmail.com> From: Michal Orzel In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hi Nathan, On 11.04.2022 17:47, Nathan Chancellor wrote: > Hi Michal, > > On Sat, Apr 09, 2022 at 12:19:31PM +0200, Michal Orzel wrote: >> Get rid of redundant assignments which end up in values not being >> read either because they are overwritten or the function ends. >> >> Reported by clang-tidy [deadcode.DeadStores] >> >> Signed-off-by: Michal Orzel > > Thank you for the patch! This should go through Andrew Morton, now CC'd. > > For the future, having some history behind the origin of these warnings > would make review a little easier. I'll comment on each below. > > Reviewed-by: Nathan Chancellor > Thanks, I will keep that in mind when sending other patches fixing static analyzer findings. Cheers, Michal