All of lore.kernel.org
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] inux-2.6.16.16/drivers/scsi/megaraid.c make it compile with !
Date: Fri, 19 May 2006 16:00:15 +0000	[thread overview]
Message-ID: <446DEB8F.1040605@bfs.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 2573 bytes --]

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 <wharms@bfs.de>

--- linux-2.6.16.16/drivers/scsi/megaraid.c.bak	2006-05-18 
21:57:57.720021832 +0200
+++ linux-2.6.16.16/drivers/scsi/megaraid.c	2006-05-18 
23:10:03.675376656 +0200
@@ -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);
--- linux-2.6.16.16/drivers/scsi/megaraid.h.bak	2006-05-18 
23:10:32.693965160 +0200
+++ linux-2.6.16.16/drivers/scsi/megaraid.h	2006-05-18 
23:11:52.696802880 +0200
@@ -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);

[-- Attachment #2: megaraid.c.diff --]
[-- Type: text/x-patch, Size: 929 bytes --]

--- linux-2.6.16.16/drivers/scsi/megaraid.c.bak	2006-05-18 21:57:57.720021832 +0200
+++ linux-2.6.16.16/drivers/scsi/megaraid.c	2006-05-18 23:10:03.675376656 +0200
@@ -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);

[-- Attachment #3: megaraid.h.diff --]
[-- Type: text/x-patch, Size: 1367 bytes --]

--- linux-2.6.16.16/drivers/scsi/megaraid.h.bak	2006-05-18 23:10:32.693965160 +0200
+++ linux-2.6.16.16/drivers/scsi/megaraid.h	2006-05-18 23:11:52.696802880 +0200
@@ -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);

[-- Attachment #4: Type: text/plain, Size: 168 bytes --]

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

                 reply	other threads:[~2006-05-19 16:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=446DEB8F.1040605@bfs.de \
    --to=wharms@bfs.de \
    --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.