linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Kousik Sanagavarapu <five231003@gmail.com>
To: kernel test robot <lkp@intel.com>
Cc: 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 15:56:22 +0530	[thread overview]
Message-ID: <ZkCZTv0Gci3xxKtw@five231003> (raw)
In-Reply-To: <202405111846.3m9z398l-lkp@intel.com>

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.

Thanks

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

  reply	other threads:[~2024-05-12 10:26 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 [this message]
2024-05-12 10:36       ` Julia Lawall
2024-05-13  6:44       ` Nathan Chancellor
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=ZkCZTv0Gci3xxKtw@five231003 \
    --to=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;
as well as URLs for NNTP newsgroup(s).