From: margitsw@t-online.de (Margit Schubert-While)
To: jgarzik@pobox.com
Cc: netdev@oss.sgi.com, prism54-devel@prism54.org
Subject: [PATCH 2/2 linux-2.6.9-rc3/linux-2.4.28-pre4] prism54 sparse fixes
Date: Sun, 17 Oct 2004 14:08:25 +0200 [thread overview]
Message-ID: <200410101530.13397.margitsw@t-online.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 306 bytes --]
2004-10-17 Margit Schubert-While <margitsw@t-online.de>
* 02_sparse.patch
* On top of Linus's sparse changes, here is a
* fix that further reduces sparse warnings.
We are still left with 2 warnings caused by the
member "data.pointer" in struct "iwreq_data" being
"__user" (from wireless.h).
Margit
[-- Attachment #2: 02_sparse.patch --]
[-- Type: text/x-diff, Size: 2182 bytes --]
diff -Naur linux-2.6.9rc3/drivers/net/wireless/prism54/isl_ioctl.c linux-2.6.9-rc3msw/drivers/net/wireless/prism54/isl_ioctl.c
--- linux-2.6.9rc3/drivers/net/wireless/prism54/isl_ioctl.c 2004-10-09 14:32:52.000000000 +0200
+++ linux-2.6.9-rc3msw/drivers/net/wireless/prism54/isl_ioctl.c 2004-10-09 14:43:06.000000000 +0200
@@ -1524,31 +1524,35 @@
const struct obj_mlme *mlme, int error)
{
union iwreq_data wrqu;
+ char *memptr;
- wrqu.data.pointer = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL);
- if (!wrqu.data.pointer)
+ memptr = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL);
+ if (!memptr)
return;
+ wrqu.data.pointer = memptr;
wrqu.data.length = 0;
- format_event(priv, wrqu.data.pointer, str, mlme, &wrqu.data.length,
+ format_event(priv, memptr, str, mlme, &wrqu.data.length,
error);
- wireless_send_event(priv->ndev, IWEVCUSTOM, &wrqu, wrqu.data.pointer);
- kfree(wrqu.data.pointer);
+ wireless_send_event(priv->ndev, IWEVCUSTOM, &wrqu, memptr);
+ kfree(memptr);
}
static void
send_simple_event(islpci_private *priv, const char *str)
{
union iwreq_data wrqu;
+ char *memptr;
int n = strlen(str);
- wrqu.data.pointer = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL);
- if (!wrqu.data.pointer)
+ memptr = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL);
+ if (!memptr)
return;
BUG_ON(n > IW_CUSTOM_MAX);
+ wrqu.data.pointer = memptr;
wrqu.data.length = n;
- strcpy(wrqu.data.pointer, str);
- wireless_send_event(priv->ndev, IWEVCUSTOM, &wrqu, wrqu.data.pointer);
- kfree(wrqu.data.pointer);
+ strcpy(memptr, str);
+ wireless_send_event(priv->ndev, IWEVCUSTOM, &wrqu, memptr);
+ kfree(memptr);
}
static void
diff -Naur linux-2.6.9rc3/drivers/net/wireless/prism54/prismcompat.h linux-2.6.9-rc3msw/drivers/net/wireless/prism54/prismcompat.h
--- linux-2.6.9rc3/drivers/net/wireless/prism54/prismcompat.h 2004-10-09 14:32:52.000000000 +0200
+++ linux-2.6.9-rc3msw/drivers/net/wireless/prism54/prismcompat.h 2004-10-09 15:20:50.000000000 +0200
@@ -38,6 +38,10 @@
#error Firmware Loading is not configured in the kernel !
#endif
+#ifndef __iomem
+#define __iomem
+#endif
+
#define prism54_synchronize_irq(irq) synchronize_irq(irq)
#define PRISM_FW_PDEV &priv->pdev->dev
[-- Attachment #3: Type: text/plain, Size: 151 bytes --]
_______________________________________________
Prism54-devel mailing list
Prism54-devel@prism54.org
http://prism54.org/mailman/listinfo/prism54-devel
reply other threads:[~2004-10-17 12:08 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=200410101530.13397.margitsw@t-online.de \
--to=margitsw@t-online.de \
--cc=jgarzik@pobox.com \
--cc=netdev@oss.sgi.com \
--cc=prism54-devel@prism54.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;
as well as URLs for NNTP newsgroup(s).