Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1459092lqo; Sun, 12 May 2024 03:37:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUOS8bxeZsD8E4148o9oLCPtN18gT/dJOCfEGFGa2FuU8Hh8PAjo+dGYxFmXonI4tEHsKj9Hi4pVD+u/oK+IrS86tIE9WLo8klvVrG5FA== X-Google-Smtp-Source: AGHT+IGjmzVY51cqn4NmLu8x9p4iZH32QxK7Kf/EvJ6EZStBVMs16R0nDJ/rjvzgfm8LWwm7ee7h X-Received: by 2002:a17:90a:ea04:b0:2b6:c4d7:fda5 with SMTP id 98e67ed59e1d1-2b6cc3410b8mr5703469a91.1.1715510226159; Sun, 12 May 2024 03:37:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715510226; cv=pass; d=google.com; s=arc-20160816; b=LhIG/PwyomEivRqBLGfEsbGQ4UIzIqSxDq3C6e+j1E+QAMO0PnSZMzH5eejmfVTVHz 9eNIv7oBpc3ZaaVtNvseGAa15T6GV9NQXYWWdHXKklOcR2yDR4chXIpq+JDVYy87sXLl LRA9459r8mc53KybNI7+4Qxha1I4wxYqWVLYbBsv6xtuootA/xM8z+UpRDfo6fFwgAdH 22NkaqQ0YzwFoMiEtF2yQvXCY7ojR9HwqUOQCPnSgxfijAkVAWPFluQolmzOTxaMJpYb /X4VCYOH0edMl8KiR4SNpPxRRJ57bgglVKZIUBSYH+NP4ZcHvsaehywWotv2URRyK6Qg NUMQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:message-id:in-reply-to:subject:cc:to:from :date:dkim-signature; bh=CFrNgpT1Nwpx03uo6E/jHNM9dH4Al8QsEcPwh5BEXAY=; fh=1Mua+Ibd68PZm4o8V8cM3zNUDnJqbZSmobj+899tYDk=; b=JCbk+hcPxVIYDH+QzhoWM2nkdk3z+1j2/p60PckaRFpXW6QmciXDtDkYm7BpA0f5SC 7mtHkiWPxI12U+GIT8b2dnfkbIWTAGtge20TdvvECAyQ7IKdWhJKi+2ACkkYTTcv7o8Q FQ+5Aoaf5ma7fEQgv4qvRm26FHsN1quus5ZZp+LFcw6fbA36Mu5TJ7qJ8SzWtpPBo/OS kEKYy0Lp3Td3Sjc31oFvgTaIGviLKXYzCfiKmYUkQ2yuBUM3wLH46tqUJX7FTrL6dJwI ujxX/0zJYXjTzwV8Tk1mAgmGpDHW4X0JAhZ21wQ2bzM4b3U2OYiL+gqzU4wWE8deWy91 kw/w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=dxlTVxnJ; arc=pass (i=1 spf=pass spfdomain=inria.fr dkim=pass dkdomain=inria.fr dmarc=pass fromdomain=inria.fr); spf=pass (google.com: domain of linux-kernel+bounces-176852-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176852-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b671471f38si7298762a91.115.2024.05.12.03.37.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 03:37:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176852-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@inria.fr header.s=dc header.b=dxlTVxnJ; arc=pass (i=1 spf=pass spfdomain=inria.fr dkim=pass dkdomain=inria.fr dmarc=pass fromdomain=inria.fr); spf=pass (google.com: domain of linux-kernel+bounces-176852-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176852-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=inria.fr Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 5A859B20E98 for ; Sun, 12 May 2024 10:37:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DEBA51CD13; Sun, 12 May 2024 10:36:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=inria.fr header.i=@inria.fr header.b="dxlTVxnJ" Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 728671B966 for ; Sun, 12 May 2024 10:36:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.134.164.83 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715510213; cv=none; b=cgiYgYV6eY14H3pRdcS4/h43J+sxXeIoWBe8AlmwiqhZIuRFSVzMLi0b9Q5dO7afeD1eURrCtXF2nh7dtKT+UPJSIdaIUkjWNVB110MaW3XU33eSRDqGAbqJD8QUCGUNsEe4xCCNDACrz9drOXbhfqXu9yg5RumIypIrAM6TmtM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715510213; c=relaxed/simple; bh=j30ddHpc932nEhD0I8IE5h30/grSJLRgARi76cpJ6M8=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=XQcI3GR8Vg52DhoBJ+Nt25TQQ8mHNSU4ZkTYME9krZ422WiFJe+i5FQiLBHieSVUvOZNKYaFPcBJ/189l05Z7IIxltc5ZV2q1PQghIkksFKjeQhB6uL30lHoOuXj9dYcJAXZdCsShG3r61cpARgjYsd41X6+SAU2KdGj7k9Oy9U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=inria.fr; spf=pass smtp.mailfrom=inria.fr; dkim=pass (1024-bit key) header.d=inria.fr header.i=@inria.fr header.b=dxlTVxnJ; arc=none smtp.client-ip=192.134.164.83 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=inria.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=inria.fr DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=CFrNgpT1Nwpx03uo6E/jHNM9dH4Al8QsEcPwh5BEXAY=; b=dxlTVxnJTUY0dP9lttlkLJ3cyJL1u+DbDsbeG6z+nmQS1o7/bmovgH2P 8aKjVF+vrw4dW5xdOd2NdngZ/DQ/XzU3HwieUPMzjxBe7JgngPmEC5kjY 9OwOCKaZdfZ0dHzjbG05MPXFcYA3AdDsHO1Wd2q3A1QJZhb/Q3zqG7MfQ A=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.08,155,1712613600"; d="scan'208";a="165237912" Received: from 231.85.89.92.rev.sfr.net (HELO hadrien) ([92.89.85.231]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2024 12:36:48 +0200 Date: Sun, 12 May 2024 12:36:48 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Kousik Sanagavarapu cc: kernel test robot , Nishanth Menon , Santosh Shilimkar , Julia Lawall , llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Shuah Khan , Javier Carrasco , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/3] soc: ti: knav_qmss_queue: do device_node auto cleanup In-Reply-To: Message-ID: References: <20240510071432.62913-3-five231003@gmail.com> <202405111846.3m9z398l-lkp@intel.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII On Sun, 12 May 2024, Kousik Sanagavarapu wrote: > On Sat, May 11, 2024 at 06:12:39PM +0800, kernel test robot wrote: > > Hi Kousik, > > > > kernel test robot noticed the following build errors: > > > > [...] > > > All errors (new ones prefixed by >>): > > > > >> drivers/soc/ti/knav_qmss_queue.c:1853:3: error: cannot jump from this goto statement to its label > > goto err; > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1855:22: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > struct device_node *regions __free(device_node) = > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1840:3: error: cannot jump from this goto statement to its label > > goto err; > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1855:22: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > struct device_node *regions __free(device_node) = > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1835:3: error: cannot jump from this goto statement to its label > > goto err; > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1855:22: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > struct device_node *regions __free(device_node) = > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1831:3: error: cannot jump from this goto statement to its label > > goto err; > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1855:22: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > struct device_node *regions __free(device_node) = > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1822:4: error: cannot jump from this goto statement to its label > > goto err; > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1855:22: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > struct device_node *regions __free(device_node) = > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1826:22: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > struct device_node *queue_pools __free(device_node) = > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1818:4: error: cannot jump from this goto statement to its label > > goto err; > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1855:22: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > struct device_node *regions __free(device_node) = > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1826:22: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > struct device_node *queue_pools __free(device_node) = > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1810:3: error: cannot jump from this goto statement to its label > > goto err; > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1855:22: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > struct device_node *regions __free(device_node) = > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1826:22: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > struct device_node *queue_pools __free(device_node) = > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1813:22: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > struct device_node *pdsps __free(device_node) = > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1806:3: error: cannot jump from this goto statement to its label > > goto err; > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1855:22: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > struct device_node *regions __free(device_node) = > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1826:22: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > struct device_node *queue_pools __free(device_node) = > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1813:22: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > struct device_node *pdsps __free(device_node) = > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1795:3: error: cannot jump from this goto statement to its label > > goto err; > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1855:22: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > struct device_node *regions __free(device_node) = > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1826:22: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > struct device_node *queue_pools __free(device_node) = > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1813:22: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > struct device_node *pdsps __free(device_node) = > > ^ > > drivers/soc/ti/knav_qmss_queue.c:1801:22: note: jump bypasses initialization of variable with __attribute__((cleanup)) > > struct device_node *qmgrs __free(device_node) = > > ^ > > 9 errors generated. > > Seems like gcc didn't catch this when I compiled locally. > > Normally, this would be fixed if we placed braces around the individual > initialization blocks, that is, say > > { > struct device_node *qmgrs __free(device_node) = > of_get_child_by_name(node, "qmgrs"); > ... > } > > > That would make the code look a lot more dirty though and is purely > unnecessary. So I'd say I'd drop this patch and do a v2 with the > remaining two patches. Thoughts? > > There's also some stuff with classes but that too is not really worth > doing because the code will end up looking very ugly. Please include the patch in such a message so that one can see everything at once. I'm not sure it's necessary to show all the error messages either. Just a few that help illustrate the problem. julia