Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1243525ybl; Thu, 22 Aug 2019 11:30:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqzwd5VxXoHwujO7qD0ktsEENLr3Gmfiv7U6RvjhfpKJ2whKtGYmnBMdTHPb0BWxrY8SG1lx X-Received: by 2002:a17:90a:8d86:: with SMTP id d6mr1064662pjo.94.1566498617810; Thu, 22 Aug 2019 11:30:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566498617; cv=none; d=google.com; s=arc-20160816; b=UkimGEghX+yG0w5F6FIAk0e2EVTzpEMuiFvExZ1HDsJ2/7Bg9voDU3isLW6tw98/5q abieaTmJPGbI7P7EAL9OdMzE4s+T+jkL82lhoz/Tcsu0XMWnpPr1tKlf+aW2E2a1ECWO mKAT7eCykmcPSLlmT2ueCL+bWIZlQhHNUhC96471VQRNJ1xlP4Exiue553ipCpfR7R3r 945kRldmC0KjcZg2hvr32p6JeYJw6GN/42/bUUr5zSh/GH1qkMiQ+ucNFgJOePrXzci5 ljb3ayXOkOPrs6IDSCtmy/6luECNtE9Hc4c1TeAOM8bw8VVTvUSWVUn0Js/OpBlHh9qZ +oUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:subject:cc:from:to :in-reply-to; bh=9Mt6dskAN3QFYcnf10OxuXeYlC/LG6LvhWjVL1D8wI4=; b=wEYFT3dg0oxo6RFRtGIo79WRfkIE8PjubHD3Xz2ixPIRRjxrpWpJbAlIjfobvnkhZD 4rsTZfIeBth7XsnekJwU9Pe9pn4eqBytDtzf7VE8TLVfFR6GRfkddyZokjadbJC+I+FL U2DzMXO9hYkCDi2tSGE3iAqREG2IE3hUv3JIw6kV4BsPlZTi2gw+vqmX1iVet715Tglv NGUewXzcLXR4ExPy6YAPF4g4V34mLfWZCmkEsEOsHrItJf1k1pqY/UKve/98oSfZEIBn nIVfG5/eYkCLAL/lCEPSwU8ue7OvA82DTV1L5g53sqvi/eexFBh4vril5n118YMac9ol rQKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si313615pjq.95.2019.08.22.11.30.00; Thu, 22 Aug 2019 11:30:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388923AbfHVNJE (ORCPT + 99 others); Thu, 22 Aug 2019 09:09:04 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:53241 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732441AbfHVNJD (ORCPT ); Thu, 22 Aug 2019 09:09:03 -0400 Received: by ozlabs.org (Postfix, from userid 1034) id 46DlGj1KgTz9sPQ; Thu, 22 Aug 2019 23:09:00 +1000 (AEST) X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 38a0d0cdb46d3f91534e5b9839ec2d67be14c59d In-Reply-To: <86b72f0c134367b214910b27b9a6dd3321af93bb.1565774657.git.christophe.leroy@c-s.fr> To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras From: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc/futex: fix warning: 'oldval' may be used uninitialized in this function Message-Id: <46DlGj1KgTz9sPQ@ozlabs.org> Date: Thu, 22 Aug 2019 23:09:00 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-08-14 at 09:25:52 UTC, Christophe Leroy wrote: > CC kernel/futex.o > kernel/futex.c: In function 'do_futex': > kernel/futex.c:1676:17: warning: 'oldval' may be used uninitialized in this function [-Wmaybe-uninitialized] > return oldval == cmparg; > ^ > kernel/futex.c:1651:6: note: 'oldval' was declared here > int oldval, ret; > ^ > > This is because arch_futex_atomic_op_inuser() only sets *oval > if ret is NUL and GCC doesn't see that it will use it only when > ret is NUL. > > Anyway, the non-NUL ret path is an error path that won't suffer from > setting *oval, and as *oval is a local var in futex_atomic_op_inuser() > it will have no impact. > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/38a0d0cdb46d3f91534e5b9839ec2d67be14c59d cheers