From: "Jürgen Groß" <jgross@suse.com>
To: Nicola Vetrini <nicola.vetrini@bugseng.com>,
Jan Beulich <jbeulich@suse.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
xen-devel@lists.xenproject.org, michal.orzel@amd.com,
xenia.ragiadakou@amd.com, ayan.kumar.halder@amd.com,
consulting@bugseng.com, Dario Faggioli <dfaggioli@suse.com>,
Meng Xu <mengxu@cis.upenn.edu>,
George Dunlap <gwd@xenproject.org>
Subject: Re: [XEN PATCH 2/3] xen/sched: address violation of MISRA C Rule 8.2
Date: Mon, 17 Feb 2025 09:48:54 +0100 [thread overview]
Message-ID: <d8dfc351-2646-4ea8-b697-5f0f0ef22108@suse.com> (raw)
In-Reply-To: <c4dbb8c88d068cf7bbc5cc6c9d8440ba@bugseng.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 2001 bytes --]
On 17.02.25 09:31, Nicola Vetrini wrote:
> On 2025-02-17 08:54, Jan Beulich wrote:
>> On 15.02.2025 00:04, Stefano Stabellini wrote:
>>> On Fri, 14 Feb 2025, Nicola Vetrini wrote:
>>>> Rule 8.2 states: "Function types shall be in prototype form with
>>>> named parameters".
>>>>
>>>> The parameter name is missing from the function pointer type
>>>> that constitutes the first parameter.
>>>>
>>>> No functional change.
>>>>
>>>> Signed-off-by: Nicola Vetrini <nicola.vetrini@bugseng.com>
>>>> ---
>>>> This small fix is needed in order to keep the rule clean in the
>>>> follow-up patch that changes the Xen configuration under static
>>>> analysis.
>>>>
>>>> I wasn't really certain about the right name to give to the parameter,
>>>> so if there are better options I'd be happy to accept them.
>>>> ---
>>>> xen/common/sched/rt.c | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> This is a specific scheduler you touch, which I think wants expressing
>> somehow (e.g. via an adjusted prefix) in the patch subject.
>>
>
> Ok. I think it should be "xen/rt" then.
>
>>>> --- a/xen/common/sched/rt.c
>>>> +++ b/xen/common/sched/rt.c
>>>> @@ -500,7 +500,7 @@ deadline_queue_remove(struct list_head *queue, struct
>>>> list_head *elem)
>>>> }
>>>>
>>>> static inline bool
>>>> -deadline_queue_insert(struct rt_unit * (*qelem)(struct list_head *),
>>>> +deadline_queue_insert(struct rt_unit * (*qelem)(struct list_head *q_iter),
>>>
>>> I think it should be "elem" instead of "q_iter"
>>
>> Why would it matter what the name is? There's no separate decl to stay in
>> sync with. (That said, I'd be happy with "elem"; it'll be a matter of the
>> maintainers to judge.)
>>
>> Jan
>
> I'd be ok with that too.
>
I think naming it "elem" is the better choice, as both functions used for
the qelem() parameter name their parameter "elem" already.
With that change:
Reviewed-by: Juergen Gross <jgross@suse.com>
Juergen
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
next prev parent reply other threads:[~2025-02-17 8:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-14 20:45 [XEN PATCH 0/3] Move Xen ECLAIR configuration to analyze.yaml Nicola Vetrini
2025-02-14 20:45 ` [XEN PATCH 1/3] xen/arm: platform: address violation of MISRA C Rule 7.2 Nicola Vetrini
2025-02-14 23:04 ` Stefano Stabellini
2025-02-14 20:45 ` [XEN PATCH 2/3] xen/sched: address violation of MISRA C Rule 8.2 Nicola Vetrini
2025-02-14 23:04 ` Stefano Stabellini
2025-02-17 7:54 ` Jan Beulich
2025-02-17 8:31 ` Nicola Vetrini
2025-02-17 8:48 ` Jürgen Groß [this message]
2025-02-14 20:45 ` [XEN PATCH 3/3] automation: Update ECLAIR analysis configuration Nicola Vetrini
2025-02-14 23:04 ` Stefano Stabellini
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=d8dfc351-2646-4ea8-b697-5f0f0ef22108@suse.com \
--to=jgross@suse.com \
--cc=ayan.kumar.halder@amd.com \
--cc=consulting@bugseng.com \
--cc=dfaggioli@suse.com \
--cc=gwd@xenproject.org \
--cc=jbeulich@suse.com \
--cc=mengxu@cis.upenn.edu \
--cc=michal.orzel@amd.com \
--cc=nicola.vetrini@bugseng.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
--cc=xenia.ragiadakou@amd.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.