From: Nicola Vetrini <nicola.vetrini@bugseng.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: michal.orzel@amd.com, xenia.ragiadakou@amd.com,
ayan.kumar.halder@amd.com, consulting@bugseng.com,
Andrew Cooper <andrew.cooper3@citrix.com>,
George Dunlap <george.dunlap@citrix.com>,
Julien Grall <julien@xen.org>,
Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
xen-devel@lists.xenproject.org
Subject: Re: [XEN PATCH v2 3/3] xen: fix violations of MISRA C:2012 Rule 3.1
Date: Tue, 20 Jun 2023 10:00:28 +0200 [thread overview]
Message-ID: <1e46b737-9e33-4175-e2fe-7d7e9cd275c0@bugseng.com> (raw)
In-Reply-To: <e6d66407-9777-160f-274e-3f0808cf514b@suse.com>
On 19/06/23 12:29, Jan Beulich wrote:
> On 19.06.2023 11:56, Nicola Vetrini wrote:
>> --- a/xen/common/xmalloc_tlsf.c
>> +++ b/xen/common/xmalloc_tlsf.c
>> @@ -140,9 +140,6 @@ static inline void MAPPING_SEARCH(unsigned long *r, int *fl, int *sl)
>> *fl = flsl(*r) - 1;
>> *sl = (*r >> (*fl - MAX_LOG2_SLI)) - MAX_SLI;
>> *fl -= FLI_OFFSET;
>> - /*if ((*fl -= FLI_OFFSET) < 0) // FL will be always >0!
>> - *fl = *sl = 0;
>> - */
>> *r &= ~t;
>> }
>> }
>
> As indicated before, I don't think simply dropping the commented out code
> is appropriate here. Personally I'd prefer if it was kept (using #if/#else),
> but I'd also be okay with replacing it by a respective assertion. That said,
> if other maintainers think this is the way to go, then I don't mean to
> stand in the way.
>
As Andrew Cooper suggested in the previous patch revision
(https://lore.kernel.org/xen-devel/6bac57d5-c30e-f763-3abe-b3f335f366f7@suse.com/T/#m5722285215bb30d7f1202b9921e2c92d5ea98d6a),
I removed the commented-out code, since it contains unused logic, but I
would be okay with replacing it with an assertion, if you think it's better.
Regards,
--
Nicola Vetrini, BSc
Software Engineer, BUGSENG srl (https://bugseng.com)
prev parent reply other threads:[~2023-06-20 8:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-19 9:56 [XEN PATCH v2 0/3] fix violations of MISRA C:2012 Rule 3.1 Nicola Vetrini
2023-06-19 9:56 ` [XEN PATCH v2 1/3] xen/arch/arm: " Nicola Vetrini
2023-06-19 10:01 ` Julien Grall
2023-06-19 10:25 ` Jan Beulich
2023-06-19 10:29 ` Julien Grall
2023-06-20 13:56 ` Nicola Vetrini
2023-06-19 9:56 ` [XEN PATCH v2 2/3] xen/drivers/passthrough/arm/smmu-v3.c: " Nicola Vetrini
2023-06-19 10:10 ` Julien Grall
2023-06-20 8:06 ` Nicola Vetrini
2023-06-19 9:56 ` [XEN PATCH v2 3/3] xen: " Nicola Vetrini
2023-06-19 10:29 ` Jan Beulich
2023-06-20 8:00 ` Nicola Vetrini [this message]
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=1e46b737-9e33-4175-e2fe-7d7e9cd275c0@bugseng.com \
--to=nicola.vetrini@bugseng.com \
--cc=andrew.cooper3@citrix.com \
--cc=ayan.kumar.halder@amd.com \
--cc=consulting@bugseng.com \
--cc=george.dunlap@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=sstabellini@kernel.org \
--cc=wl@xen.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.