VirtualBox

Ignore:
Timestamp:
Aug 3, 2016 4:50:15 PM (8 years ago)
Author:
vboxsync
Message:

Devices: warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp

    r62514 r62932  
    9191#define VBOXHGSMI_STATE_FIFOSTOP_MAGIC 0x1fedcba9
    9292
    93 #define VBOXHGSMI_SAVE_START(_pSSM)     do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_START_MAGIC);      AssertRC(rc2);}while(0)
    94 #define VBOXHGSMI_SAVE_STOP(_pSSM)      do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_STOP_MAGIC);       AssertRC(rc2);}while(0)
    95 #define VBOXHGSMI_SAVE_FIFOSTART(_pSSM) do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_FIFOSTART_MAGIC);  AssertRC(rc2);}while(0)
    96 #define VBOXHGSMI_SAVE_FIFOSTOP(_pSSM)  do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_FIFOSTOP_MAGIC);   AssertRC(rc2);}while(0)
     93#define VBOXHGSMI_SAVE_START(_pSSM)     do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_START_MAGIC);     AssertRC(rc2); }while(0)
     94#define VBOXHGSMI_SAVE_STOP(_pSSM)      do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_STOP_MAGIC);      AssertRC(rc2); }while(0)
     95#define VBOXHGSMI_SAVE_FIFOSTART(_pSSM) do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_FIFOSTART_MAGIC); AssertRC(rc2); }while(0)
     96#define VBOXHGSMI_SAVE_FIFOSTOP(_pSSM)  do{ int rc2 = SSMR3PutU32(_pSSM, VBOXHGSMI_STATE_FIFOSTOP_MAGIC);  AssertRC(rc2); }while(0)
    9797
    9898#define VBOXHGSMI_LOAD_CHECK(_pSSM, _v) \
     
    304304        if (RTListIsEmpty(&pIns->guestCmdCompleted))
    305305        {
    306             if(pIns->pHGFlags)
    307             {
     306            if (pIns->pHGFlags)
    308307                ASMAtomicAndU32(&pIns->pHGFlags->u32HostFlags, ~HGSMIHOSTFLAGS_GCOMMAND_COMPLETED);
    309             }
    310308        }
    311309
     
    355353
    356354    int rc = hgsmiFIFOLock(pIns);
    357     if(RT_SUCCESS(rc))
     355    if (RT_SUCCESS(rc))
    358356    {
    359357        /* Search the Read list for the given buffer offset. */
     
    392390
    393391        hgsmiFIFOUnlock(pIns);
    394         if(!bCompleteFirst)
     392        if (!bCompleteFirst)
    395393            LogRel(("HGSMI[%s]: ignored invalid write to the host FIFO: 0x%08X!!!\n", pIns->pszName, offBuffer));
    396394    }
     
    420418    VM_ASSERT_EMT(pIns->pVM);
    421419
    422     AssertPtrReturn(pIns->pHGFlags, VERR_WRONG_ORDER);
     420    AssertPtrReturn(pIns->pHGFlags, HGSMIOFFSET_VOID);
    423421    int rc = hgsmiFIFOLock(pIns);
    424422    AssertRC(rc);
    425     if(RT_SUCCESS(rc))
     423    if (RT_SUCCESS(rc))
    426424    {
    427425        /* Get the host FIFO head entry. */
     
    454452            return pEntry->offBuffer;
    455453        }
     454
    456455        hgsmiFIFOUnlock(pIns);
    457456    }
     
    723722    HGSMIINSTANCE *pIns = pEntry->pIns;
    724723    int rc = hgsmiFIFOLock (pIns);
    725     if(RT_SUCCESS(rc))
     724    if (RT_SUCCESS(rc))
    726725    {
    727726        RTListNodeRemove(&pEntry->nodeEntry);
     
    731730
    732731        rc = hgsmiHostHeapLock (pIns);
    733         if(RT_SUCCESS(rc))
     732        if (RT_SUCCESS(rc))
    734733        {
    735734            /* Deallocate the host heap memory. */
     
    12921291              hgsmiHostHeapHandleLocationOffset(&pIns->hostHeap);
    12931292    rc = SSMR3PutU32 (pSSM, off);
    1294     if(off != HGSMIOFFSET_VOID)
     1293    if (off != HGSMIOFFSET_VOID)
    12951294    {
    12961295        SSMR3PutU32 (pSSM, hgsmiHostHeapOffset(&pIns->hostHeap));
     
    12991298        SSMR3PutU64 (pSSM, (uint64_t)(uintptr_t)pIns->area.pu8Base);
    13001299        rc = hgsmiFIFOLock (pIns);
    1301         if(RT_SUCCESS(rc))
     1300        if (RT_SUCCESS(rc))
    13021301        {
    13031302            rc = hgsmiHostSaveFifoLocked (&pIns->hostFIFO, pSSM); AssertRC(rc);
     
    13271326int HGSMIHostLoadStateExec (PHGSMIINSTANCE pIns, PSSMHANDLE pSSM, uint32_t u32Version)
    13281327{
    1329     if(u32Version < VGA_SAVEDSTATE_VERSION_HGSMI)
     1328    if (u32Version < VGA_SAVEDSTATE_VERSION_HGSMI)
    13301329        return VINF_SUCCESS;
    13311330
     
    13461345    pIns->pHGFlags = (off != HGSMIOFFSET_VOID) ? (HGSMIHOSTFLAGS*)HGSMIOffsetToPointer (&pIns->area, off) : NULL;
    13471346
    1348     HGSMIHOSTHEAP hHeap = pIns->hostHeap;
    13491347    rc = SSMR3GetU32(pSSM, &off);
    13501348    AssertLogRelRCReturn(rc, rc);
    1351     if(off != HGSMIOFFSET_VOID)
     1349    if (off != HGSMIOFFSET_VOID)
    13521350    {
    13531351        /* There is a saved heap. */
     
    13701368        {
    13711369            rc = hgsmiFIFOLock (pIns);
    1372             if(RT_SUCCESS(rc))
     1370            if (RT_SUCCESS(rc))
    13731371            {
    13741372                rc = hgsmiHostLoadFifoLocked (pIns, &pIns->hostFIFO, pSSM);
     
    14401438 */
    14411439
    1442 static int hgsmiChannelMapCreate (PHGSMIINSTANCE pIns,
    1443                                   const char *pszChannel,
    1444                                   uint8_t *pu8Channel)
    1445 {
    1446     /* @todo later */
     1440static int hgsmiChannelMapCreate(PHGSMIINSTANCE pIns, const char *pszChannel, uint8_t *pu8Channel)
     1441{
     1442    RT_NOREF(pIns, pszChannel, pu8Channel);
     1443    /** @todo later */
    14471444    return VERR_NOT_SUPPORTED;
    14481445}
     
    14781475/* Register a new HGSMI channel by name.
    14791476 */
    1480 int HGSMIChannelRegisterName (PHGSMIINSTANCE pIns,
    1481                               const char *pszChannel,
    1482                               PFNHGSMICHANNELHANDLER pfnChannelHandler,
    1483                               void *pvChannelHandler,
    1484                               uint8_t *pu8Channel)
     1477int HGSMIChannelRegisterName(PHGSMIINSTANCE pIns,
     1478                             const char *pszChannel,
     1479                             PFNHGSMICHANNELHANDLER pfnChannelHandler,
     1480                             void *pvChannelHandler,
     1481                             uint8_t *pu8Channel)
    14851482{
    14861483    LogFlowFunc(("pIns %p, pszChannel %s, pfnChannelHandler %p, pvChannelHandler %p, pu8Channel %p\n",
     
    15911588
    15921589            HGSMIBUFFERLOCATION *pLoc = (HGSMIBUFFERLOCATION *)pvBuffer;
    1593             if(pLoc->cbLocation != sizeof(HGSMIHOSTFLAGS))
     1590            if (pLoc->cbLocation != sizeof(HGSMIHOSTFLAGS))
    15941591            {
    15951592                rc = VERR_INVALID_PARAMETER;
     
    17051702{
    17061703    uint32_t flags = 0;
    1707     if(pIns->pHGFlags)
     1704    if (pIns->pHGFlags)
    17081705    {
    17091706        /* treat the abandoned commands as read.. */
    1710         while(HGSMIHostRead (pIns) != HGSMIOFFSET_VOID)  {}
     1707        while (HGSMIHostRead(pIns) != HGSMIOFFSET_VOID)
     1708        {}
    17111709        flags = pIns->pHGFlags->u32HostFlags;
    17121710        pIns->pHGFlags->u32HostFlags = 0;
     
    17141712
    17151713    /* .. and complete them */
    1716     while(hgsmiProcessHostCmdCompletion (pIns, 0, true)) {}
     1714    while (hgsmiProcessHostCmdCompletion(pIns, 0, true))
     1715    {}
    17171716
    17181717#ifdef VBOX_WITH_WDDM
    1719     while(hgsmiProcessGuestCmdCompletion(pIns) != HGSMIOFFSET_VOID) {}
     1718    while(hgsmiProcessGuestCmdCompletion(pIns) != HGSMIOFFSET_VOID)
     1719    {}
    17201720#endif
    17211721
     
    17941794    if (RT_SUCCESS (rc))
    17951795    {
    1796         if(bDoIrq)
     1796        if (bDoIrq)
    17971797        {
    17981798            /* Now guest can read the FIFO, the notification is informational. */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette