From: Oliver W. <oli...@ol...> - 2012-05-15 19:17:46
|
On 05/15/2012 09:00 PM, Jim Cromie wrote: >> >> Im attaching a test script Ive been using to bang on the driver >> Dot it into your shell, and go from there. >> How about putting the script into a 'scripts' sub-dir in the tree ? For me that's fine. Cheers, Oliver > oof. now attached. > > > ieee80211 phy0: device now idle |
From: Larry F. <Lar...@lw...> - 2012-05-15 20:02:31
|
On 05/15/2012 02:17 PM, Oliver Winker wrote: > On 05/15/2012 09:00 PM, Jim Cromie wrote: >>> >>> Im attaching a test script Ive been using to bang on the driver >>> Dot it into your shell, and go from there. >>> > > How about putting the script into a 'scripts' sub-dir in the tree ? For > me that's fine. Sounds good to me. Larry |
From: Jim C. <jim...@gm...> - 2012-05-15 20:47:36
|
hey, this one seems to have problems: Ive gotten a couple null-pointer oopses. common.c: set debug-flags by symbolic names I'll look into it. |
From: Oliver W. <oli...@ol...> - 2012-05-17 12:10:30
|
Hi Jim, Larry, Ok, the series and pushed! Thanks a lot again for this heap of work :)!! There are several changes regarding builds and some functional fixes. You'll see in the commits messages. I had also to revert b4661bf5 (CONFIG_PCI vs. CONFIG_ACX_MAC80211_PCI, see commit message). Maybe a runtime check would still be better here. The sparse checks are interesting. I'll have also a look at some one time. There regarding debugfs.c: There were warnings, which have been fixed in 740058 and then seem to have been rolled back again due to sparse warnings. I checked those and, at least from my perspective, could fix them for both gcc and sparse - see patch below. Is this ok to commit, or is there something, that missed maybe ? Best Regards, Oliver --- > CC [M] /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.o > /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c: In function ‘acx_dbgfs_open’: > /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c:61:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] > /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c: In function ‘acx_dbgfs_write’: > /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c:90:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] > /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c: At top level: > /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c:117:2: warning: initialization from incompatible pointer type [enabled by default] > /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c:117:2: warning: (near initialization for ‘acx_fops.write’) [enabled by default] > /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c: In function ‘acx_debugfs_add_adev’: > /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c:158:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] --- Then I get also still these sparse warning in debugfs.c: --- > CHECK /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c > /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c:117:27: warning: incorrect type in initializer (different type sizes) > /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c:117:27: expected long ( *write )( ... ) > /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c:117:27: got int ( static [toplevel] *<noident> )( ... ) --- This patch seems to satisfy both, gcc and sparse for x86_32 and x86_64: --- > diff --git a/debugfs.c b/debugfs.c > index cd403bc..d6bbe7e 100644 > --- a/debugfs.c > +++ b/debugfs.c > @@ -58,7 +58,7 @@ BUILD_BUG_DECL(dbgfs_files__VS__enum_REG_DOMAIN, > > static int acx_dbgfs_open(struct inode *inode, struct file *file) > { > - int fidx = (int) inode->i_private; > + int fidx = (uintptr_t) inode->i_private; > struct acx_device *adev = (struct acx_device *) > file->f_path.dentry->d_parent->d_inode->i_private; > > @@ -83,11 +83,11 @@ static int acx_dbgfs_open(struct inode *inode, struct file *file) > return single_open(file, acx_proc_show_funcs[fidx], adev); > } > > -static int acx_dbgfs_write(struct file *file, const char __user *buf, > +static ssize_t acx_dbgfs_write(struct file *file, const char __user *buf, > size_t count, loff_t *ppos) > { > /* retrieve file-index and adev from private fields */ > - int fidx = (int) file->f_path.dentry->d_inode->i_private; > + int fidx = (uintptr_t) file->f_path.dentry->d_inode->i_private; > struct acx_device *adev = (struct acx_device *) > file->f_path.dentry->d_parent->d_inode->i_private; > > @@ -155,7 +155,7 @@ int acx_debugfs_add_adev(struct acx_device *adev) > /* save file-index in in file's private field */ > file = debugfs_create_file(dbgfs_files[i], fmode, > acx_dbgfs_devdir, > - (void*) i, &acx_fops); > + (void *) (uintptr_t) i, &acx_fops); > if (!file) > goto fail; > } --- On 05/15/2012 09:50 AM, Jim Cromie wrote: > hi Oliver, Larry, > > heres another batch of merges, sparse fixes, comment wraps and grammar > fixes, and various other stuff. Another chance to amortize your testing efforts over more changes ;-) > > > common.c | 188 +++++++++++++++++++---------- > debugfs.c | 26 ++-- > inlines.h | 75 +++++------- > mem.c | 55 +++++---- > mem.h | 4 +- > merge.c | 408 +++++++++++++++++++++++++++++++------------------------------- > merge.h | 204 +++++++++++++++++++++++-------- > pci.c | 23 ++-- > 8 files changed, 569 insertions(+), 414 deletions(-) > |
From: Larry F. <Lar...@lw...> - 2012-05-17 14:43:55
|
On 05/17/2012 07:10 AM, Oliver Winker wrote: > Hi Jim, Larry, > > Ok, the series and pushed! Thanks a lot again for this heap of work :)!! > > There are several changes regarding builds and some functional fixes. > You'll see in the commits messages. > > I had also to revert b4661bf5 (CONFIG_PCI vs. CONFIG_ACX_MAC80211_PCI, > see commit message). Maybe a runtime check would still be better here. > > The sparse checks are interesting. I'll have also a look at some one time. > > There regarding debugfs.c: > > There were warnings, which have been fixed in 740058 and then seem to > have been rolled back again due to sparse warnings. > > I checked those and, at least from my perspective, could fix them for > both gcc and sparse - see patch below. > > Is this ok to commit, or is there something, that missed maybe ? > > Best Regards, Oliver > > --- >> CC [M] /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.o >> /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c: In function ‘acx_dbgfs_open’: >> /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c:61:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] >> /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c: In function ‘acx_dbgfs_write’: >> /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c:90:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] >> /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c: At top level: >> /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c:117:2: warning: initialization from incompatible pointer type [enabled by default] >> /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c:117:2: warning: (near initialization for ‘acx_fops.write’) [enabled by default] >> /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c: In function ‘acx_debugfs_add_adev’: >> /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c:158:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] > --- > > Then I get also still these sparse warning in debugfs.c: > --- >> CHECK /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c >> /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c:117:27: warning: incorrect type in initializer (different type sizes) >> /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c:117:27: expected long ( *write )( ... ) >> /media/OE/Devel/Git-acx-mac80211/acx-mac80211/debugfs.c:117:27: got int ( static [toplevel] *<noident> )( ... ) > --- > > This patch seems to satisfy both, gcc and sparse for x86_32 and x86_64: > --- >> diff --git a/debugfs.c b/debugfs.c >> index cd403bc..d6bbe7e 100644 >> --- a/debugfs.c >> +++ b/debugfs.c >> @@ -58,7 +58,7 @@ BUILD_BUG_DECL(dbgfs_files__VS__enum_REG_DOMAIN, >> >> static int acx_dbgfs_open(struct inode *inode, struct file *file) >> { >> - int fidx = (int) inode->i_private; >> + int fidx = (uintptr_t) inode->i_private; >> struct acx_device *adev = (struct acx_device *) >> file->f_path.dentry->d_parent->d_inode->i_private; >> >> @@ -83,11 +83,11 @@ static int acx_dbgfs_open(struct inode *inode, struct file *file) >> return single_open(file, acx_proc_show_funcs[fidx], adev); >> } >> >> -static int acx_dbgfs_write(struct file *file, const char __user *buf, >> +static ssize_t acx_dbgfs_write(struct file *file, const char __user *buf, >> size_t count, loff_t *ppos) >> { >> /* retrieve file-index and adev from private fields */ >> - int fidx = (int) file->f_path.dentry->d_inode->i_private; >> + int fidx = (uintptr_t) file->f_path.dentry->d_inode->i_private; >> struct acx_device *adev = (struct acx_device *) >> file->f_path.dentry->d_parent->d_inode->i_private; >> >> @@ -155,7 +155,7 @@ int acx_debugfs_add_adev(struct acx_device *adev) >> /* save file-index in in file's private field */ >> file = debugfs_create_file(dbgfs_files[i], fmode, >> acx_dbgfs_devdir, >> - (void*) i,&acx_fops); >> + (void *) (uintptr_t) i,&acx_fops); >> if (!file) >> goto fail; >> } > --- > I had noticed the warnings from debugfs on x86_64 and prepared a patch. As I decided that you had enough to test and merge, I have been holding it back. Your solution looks like mine with one exception. In acx-debugfs_add_adev(), I changed "i" to a long rather than using the uintptr_t cast. AFAIK, the solutions are equal. I purchased a DWL-120+ on E-bay yesterday. When it arrives, I hope that turns out to be an acx100. The one labeled as DWL-120 that I asked you about turns out to use at76c50x-usb as a driver. It wasn't a total loss, as that driver crashes my kernels, thus it needs some work. I hope to get to it someday. Thanks for your efforts on merging the code. |