git: kernel/nata: Constification.

Rimvydas Jasinskas zrj at crater.dragonflybsd.org
Sun Dec 31 13:52:42 PST 2017


commit 59503772404c7f6995a634d33da693a01db4d425
Author: zrj <rimvydas.jasinskas at gmail.com>
Date:   Thu Nov 23 22:24:45 2017 +0200

    kernel/nata: Constification.
    
    Attempt at making nata a bit more safe:
      * const attributes where possible
      * add and use ata_set_desc() helper
      * add early returns (for future split modules support)
      * fix a bug in ata-sis.c where it was patching ids table.
    
    As a bonus, now CCVER=gcc47 no longer warn on -Warray-bounds in ata-ite.c,
    finally allowing to buildkernel w/o NO_WERROR (ata_mode2idx() in ata-pci.c).
    
    No functional change intended, except for bugfix in ata-sis.c.

Summary of changes:
 sys/dev/disk/nata/ata-all.c                   |  2 +-
 sys/dev/disk/nata/ata-all.h                   |  4 +-
 sys/dev/disk/nata/ata-pci.c                   | 24 +++++++---
 sys/dev/disk/nata/ata-pci.h                   | 11 +++--
 sys/dev/disk/nata/ata-queue.c                 |  2 +-
 sys/dev/disk/nata/chipsets/ata-acard.c        | 14 +++---
 sys/dev/disk/nata/chipsets/ata-acerlabs.c     | 39 ++++++++--------
 sys/dev/disk/nata/chipsets/ata-ahci.c         |  2 +-
 sys/dev/disk/nata/chipsets/ata-amd.c          | 34 +++++++-------
 sys/dev/disk/nata/chipsets/ata-ati.c          | 33 +++++++-------
 sys/dev/disk/nata/chipsets/ata-cyrix.c        | 18 ++++----
 sys/dev/disk/nata/chipsets/ata-highpoint.c    | 25 +++++-----
 sys/dev/disk/nata/chipsets/ata-intel.c        | 17 ++++---
 sys/dev/disk/nata/chipsets/ata-ite.c          | 24 ++++------
 sys/dev/disk/nata/chipsets/ata-jmicron.c      |  7 ++-
 sys/dev/disk/nata/chipsets/ata-marvell.c      | 15 +++---
 sys/dev/disk/nata/chipsets/ata-national.c     | 14 +++---
 sys/dev/disk/nata/chipsets/ata-nvidia.c       | 34 +++++++-------
 sys/dev/disk/nata/chipsets/ata-promise.c      |  9 ++--
 sys/dev/disk/nata/chipsets/ata-serverworks.c  | 19 ++++----
 sys/dev/disk/nata/chipsets/ata-siliconimage.c | 66 +++++++++++++--------------
 sys/dev/disk/nata/chipsets/ata-sis.c          | 38 ++++++++-------
 sys/dev/disk/nata/chipsets/ata-via.c          | 49 ++++++++++----------
 23 files changed, 257 insertions(+), 243 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/59503772404c7f6995a634d33da693a01db4d425


-- 
DragonFly BSD source repository


More information about the Commits mailing list