use template max() instead of max_c() macro
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
#include "ahci_controller.h"
|
#include "ahci_controller.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <KernelExport.h>
|
#include <KernelExport.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -281,7 +282,7 @@ AHCIController::ResetController()
|
|||||||
if (fPCIVendorID == PCI_VENDOR_INTEL) {
|
if (fPCIVendorID == PCI_VENDOR_INTEL) {
|
||||||
// Intel PCS—Port Control and Status
|
// Intel PCS—Port Control and Status
|
||||||
// SATA port enable bits must be set
|
// SATA port enable bits must be set
|
||||||
int portCount = max_c(fls(fRegs->pi), 1 + (int)((fRegs->cap >> CAP_NP_SHIFT) & CAP_NP_MASK));
|
int portCount = std::max(fls(fRegs->pi), 1 + (int)((fRegs->cap >> CAP_NP_SHIFT) & CAP_NP_MASK));
|
||||||
if (portCount > 8) {
|
if (portCount > 8) {
|
||||||
// TODO: fix this when specification available
|
// TODO: fix this when specification available
|
||||||
TRACE("don't know how to enable SATA ports 9 to %d\n", portCount);
|
TRACE("don't know how to enable SATA ports 9 to %d\n", portCount);
|
||||||
|
|||||||
Reference in New Issue
Block a user