From: Arjan van de Ven <arjanv-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Xose Vazquez Perez <xose-39ZsbGIQGT7e5aOfsHch1g@public.gmane.org>
Cc: linux-aacraid-devel-XtjxT7Vmt5ZskZv2Y/7f+AC/G2K4zDHf@public.gmane.org,
linux-scsi <linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] 1.1.4-2313 aacraid driver for LiNUX 2.4.25-pre4
Date: Wed, 7 Jan 2004 19:42:22 +0100 [thread overview]
Message-ID: <20040107184222.GA14191@devserv.devel.redhat.com> (raw)
In-Reply-To: <3FFC4C09.3020103-39ZsbGIQGT7e5aOfsHch1g@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2295 bytes --]
On Wed, Jan 07, 2004 at 07:28:01PM +0100, Xose Vazquez Perez wrote:
> hi,
>
> here goes latest aacraid driver, it was sent for 2.4 kernel
> inclusion. CHANGELOG has an extensive list of changes.
+#define aac_spin_lock_irqsave(host_lock, cpu_flags) spin_lock_irqsave(&io_request_lock, cpu_flags)
+#define aac_spin_lock_irq(host_lock) spin_lock_irq(&io_request_lock)
+#define aac_spin_unlock_irqrestore(host_lock, cpu_flags) spin_unlock_irqrestore(&io_request_lock, cpu_flags)
+#define aac_spin_unlock_irq(host_lock) spin_unlock_irq(&io_request_lock)
ewwww
+#ifdef AAC_DETAILED_STATUS_INFO
static char *aac_get_status_string(u32 status);
+#endif
there's no need for ifdefs around prototypes, they just clutter the code
+ * Only enable DAC mode if the dma_addr_t is larger than 32
+ * bit addressing, and we have more than 32 bit addressing worth of
+ * memory and if the controller supports 64 bit scatter gather elements.
+ */
+ if( (sizeof(dma_addr_t) > 4) && (num_physpages > (0xFFFFFFFFULL >> PAGE_SHIFT)) && (dev->adapter_info.options &
+ dev->dac_support = 1;
}
that looks broken, at least drivers should never need to check num_physpages etc etc
+static void get_sd_devname(int disknum, char *buffer)
+{
+.....
why on earth is that in a driver?????
+# define strlcpy(s1,s2,n) strncpy(s1,s2,n);s1[n-1]='\0'
this is very broken; consider
if (foo)
bar(foo);
else
strlcpy(foo,bar,3);
+# ifndef min
+# define min(a,b) (((a)<(b))?(a):(b))
+# endif
that is quite broken..... arguments get evaluated multiple times
struct fib_ioctl
{
- char *fibctx;
- int wait;
- char *fib;
+ u32 fibctx;
+ s32 wait;
+#if (defined(__x86_64__))
+ u64 fib;
+#else
+ u32 fib;
+#endif
};
that looks really fishy; __x86_64__ most certainly is not the only 64 bit architecture out there
this driver "update" appears to intruduce quite a few nastys... doesn't look like a good idea to me
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2004-01-07 18:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-07 18:12 [PATCH] 1.1.4-2313 aacraid driver for LiNUX 2.4.25-pre4 Xose Vazquez Perez
[not found] ` <3FFC4C09.3020103-39ZsbGIQGT7e5aOfsHch1g@public.gmane.org>
2004-01-07 18:42 ` Arjan van de Ven [this message]
2004-01-07 21:00 ` Christoph Hellwig
2004-01-08 15:58 ` Xose Vazquez Perez
[not found] ` <3FFD7E3A.3010808-39ZsbGIQGT7e5aOfsHch1g@public.gmane.org>
2004-01-08 16:04 ` Christoph Hellwig
2004-01-08 16:36 ` scsi drivers was " Xose Vazquez Perez
-- strict thread matches above, loose matches on Subject: below --
2004-01-07 20:12 Salyzyn, Mark
[not found] ` <C2CB6D8BA015124783C0EB9B33D24FFD047F90-b070rUroPABnRV3uFxCcHmPGcypz5H/V@public.gmane.org>
2004-01-07 20:51 ` Arjan van de Ven
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=20040107184222.GA14191@devserv.devel.redhat.com \
--to=arjanv-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=linux-aacraid-devel-XtjxT7Vmt5ZskZv2Y/7f+AC/G2K4zDHf@public.gmane.org \
--cc=linux-scsi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=xose-39ZsbGIQGT7e5aOfsHch1g@public.gmane.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.