public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@fs.tum.de>
To: matthew@wil.cx, linux-scsi@vger.kernel.org,
	James.Bottomley@SteelEye.com, linux-kernel@vger.kernel.org
Subject: [patch] sym53c8xx_2 uses SYM_MEM_CLUSTER_SHIFT before its #define'd
Date: Sat, 7 Feb 2004 21:30:58 +0100	[thread overview]
Message-ID: <20040207203058.GA7388@fs.tum.de> (raw)

When compiling 2.6.2-mm1 (this problem doesn't seem to be specific
to -mm) with -Wundef I got many of the following warnings:

<--  snip  -->

...
In file included from drivers/scsi/sym53c8xx_2/sym_glue.h:446,
                 from drivers/scsi/sym53c8xx_2/sym_fw.c:56:
drivers/scsi/sym53c8xx_2/sym_hipd.h:186:30: 
warning: "SYM_MEM_CLUSTER_SIZE" is not defined
...

<--  snip  -->

This seems to be a bug:
SYM_MEM_CLUSTER_SIZE is used before it's #define'd.

The patch below fixes this issue.

cu
Adrian

--- linux-2.6.2-mm1/drivers/scsi/sym53c8xx_2/sym_hipd.h.old	2004-02-07 21:20:04.000000000 +0100
+++ linux-2.6.2-mm1/drivers/scsi/sym53c8xx_2/sym_hipd.h	2004-02-07 21:20:54.000000000 +0100
@@ -171,6 +171,15 @@
 #define	SYM_CONF_MIN_ASYNC (40)
 
 /*
+ *  Shortest memory chunk is (1<<SYM_MEM_SHIFT), currently 16.
+ *  Actual allocations happen as SYM_MEM_CLUSTER_SIZE sized.
+ *  (1 PAGE at a time is just fine).
+ */
+#define SYM_MEM_SHIFT   4
+#define SYM_MEM_CLUSTER_SIZE    (1UL << SYM_MEM_CLUSTER_SHIFT)
+#define SYM_MEM_CLUSTER_MASK    (SYM_MEM_CLUSTER_SIZE-1)
+
+/*
  *  Number of entries in the START and DONE queues.
  *
  *  We limit to 1 PAGE in order to succeed allocation of 
@@ -1322,14 +1331,6 @@
  *  MEMORY ALLOCATOR.
  */
 
-/*
- *  Shortest memory chunk is (1<<SYM_MEM_SHIFT), currently 16.
- *  Actual allocations happen as SYM_MEM_CLUSTER_SIZE sized.
- *  (1 PAGE at a time is just fine).
- */
-#define SYM_MEM_SHIFT	4
-#define SYM_MEM_CLUSTER_SIZE	(1UL << SYM_MEM_CLUSTER_SHIFT)
-#define SYM_MEM_CLUSTER_MASK	(SYM_MEM_CLUSTER_SIZE-1)
 
 /*
  *  Link between free memory chunks of a given size.

             reply	other threads:[~2004-02-07 20:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-07 20:30 Adrian Bunk [this message]
2004-02-07 20:45 ` [patch] sym53c8xx_2 uses SYM_MEM_CLUSTER_SHIFT before its #define'd Matthew Wilcox

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=20040207203058.GA7388@fs.tum.de \
    --to=bunk@fs.tum.de \
    --cc=James.Bottomley@SteelEye.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=matthew@wil.cx \
    /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