[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] xen/cache-col: address MISRA C Rule 5.3



commit a87d5761e27a2c1d6051c681deafcb48a88eaf88
Author:     Dmytro Prokopchuk <dmytro_prokopchuk1@xxxxxxxx>
AuthorDate: Mon Mar 23 11:17:24 2026 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Mar 23 11:17:24 2026 +0100

    xen/cache-col: address MISRA C Rule 5.3
    
    MISRA C:2012 Rule 5.3 states as following: An identifier declared in an
    inner scope shall not hide an identifier declared in an outer scope.
    
    Inside the 'if' block, the inner 'i' shadows the outer 'i'.
    Reuse the outer variable and remove the inner declaration to fix that.
    
    No functional change.
    
    Signed-off-by: Dmytro Prokopchuk <dmytro_prokopchuk1@xxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/common/llc-coloring.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/xen/common/llc-coloring.c b/xen/common/llc-coloring.c
index 77a54beed1..822a6b2ed5 100644
--- a/xen/common/llc-coloring.c
+++ b/xen/common/llc-coloring.c
@@ -193,8 +193,6 @@ void __init llc_coloring_init(void)
 
     if ( !xen_num_colors )
     {
-        unsigned int i;
-
         xen_num_colors = MIN(XEN_DEFAULT_NUM_COLORS, max_nr_colors);
 
         printk(XENLOG_WARNING
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.