From: Dan Carpenter <dan.carpenter@linaro.org>
To: "Everest K.C." <everestkc@everestkc.com.np>
Cc: Greg KH <gregkh@linuxfoundation.org>,
dpenkler@gmail.com, skhan@linuxfoundation.org,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH V2] staging: gpib: Remove a dead condition in if statement
Date: Thu, 17 Oct 2024 10:03:33 +0300 [thread overview]
Message-ID: <92acd116-55f4-4262-8b86-840da55481c3@stanley.mountain> (raw)
In-Reply-To: <CAEO-vhFAb=xfc2sZiezW7Zn0dWNQ4axVxE6GErayKs76NtG1bg@mail.gmail.com>
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
next prev parent reply other threads:[~2024-10-17 7:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-16 7:53 [PATCH V2] staging: gpib: Remove a dead condition in if statement Everest K.C.
2024-10-16 8:04 ` Greg KH
2024-10-16 12:54 ` Everest K.C.
2024-10-16 15:00 ` Dan Carpenter
2024-10-17 2:47 ` Everest K.C.
2024-10-17 7:03 ` Dan Carpenter [this message]
2024-10-16 15:12 ` Greg KH
2024-10-17 2:50 ` Everest K.C.
2024-10-17 4:42 ` Everest K.C.
2024-10-17 6:01 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=92acd116-55f4-4262-8b86-840da55481c3@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=dpenkler@gmail.com \
--cc=everestkc@everestkc.com.np \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox