Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: "André Almeida" <andrealmeid@igalia.com>
To: Ankit Khushwaha <ankitkhushwaha.linux@gmail.com>
Cc: Darren Hart <dvhart@infradead.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>, Shuah Khan <shuah@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	Davidlohr Bueso <dave@stgolabs.net>
Subject: Re: [PATCH v2] selftests/futex: Fix storing address of local variable
Date: Wed, 19 Nov 2025 12:28:37 -0300	[thread overview]
Message-ID: <cfed2906-291f-41e9-a6ba-4884a7380d17@igalia.com> (raw)
In-Reply-To: <20251118170907.108832-1-ankitkhushwaha.linux@gmail.com>

Hi Ankit,

Em 18/11/2025 14:08, Ankit Khushwaha escreveu:
> In "child_circular_list()" address of local variable ‘lock_struct a’
> is assigned to "" raising the following warning.
> 
> robust_list.c: In function ‘child_circular_list’:
> robust_list.c:522:24: warning: storing the address of local variable ‘a’
> in ‘head.list.next’ [-Wdangling-pointer=]
> 
>    522 |         head.list.next = &a.list;
>        |         ~~~~~~~~~~~~~~~^~~~~~~~~
> robust_list.c:513:28: note: ‘a’ declared here
>    513 |         struct lock_struct a, b, c;
>        |                            ^
> robust_list.c:512:40: note: ‘head’ declared here
>    512 |         static struct robust_list_head head;
>        |                                        ^~~~
> 
> removing the static keyword of "head" to fix this.
> 

This should be "Remove the static..." as noted in the kernel documentation:

"Describe your changes in imperative mood, e.g. “make xyzzy do frotz” 
instead of “[This patch] makes xyzzy do frotz” or “[I] changed xyzzy to 
do frotz”, as if you are giving orders to the codebase to change its 
behaviour."

Please have a look on this page here: 
https://www.kernel.org/doc/html/latest/process/submitting-patches.html

  reply	other threads:[~2025-11-19 15:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-18 17:08 [PATCH v2] selftests/futex: Fix storing address of local variable Ankit Khushwaha
2025-11-19 15:28 ` André Almeida [this message]
2025-11-25  4:50   ` Ankit Khushwaha

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=cfed2906-291f-41e9-a6ba-4884a7380d17@igalia.com \
    --to=andrealmeid@igalia.com \
    --cc=ankitkhushwaha.linux@gmail.com \
    --cc=dave@stgolabs.net \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=shuah@kernel.org \
    --cc=tglx@linutronix.de \
    /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