1. 17 9月, 2014 1 次提交
  2. 26 7月, 2014 6 次提交
    • J
      mptfusion: tweak null pointer checks · 9f21316f
      Joe Lawrence 提交于
      Fixes the following smatch warnings:
      
        drivers/message/fusion/mptbase.c:652 mptbase_reply() warn: variable
          dereferenced before check 'reply' (see line 639)
      
            [JL: No-brainer, the enclosing switch statement dereferences
             reply, so we can't get here unless reply is valid.]
      
        drivers/message/fusion/mptsas.c:1255 mptsas_taskmgmt_complete() error:
          we previously assumed 'pScsiTmReply' could be null (see line 1227)
      
            [HCH: Reading the code in mptsas_taskmgmt_complete it's pretty
             obvious that it can't do anything useful if mr/pScsiTmReply are
             NULL, so I suspect it would be best to just return at the
             beginning of the function.
      
             I'd love to understand if it actually could ever be zero, which I
             doubt.  Maybe the LSI people can shed some light on that?]
      
        drivers/message/fusion/mptsas.c:3888 mptsas_not_responding_devices()
          error: we previously assumed 'port_info->phy_info' could be null
          (see line 3875)
      
            [HCH: It's pretty obvious from reading mptsas_sas_io_unit_pg0 that
             we never register a port_info with a NULL phy_info in the lists,
             so all NULL checks on it could be deleted.]
      
        drivers/message/fusion/mptscsih.c:1284 mptscsih_info() error:
          we previously assumed 'h' could be null (see line 1274)
      
            [HCH: shost_priv can't return NULL, so the if (h) should be
             removed.]
      
        drivers/message/fusion/mptscsih.c:1388 mptscsih_qcmd() error: we
          previously assumed 'vdevice' could be null (see line 1373)
      
            [HCH: vdevice can't ever be NULL here, it's allocated in
             ->slave_alloc and thus guaranteed to be around when
             ->queuecommand is called.]
      Signed-off-by: NJoe Lawrence <joe.lawrence@stratus.com>
      Acked-by: NSreekanth Reddy <Sreekanth.Reddy@avagotech.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      9f21316f
    • J
      mptfusion: combine fw_event_work and its event_data · 32696198
      Joe Lawrence 提交于
      Tack the firmware reply event_data payload to the end of its
      corresponding struct fw_event_work allocation.  Rework fw_event_work
      allocation calculations to include the event_data size where
      appropriate.
      
      This clarifies the code a bit and avoids the following smatch warnings:
      
        drivers/message/fusion/mptsas.c:1003 mptsas_queue_device_delete()
          error: memcpy() 'fw_event->event_data' too small (29 vs 36)
      
        drivers/message/fusion/mptsas.c:1017 mptsas_queue_rescan() error: not
          allocating enough data 168 vs 160
      Signed-off-by: NJoe Lawrence <joe.lawrence@stratus.com>
      Acked-by: NSreekanth Reddy <Sreekanth.Reddy@avagotech.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      32696198
    • J
      mptfusion: make adapter prod_name[] a pointer · c9834c70
      Joe Lawrence 提交于
      The struct _MPT_ADAPTER doesn't need a full copy of the product string,
      so prod_name can point to the string literal storage that the driver
      already provides.
      
      Avoids the following smatch warning:
      
        drivers/message/fusion/mptbase.c:2858 MptDisplayIocCapabilities()
          warn: this array is probably non-NULL. 'ioc->prod_name'
      Signed-off-by: NJoe Lawrence <joe.lawrence@stratus.com>
      Acked-by: NSreekanth Reddy <Sreekanth.Reddy@avagotech.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      c9834c70
    • J
      mptfusion: use memdup_user · 3e67c459
      Joe Lawrence 提交于
      Let memdup_user handle the kmalloc, copy_from_user and error checking
      kfree code.
      
      Spotted by the following smatch (false positive) warning:
      
        drivers/message/fusion/mptctl.c:1369 mptctl_getiocinfo() warn:
          possible info leak 'karg'
      Signed-off-by: NJoe Lawrence <joe.lawrence@stratus.com>
      Acked-by: NSreekanth Reddy <Sreekanth.Reddy@avagotech.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      3e67c459
    • J
      mptfusion: remove redundant kfree checks · 5074b1b6
      Joe Lawrence 提交于
      Fixes the following smatch warnings:
      
        drivers/message/fusion/mptfc.c:529 mptfc_target_destroy() info:
          redundant null check on starget->hostdata calling kfree()
      
        drivers/message/fusion/mptspi.c:465 mptspi_target_destroy() info:
          redundant null check on starget->hostdata calling kfree()
      Signed-off-by: NJoe Lawrence <joe.lawrence@stratus.com>
      Acked-by: NSreekanth Reddy <Sreekanth.Reddy@avagotech.com>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      5074b1b6
    • J
      mptfusion: mark file-private functions as static · 5767d25f
      Joe Lawrence 提交于
      Fixes the following sparse warnings:
      
        drivers/message/fusion/mptbase.c:7011:1: warning: symbol
          'mpt_SoftResetHandler' was not declared. Should it be static?
      
        drivers/message/fusion/mptsas.c:1578:23: warning: symbol
          'mptsas_refreshing_device_handles' was not declared. Should it be
          static?
      
        drivers/message/fusion/mptsas.c:3653:24: warning: symbol
          'mptsas_expander_add' was not declared. Should it be static?
      
        drivers/message/fusion/mptsas.c:5327:1: warning: symbol
          'mptsas_shutdown' was not declared. Should it be static?
      
        drivers/message/fusion/mptspi.c:624:1: warning: symbol
          'mptscsih_quiesce_raid' was not declared. Should it be static?
      Signed-off-by: NJoe Lawrence <joe.lawrence@stratus.com>
      Acked-by: NSreekanth Reddy <Sreekanth.Reddy@avagotech.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      5767d25f
  3. 25 7月, 2014 1 次提交
  4. 18 7月, 2014 2 次提交
  5. 29 5月, 2014 3 次提交
  6. 27 2月, 2014 4 次提交
    • B
      i2o: Use pci_bus_alloc_resource(), not allocate_resource() directly · d2e074cc
      Bjorn Helgaas 提交于
      Convert i2o_res_alloc() to use pci_bus_alloc_resource() rather than
      pci_find_parent_resource() and allocate_resource().  We don't have a
      resource to start with, so pci_find_parent_resource() can't do anything
      useful: a bus may have several memory resources available, so there might
      be several possible parents.  This is more likely on root buses because
      host bridges may have any number of apertures.
      
      I'm pretty sure this didn't work in the first place because it passed
      size == min == max to allocate_resource().  The min and max parameters are
      constraints on the *addresses* of the resource, not on its size, so I think
      it was impossible for allocate_resource() to succeed.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      d2e074cc
    • B
      i2o: Refactor i2o_iop_systab_set() PCI space allocation · 60f061e1
      Bjorn Helgaas 提交于
      Refactor the PCI space allocation in i2o_iop_systab_set().  This might
      improve readability slightly, but mainly it is to make the next patch
      simpler.
      
      No functional change.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      60f061e1
    • B
      i2o: Fix I/O space alignment requirement · 5c513bd5
      Bjorn Helgaas 提交于
      When i2o_iop_systab_set() allocates I/O port space, it specifies 1Mb
      alignment required.  This seems unlikely, since most platforms have only
      64Kb of I/O space total.  I think 4Kb is a more reasonable choice, since
      that's the minimum alignment of a PCI-PCI bridge I/O window.
      
      My guess is that this is a copy/paste error from the memory allocation
      code, which specifies 1Mb alignment (which is the minimum alignment of a
      PCI-PCI bridge memory window).
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      5c513bd5
    • B
      i2o: Fix I/O space allocation copy/paste error · 7ed37fc3
      Bjorn Helgaas 提交于
      When i2o_iop_systab_set() allocates I/O port space, it assigns the base of
      the new I/O port region to sb->current_mem_base, not sb->current_io_base.
      This looks like a copy/paste error, because we do use current_io_base, but
      there's no other place that sets it.
      Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
      7ed37fc3
  7. 11 2月, 2014 1 次提交
  8. 15 1月, 2014 1 次提交
  9. 24 11月, 2013 1 次提交
    • K
      block: Kill bio_segments()/bi_vcnt usage · 458b76ed
      Kent Overstreet 提交于
      When we start sharing biovecs, keeping bi_vcnt accurate for splits is
      going to be error prone - and unnecessary, if we refactor some code.
      
      So bio_segments() has to go - but most of the existing users just needed
      to know if the bio had multiple segments, which is easier - add a
      bio_multiple_segments() for them.
      
      (Two of the current uses of bio_segments() are going to go away in a
      couple patches, but the current implementation of bio_segments() is
      unsafe as soon as we start doing driver conversions for immutable
      biovecs - so implement a dumb version for bisectability, it'll go away
      in a couple patches)
      Signed-off-by: NKent Overstreet <kmo@daterainc.com>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Neil Brown <neilb@suse.de>
      Cc: Nagalakshmi Nandigama <Nagalakshmi.Nandigama@lsi.com>
      Cc: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
      Cc: "James E.J. Bottomley" <JBottomley@parallels.com>
      458b76ed
  10. 13 11月, 2013 1 次提交
  11. 17 10月, 2013 1 次提交
  12. 04 7月, 2013 1 次提交
  13. 07 5月, 2013 1 次提交
  14. 02 5月, 2013 1 次提交
  15. 01 5月, 2013 1 次提交
  16. 30 4月, 2013 1 次提交
  17. 10 4月, 2013 3 次提交
  18. 24 3月, 2013 1 次提交
    • K
      block: Remove some unnecessary bi_vcnt usage · 2f477877
      Kent Overstreet 提交于
      More prep work for immutable bvecs/effecient bio splitting - usage of
      bi_vcnt has to be auditing, so getting rid of all the unnecessary usage
      makes that easier.
      
      Plus, bio_segments() is really what this code wanted, as it respects the
      current value of bi_idx.
      Signed-off-by: NKent Overstreet <koverstreet@google.com>
      CC: Jens Axboe <axboe@kernel.dk>
      CC: Eric Moore <Eric.Moore@lsi.com>
      CC: "James E.J. Bottomley" <JBottomley@parallels.com>
      CC: linux-scsi@vger.kernel.org
      2f477877
  19. 04 1月, 2013 1 次提交
    • G
      Drivers: message: remove __dev* attributes. · 47b1ea75
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Nagalakshmi Nandigama <Nagalakshmi.Nandigama@lsi.com>
      Cc: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      47b1ea75
  20. 19 12月, 2012 1 次提交
  21. 29 11月, 2012 1 次提交
  22. 15 9月, 2012 1 次提交
  23. 31 7月, 2012 2 次提交
  24. 01 6月, 2012 1 次提交
  25. 22 5月, 2012 1 次提交
  26. 18 5月, 2012 1 次提交
    • P
      MCA: delete all remaining traces of microchannel bus support. · bb8187d3
      Paul Gortmaker 提交于
      Hardware with MCA bus is limited to 386 and 486 class machines
      that are now 20+ years old and typically with less than 32MB
      of memory.  A quick search on the internet, and you see that
      even the MCA hobbyist/enthusiast community has lost interest
      in the early 2000 era and never really even moved ahead from
      the 2.4 kernels to the 2.6 series.
      
      This deletes anything remaining related to CONFIG_MCA from core
      kernel code and from the x86 architecture.  There is no point in
      carrying this any further into the future.
      
      One complication to watch for is inadvertently scooping up
      stuff relating to machine check, since there is overlap in
      the TLA name space (e.g. arch/x86/boot/mca.c).
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: James Bottomley <JBottomley@Parallels.com>
      Cc: x86@kernel.org
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      bb8187d3