Bug 218006 - sys/dev/isci/scil/sati_util.c: PVS-Studio: V764: Possible incorrect order of arguments passed
Summary: sys/dev/isci/scil/sati_util.c: PVS-Studio: V764: Possible incorrect order of ...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-scsi (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-03-22 13:28 UTC by Svyatoslav
Modified: 2017-03-23 21:48 UTC (History)
1 user (show)

See Also:


Attachments
git patch (1010 bytes, patch)
2017-03-22 13:28 UTC, Svyatoslav
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Svyatoslav 2017-03-22 13:28:25 UTC
Created attachment 181055 [details]
git patch

We have found and fixed bugs using PVS-Studio tool. PVS-Studio is a static code analyzer for C, C++ and C#: https://www.viva64.com/en/pvs-studio/

Analyzer warnings:
V764 Possible incorrect order of arguments passed to 'sati_scsi_fixed_sense_data_construct' function: 'scsi_status' and 'response_code'. sati_util.c 621
V764 Possible incorrect order of arguments passed to 'sati_scsi_descriptor_sense_data_construct' function: 'scsi_status' and 'response_code'. sati_util.c 626
Comment 1 Alexander Motin freebsd_committer freebsd_triage 2017-03-22 18:29:53 UTC
I think your patch is wrong.  While there indeed a confusion, it looks like wrong parameter order is only in a header file in function declaration.  Real use seems correct.