inux-2.6.16.16/drivers/scsi/megaraid.c make it compile with !
Subsystems (3)
hi list,
i notice that you can not compile the megaraid driver without proc. some shifting of #ifdef prevent some 'unsed XY' warnings. note that are 2 patchs 1. megaraid.c 2. megaraid.h.
re,
wh
Signed-off-by walter harms <[email protected]>
drivers/scsi/megaraid.c renamed from drivers/scsi/megaraid.c.bak +14 -3
@@ -3180,6 +3180,15 @@ return len; } +#else /* !PROC */ + +static void +mega_create_proc_entry (int index,struct proc_dir_entry *parent) +{ +while (0 ); +} + +#endif
@@ -4343,7 +4352,7 @@return 0 ; } - +#ifdef CONFIG_PROC_FS /** * mega_adapinq() * @adapter - pointer to our soft state
@@ -4448,6 +4457,7 @@ return rval; } +#endif /**
@@ -4470,7 +4480,7 @@ {Scsi_Cmnd *scmd;struct scsi_device *sdev; -unsigned long flags =0 ; +// unsigned long flags = 0; scb_t *scb;int rval;
@@ -4965,8 +4975,9 @@ {struct Scsi_Host *host =pci_get_drvdata (pdev);adapter_t *adapter = (adapter_t *)host->hostdata; +#ifdef CONFIG_PROC_FS char buf[12 ] = {0 }; - +#endif scsi_remove_host (host);__megaraid_shutdown (adapter);
drivers/scsi/megaraid.h renamed from drivers/scsi/megaraid.h.bak +5 -2
@@ -1001,7 +1001,6 @@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,8 @@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,11 +1040,13 @@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 *,Scsi_Cmnd *,int ,int );
drivers/scsi/megaraid.c renamed from drivers/scsi/megaraid.c.bak +14 -3
@@ -3180,6 +3180,15 @@ return len; } +#else /* !PROC */ + +static void +mega_create_proc_entry (int index,struct proc_dir_entry *parent) +{ +while (0 ); +} + +#endif
@@ -4343,7 +4352,7 @@return 0 ; } - +#ifdef CONFIG_PROC_FS /** * mega_adapinq() * @adapter - pointer to our soft state
@@ -4448,6 +4457,7 @@ return rval; } +#endif /**
@@ -4470,7 +4480,7 @@ {Scsi_Cmnd *scmd;struct scsi_device *sdev; -unsigned long flags =0 ; +// unsigned long flags = 0; scb_t *scb;int rval;
@@ -4965,8 +4975,9 @@ {struct Scsi_Host *host =pci_get_drvdata (pdev);adapter_t *adapter = (adapter_t *)host->hostdata; +#ifdef CONFIG_PROC_FS char buf[12 ] = {0 }; - +#endif scsi_remove_host (host);__megaraid_shutdown (adapter);
drivers/scsi/megaraid.h renamed from drivers/scsi/megaraid.h.bak +5 -2
@@ -1001,7 +1001,6 @@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,8 @@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,11 +1040,13 @@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 *,Scsi_Cmnd *,int ,int );
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors