Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'asm-generic-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic

Pull asm-generic cleanups from Arnd Bergmann:
"These are a few cross-architecture cleanup patches:

- separate out fbdev support from the asm/video.h contents that may
be used by either the old fbdev drivers or the newer drm display
code (Thomas Zimmermann)

- cleanups for the generic bitops code and asm-generic/bug.h
(Thorsten Blum)

- remove the orphaned include/asm-generic/page.h header that used to
be included by long-removed mmu-less architectures (me)"

* tag 'asm-generic-6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic:
arch: Fix name collision with ACPI's video.o
bug: Improve comment
asm-generic: remove unused asm-generic/page.h
arch: Rename fbdev header and source files
arch: Remove struct fb_info from video helpers
arch: Select fbdev helpers with CONFIG_VIDEO
bitops: Change function return types from long to int

+139 -269
-8
arch/arc/include/asm/fb.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - 3 - #ifndef _ASM_FB_H_ 4 - #define _ASM_FB_H_ 5 - 6 - #include <asm-generic/fb.h> 7 - 8 - #endif /* _ASM_FB_H_ */
-6
arch/arm/include/asm/fb.h
··· 1 - #ifndef _ASM_FB_H_ 2 - #define _ASM_FB_H_ 3 - 4 - #include <asm-generic/fb.h> 5 - 6 - #endif /* _ASM_FB_H_ */
-10
arch/arm64/include/asm/fb.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0-only */ 2 - /* 3 - * Copyright (C) 2012 ARM Ltd. 4 - */ 5 - #ifndef __ASM_FB_H_ 6 - #define __ASM_FB_H_ 7 - 8 - #include <asm-generic/fb.h> 9 - 10 - #endif /* __ASM_FB_H_ */
+4 -4
arch/loongarch/include/asm/fb.h arch/loongarch/include/asm/video.h
··· 2 2 /* 3 3 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited 4 4 */ 5 - #ifndef _ASM_FB_H_ 6 - #define _ASM_FB_H_ 5 + #ifndef _ASM_VIDEO_H_ 6 + #define _ASM_VIDEO_H_ 7 7 8 8 #include <linux/compiler.h> 9 9 #include <linux/string.h> ··· 26 26 } 27 27 #define fb_memset fb_memset_io 28 28 29 - #include <asm-generic/fb.h> 29 + #include <asm-generic/video.h> 30 30 31 - #endif /* _ASM_FB_H_ */ 31 + #endif /* _ASM_VIDEO_H_ */
+4 -4
arch/m68k/include/asm/fb.h arch/m68k/include/asm/video.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_FB_H_ 3 - #define _ASM_FB_H_ 2 + #ifndef _ASM_VIDEO_H_ 3 + #define _ASM_VIDEO_H_ 4 4 5 5 #include <asm/page.h> 6 6 #include <asm/setup.h> ··· 27 27 } 28 28 #define pgprot_framebuffer pgprot_framebuffer 29 29 30 - #include <asm-generic/fb.h> 30 + #include <asm-generic/video.h> 31 31 32 - #endif /* _ASM_FB_H_ */ 32 + #endif /* _ASM_VIDEO_H_ */
+6 -6
arch/mips/include/asm/fb.h arch/mips/include/asm/video.h
··· 1 - #ifndef _ASM_FB_H_ 2 - #define _ASM_FB_H_ 1 + #ifndef _ASM_VIDEO_H_ 2 + #define _ASM_VIDEO_H_ 3 3 4 4 #include <asm/page.h> 5 5 ··· 13 13 14 14 /* 15 15 * MIPS doesn't define __raw_ I/O macros, so the helpers 16 - * in <asm-generic/fb.h> don't generate fb_readq() and 17 - * fb_write(). We have to provide them here. 16 + * in <asm-generic/video.h> don't generate fb_readq() and 17 + * fb_writeq(). We have to provide them here. 18 18 * 19 19 * TODO: Convert MIPS to generic I/O. The helpers below can 20 20 * then be removed. ··· 33 33 #define fb_writeq fb_writeq 34 34 #endif 35 35 36 - #include <asm-generic/fb.h> 36 + #include <asm-generic/video.h> 37 37 38 - #endif /* _ASM_FB_H_ */ 38 + #endif /* _ASM_VIDEO_H_ */
+1 -1
arch/parisc/Makefile
··· 119 119 120 120 libs-y += arch/parisc/lib/ $(LIBGCC) 121 121 122 - drivers-y += arch/parisc/video/ 122 + drivers-$(CONFIG_VIDEO) += arch/parisc/video/ 123 123 124 124 boot := arch/parisc/boot 125 125
-14
arch/parisc/include/asm/fb.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_FB_H_ 3 - #define _ASM_FB_H_ 4 - 5 - struct fb_info; 6 - 7 - #if defined(CONFIG_STI_CORE) 8 - int fb_is_primary_device(struct fb_info *info); 9 - #define fb_is_primary_device fb_is_primary_device 10 - #endif 11 - 12 - #include <asm-generic/fb.h> 13 - 14 - #endif /* _ASM_FB_H_ */
+16
arch/parisc/include/asm/video.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef _ASM_VIDEO_H_ 3 + #define _ASM_VIDEO_H_ 4 + 5 + #include <linux/types.h> 6 + 7 + struct device; 8 + 9 + #if defined(CONFIG_STI_CORE) 10 + bool video_is_primary_device(struct device *dev); 11 + #define video_is_primary_device video_is_primary_device 12 + #endif 13 + 14 + #include <asm-generic/video.h> 15 + 16 + #endif /* _ASM_VIDEO_H_ */
+1 -1
arch/parisc/video/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 3 - obj-$(CONFIG_STI_CORE) += fbdev.o 3 + obj-$(CONFIG_STI_CORE) += video-sti.o
+5 -4
arch/parisc/video/fbdev.c arch/parisc/video/video-sti.c
··· 5 5 * Copyright (C) 2001-2002 Thomas Bogendoerfer <tsbogend@alpha.franken.de> 6 6 */ 7 7 8 - #include <linux/fb.h> 9 8 #include <linux/module.h> 10 9 11 10 #include <video/sticore.h> 12 11 13 - int fb_is_primary_device(struct fb_info *info) 12 + #include <asm/video.h> 13 + 14 + bool video_is_primary_device(struct device *dev) 14 15 { 15 16 struct sti_struct *sti; 16 17 ··· 22 21 return true; 23 22 24 23 /* return true if it's the default built-in framebuffer driver */ 25 - return (sti->dev == info->device); 24 + return (sti->dev == dev); 26 25 } 27 - EXPORT_SYMBOL(fb_is_primary_device); 26 + EXPORT_SYMBOL(video_is_primary_device);
+4 -4
arch/powerpc/include/asm/fb.h arch/powerpc/include/asm/video.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_FB_H_ 3 - #define _ASM_FB_H_ 2 + #ifndef _ASM_VIDEO_H_ 3 + #define _ASM_VIDEO_H_ 4 4 5 5 #include <asm/page.h> 6 6 ··· 12 12 } 13 13 #define pgprot_framebuffer pgprot_framebuffer 14 14 15 - #include <asm-generic/fb.h> 15 + #include <asm-generic/video.h> 16 16 17 - #endif /* _ASM_FB_H_ */ 17 + #endif /* _ASM_VIDEO_H_ */
+1 -1
arch/powerpc/kernel/pci-common.c
··· 517 517 } 518 518 519 519 /* 520 - * This one is used by /dev/mem and fbdev who have no clue about the 520 + * This one is used by /dev/mem and video who have no clue about the 521 521 * PCI device, it tries to find the PCI device first and calls the 522 522 * above routine 523 523 */
-7
arch/sh/include/asm/fb.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_FB_H_ 3 - #define _ASM_FB_H_ 4 - 5 - #include <asm-generic/fb.h> 6 - 7 - #endif /* _ASM_FB_H_ */
+2 -2
arch/sparc/Makefile
··· 59 59 libs-y += arch/sparc/prom/ 60 60 libs-y += arch/sparc/lib/ 61 61 62 - drivers-$(CONFIG_PM) += arch/sparc/power/ 63 - drivers-$(CONFIG_FB_CORE) += arch/sparc/video/ 62 + drivers-$(CONFIG_PM) += arch/sparc/power/ 63 + drivers-$(CONFIG_VIDEO) += arch/sparc/video/ 64 64 65 65 boot := arch/sparc/boot 66 66
+8 -7
arch/sparc/include/asm/fb.h arch/sparc/include/asm/video.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _SPARC_FB_H_ 3 - #define _SPARC_FB_H_ 2 + #ifndef _SPARC_VIDEO_H_ 3 + #define _SPARC_VIDEO_H_ 4 4 5 5 #include <linux/io.h> 6 + #include <linux/types.h> 6 7 7 8 #include <asm/page.h> 8 9 9 - struct fb_info; 10 + struct device; 10 11 11 12 #ifdef CONFIG_SPARC32 12 13 static inline pgprot_t pgprot_framebuffer(pgprot_t prot, ··· 19 18 #define pgprot_framebuffer pgprot_framebuffer 20 19 #endif 21 20 22 - int fb_is_primary_device(struct fb_info *info); 23 - #define fb_is_primary_device fb_is_primary_device 21 + bool video_is_primary_device(struct device *dev); 22 + #define video_is_primary_device video_is_primary_device 24 23 25 24 static inline void fb_memcpy_fromio(void *to, const volatile void __iomem *from, size_t n) 26 25 { ··· 40 39 } 41 40 #define fb_memset fb_memset_io 42 41 43 - #include <asm-generic/fb.h> 42 + #include <asm-generic/video.h> 44 43 45 - #endif /* _SPARC_FB_H_ */ 44 + #endif /* _SPARC_VIDEO_H_ */
+1 -1
arch/sparc/video/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 3 - obj-$(CONFIG_FB_CORE) += fbdev.o 3 + obj-y += video-common.o
-26
arch/sparc/video/fbdev.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 - 3 - #include <linux/console.h> 4 - #include <linux/fb.h> 5 - #include <linux/module.h> 6 - 7 - #include <asm/prom.h> 8 - 9 - int fb_is_primary_device(struct fb_info *info) 10 - { 11 - struct device *dev = info->device; 12 - struct device_node *node; 13 - 14 - if (console_set_on_cmdline) 15 - return 0; 16 - 17 - node = dev->of_node; 18 - if (node && node == of_console_device) 19 - return 1; 20 - 21 - return 0; 22 - } 23 - EXPORT_SYMBOL(fb_is_primary_device); 24 - 25 - MODULE_DESCRIPTION("Sparc fbdev helpers"); 26 - MODULE_LICENSE("GPL");
+25
arch/sparc/video/video-common.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + 3 + #include <linux/console.h> 4 + #include <linux/device.h> 5 + #include <linux/module.h> 6 + 7 + #include <asm/prom.h> 8 + #include <asm/video.h> 9 + 10 + bool video_is_primary_device(struct device *dev) 11 + { 12 + struct device_node *node = dev->of_node; 13 + 14 + if (console_set_on_cmdline) 15 + return false; 16 + 17 + if (node && node == of_console_device) 18 + return true; 19 + 20 + return false; 21 + } 22 + EXPORT_SYMBOL(video_is_primary_device); 23 + 24 + MODULE_DESCRIPTION("Sparc video helpers"); 25 + MODULE_LICENSE("GPL");
+1 -1
arch/um/include/asm/Kbuild
··· 8 8 generic-y += emergency-restart.h 9 9 generic-y += exec.h 10 10 generic-y += extable.h 11 - generic-y += fb.h 12 11 generic-y += ftrace.h 13 12 generic-y += hw_irq.h 14 13 generic-y += irq_regs.h ··· 27 28 generic-y += kprobes.h 28 29 generic-y += mm_hooks.h 29 30 generic-y += vga.h 31 + generic-y += video.h
+1 -1
arch/x86/Makefile
··· 258 258 # suspend and hibernation support 259 259 drivers-$(CONFIG_PM) += arch/x86/power/ 260 260 261 - drivers-$(CONFIG_FB_CORE) += arch/x86/video/ 261 + drivers-$(CONFIG_VIDEO) += arch/x86/video/ 262 262 263 263 #### 264 264 # boot loader support. Several targets are kept for legacy purposes
-19
arch/x86/include/asm/fb.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef _ASM_X86_FB_H 3 - #define _ASM_X86_FB_H 4 - 5 - #include <asm/page.h> 6 - 7 - struct fb_info; 8 - 9 - pgprot_t pgprot_framebuffer(pgprot_t prot, 10 - unsigned long vm_start, unsigned long vm_end, 11 - unsigned long offset); 12 - #define pgprot_framebuffer pgprot_framebuffer 13 - 14 - int fb_is_primary_device(struct fb_info *info); 15 - #define fb_is_primary_device fb_is_primary_device 16 - 17 - #include <asm-generic/fb.h> 18 - 19 - #endif /* _ASM_X86_FB_H */
+21
arch/x86/include/asm/video.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef _ASM_X86_VIDEO_H 3 + #define _ASM_X86_VIDEO_H 4 + 5 + #include <linux/types.h> 6 + 7 + #include <asm/page.h> 8 + 9 + struct device; 10 + 11 + pgprot_t pgprot_framebuffer(pgprot_t prot, 12 + unsigned long vm_start, unsigned long vm_end, 13 + unsigned long offset); 14 + #define pgprot_framebuffer pgprot_framebuffer 15 + 16 + bool video_is_primary_device(struct device *dev); 17 + #define video_is_primary_device video_is_primary_device 18 + 19 + #include <asm-generic/video.h> 20 + 21 + #endif /* _ASM_X86_VIDEO_H */
+2 -1
arch/x86/video/Makefile
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 - obj-$(CONFIG_FB_CORE) += fbdev.o 2 + 3 + obj-y += video-common.o
+9 -12
arch/x86/video/fbdev.c arch/x86/video/video-common.c
··· 7 7 * 8 8 */ 9 9 10 - #include <linux/fb.h> 11 10 #include <linux/module.h> 12 11 #include <linux/pci.h> 13 12 #include <linux/vgaarb.h> 14 - #include <asm/fb.h> 13 + 14 + #include <asm/video.h> 15 15 16 16 pgprot_t pgprot_framebuffer(pgprot_t prot, 17 17 unsigned long vm_start, unsigned long vm_end, ··· 25 25 } 26 26 EXPORT_SYMBOL(pgprot_framebuffer); 27 27 28 - int fb_is_primary_device(struct fb_info *info) 28 + bool video_is_primary_device(struct device *dev) 29 29 { 30 - struct device *device = info->device; 31 - struct pci_dev *pci_dev; 30 + struct pci_dev *pdev; 32 31 33 - if (!device || !dev_is_pci(device)) 34 - return 0; 32 + if (!dev_is_pci(dev)) 33 + return false; 35 34 36 - pci_dev = to_pci_dev(device); 35 + pdev = to_pci_dev(dev); 37 36 38 - if (pci_dev == vga_default_device()) 39 - return 1; 40 - return 0; 37 + return (pdev == vga_default_device()); 41 38 } 42 - EXPORT_SYMBOL(fb_is_primary_device); 39 + EXPORT_SYMBOL(video_is_primary_device); 43 40 44 41 MODULE_LICENSE("GPL");
+1 -1
drivers/video/fbdev/core/fbcon.c
··· 2907 2907 static void fbcon_select_primary(struct fb_info *info) 2908 2908 { 2909 2909 if (!map_override && primary_device == -1 && 2910 - fb_is_primary_device(info)) { 2910 + video_is_primary_device(info->device)) { 2911 2911 int i; 2912 2912 2913 2913 printk(KERN_INFO "fbcon: %s (fb%i) is primary device\n",
+1 -1
include/asm-generic/Kbuild
··· 22 22 mandatory-y += dma.h 23 23 mandatory-y += emergency-restart.h 24 24 mandatory-y += exec.h 25 - mandatory-y += fb.h 26 25 mandatory-y += ftrace.h 27 26 mandatory-y += futex.h 28 27 mandatory-y += hardirq.h ··· 61 62 mandatory-y += unaligned.h 62 63 mandatory-y += vermagic.h 63 64 mandatory-y += vga.h 65 + mandatory-y += video.h 64 66 mandatory-y += word-at-a-time.h 65 67 mandatory-y += xor.h
+2 -2
include/asm-generic/bitops/__ffs.h
··· 10 10 * 11 11 * Undefined if no bit exists, so code should check against 0 first. 12 12 */ 13 - static __always_inline unsigned long generic___ffs(unsigned long word) 13 + static __always_inline unsigned int generic___ffs(unsigned long word) 14 14 { 15 - int num = 0; 15 + unsigned int num = 0; 16 16 17 17 #if BITS_PER_LONG == 64 18 18 if ((word & 0xffffffff) == 0) {
+2 -2
include/asm-generic/bitops/__fls.h
··· 10 10 * 11 11 * Undefined if no set bit exists, so code should check against 0 first. 12 12 */ 13 - static __always_inline unsigned long generic___fls(unsigned long word) 13 + static __always_inline unsigned int generic___fls(unsigned long word) 14 14 { 15 - int num = BITS_PER_LONG - 1; 15 + unsigned int num = BITS_PER_LONG - 1; 16 16 17 17 #if BITS_PER_LONG == 64 18 18 if (!(word & (~0ul << 32))) {
+1 -1
include/asm-generic/bitops/builtin-__ffs.h
··· 8 8 * 9 9 * Undefined if no bit exists, so code should check against 0 first. 10 10 */ 11 - static __always_inline unsigned long __ffs(unsigned long word) 11 + static __always_inline unsigned int __ffs(unsigned long word) 12 12 { 13 13 return __builtin_ctzl(word); 14 14 }
+1 -1
include/asm-generic/bitops/builtin-__fls.h
··· 8 8 * 9 9 * Undefined if no set bit exists, so code should check against 0 first. 10 10 */ 11 - static __always_inline unsigned long __fls(unsigned long word) 11 + static __always_inline unsigned int __fls(unsigned long word) 12 12 { 13 13 return (sizeof(word) * 8) - 1 - __builtin_clzl(word); 14 14 }
+1 -1
include/asm-generic/bug.h
··· 72 72 #endif 73 73 74 74 /* 75 - * WARN(), WARN_ON(), WARN_ON_ONCE, and so on can be used to report 75 + * WARN(), WARN_ON(), WARN_ON_ONCE(), and so on can be used to report 76 76 * significant kernel issues that need prompt attention if they should ever 77 77 * appear at runtime. 78 78 *
+9 -8
include/asm-generic/fb.h include/asm-generic/video.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 3 - #ifndef __ASM_GENERIC_FB_H_ 4 - #define __ASM_GENERIC_FB_H_ 3 + #ifndef __ASM_GENERIC_VIDEO_H_ 4 + #define __ASM_GENERIC_VIDEO_H_ 5 5 6 6 /* 7 7 * Only include this header file from your architecture's <asm/fb.h>. ··· 10 10 #include <linux/io.h> 11 11 #include <linux/mm_types.h> 12 12 #include <linux/pgtable.h> 13 + #include <linux/types.h> 13 14 14 - struct fb_info; 15 + struct device; 15 16 16 17 #ifndef pgprot_framebuffer 17 18 #define pgprot_framebuffer pgprot_framebuffer ··· 24 23 } 25 24 #endif 26 25 27 - #ifndef fb_is_primary_device 28 - #define fb_is_primary_device fb_is_primary_device 29 - static inline int fb_is_primary_device(struct fb_info *info) 26 + #ifndef video_is_primary_device 27 + #define video_is_primary_device video_is_primary_device 28 + static inline bool video_is_primary_device(struct device *dev) 30 29 { 31 - return 0; 30 + return false; 32 31 } 33 32 #endif 34 33 ··· 133 132 #define fb_memset fb_memset_io 134 133 #endif 135 134 136 - #endif /* __ASM_GENERIC_FB_H_ */ 135 + #endif /* __ASM_GENERIC_VIDEO_H_ */
-103
include/asm-generic/page.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef __ASM_GENERIC_PAGE_H 3 - #define __ASM_GENERIC_PAGE_H 4 - /* 5 - * Generic page.h implementation, for NOMMU architectures. 6 - * This provides the dummy definitions for the memory management. 7 - */ 8 - 9 - #ifdef CONFIG_MMU 10 - #error need to provide a real asm/page.h 11 - #endif 12 - 13 - 14 - /* PAGE_SHIFT determines the page size */ 15 - 16 - #define PAGE_SHIFT 12 17 - #ifdef __ASSEMBLY__ 18 - #define PAGE_SIZE (1 << PAGE_SHIFT) 19 - #else 20 - #define PAGE_SIZE (1UL << PAGE_SHIFT) 21 - #endif 22 - #define PAGE_MASK (~(PAGE_SIZE-1)) 23 - 24 - #include <asm/setup.h> 25 - 26 - #ifndef __ASSEMBLY__ 27 - 28 - #define clear_page(page) memset((page), 0, PAGE_SIZE) 29 - #define copy_page(to,from) memcpy((to), (from), PAGE_SIZE) 30 - 31 - #define clear_user_page(page, vaddr, pg) clear_page(page) 32 - #define copy_user_page(to, from, vaddr, pg) copy_page(to, from) 33 - 34 - /* 35 - * These are used to make use of C type-checking.. 36 - */ 37 - typedef struct { 38 - unsigned long pte; 39 - } pte_t; 40 - typedef struct { 41 - unsigned long pmd[16]; 42 - } pmd_t; 43 - typedef struct { 44 - unsigned long pgd; 45 - } pgd_t; 46 - typedef struct { 47 - unsigned long pgprot; 48 - } pgprot_t; 49 - typedef struct page *pgtable_t; 50 - 51 - #define pte_val(x) ((x).pte) 52 - #define pmd_val(x) ((&x)->pmd[0]) 53 - #define pgd_val(x) ((x).pgd) 54 - #define pgprot_val(x) ((x).pgprot) 55 - 56 - #define __pte(x) ((pte_t) { (x) } ) 57 - #define __pmd(x) ((pmd_t) { (x) } ) 58 - #define __pgd(x) ((pgd_t) { (x) } ) 59 - #define __pgprot(x) ((pgprot_t) { (x) } ) 60 - 61 - extern unsigned long memory_start; 62 - extern unsigned long memory_end; 63 - 64 - #endif /* !__ASSEMBLY__ */ 65 - 66 - #define PAGE_OFFSET (0) 67 - 68 - #ifndef ARCH_PFN_OFFSET 69 - #define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT) 70 - #endif 71 - 72 - #ifndef __ASSEMBLY__ 73 - 74 - #define __va(x) ((void *)((unsigned long) (x))) 75 - #define __pa(x) ((unsigned long) (x)) 76 - 77 - static inline unsigned long virt_to_pfn(const void *kaddr) 78 - { 79 - return __pa(kaddr) >> PAGE_SHIFT; 80 - } 81 - #define virt_to_pfn virt_to_pfn 82 - static inline void *pfn_to_virt(unsigned long pfn) 83 - { 84 - return __va(pfn) << PAGE_SHIFT; 85 - } 86 - #define pfn_to_virt pfn_to_virt 87 - 88 - #define virt_to_page(addr) pfn_to_page(virt_to_pfn(addr)) 89 - #define page_to_virt(page) pfn_to_virt(page_to_pfn(page)) 90 - 91 - #ifndef page_to_phys 92 - #define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) 93 - #endif 94 - 95 - #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \ 96 - ((void *)(kaddr) < (void *)memory_end)) 97 - 98 - #endif /* __ASSEMBLY__ */ 99 - 100 - #include <asm-generic/memory_model.h> 101 - #include <asm-generic/getorder.h> 102 - 103 - #endif /* __ASM_GENERIC_PAGE_H */
+3 -3
include/linux/bitops.h
··· 203 203 return (__s64)(value << shift) >> shift; 204 204 } 205 205 206 - static inline unsigned fls_long(unsigned long l) 206 + static inline unsigned int fls_long(unsigned long l) 207 207 { 208 208 if (sizeof(l) == 4) 209 209 return fls(l); ··· 239 239 * The result is not defined if no bits are set, so check that @word 240 240 * is non-zero before calling this. 241 241 */ 242 - static inline unsigned long __ffs64(u64 word) 242 + static inline unsigned int __ffs64(u64 word) 243 243 { 244 244 #if BITS_PER_LONG == 32 245 245 if (((u32)word) == 0UL) ··· 255 255 * @word: The word to search 256 256 * @n: Bit to find 257 257 */ 258 - static inline unsigned long fns(unsigned long word, unsigned int n) 258 + static inline unsigned int fns(unsigned long word, unsigned int n) 259 259 { 260 260 unsigned int bit; 261 261
+1 -1
include/linux/fb.h
··· 12 12 #include <linux/types.h> 13 13 #include <linux/workqueue.h> 14 14 15 - #include <asm/fb.h> 15 + #include <asm/video.h> 16 16 17 17 struct backlight_device; 18 18 struct device;
+2 -2
tools/include/asm-generic/bitops/__ffs.h
··· 11 11 * 12 12 * Undefined if no bit exists, so code should check against 0 first. 13 13 */ 14 - static __always_inline unsigned long __ffs(unsigned long word) 14 + static __always_inline unsigned int __ffs(unsigned long word) 15 15 { 16 - int num = 0; 16 + unsigned int num = 0; 17 17 18 18 #if __BITS_PER_LONG == 64 19 19 if ((word & 0xffffffff) == 0) {
+2 -2
tools/include/asm-generic/bitops/__fls.h
··· 10 10 * 11 11 * Undefined if no set bit exists, so code should check against 0 first. 12 12 */ 13 - static __always_inline unsigned long generic___fls(unsigned long word) 13 + static __always_inline unsigned int generic___fls(unsigned long word) 14 14 { 15 - int num = BITS_PER_LONG - 1; 15 + unsigned int num = BITS_PER_LONG - 1; 16 16 17 17 #if BITS_PER_LONG == 64 18 18 if (!(word & (~0ul << 32))) {
+1 -1
tools/include/linux/bitops.h
··· 72 72 return sizeof(w) == 4 ? hweight32(w) : hweight64(w); 73 73 } 74 74 75 - static inline unsigned fls_long(unsigned long l) 75 + static inline unsigned int fls_long(unsigned long l) 76 76 { 77 77 if (sizeof(l) == 4) 78 78 return fls(l);