1. 13 Jul, 2012 4 commits
    • Erik Hugne's avatar
      tipc: simplify print buffer handling in tipc_printf · e2dbd601
      Erik Hugne authored
      tipc_printf was previously used both to construct debug traces
      and to append data to buffers that should be sent over netlink
      to the tipc-config application.  A global print_buffer was
      used to format the string before it was copied to the actual
      output buffer.  This could lead to concurrent access of the
      global print_buffer, which then had to be lock protected.
      This is simplified by changing tipc_printf to append data
      directly to the output buffer using vscnprintf.
      
      With the new implementation of tipc_printf, there is no longer
      any risk of concurrent access to the internal log buffer, so
      the lock (and the comments describing it) are no longer
      strictly necessary.  However, there are still a few functions
      that do grab this lock before resizing/dumping the log
      buffer.  We leave the lock, and these functions untouched since
      they will be removed with a subsequent commit that drops the
      deprecated log buffer handling code
      Signed-off-by: default avatarErik Hugne <erik.hugne@ericsson.com>
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      e2dbd601
    • Paul Gortmaker's avatar
      tipc: simplify link_print by divorcing it from using tipc_printf · 5deedde9
      Paul Gortmaker authored
      To pave the way for a pending cleanup of tipc_printf, and
      removal of struct print_buf entirely, we make that task simpler
      by converting link_print to issue its messages with standard
      printk infrastructure.  [Original idea separated from a larger
      patch from Erik Hugne <erik.hugne@ericsson.com>]
      
      Cc: Erik Hugne <erik.hugne@ericsson.com>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      5deedde9
    • Erik Hugne's avatar
      tipc: remove TIPC packet debugging functions and macros · 568fc588
      Erik Hugne authored
      The link queue traces and packet level debug functions served
      a purpose during early development, but are now redundant
      since there are other, more capable tools available for
      debugging at the packet level.
      
      The TIPC_DEBUG Kconfig option is removed since it does not
      provide any extra debugging features anymore.
      
      This gets rid of a lot of tipc_printf usages, which will
      make the pending cleanup work of that function easier.
      Signed-off-by: default avatarErik Hugne <erik.hugne@ericsson.com>
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      568fc588
    • Erik Hugne's avatar
      tipc: use standard printk shortcut macros (pr_err etc.) · 2cf8aa19
      Erik Hugne authored
      All messages should go directly to the kernel log.  The TIPC
      specific error, warning, info and debug trace macro's are
      removed and all references replaced with pr_err, pr_warn,
      pr_info and pr_debug.
      
      Commonly used sub-strings are explicitly declared as a const
      char to reduce .text size.
      
      Note that this means the debug messages (changed to pr_debug),
      are now enabled through dynamic debugging, instead of a TIPC
      specific Kconfig option (TIPC_DEBUG).  The latter will be
      phased out completely
      Signed-off-by: default avatarErik Hugne <erik.hugne@ericsson.com>
      Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
      [PG: use pr_fmt as suggested by Joe Perches <joe@perches.com>]
      Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
      2cf8aa19
  2. 12 Jul, 2012 2 commits
  3. 11 Jul, 2012 34 commits