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 <[email protected]>
  • Loading branch information
Jedoku committed Jan 20, 2025
1 parent 32aca00 commit 3f4cd99
Show file tree
Hide file tree
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
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -575,7 +577,7 @@ class CDpcIrqlRaiser
}
CDpcIrqlRaiser(const CDpcIrqlRaiser &) = delete;
CDpcIrqlRaiser &operator=(const CDpcIrqlRaiser &) = delete;

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

// clang-format off
static const tConfigurationEntries defaultConfiguration =
{
{ "*PhysicalMediaType", 0, 0, 0xff },
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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[] =
Expand Down Expand Up @@ -523,6 +526,7 @@ static void DumpVirtIOFeatures(PPARANDIS_ADAPTER pContext)
}
}
}
// clang-format on

static BOOLEAN AckFeature(PPARANDIS_ADAPTER pContext, UINT64 Feature)
{
Expand Down
2 changes: 2 additions & 0 deletions NetKVM/Common/ParaNdis_Util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions NetKVM/Common/ParaNdis_VirtIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ static void vdev_sleep(void *context, unsigned int msecs)
NdisMSleep(1000 * msecs);
}

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

0 comments on commit 3f4cd99

Please sign in to comment.