alpine 3.6
obsolete weakness #68


Weakness Breakdown


An obsolete weakness occurs when someone uses deprecated or obsolete functions when building a system. As a programming language evolves, some functions occasionally become obsolete.

Warning code(s):

This C routine is considered obsolete.

File Name:



The highlighted line of code below is the trigger point of this particular Alpine 3.6 obsolete weakness.

     pI128->I2C = I2CPtr;
    I2CPtr->BusName    = "DDC";
    I2CPtr->scrnIndex  = pScrn->scrnIndex; 
    I2CPtr->I2CPutBits = I128I2CPutBits; 
    I2CPtr->I2CGetBits = I128I2CGetBits;
    I2CPtr->BitTimeout = 4;
    I2CPtr->ByteTimeout = 4;
    I2CPtr->AcknTimeout = 4;
    I2CPtr->StartTimeout = 4;

    /* soft switch register bits 1,0 control I2C channel */
    iobase = pI128->RegRec.iobase;
    soft_sw = inl(iobase + 0x28);
    soft_sw &= 0xfffffffc;
    soft_sw |= 0x00000001;
    outl(iobase + 0x28, soft_sw);

    /* set default as ddc2 mode */
    ddc = inl(iobase + 0x2C);
    ddc &= ~DDC_MODE_MASK;
    ddc |= DDC_MODE_DDC2;
    outl(iobase + 0x2C, ddc);

    if (!xf86I2CBusInit(I2CPtr)) {
        return FALSE;
    return TRUE;

static xf86MonPtr
I128getDDC(ScrnInfoPtr pScrn)
  I128Ptr pI128 = I128PTR(pScrn);
  xf86MonPtr MonInfo = NULL;

  /* Initialize I2C bus - used by DDC if available */
  if (pI128->i2cInit) {
  /* Read and output monitor info using DDC2 over I2C bus */
  if (pI128->I2C) {
    MonInfo = xf86DoEDID_DDC2(XF86_SCRN_ARG(pScrn), pI128->I2C);
    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "I2C Monitor info: %p\n",
	       (void *)MonInfo);
    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "end of I2C Monitor info\n"); 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.