Patch "staging: vchiq_arm: mark vchiq_platform_init() static" has been added to the 6.1-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    staging: vchiq_arm: mark vchiq_platform_init() static

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     staging-vchiq_arm-mark-vchiq_platform_init-static.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 25fd438a0099692a9797a6c0b3d11db5c6a0931a
Author: Arnd Bergmann <arnd@xxxxxxxx>
Date:   Tue May 16 22:25:55 2023 +0200

    staging: vchiq_arm: mark vchiq_platform_init() static
    
    [ Upstream commit e152c58d7a48194d6b530d8e004d650fd01568b6 ]
    
    This function has no callers from other files, and the declaration
    was removed a while ago, causing a W=1 warning:
    
    drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:465:5: error: no previous prototype for 'vchiq_platform_init'
    
    Marking it static solves this problem but introduces a new warning
    since gcc determines that 'g_fragments_base' is never initialized
    in some kernel configurations:
    
    In file included from include/linux/string.h:254,
                     from include/linux/bitmap.h:11,
                     from include/linux/cpumask.h:12,
                     from include/linux/mm_types_task.h:14,
                     from include/linux/mm_types.h:5,
                     from include/linux/buildid.h:5,
                     from include/linux/module.h:14,
                     from drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:8:
    In function 'memcpy_to_page',
        inlined from 'free_pagelist' at drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:433:4:
    include/linux/fortify-string.h:57:33: error: argument 2 null where non-null expected [-Werror=nonnull]
    include/linux/highmem.h:427:9: note: in expansion of macro 'memcpy'
      427 |         memcpy(to + offset, from, len);
          |         ^~~~~~
    
    Add a NULL pointer check for this in addition to the static annotation
    to avoid both.
    
    Fixes: 89cc4218f640 ("staging: vchiq_arm: drop unnecessary declarations")
    Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
    Reviewed-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
    Reviewed-by: Umang Jain <umang.jain@xxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230516202603.560554-1-arnd@xxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index dc33490ba7fbb..705c5e283c27b 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -415,7 +415,7 @@ free_pagelist(struct vchiq_instance *instance, struct vchiq_pagelist_info *pagel
 	pagelistinfo->scatterlist_mapped = 0;
 
 	/* Deal with any partial cache lines (fragments) */
-	if (pagelist->type >= PAGELIST_READ_WITH_FRAGMENTS) {
+	if (pagelist->type >= PAGELIST_READ_WITH_FRAGMENTS && g_fragments_base) {
 		char *fragments = g_fragments_base +
 			(pagelist->type - PAGELIST_READ_WITH_FRAGMENTS) *
 			g_fragments_size;
@@ -462,7 +462,7 @@ free_pagelist(struct vchiq_instance *instance, struct vchiq_pagelist_info *pagel
 	cleanup_pagelistinfo(instance, pagelistinfo);
 }
 
-int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state)
+static int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state)
 {
 	struct device *dev = &pdev->dev;
 	struct vchiq_drvdata *drvdata = platform_get_drvdata(pdev);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux