All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe W Damasio <felipewd@terra.com.br>
To: kernel-janitors@vger.kernel.org
Subject: Re: [Kernel-janitors] [PATCH] Fix warning in drivers/ide/pci/triflex.c
Date: Mon, 26 Jan 2004 16:06:07 +0000	[thread overview]
Message-ID: <40153AEF.6000907@terra.com.br> (raw)
In-Reply-To: <1074874158.5269.3.camel@telecentrolivre>

	Greetings,

Luiz Fernando Capitulino wrote:
> hi all,
> 
> this patch fixes this warning:
> 
> drivers/ide/pci/triflex.c:49: warning: `triflex_get_info' defined but not used
> 
> here is:
> 
> diff -X dontdiff -Nru linux-2.6.2-rc2/drivers/ide/pci/triflex.c linux-2.6.2-rc2~/drivers/ide/pci/triflex.c
> --- linux-2.6.2-rc2/drivers/ide/pci/triflex.c	2003-10-08 16:24:04.000000000 -0300
> +++ linux-2.6.2-rc2~/drivers/ide/pci/triflex.c	2004-01-26 11:02:33.000000000 -0200
> @@ -45,6 +45,7 @@
>  
>  static struct pci_dev *triflex_dev;
>  
> +#ifdef CONFIG_PROC_FS
>  static int triflex_get_info(char *buf, char **addr, off_t offset, int count)
>  {
>  	char *p = buf;
> @@ -91,6 +92,7 @@
>  	
>  	return len > count ? count : len;
>  }
> +#endif

	Do we really need this chunk?

>  static int triflex_tune_chipset(ide_drive_t *drive, u8 xferspeed)
>  {
> diff -X dontdiff -Nru linux-2.6.2-rc2/drivers/ide/pci/triflex.h linux-2.6.2-rc2~/drivers/ide/pci/triflex.h
> --- linux-2.6.2-rc2/drivers/ide/pci/triflex.h	2003-10-08 16:24:26.000000000 -0300
> +++ linux-2.6.2-rc2~/drivers/ide/pci/triflex.h	2004-01-26 11:02:33.000000000 -0200
> @@ -14,8 +14,16 @@
>  
>  static unsigned int __devinit init_chipset_triflex(struct pci_dev *, const char *);
>  static void init_hwif_triflex(ide_hwif_t *);
> +#ifdef CONFIG_PROC_FS
>  static int triflex_get_info(char *, char **, off_t, int);
.
.
.

> +#endif

	Since triflex_get_info is already #ifdef'd out if CONFIG_PROC_FS is not 
set, we don't need to put that extra #ifdef on the .c file, since that 
function will not get used anyway.

	IIRC the policy for adding #ifdefs on .c files is when it's really 
necessary, and I don't really see the point for this (expect object size 
and an extra symbol defined, which I don't think it really hurts here).

	Cheers,

Felipe

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

  reply	other threads:[~2004-01-26 16:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-23 16:09 [Kernel-janitors] [PATCH] Fix warning in drivers/ide/pci/triflex.c Luiz Fernando Capitulino
2004-01-26 16:06 ` Felipe W Damasio [this message]
2004-01-29 19:05 ` [Kernel-janitors] [PATCH] Fix warning in drivers/net/pppoe.c when Luiz Fernando Capitulino
2004-01-30 11:04 ` [Kernel-janitors] [PATCH] Fix warning in drivers/net/pppoe.c Luiz Fernando Capitulino
2004-02-02 22:03 ` [Kernel-janitors] [PATCH] Fix warning indrivers/ide/pci/triflex.c Adrian Bunk
2004-02-06 13:10 ` [Kernel-janitors] [PATCH] Fix warning in drivers/net/pppoe.c when Luiz Fernando Capitulino

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=40153AEF.6000907@terra.com.br \
    --to=felipewd@terra.com.br \
    --cc=kernel-janitors@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.