Skip to content
  • Mauro Carvalho Chehab's avatar
    01cc2ec6
    media: atomisp: cleanup __printf() atributes on printk messages · 01cc2ec6
    Mauro Carvalho Chehab authored
    
    
    There are still some warnings produced by -Wsuggest-attribute=format,
    like this one:
    
    	drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c: In function ‘dtrace_dot’:
    	drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c:2466:2: warning: function ‘dtrace_dot’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
    	 2466 |  ia_css_debug_vdtrace(IA_CSS_DEBUG_INFO, fmt, ap);
    	      |  ^~~~~~~~~~~~~~~~~~~~
    
    Also, on some places, is is using __atribute, while on others it
    is using the __printf() macro.
    
    Uniform those to always use the __printf() macro, placing it
    before the function, and fix the logic in order to cleanup
    all such warnings.
    
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
    01cc2ec6
    media: atomisp: cleanup __printf() atributes on printk messages
    Mauro Carvalho Chehab authored
    
    
    There are still some warnings produced by -Wsuggest-attribute=format,
    like this one:
    
    	drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c: In function ‘dtrace_dot’:
    	drivers/staging/media/atomisp/pci/runtime/debug/src/ia_css_debug.c:2466:2: warning: function ‘dtrace_dot’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
    	 2466 |  ia_css_debug_vdtrace(IA_CSS_DEBUG_INFO, fmt, ap);
    	      |  ^~~~~~~~~~~~~~~~~~~~
    
    Also, on some places, is is using __atribute, while on others it
    is using the __printf() macro.
    
    Uniform those to always use the __printf() macro, placing it
    before the function, and fix the logic in order to cleanup
    all such warnings.
    
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Loading