public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Luben Tuikov <luben_tuikov@adaptec.com>
To: Andi Kleen <ak@muc.de>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [ANNOUNCE] Adaptec SAS/SATA device driver [17/27]
Date: Thu, 17 Feb 2005 16:16:44 -0500	[thread overview]
Message-ID: <421509BC.3090708@adaptec.com> (raw)
In-Reply-To: <m14qgadhdg.fsf@muc.de>

On 02/17/05 16:08, Andi Kleen wrote:
> Luben Tuikov <luben_tuikov@adaptec.com> writes:
> 
> 
> 
>>+/********************************** Misc Macros *******************************/
> 
> 
> [... lots of code...]
> 
> What are they all good for? As far as I can see every one of them
> duplicates or wraps something Linux already has.
> 
> How about you just use the native Linux functions directly?
> 
>  +
> 
>>+#if KDB_ENABLE
>>+#define ASSERT(expression)						\
>>+	if (!(expression)) {						\
>>+		printk("assertion failed: %s, file: %s, line: %d\n",	\
>>+			#expression, __FILE__, __LINE__);		\
>>+		KDB_ENTER();						\
>>+	}
>>+#else
>>+#define ASSERT(expression)						\
>>+	if (!(expression)) {						\
>>+		panic("assertion failed: %s, file: %s, line: %d\n",	\
>>+			#expression, __FILE__, __LINE__);		\
>>+	}
>>+#endif
> 
> 
> That's called BUG_ON in Linux land.

Hi Andi,

Yes I agree.  As I didn't write this code I hadn't noticed this.
 
> 
>>+#ifndef list_for_each_entry_safe
> 
> 
> [...]
> 
> Such compat code does not really belong into a 2.6 driver.

Yes, that's true.  The driver was written to compile for 2.4 as well
as for 2.6.
 
> 
>>+
>>+#define list_move_all(to_list, from_list)				\
> 
> 
> [...]
> 
> And this should be put into list.h

Yes, I agree.

	Luben

 

  reply	other threads:[~2005-02-17 21:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-17 17:37 [ANNOUNCE] Adaptec SAS/SATA device driver [17/27] Luben Tuikov
2005-02-17 21:08 ` Andi Kleen
2005-02-17 21:16   ` Luben Tuikov [this message]
2005-02-17 22:03     ` Jeff Garzik

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=421509BC.3090708@adaptec.com \
    --to=luben_tuikov@adaptec.com \
    --cc=ak@muc.de \
    --cc=linux-scsi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox