Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Kousik Sanagavarapu <five231003@gmail.com>
Cc: kernel test robot <lkp@intel.com>, Nishanth Menon <nm@ti.com>,
	Santosh Shilimkar <ssantosh@kernel.org>,
	Julia Lawall <julia.lawall@inria.fr>,
	llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Shuah Khan <skhan@linuxfoundation.org>,
	Javier Carrasco <javier.carrasco.cruz@gmail.com>,
	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
Date: Sun, 12 May 2024 23:44:51 -0700	[thread overview]
Message-ID: <20240513064451.GB652533@thelio-3990X> (raw)
In-Reply-To: <ZkCZTv0Gci3xxKtw@five231003>

On Sun, May 12, 2024 at 03:56:22PM +0530, 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.

FWIW, you may notice this as you do more conversions. The fact that GCC
does not warn at all is a GCC bug as far as I am aware (i.e., clang's
error is correct):

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91951

which has come up in other places:

https://lore.kernel.org/20240425174732.GA270911@dev-arch.thelio-3990X/

Cheers,
Nathan

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2024-05-13  6:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-10  7:13 [PATCH 0/3] Use scope based cleanup in drivers/soc/ti/ Kousik Sanagavarapu
2024-05-10  7:13 ` [PATCH 1/3] soc: ti: pruss: do device_node auto cleanup Kousik Sanagavarapu
2024-05-16 14:41   ` Jonathan Cameron
2024-05-10  7:13 ` [PATCH 2/3] soc: ti: knav_qmss_queue: " Kousik Sanagavarapu
2024-05-11 10:12   ` kernel test robot
2024-05-12 10:26     ` Kousik Sanagavarapu
2024-05-12 10:36       ` Julia Lawall
2024-05-13  6:44       ` Nathan Chancellor [this message]
2024-05-13  7:23         ` Kousik Sanagavarapu
2024-05-16 14:48           ` Jonathan Cameron
2024-05-10  7:13 ` [PATCH 3/3] soc: ti: pm33xx: " Kousik Sanagavarapu
2024-05-11  9:06 ` [PATCH 0/3] Use scope based cleanup in drivers/soc/ti/ Kousik Sanagavarapu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240513064451.GB652533@thelio-3990X \
    --to=nathan@kernel.org \
    --cc=five231003@gmail.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=julia.lawall@inria.fr \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=nm@ti.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=skhan@linuxfoundation.org \
    --cc=ssantosh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox