More trivial syntax and logic cleanup.
Spotted by Clang. No functional change intended.
This commit is contained in:
@@ -22,7 +22,7 @@ public:
|
|||||||
uint32 minCountPerBlock);
|
uint32 minCountPerBlock);
|
||||||
~PhysicalMemoryAllocator();
|
~PhysicalMemoryAllocator();
|
||||||
|
|
||||||
status_t InitCheck() { return fStatus; };
|
status_t InitCheck() { return fStatus; }
|
||||||
|
|
||||||
status_t Allocate(size_t size,
|
status_t Allocate(size_t size,
|
||||||
void **logicalAddress,
|
void **logicalAddress,
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ virtual status_t NotifyPipeChange(Pipe *pipe,
|
|||||||
static status_t AddTo(Stack *stack);
|
static status_t AddTo(Stack *stack);
|
||||||
|
|
||||||
// Port operations for root hub
|
// Port operations for root hub
|
||||||
uint8 PortCount() { return fPortCount; };
|
uint8 PortCount() { return fPortCount; }
|
||||||
status_t GetPortStatus(uint8 index, usb_port_status *status);
|
status_t GetPortStatus(uint8 index, usb_port_status *status);
|
||||||
status_t SetPortFeature(uint8 index, uint16 feature);
|
status_t SetPortFeature(uint8 index, uint16 feature);
|
||||||
status_t ClearPortFeature(uint8 index, uint16 feature);
|
status_t ClearPortFeature(uint8 index, uint16 feature);
|
||||||
@@ -84,7 +84,7 @@ static status_t AddTo(Stack *stack);
|
|||||||
status_t ResetPort(uint8 index);
|
status_t ResetPort(uint8 index);
|
||||||
status_t SuspendPort(uint8 index);
|
status_t SuspendPort(uint8 index);
|
||||||
|
|
||||||
virtual const char * TypeName() const { return "ehci"; };
|
virtual const char * TypeName() const { return "ehci"; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Controller resets
|
// Controller resets
|
||||||
|
|||||||
@@ -34,10 +34,8 @@
|
|||||||
//#define TRACE_TCP
|
//#define TRACE_TCP
|
||||||
#ifdef TRACE_TCP
|
#ifdef TRACE_TCP
|
||||||
# define TRACE(x) dprintf x
|
# define TRACE(x) dprintf x
|
||||||
# define TRACE_BLOCK(x) dump_block x
|
|
||||||
#else
|
#else
|
||||||
# define TRACE(x)
|
# define TRACE(x)
|
||||||
# define TRACE_BLOCK(x)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1188,7 +1188,7 @@ Interface::_ChangeAddress(RecursiveLocker& locker, InterfaceAddress* address,
|
|||||||
/*! Searches for a specific interface by name.
|
/*! Searches for a specific interface by name.
|
||||||
You need to have the interface list's lock hold when calling this function.
|
You need to have the interface list's lock hold when calling this function.
|
||||||
*/
|
*/
|
||||||
static struct Interface*
|
static Interface*
|
||||||
find_interface(const char* name)
|
find_interface(const char* name)
|
||||||
{
|
{
|
||||||
ASSERT_LOCKED_RECURSIVE(&sLock);
|
ASSERT_LOCKED_RECURSIVE(&sLock);
|
||||||
@@ -1206,7 +1206,7 @@ find_interface(const char* name)
|
|||||||
/*! Searches for a specific interface by index.
|
/*! Searches for a specific interface by index.
|
||||||
You need to have the interface list's lock hold when calling this function.
|
You need to have the interface list's lock hold when calling this function.
|
||||||
*/
|
*/
|
||||||
static struct Interface*
|
static Interface*
|
||||||
find_interface(uint32 index)
|
find_interface(uint32 index)
|
||||||
{
|
{
|
||||||
InterfaceList::Iterator iterator = sInterfaces.GetIterator();
|
InterfaceList::Iterator iterator = sInterfaces.GetIterator();
|
||||||
|
|||||||
@@ -152,8 +152,8 @@ public:
|
|||||||
domain_datalink* DomainDatalink(net_domain* domain)
|
domain_datalink* DomainDatalink(net_domain* domain)
|
||||||
{ return DomainDatalink(domain->family); }
|
{ return DomainDatalink(domain->family); }
|
||||||
|
|
||||||
inline void SetBusy(bool busy) { atomic_set(&fBusy, busy ? 1 : 0); };
|
inline void SetBusy(bool busy) { atomic_set(&fBusy, busy ? 1 : 0); }
|
||||||
inline bool IsBusy() const { return atomic_get((int32*)&fBusy) == 1 ;};
|
inline bool IsBusy() const { return atomic_get((int32*)&fBusy) == 1 ; }
|
||||||
|
|
||||||
#if ENABLE_DEBUGGER_COMMANDS
|
#if ENABLE_DEBUGGER_COMMANDS
|
||||||
void Dump() const;
|
void Dump() const;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
#include <util/DoublyLinkedList.h>
|
#include <util/DoublyLinkedList.h>
|
||||||
|
|
||||||
|
|
||||||
class InterfaceAddress;
|
struct InterfaceAddress;
|
||||||
|
|
||||||
|
|
||||||
struct net_route_private
|
struct net_route_private
|
||||||
|
|||||||
-1
@@ -37,7 +37,6 @@
|
|||||||
|
|
||||||
// maximum number of iovecs per request
|
// maximum number of iovecs per request
|
||||||
#define MAX_IO_VECS 32 // 128 kB
|
#define MAX_IO_VECS 32 // 128 kB
|
||||||
#define MAX_FILE_IO_VECS 32
|
|
||||||
|
|
||||||
#define BYPASS_IO_SIZE 65536
|
#define BYPASS_IO_SIZE 65536
|
||||||
#define LAST_ACCESSES 3
|
#define LAST_ACCESSES 3
|
||||||
|
|||||||
@@ -288,7 +288,6 @@ FileDevice::Control(void* _cookie, int32 op, void* buffer, size_t length)
|
|||||||
case B_GET_ICON_NAME:
|
case B_GET_ICON_NAME:
|
||||||
return user_strlcpy((char *)buffer, "devices/device-volume",
|
return user_strlcpy((char *)buffer, "devices/device-volume",
|
||||||
B_FILE_NAME_LENGTH);
|
B_FILE_NAME_LENGTH);
|
||||||
break;
|
|
||||||
|
|
||||||
case B_GET_VECTOR_ICON:
|
case B_GET_VECTOR_ICON:
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,11 +40,8 @@ struct rw_lock_waiter {
|
|||||||
bool writer;
|
bool writer;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MUTEX_FLAG_OWNS_NAME MUTEX_FLAG_CLONE_NAME
|
|
||||||
#define MUTEX_FLAG_RELEASED 0x2
|
#define MUTEX_FLAG_RELEASED 0x2
|
||||||
|
|
||||||
#define RW_LOCK_FLAG_OWNS_NAME RW_LOCK_FLAG_CLONE_NAME
|
|
||||||
|
|
||||||
|
|
||||||
int32
|
int32
|
||||||
recursive_lock_get_recursion(recursive_lock *lock)
|
recursive_lock_get_recursion(recursive_lock *lock)
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
#include "MemoryManager.h"
|
#include "MemoryManager.h"
|
||||||
|
|
||||||
|
|
||||||
#define DEBUG_ALLOCATOR
|
|
||||||
//#define TEST_ALL_CACHES_DURING_BOOT
|
//#define TEST_ALL_CACHES_DURING_BOOT
|
||||||
|
|
||||||
static const size_t kBlockSizes[] = {
|
static const size_t kBlockSizes[] = {
|
||||||
|
|||||||
@@ -341,8 +341,8 @@ VMAddressSpace::_DumpCommand(int argc, char** argv)
|
|||||||
} else {
|
} else {
|
||||||
aspace->Dump();
|
aspace->Dump();
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user