Project

General

Profile

Actions

Bug #11862

closed

cleanup smatch/cstyle/wscheck issues in usr/src/lib/sun_sas/

Added by Rob Johnston over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

usr/src/lib/sun_sas/ contains code that implements the lower-level (vendor-specific) layer of the SM-HBA API (usr/src/lib/hbaapi).

Smatch is currently disabled for usr/src/lib/sun_sas/ due to a number of pre-existing smatch issues. As we (Joyent) may be SM-HBA for the SAS Topology project, it seems like it would be a good idea to clean up these warnings and then enable smatch checks going forward.

Below are smatch warnings that need to be addressed:

 ../common/Sun_sasGetNumberOfAdapters.c38 Sun_sasGetNumberOfAdapters() warn inconsistent indenting
 ../common/Sun_sasGetAdapterName.c49 Sun_sasGetAdapterName() warn this array is probably non-NULL. 'hba_ptr->handle_name'
 ../common/Sun_sasGetDiscoveredPortAttributes.c75 Sun_sasGetDiscoveredPortAttributes() warn this array is probably non-NULL. 'hba_ptr->device_path'
 ../common/Sun_sasGetAdapterPortAttributes.c70 Sun_sasGetAdapterPortAttributes() warn this array is probably non-NULL. 'hba_ptr->device_path'
 ../common/Sun_sasFreeLibrary.c93 FreeHBA() warn inconsistent indenting
 ../common/Sun_sasGetPortAttributesByWWN.c74 Sun_sasGetPortAttributesByWWN() warn this array is probably non-NULL. 'hba_ptr->device_path'
 ../common/Sun_sasGetPortType.c62 Sun_sasGetPortType() warn this array is probably non-NULL. 'hba_ptr->device_path'
 ../common/Sun_sasRefreshAdapterConfiguration.c61 find_matching_hba() warn inconsistent indenting
 ../common/sun_sas.c347 getFirstAdapterPortWWN() warn this array is probably non-NULL. 'hba_ptr->device_path'
 ../common/Sun_sasGetPhyStatistics.c220 Sun_sasGetPhyStatistics() warn inconsistent indenting
 ../common/Sun_sasScsiInquiry.c134 Sun_sasScsiInquiry() warn this array is probably non-NULL. 'hba_ptr->device_path'
 ../common/Sun_sasSendSMPPassThru.c136 Sun_sasSendSMPPassThru() warn this array is probably non-NULL. 'hba_ptr->device_path'
 ../common/devtree_device_disco.c494 get_attached_devices_info() warn inconsistent indenting
 ../common/devtree_device_disco.c910 get_attached_paths_info() warn inconsistent indenting
Actions

Also available in: Atom PDF