* [PATCH] megaraid: fix warnings when CONFIG_PROC_FS=n
@ 2006-07-06 14:23 Alexey Dobriyan
2006-07-06 22:10 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Alexey Dobriyan @ 2006-07-06 14:23 UTC (permalink / raw)
To: Neela Syam Kolli; +Cc: walter harms, linux-scsi, Andrew Morton
From: walter harms <wharms@bfs.de>
Signed-off-by: walter harms <wharms@bfs.de>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
drivers/scsi/megaraid.c | 17 +++++++++++------
drivers/scsi/megaraid.h | 4 ++--
2 files changed, 13 insertions(+), 8 deletions(-)
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -3180,7 +3180,10 @@ proc_rdrv(adapter_t *adapter, char *page
return len;
}
-
+#else
+static inline void mega_create_proc_entry(int index, struct proc_dir_entry *parent)
+{
+}
#endif
@@ -4344,7 +4347,7 @@ mega_support_cluster(adapter_t *adapter)
return 0;
}
-
+#ifdef CONFIG_PROC_FS
/**
* mega_adapinq()
* @adapter - pointer to our soft state
@@ -4449,7 +4452,7 @@ mega_internal_dev_inquiry(adapter_t *ada
return rval;
}
-
+#endif
/**
* mega_internal_command()
@@ -4965,7 +4968,6 @@ megaraid_remove_one(struct pci_dev *pdev
{
struct Scsi_Host *host = pci_get_drvdata(pdev);
adapter_t *adapter = (adapter_t *)host->hostdata;
- char buf[12] = { 0 };
scsi_remove_host(host);
@@ -5011,8 +5013,11 @@ #if MEGA_HAVE_ENH_PROC
remove_proc_entry("raiddrives-30-39",
adapter->controller_proc_dir_entry);
#endif
- sprintf(buf, "hba%d", adapter->host->host_no);
- remove_proc_entry(buf, mega_proc_dir_entry);
+ {
+ char buf[12] = { 0 };
+ sprintf(buf, "hba%d", adapter->host->host_no);
+ remove_proc_entry(buf, mega_proc_dir_entry);
+ }
}
#endif
--- a/drivers/scsi/megaraid.h
+++ b/drivers/scsi/megaraid.h
@@ -1001,7 +1001,6 @@ static int megaraid_reset(Scsi_Cmnd *);
static int megaraid_abort_and_reset(adapter_t *, Scsi_Cmnd *, int);
static int megaraid_biosparam(struct scsi_device *, struct block_device *,
sector_t, int []);
-static int mega_print_inquiry(char *, char *);
static int mega_build_sglist (adapter_t *adapter, scb_t *scb,
u32 *buffer, u32 *length);
@@ -1023,6 +1022,7 @@ static int mega_init_scb (adapter_t *);
static int mega_is_bios_enabled (adapter_t *);
#ifdef CONFIG_PROC_FS
+static int mega_print_inquiry(char *, char *);
static void mega_create_proc_entry(int, struct proc_dir_entry *);
static int proc_read_config(char *, char **, off_t, int, int *, void *);
static int proc_read_stat(char *, char **, off_t, int, int *, void *);
@@ -1039,10 +1039,10 @@ static int proc_rdrv_20(char *, char **,
static int proc_rdrv_30(char *, char **, off_t, int, int *, void *);
static int proc_rdrv_40(char *, char **, off_t, int, int *, void *);
static int proc_rdrv(adapter_t *, char *, int, int);
-#endif
static int mega_adapinq(adapter_t *, dma_addr_t);
static int mega_internal_dev_inquiry(adapter_t *, u8, u8, dma_addr_t);
+#endif
static int mega_support_ext_cdb(adapter_t *);
static mega_passthru* mega_prepare_passthru(adapter_t *, scb_t *,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] megaraid: fix warnings when CONFIG_PROC_FS=n
2006-07-06 14:23 [PATCH] megaraid: fix warnings when CONFIG_PROC_FS=n Alexey Dobriyan
@ 2006-07-06 22:10 ` Andrew Morton
2006-07-06 22:19 ` Alexey Dobriyan
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2006-07-06 22:10 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: Neela.Kolli, wharms, linux-scsi
Alexey Dobriyan <adobriyan@gmail.com> wrote:
>
> +#else
> +static inline void mega_create_proc_entry(int index, struct proc_dir_entry *parent)
> +{
> +}
Thanks. But this is already fixed in -mm. Was submitted to James 25 June
and 30 June and is on autorepeat.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] megaraid: fix warnings when CONFIG_PROC_FS=n
2006-07-06 22:10 ` Andrew Morton
@ 2006-07-06 22:19 ` Alexey Dobriyan
2006-07-06 22:30 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Alexey Dobriyan @ 2006-07-06 22:19 UTC (permalink / raw)
To: Andrew Morton; +Cc: Neela.Kolli, wharms, linux-scsi
On Thu, Jul 06, 2006 at 03:10:33PM -0700, Andrew Morton wrote:
> Alexey Dobriyan <adobriyan@gmail.com> wrote:
> >
> > +#else
> > +static inline void mega_create_proc_entry(int index, struct proc_dir_entry *parent)
> > +{
> > +}
>
> Thanks. But this is already fixed in -mm. Was submitted to James 25 June
> and 30 June and is on autorepeat.
drivers-scsi-megaraidc-add-a-dummy-mega_create_proc_entry-for-proc_fs\=y.patch
from Adrian?
This patch also fixes all other PROC=n warnings not just adds dummy function.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] megaraid: fix warnings when CONFIG_PROC_FS=n
2006-07-06 22:19 ` Alexey Dobriyan
@ 2006-07-06 22:30 ` Andrew Morton
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2006-07-06 22:30 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: Neela.Kolli, wharms, linux-scsi, Adrian Bunk
Alexey Dobriyan <adobriyan@gmail.com> wrote:
>
> On Thu, Jul 06, 2006 at 03:10:33PM -0700, Andrew Morton wrote:
> > Alexey Dobriyan <adobriyan@gmail.com> wrote:
> > >
> > > +#else
> > > +static inline void mega_create_proc_entry(int index, struct proc_dir_entry *parent)
> > > +{
> > > +}
> >
> > Thanks. But this is already fixed in -mm. Was submitted to James 25 June
> > and 30 June and is on autorepeat.
>
> drivers-scsi-megaraidc-add-a-dummy-mega_create_proc_entry-for-proc_fs\=y.patch
>
> from Adrian?
Yes, that.
> This patch also fixes all other PROC=n warnings not just adds dummy function.
Well I still don't know what the patch does really - I'd need to compile
the driver with PROC_FS=n to find out.
In future for all warning and build error patches please include the
compiler stderr in the changelog, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-07-06 22:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-06 14:23 [PATCH] megaraid: fix warnings when CONFIG_PROC_FS=n Alexey Dobriyan
2006-07-06 22:10 ` Andrew Morton
2006-07-06 22:19 ` Alexey Dobriyan
2006-07-06 22:30 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox