Skip to content

Commit

Permalink
RHEL-69071: fix broken style for Common folder in NetKVM
Browse files Browse the repository at this point in the history
Signed-off-by: Vitalii Chulak <vitalii@daynix.com>
Jedoku authored and YanVugenfirer committed Jan 28, 2025
1 parent af79188 commit 6607ef3
Showing 4 changed files with 12 additions and 2 deletions.
6 changes: 4 additions & 2 deletions NetKVM/Common/ParaNdis-Util.h
Original file line number Diff line number Diff line change
@@ -503,7 +503,9 @@ class CNdisList : private TAccessStrategy, public TCountingStrategy

template <typename TPredicate, typename TFunctor> void ForEachDetachedIf(TPredicate Predicate, TFunctor Functor)
{
// clang-format off
ForEachPrepareIf(Predicate, [this](PLIST_ENTRY Entry){ Remove_LockLess(Entry); }, Functor);
// clang-format on
}

template <typename TFunctor> void ForEach(TFunctor Functor)
@@ -561,7 +563,7 @@ class CNdisList : private TAccessStrategy, public TCountingStrategy
class CDpcIrqlRaiser
{
public:

// clang-format off
_IRQL_requires_max_(DISPATCH_LEVEL)
_IRQL_raises_(DISPATCH_LEVEL)
_IRQL_saves_global_(OldIrql, this->m_OriginalIRQL)
@@ -575,7 +577,7 @@ class CDpcIrqlRaiser
}
CDpcIrqlRaiser(const CDpcIrqlRaiser &) = delete;
CDpcIrqlRaiser &operator=(const CDpcIrqlRaiser &) = delete;

// clang-format on
private:
KIRQL m_OriginalIRQL;
};
4 changes: 4 additions & 0 deletions NetKVM/Common/ParaNdis_Common.cpp
Original file line number Diff line number Diff line change
@@ -111,6 +111,7 @@ typedef struct _tagConfigurationEntries
tConfigurationEntry PollMode;
} tConfigurationEntries;

// clang-format off
static const tConfigurationEntries defaultConfiguration =
{
{ "*PhysicalMediaType", 0, 0, 0xff },
@@ -163,6 +164,7 @@ static void ParaNdis_ResetVirtIONetDevice(PARANDIS_ADAPTER *pContext)
/* reset all the features in the device */
pContext->ulCurrentVlansFilterSet = 0;
}
// clang-format on

/**********************************************************
Gets integer value for specifies in pEntry->Name name
@@ -474,6 +476,7 @@ void ParaNdis_ResetOffloadSettings(PARANDIS_ADAPTER *pContext, tOffloadSettingsF
pDest->fUsov6 = !!(*from & osbT6Uso);
}

// clang-format off
static void DumpVirtIOFeatures(PPARANDIS_ADAPTER pContext)
{
static const struct { ULONG bitmask; PCHAR Name; } Features[] =
@@ -523,6 +526,7 @@ static void DumpVirtIOFeatures(PPARANDIS_ADAPTER pContext)
}
}
}
// clang-format on

static BOOLEAN AckFeature(PPARANDIS_ADAPTER pContext, UINT64 Feature)
{
2 changes: 2 additions & 0 deletions NetKVM/Common/ParaNdis_Util.cpp
Original file line number Diff line number Diff line change
@@ -125,6 +125,7 @@ bool CSystemThread::Start(PVOID Context)
{
m_Context = Context;
UpdateTimestamp(m_StartTime);
// clang-format off
NTSTATUS status = PsCreateSystemThread(&m_hThread,
GENERIC_READ,
NULL,
@@ -134,6 +135,7 @@ bool CSystemThread::Start(PVOID Context)
((CSystemThread *)Ctx)->ThreadProc();
},
this);
// clang-format on
if (!NT_SUCCESS(status))
{
DPrintf(0, "Failed to start, status %X", status);
2 changes: 2 additions & 0 deletions NetKVM/Common/ParaNdis_VirtIO.cpp
Original file line number Diff line number Diff line change
@@ -464,6 +464,7 @@ static void vdev_sleep(void *context, unsigned int msecs)
NdisMSleep(1000 * msecs);
}

// clang-format off
VirtIOSystemOps ParaNdisSystemOps = {
ReadVirtIODeviceByte,
ReadVirtIODeviceWord,
@@ -484,3 +485,4 @@ VirtIOSystemOps ParaNdisSystemOps = {
vdev_get_msix_vector,
vdev_sleep,
};
// clang-format on

0 comments on commit 6607ef3

Please sign in to comment.