[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [XEN PATCH 3/8] xen: address MISRA C:2012 Rule 8.4
- To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Wed, 9 Aug 2023 13:50:27 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rQNT8PERyXuLdsuD19oU8pXPPzCvFl1yWXLc6ZmLdpY=; b=Yq/o8+wJpgYcicfD+VY562WIsmbgmU70RicVLYHvyGWA9pUP0t8QSJluJdi8vqZnj9ejykTPJOyNoOkGjLugwtNuQfSlA6YJYguFb3dgFyi31Dni4XETRbwzL3HTioXqwqfAnjfdQXaVeqme2UAwYYRBxKsPpU8GxXf+7pCXuk8mRAEjvwSfkMd895u1cDYm+54csqY+TqU2NEGK3C/OAvpjZty94KGmTKAGcPxoX5QbkSqewF4rLwnPKAJGvpUK6OEIedwPWShPslFEXorEefUPtKjs79aFf8xVpCch/1hVzbH0rIUpw9XPtrmiGxZSdpiZtg1IcDfciAQFwjZcsg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dPtCBT5Rnpid7iK/ZcGhhlf7Qp4fxjFTGBTm3Ei970N4p1E70Tfr2/SfocY6bnAfaP7j9JBSdt7vPyohxS/eF09kF/6v0M79ztKgQV0P2IbLQ2L2mxcYOmhSmgJA6e2/30SlrBEUkpleq82uDio30MqEcFBooZ8eS414JYc9JB6iACcvyxoszoQnzZ/YoV/snL5pAiFZQPtUdnaumOm+O3IvGkJf2WXoly6ut4hffewSVMzgEe/F74fOgkwuwdtXmRIqs5b1cMoFNPMb+GVaQ+Uthn/b33Bw78b/2/F8csmHRNU7fVzjxFnkjr6fDWa0W9d3w2dxxVIzCJT58oE4PQ==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "michal.orzel@xxxxxxx" <michal.orzel@xxxxxxx>, "xenia.ragiadakou@xxxxxxx" <xenia.ragiadakou@xxxxxxx>, "ayan.kumar.halder@xxxxxxx" <ayan.kumar.halder@xxxxxxx>, "consulting@xxxxxxxxxxx" <consulting@xxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Wed, 09 Aug 2023 13:51:40 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHZyrEYmlGLQrMXXU2mT8iNskDvw6/h+3gA
- Thread-topic: [XEN PATCH 3/8] xen: address MISRA C:2012 Rule 8.4
> On 9 Aug 2023, at 12:02, Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx> wrote:
>
> The variable 'saved_cmdline' can be defined static,
> as its only uses are within the same file. This in turn avoids
> violating Rule 8.4 because no declaration is present.
>
> Signed-off-by: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
> ---
> xen/common/kernel.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/xen/common/kernel.c b/xen/common/kernel.c
> index fb919f3d9c..52aa287627 100644
> --- a/xen/common/kernel.c
> +++ b/xen/common/kernel.c
> @@ -28,7 +28,7 @@ CHECK_feature_info;
>
> enum system_state system_state = SYS_STATE_early_boot;
>
> -xen_commandline_t saved_cmdline;
> +static xen_commandline_t saved_cmdline;
I see this line was touched by fa97833ae18e4a42c0e5ba4e781173457b5d3397,
have you checked that making it static was not affecting anything else?
> static const char __initconst opt_builtin_cmdline[] = CONFIG_CMDLINE;
>
> static int assign_integer_param(const struct kernel_param *param, uint64_t
> val)
> --
> 2.34.1
>
>
|