On Wed, Oct 16, 2024 at 08:47:21PM -0600, Everest K.C. wrote: > > $ git grep get_dma_residue | grep static | grep -v gpib > > > > arch/alpha/include/asm/dma.h:static __inline__ int get_dma_residue(unsigned int dmanr) > > arch/arm/mach-footbridge/dma-isa.c:static int isa_get_dma_residue(unsigned int chan, dma_t *dma) > > arch/m68k/include/asm/floppy.h:static int vdma_get_dma_residue(unsigned int dummy) > > arch/mips/include/asm/dma.h:static __inline__ int get_dma_residue(unsigned int dmanr) > > arch/mips/include/asm/mach-au1x00/au1000_dma.h:static inline int get_dma_residue(unsigned int dmanr) > > arch/mips/include/asm/mach-generic/floppy.h:static inline int fd_get_dma_residue(void) > > arch/mips/include/asm/mach-jazz/floppy.h:static inline int fd_get_dma_residue(void) > > arch/parisc/include/asm/dma.h:static __inline__ int get_dma_residue(unsigned int dmanr) > > arch/parisc/include/asm/floppy.h:static int vdma_get_dma_residue(unsigned int dummy) > > arch/powerpc/include/asm/dma.h:static __inline__ int get_dma_residue(unsigned int dmanr) > > arch/powerpc/include/asm/floppy.h:static int vdma_get_dma_residue(unsigned int dummy) > > arch/sh/drivers/dma/dma-pvr2.c:static int pvr2_get_dma_residue(struct dma_channel *chan) > > arch/sh/drivers/dma/dma-sh.c:static int sh_dmac_get_dma_residue(struct dma_channel *chan) > > arch/sparc/include/asm/floppy_64.h:static unsigned int sun_get_dma_residue(void) > > arch/sparc/include/asm/floppy_64.h:static unsigned int sun_pci_get_dma_residue(void) > > arch/sparc/include/asm/parport_64.h:static inline unsigned int get_dma_residue(unsigned int dmanr) > > arch/x86/include/asm/dma.h:static inline int get_dma_residue(unsigned int dmanr) > > arch/x86/include/asm/floppy.h:static int vdma_get_dma_residue(unsigned int dummy) > > > > Only the Sparc functions return unsigned int. The rest return int. > Why is it so ? Are there any resources I could go through to > understand it better? There isn't a reason for it. Programmers make millions of little choices and some don't matter so it's just a roll of the dice which way things go. regards, dan carpenter