1. 16 3月, 2010 2 次提交
    • I
      i4l: change magic numbers in Eicon DIVA ISDN driver to symbolic names · 255f5c32
      Ian Munsie 提交于
      Replace references to the '20' magic number found throughout the Eicon
      ISDN driver for the length of the station_id field in the T30_INFO struct
      with the T30_MAX_STATION_ID_LENGTH symbolic constant.
      Signed-off-by: NIan Munsie <imunsie@au.ibm.com>
      Cc: Armin Schindler <mac@melware.de>
      Cc: Karsten Keil <isdn@linux-pingi.de>
      Cc: Stoyan Gaydarov <sgayda2@uiuc.edu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      255f5c32
    • I
      i4l: silence compiler warnings for array access in Eicon DIVA ISDN driver · 8b4017d8
      Ian Munsie 提交于
      When compiling this driver, the compiler throws the following warnings:
      
      drivers/isdn/hardware/eicon/message.c:8426: warning: array subscript is above array bounds
      drivers/isdn/hardware/eicon/message.c:8427: warning: array subscript is above array bounds
      drivers/isdn/hardware/eicon/message.c:8434: warning: array subscript is above array bounds
      drivers/isdn/hardware/eicon/message.c:8435: warning: array subscript is above array bounds
      drivers/isdn/hardware/eicon/message.c:8436: warning: array subscript is above array bounds
      drivers/isdn/hardware/eicon/message.c:8447: warning: array subscript is above array bounds
      
      This arises from the particular semantics the driver is using to write to
      the nlc array (static byte[256]).  The array has a length in byte 0
      followed by a T30_INFO struct starting at byte 1.
      
      The T30_INFO struct has a number of variable length strings after the
      station_id entry, which cannot be explicitly defined in the struct and the
      driver accesses them with an array index to station_id beyond the length
      of station_id.
      
      This patch merely changes the semantics that the driver uses to access the
      entries after the station_id entry to use the original 256 byte nlc array
      taking the offset and length of the station_id entry to calculate where to
      write in the array, thereby silencing the warning.
      Signed-off-by: NIan Munsie <imunsie@au.ibm.com>
      Cc: Armin Schindler <mac@melware.de>
      Cc: Karsten Keil <isdn@linux-pingi.de>
      Cc: Stoyan Gaydarov <sgayda2@uiuc.edu>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b4017d8
  2. 14 1月, 2010 1 次提交
  3. 04 12月, 2009 1 次提交
  4. 05 11月, 2009 2 次提交
  5. 26 7月, 2009 1 次提交
  6. 31 3月, 2009 1 次提交
    • A
      proc 2/2: remove struct proc_dir_entry::owner · 99b76233
      Alexey Dobriyan 提交于
      Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy
      as correctly noted at bug #12454. Someone can lookup entry with NULL
      ->owner, thus not pinning enything, and release it later resulting
      in module refcount underflow.
      
      We can keep ->owner and supply it at registration time like ->proc_fops
      and ->data.
      
      But this leaves ->owner as easy-manipulative field (just one C assignment)
      and somebody will forget to unpin previous/pin current module when
      switching ->owner. ->proc_fops is declared as "const" which should give
      some thoughts.
      
      ->read_proc/->write_proc were just fixed to not require ->owner for
      protection.
      
      rmmod'ed directories will be empty and return "." and ".." -- no harm.
      And directories with tricky enough readdir and lookup shouldn't be modular.
      We definitely don't want such modular code.
      
      Removing ->owner will also make PDE smaller.
      
      So, let's nuke it.
      
      Kudos to Jeff Layton for reminding about this, let's say, oversight.
      
      http://bugzilla.kernel.org/show_bug.cgi?id=12454Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      99b76233
  7. 27 2月, 2009 2 次提交
    • H
      drivers/isdn/hardware/eicon: fix sparse warnings: Should it be static? · 465e9850
      Hannes Eder 提交于
      Impact: Make symbols static.
      
      Fix this sparse warnings:
        drivers/isdn/hardware/eicon/message.c:1197:6: warning: symbol 'connect_req' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:1414:6: warning: symbol 'connect_res' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:1570:6: warning: symbol 'connect_a_res' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:1576:6: warning: symbol 'disconnect_req' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:1631:6: warning: symbol 'disconnect_res' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:1658:6: warning: symbol 'listen_req' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:1707:6: warning: symbol 'info_req' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:1816:6: warning: symbol 'info_res' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:1822:6: warning: symbol 'alert_req' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:1852:6: warning: symbol 'facility_req' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:2602:6: warning: symbol 'facility_res' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:2608:6: warning: symbol 'connect_b3_req' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:2842:6: warning: symbol 'connect_b3_res' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:2957:6: warning: symbol 'connect_b3_a_res' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:2977:6: warning: symbol 'disconnect_b3_req' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:3033:6: warning: symbol 'disconnect_b3_res' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:3089:6: warning: symbol 'data_b3_req' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:3166:6: warning: symbol 'data_b3_res' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:3199:6: warning: symbol 'reset_b3_req' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:3240:6: warning: symbol 'reset_b3_res' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:3264:6: warning: symbol 'connect_b3_t90_a_res' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:3298:6: warning: symbol 'select_b_req' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:8692:6: warning: symbol 'sig_req' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:8792:6: warning: symbol 'send_data' was not declared. Should it be static?
      Signed-off-by: NHannes Eder <hannes@hanneseder.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      465e9850
    • H
      drivers/isdn/hardware/icon: fix sparse warning: cast truncates bits · 215a9c78
      Hannes Eder 提交于
      Fix this sparse warning:
        drivers/isdn/hardware/eicon/debug.c:1201:32: warning: cast truncates bits from constant value (1000 becomes 0)
      Signed-off-by: NHannes Eder <hannes@hanneseder.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      215a9c78
  8. 09 1月, 2009 1 次提交
  9. 16 12月, 2008 1 次提交
    • H
      isdn: eicon: fix sparse warning: make global functions static · 4ee59d54
      Hannes Eder 提交于
      Fix this sparse warnings by making the functions static:
      
        drivers/isdn/hardware/eicon/di.c:356:6: warning: symbol 'isdn_rc' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/di.c:558:6: warning: symbol 'isdn_ind' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:595:6: warning: symbol 'api_parse' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:634:6: warning: symbol 'api_save_msg' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:666:6: warning: symbol 'api_load_msg' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:3417:6: warning: symbol 'manufacturer_req' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:3745:6: warning: symbol 'manufacturer_res' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:4077:6: warning: symbol 'control_rc' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:4743:6: warning: symbol 'data_rc' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:4779:6: warning: symbol 'data_ack' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:4805:6: warning: symbol 'sig_ind' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:6173:6: warning: symbol 'SendInfo' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:6349:6: warning: symbol 'SendMultiIE' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:6468:6: warning: symbol 'nl_ind' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:7250:6: warning: symbol 'get_plci' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:7409:6: warning: symbol 'add_d' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:7427:6: warning: symbol 'add_ai' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:7448:6: warning: symbol 'add_b1' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:7912:6: warning: symbol 'add_b23' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:8709:6: warning: symbol 'nl_req_ncci' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:8731:6: warning: symbol 'send_req' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:8866:6: warning: symbol 'listen_check' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:8909:6: warning: symbol 'IndParse' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:8994:6: warning: symbol 'ie_compare' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:9003:6: warning: symbol 'find_cip' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:9071:6: warning: symbol 'SetVoiceChannel' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:9089:6: warning: symbol 'VoiceChannelOff' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:9102:6: warning: symbol 'AdvCodecSupport' was not declared. Should it be static?
        drivers/isdn/hardware/eicon/message.c:9198:6: warning: symbol 'CodecIdCheck' was not declared. Should it be static?
      Signed-off-by: NHannes Eder <hannes@hanneseder.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4ee59d54
  10. 21 6月, 2008 2 次提交
  11. 11 6月, 2008 1 次提交
  12. 29 4月, 2008 1 次提交
  13. 28 4月, 2008 1 次提交
  14. 07 2月, 2008 3 次提交
  15. 03 2月, 2008 3 次提交
  16. 20 10月, 2007 1 次提交
  17. 11 10月, 2007 1 次提交
    • E
      [NET]: Make /proc/net per network namespace · 457c4cbc
      Eric W. Biederman 提交于
      This patch makes /proc/net per network namespace.  It modifies the global
      variables proc_net and proc_net_stat to be per network namespace.
      The proc_net file helpers are modified to take a network namespace argument,
      and all of their callers are fixed to pass &init_net for that argument.
      This ensures that all of the /proc/net files are only visible and
      usable in the initial network namespace until the code behind them
      has been updated to be handle multiple network namespaces.
      
      Making /proc/net per namespace is necessary as at least some files
      in /proc/net depend upon the set of network devices which is per
      network namespace, and even more files in /proc/net have contents
      that are relevant to a single network namespace.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      457c4cbc
  18. 18 7月, 2007 4 次提交
  19. 09 6月, 2007 1 次提交
  20. 01 6月, 2007 1 次提交
    • S
      isdn: fix section mismatch warnings · 162dd3b9
      Sam Ravnborg 提交于
      Fix the following section mismatch warnings:
      
      WARNING: drivers/isdn/hardware/eicon/divadidd.o(.init.text+0xc4): Section mismatch: reference to .exit.text: (between 'init_module' and 'diddfunc_init')
      WARNING: drivers/isdn/hardware/eicon/divas.o(.init.text+0xf4): Section mismatch: reference to .exit.text:divasfunc_exit (between 'init_module' and 'divasfunc_init')
      WARNING: drivers/isdn/hardware/eicon/divas.o(.init.text+0x10d): Section mismatch: reference to .exit.text:divasfunc_exit (between 'init_module' and 'divasfunc_init')
      WARNING: drivers/isdn/hardware/eicon/divas.o(.init.text+0x148): Section mismatch: reference to .exit.text:divasfunc_exit (between 'init_module' and 'divasfunc_init')
      
      They all point to situation whare a function marked __init calls a function
      marked __exit - but the __exit section may have been discarded.
      
      Note: This warning is generated by a modified copy of modpost in my
            tree. It will soon hit upstearm.
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Karsten Keil <kkeil@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      162dd3b9
  21. 24 5月, 2007 2 次提交
    • A
      drivers/isdn/hardware/eicon/message.c warning fixes · d3c8bdfb
      Andrew Morton 提交于
      Squash these:
      
      drivers/isdn/hardware/eicon/message.c: In function 'api_put':
      drivers/isdn/hardware/eicon/message.c:536: warning: cast from pointer to integer of different size
      drivers/isdn/hardware/eicon/message.c: In function 'plci_free_msg_in_queue':
      drivers/isdn/hardware/eicon/message.c:1035: warning: cast to pointer from integer of different size
      drivers/isdn/hardware/eicon/message.c: In function 'data_b3_req':
      drivers/isdn/hardware/eicon/message.c:3121: warning: cast to pointer from integer of different size
      drivers/isdn/hardware/eicon/message.c:3154: warning: cast to pointer from integer of different size
      drivers/isdn/hardware/eicon/message.c: In function 'callback':
      drivers/isdn/hardware/eicon/message.c:4060: warning: cast to pointer from integer of different size
      drivers/isdn/hardware/eicon/message.c: In function 'nl_ind':
      drivers/isdn/hardware/eicon/message.c:7137: warning: cast from pointer to integer of different size
      
      Cc: Karsten Keil <kkeil@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d3c8bdfb
    • A
      capifunc warning fixes · 241be8d9
      Andrew Morton 提交于
      squish these:
      
      drivers/isdn/hardware/eicon/capifunc.c: In function 'TransmitBufferSet':
      drivers/isdn/hardware/eicon/capifunc.c:192: warning: cast to pointer from integer of different size
      drivers/isdn/hardware/eicon/capifunc.c: In function 'TransmitBufferGet':
      drivers/isdn/hardware/eicon/capifunc.c:197: warning: cast from pointer to integer of different size
      drivers/isdn/hardware/eicon/capifunc.c:198: warning: cast from pointer to integer of different size
      drivers/isdn/hardware/eicon/capifunc.c:200: warning: cast from pointer to integer of different size
      drivers/isdn/hardware/eicon/capifunc.c: In function 'TransmitBufferFree':
      drivers/isdn/hardware/eicon/capifunc.c:205: warning: cast from pointer to integer of different size
      drivers/isdn/hardware/eicon/capifunc.c:206: warning: cast from pointer to integer of different size
      drivers/isdn/hardware/eicon/capifunc.c: In function 'sendf':
      drivers/isdn/hardware/eicon/capifunc.c:304: warning: cast to pointer from integer of different size
      drivers/isdn/hardware/eicon/capifunc.c:304: warning: cast to pointer from integer of different size
      drivers/isdn/hardware/eicon/capifunc.c:321: warning: cast to pointer from integer of different size
      
      Cc: Karsten Keil <kkeil@suse.de>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      241be8d9
  22. 09 5月, 2007 3 次提交
  23. 15 2月, 2007 1 次提交
    • T
      [PATCH] remove many unneeded #includes of sched.h · cd354f1a
      Tim Schmielau 提交于
      After Al Viro (finally) succeeded in removing the sched.h #include in module.h
      recently, it makes sense again to remove other superfluous sched.h includes.
      There are quite a lot of files which include it but don't actually need
      anything defined in there.  Presumably these includes were once needed for
      macros that used to live in sched.h, but moved to other header files in the
      course of cleaning it up.
      
      To ease the pain, this time I did not fiddle with any header files and only
      removed #includes from .c-files, which tend to cause less trouble.
      
      Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
      arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
      allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
      configs in arch/arm/configs on arm.  I also checked that no new warnings were
      introduced by the patch (actually, some warnings are removed that were emitted
      by unnecessarily included header files).
      Signed-off-by: NTim Schmielau <tim@physik3.uni-rostock.de>
      Acked-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      cd354f1a
  24. 13 2月, 2007 3 次提交