Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp4758218imm; Mon, 25 Jun 2018 23:28:12 -0700 (PDT) X-Google-Smtp-Source: ADUXVKITHXcdpAQuqlYOnXc9DQHETlJrmS62FF/UJBsVdBniH3MVF43qVykVKtNSh2AxU7nCKdpm X-Received: by 2002:a63:69c4:: with SMTP id e187-v6mr203373pgc.294.1529994492665; Mon, 25 Jun 2018 23:28:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529994492; cv=none; d=google.com; s=arc-20160816; b=Q8wTlNmdFcx6K7uhhHFL2+xSAj1ozWkjOaqHB4Kc0h6LDY1/GPeUEWAnjG57YMB54m TVuDHaYDYus3RGo5iNzIy6dR1HGBXg1sx8xRoNHENGfqzWEo+XXNYSvWqWXjTO2jQOtV TRfUY7+wUgCQH+TnLbEg+MjLac+dIx+3V1PBcwmAHM+8CLcH1jW5ifC/4YrXNQ0Buc7i 4SRh9LNeypMkc3JWXQ+4EmAydlyo2lcKRPv5ACsCX+vNkxdehZX+UEpL8bxOQZkKZyl3 ovM7F5sSQ/ffeJwL+1r8ZTM8KZqnCvFazgZF0Gntr6xOfpSAhVHVKLCbv2jjwWqNRrKj 2n3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :arc-authentication-results; bh=m6eX8LCMzDMZai7/VOdK4PF5XmdhPRXDkMQ96dktAAk=; b=UOzpm8B/r5Dc7/TRR2Mtd82DdzupIAgpyD0L5sUO9U11SBzpda6SximUmFVGAjIFnf KU1mTS+c3Hvf9KOJJLHtsmRtSVNw1IQO4tUL9peMh2Rq94P3X4q5EFN6RYsn/ULbo1Gk MsKLjX+jgmAIiseCK59Nuxpbn/zePL1537T6bYGuSrvYJ8m7THqSCAR9sy5Sk/yU29vF 0DHtLYO5AgKkE1/TLgMG4QCK5KicFiRde6Jtx0FSvfjUNEQdM7q3Yxq6NR924d/qtstI 8txImyXUpO+MrnKEQoCocZTHMpLFiOug01QuyPL5Ok/ndVEi7ZgGbxseyS8kFPW+732P ISlQ== 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 i12-v6si787195pgp.325.2018.06.25.23.27.58; Mon, 25 Jun 2018 23:28:12 -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 S1751749AbeFZG1U convert rfc822-to-8bit (ORCPT + 99 others); Tue, 26 Jun 2018 02:27:20 -0400 Received: from mail-ot0-f196.google.com ([74.125.82.196]:42685 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751109AbeFZG1T (ORCPT ); Tue, 26 Jun 2018 02:27:19 -0400 Received: by mail-ot0-f196.google.com with SMTP id 92-v6so17814928otw.9 for ; Mon, 25 Jun 2018 23:27:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=FU3m4WFtWgDkVNK8d/93dQdyw+3LyGH4+StOO7gYhic=; b=j9TpR6nuWoyNLj5RJ1Wk07J3rLeP+fIoVZSLxxWfN4SL54uqKz26ji1tD+o7S+EsLo uZhWtEAuMAv99s0ZzK8GEFG013XjpSf857bv3RFO41LFPGTh0rPL2A1/DNhfV+4RLntN YAspcrBiYv0AwqG1KpvsLa5eFj2RD8TMDVmTmwrNKPO5cGu5Y9UDJ5tTY7G3JAdsrI+W qW64ee3uigfL1qOOIpaKkgIBT3FtkeCUprx/z1foo62vPGTlhVUXuvzDflkhpDrS9oWc y/HgQcBJ1zZwLBj3IyrFipCITCEKeGiARTlHs4vOuweCXmZNY13HWYbrOUbIzSSUSHZY Ri6A== X-Gm-Message-State: APt69E3nASS7JC8ZrO4BY1z9pvkBFrHWNhdzg+Ez3tgk8vhMwzo4h1rG JlCZUPGunzJO3cGTcxydAi1svvjWFNgnRluGt6I= X-Received: by 2002:a9d:41ea:: with SMTP id v39-v6mr111125oti.125.1529994438511; Mon, 25 Jun 2018 23:27:18 -0700 (PDT) MIME-Version: 1.0 References: <20180622192718.24242-1-malat@debian.org> <20180623194716.GY16221@gate.crashing.org> In-Reply-To: <20180623194716.GY16221@gate.crashing.org> From: Mathieu Malaterre Date: Tue, 26 Jun 2018 08:27:06 +0200 Message-ID: Subject: =?UTF-8?Q?Re=3A_=5BPATCH=5D_powerpc=2Fxmon=3A_avoid_warnings_about_varia?= =?UTF-8?Q?bles_that_might_be_clobbered_by_=E2=80=98longjmp=E2=80=99?= To: Segher Boessenkool Cc: Christophe LEROY , Michael Ellerman , Yisheng Xie , Vaibhav Jain , Nicholas Piggin , LKML , Paul Mackerras , Breno Leitao , linuxppc-dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 23, 2018 at 9:47 PM Segher Boessenkool wrote: > > On Sat, Jun 23, 2018 at 06:59:27PM +0200, christophe leroy wrote: > > > > > > Le 22/06/2018 à 21:27, Mathieu Malaterre a écrit : > > >Move initialization of variables after data definitions. This silence > > >warnings treated as error with W=1: > > > > > > arch/powerpc/xmon/xmon.c:3389:14: error: variable ‘name’ might be > > > clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] > > > arch/powerpc/xmon/xmon.c:3100:22: error: variable ‘tsk’ might be > > > clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] > > > > Is that an invalid warning ? > > No, both are correct warnings. GCC can not see which functions it only > has a declaration of can call longjmp. I assumed those were false positive warnings, given how easy it was to defeat them. Let give it another try. > > Otherwise, I'd expect one to fix the warning, not just cheat on GCC. > > Yes, the patch seems to change the code in such a way that some versions > of GCC will no longer warn. Which does not make to code any more correct. > > Either restructure the code, or make the var non-automatic, or make it > volatile. > > > Segher