Remove more code from bnx2.c and 3c359.c.
authorlxoliva <lxoliva@559672b5-ba27-0410-b829-e8f1faed8b1b>
Thu, 19 Mar 2009 16:06:39 +0000 (16:06 +0000)
committerlxoliva <lxoliva@559672b5-ba27-0410-b829-e8f1faed8b1b>
Thu, 19 Mar 2009 16:06:39 +0000 (16:06 +0000)
Remove comments from irda-usb.c and myri10ge.c.
Accept false positives in atmel.c
Adjust deblobbing of ipw2100.c.  Add false positives in it.
Undefine firmware size in tda10048.c
Fix escaped end-of-line and parenthesize bnx2x_init_block.
Remove bogus } in deblobbing of ael1002.c.

git-svn-id: http://www.fsfla.org/svn/fsfla/software/linux-libre/scripts@4785 559672b5-ba27-0410-b829-e8f1faed8b1b

deblob-2.6.28
deblob-check

index f90c3da5cc2ac0e7026a1b3c6b6002461d5a9fa3..6bee4bd5d1764144d059ef248ca5aeacdf3e1d48 100755 (executable)
@@ -667,6 +667,8 @@ clean_kconfig drivers/media/dvb/frontends/Kconfig 'DVB_SP887X'
 clean_mk CONFIG_DVB_SP887X drivers/media/dvb/frontends/Makefile
 
 announce DVB_TDA10048 - "Philips TDA10048HN based"
+undefine_macro 'TDA10048_DEFAULT_FIRMWARE_SIZE' 0 \
+  'removed non-Free firmware size' drivers/media/dvb/frontends/tda10048.c
 undefault_firmware 'TDA10048' drivers/media/dvb/frontends/tda10048.c
 reject_firmware drivers/media/dvb/frontends/tda10048.c
 clean_kconfig drivers/media/dvb/frontends/Kconfig 'DVB_TDA10048'
@@ -888,8 +890,8 @@ clean_sed '
 /^#include "bnx2x_init\.h"/,/^$/{
   /^$/i\
 #define bnx2x_init_block(bp, start, end) \\\
-  return printk(KERN_ERR PFX "%s: Missing Free firmware\\n", bp->dev->name),\
-        -EINVAL;
+  return (printk(KERN_ERR PFX "%s: Missing Free firmware\\n", bp->dev->name),\\\
+         -EINVAL)
 }' drivers/net/bnx2x_main.c 'report missing Free firmware'
 clean_kconfig drivers/net/Kconfig 'BNX2X'
 clean_mk CONFIG_BNX2X drivers/net/Makefile
@@ -906,7 +908,6 @@ reject_firmware drivers/net/cxgb3/cxgb3_main.c
 clean_sed '
 /^static int ael2005_setup_\(sr\|twinax\)_edc([^;]*$/,/^}$/{
   /for.*ARRAY_SIZE(\(sr\|twinax\)_edc)/i\
-}\
        CH_ERR(phy->adapter, "Missing Free firwmare\\n");\
        err = -EINVAL;
 }' drivers/net/cxgb3/ael1002.c 'report missing Free firmware'
@@ -1099,7 +1100,7 @@ announce 3C359 - "3Com 3C359 Token Link Velocity XL adapter"
 clean_file drivers/net/tokenring/3c359_microcode.h
 clean_sed '
 /^\(static int \)\?xl_hw_reset([^;]*$/,/^}/{
-  /printk.*Uploading Microcode/i\
+  /start = .*mc_size/i\
                printk(KERN_ERR "%s: Missing Free firmware\\n", dev->name);\
                return -EINVAL;
 }' drivers/net/tokenring/3c359.c 'report missing Free firmware'
index 8fc7f1514a6b9ff66790ca606d51ec9622abd70f..44ae2cd9d74ec6c76a1e8a73c02ff004de3f1afc 100755 (executable)
@@ -955,6 +955,7 @@ set_except () {
 
     blob 'static \(u8\|const u32\|struct fw_info\) bnx2_\(\(COM\|CP\|[RT]XP\|TPAT\)_b0[69]Fw\(Text\|Data\|Rodata\)\|\(xi_\)\?rv2p_proc[12]\|\(com\|cp\|[rt]xp\|tpat\)_fw_0[69]\)\(\[[^]};]*\]\)* = {[^}]*};\([\n][\n]*static \(u8\|const u32\|struct fw_info\) bnx2_\(\(COM\|CP\|[RT]XP\|TPAT\)_b0[69]Fw\(Text\|Data\|Rodata\)\|\(xi_\)\?rv2p_proc[12]\|\(com\|cp\|[rt]xp\|tpat\)_fw_0[69]\)\(\[[^]};]*\]\)* = {[^}]*};\)*' 'drivers/net/bnx2_fw2\?.h'
     blob '#include "bnx2_fw2\?\.h"\([\n][\n]*#include "bnx2_fw2\?\.h"\)*' drivers/net/bnx2.c
+    blob 'static void[\n]load_rv2p_fw([^{]*)[\n]{[\n]\([^}]\|[^\n}]}*\)*[\n]}' drivers/net/bnx2.c
     blob 'static int[\n]bnx2_init_cpus([^{]*)[\n]{[\n]\([^}]\|[^\n}]}*\)*[\n]}' drivers/net/bnx2.c
 
     # init_data_e1h? might actually be just data, but it doesn't
@@ -1000,7 +1001,7 @@ set_except () {
 
     blob 'static const u8 microcode\[\] = {[^}]*} *;' drivers/net/tokenring/3c359_microcode.h
     blob '#include "3c359_microcode\.h"' drivers/net/tokenring/3c359.c
-    blobna '\(printk(KERN_INFO "3C359: Uploading Microcode: ");[\n     ]*\)\?for ([^{]*\(mc_size[^{]*) {[^}]*writeb(microcode\[\|) {[^}]*writeb(microcode\[mc_size\)[^}]*}\([\n][      ]*printk[^\n]*;[\n      ]*for ([^{]*\(mc_size[^{]*) {[^}]*writeb(microcode\[\|) {[^}]*writeb(microcode\[mc_size\)[^}]*}\)*' drivers/net/tokenring/3c359.c
+    blobna '[/][*][    \n*]* Now to write the microcode\([^/]\|[^*/][/]*\)*[*][/][\n   ]*start = (0xFFFF - (mc_size)[^;]*;[\n  ]*[/][*]\([^/]\|[^*/][/]*\)*[*][/][\n   ]*printk(KERN_INFO "3C359: Uploading Microcode: ");[\n  ]*for ([^{]*\(mc_size[^{]*) {[^}]*writeb(microcode\[\|) {[^}]*writeb(microcode\[mc_size\)[^}]*}\([\n][  ]*printk[^\n]*;[\n      ]*for ([^{]*\(mc_size[^{]*) {[^}]*writeb(microcode\[\|) {[^}]*writeb(microcode\[mc_size\)[^}]*}\)*' drivers/net/tokenring/3c359.c
 
     blobname 'tr_smctr\.bin' drivers/net/tokenring/smctr.c
 
@@ -1107,20 +1108,25 @@ set_except () {
     blobname 'dvb-fe-xc5000-1\.1\.fw' drivers/media/common/tuners/xc5000.c
 
     blobname '4210\(100[12]\|%4X\)\.sb' drivers/net/irda/irda-usb.c
+    blobna '[/][*][    \n*]* Known firmware\([^/]\|[^*/][/]*\)*\(STIR421x\|4210\(100[12]\|%4X\)\.sb\)\([^/]\|[^*/][/]*\)*[*][/]' drivers/net/irda/irda-usb.c
 
     blobname 'myri10ge_\(rss_\)\?ethp\?_z8e\.dat' drivers/net/myri10ge.c
+    blobna 'If the driver can neither enable ECRC\([^/]\|[^*/][/]*\)*myri10ge_\(rss_\)\?ethp\?_z8e\.dat\([^/]\|[^*/][/]*\)*[*][/]' drivers/net/myri10ge.c
 
     blobname 'spider_fw\.bin' drivers/net/spider_net.h
 
     blobname 'tms380tr\.bin' drivers/net/tokenring/tms380tr.c
 
     blobname 'atmel_at76c50\(2\([de]\|_3com\)\?\|4a\?\(_2958\)\?\|6\)\(\.bin\)\?' drivers/net/wireless/atmel.c
+    accept '   *priv->firmware = \(NULL\|new_firmware\);' drivers/net/wireless/atmel.c
 
     blobname 'b43[^/]*[/]\(%s\|ucode\(5\|1[13]\)\|pcm5\|[abn]0g[01]initvals\(5\|1[13]\)\)\.fw' 'drivers/net/wireless/b43\(legacy\)\?/main.c'
 
-    blob '#define IPW2100_FW_\(\(MAJOR\|MINOR\)\(_VERSION\|(x)\)\|VERSION\) \([^\n]\|[\\][\n]\)*\([\n][\n]*#define IPW2100_FW_\(\(MAJOR\|MINOR\)\(_VERSION\|(x)\)\|VERSION\) \([^\n]\|[\\][\n]\)*\)*' drivers/net/wireless/ipw2100.c
+    blob '#define IPW2100_FW_\(\(MINOR_\)\?VERSION\|\(MAJOR\|MINOR\)(x)\)\([^\n]*\\[\n]\)*[^\n]*\([\n][\n]*#define IPW2100_FW_\(\(MINOR_\)\?VERSION\|\(MAJOR\|MINOR\)(x)\)\([^\n]*\\[\n]\)*[^\n]*\)*' drivers/net/wireless/ipw2100.c
     blobname 'ipw2100-\("\([^"\n]\|[\\][\n]\)*"\([^"]\|[\\]["]\)*\)\+' drivers/net/wireless/ipw2100.c
     blobname '__stringify(IPW2100_FW_MINOR_VERSION)' drivers/net/wireless/ipw2100.c
+    accept ' *Portions of ipw2100_\(do_\)\?mod_firmware_load[,         ]*\(ipw2100_\(do_\)\?mod_firmware_load[,        and\n]*\)*' drivers/net/wireless/ipw2100.c
+    accept '\(static int \|    \)ipw2100_mod_firmware_load(' drivers/net/wireless/ipw2100.c
 
     accept '[/][*] Call this function from process context\([^/]\|[^*/][/]*\)*request_firmware' drivers/net/wireless/ipw2200.c
     blobname 'ipw2200-\(i\?bss\|sniffer\)\.fw' drivers/net/wireless/ipw2200.c