Re: [PATCH xf86-video-cirrus] Declare an I2C bus name string as a static type for alp_i2c.c (walter harms)

2019-07-18 Thread Kevin Brace
Hi Walter,

I am attempting to eliminate compilation warnings from the code.
The previous code causes "const char*" to "char*" compilation warnings.
That's all.

Regards,

Kevin Brace
Brace Computer Laboratory blog
https://bracecomputerlab.com


> Date: Thu, 18 Jul 2019 09:02:52 +0200
> From: walter harms 
> To: xorg-devel@lists.x.org
> Subject: Re: [PATCH xf86-video-cirrus] Declare an I2C bus name string
>   as a static type for alp_i2c.c
> Message-ID: <5d30199c.6060...@bfs.de>
> Content-Type: text/plain; charset=UTF-8
>
> HI,
> thx for your patch,
> would you like to explain why ?
> what problem do you try to solve ?
>
>
> re,
>  wh
>
> Am 18.07.2019 04:55, schrieb Kevin Brace:
> > Signed-off-by: Kevin Brace 
> > ---
> >  src/alp_i2c.c | 9 +++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> >
> > diff --git a/src/alp_i2c.c b/src/alp_i2c.c
> > index 9341543..b52f2c8 100644
> > --- a/src/alp_i2c.c
> > +++ b/src/alp_i2c.c
> > @@ -16,6 +16,11 @@
> >  #define _ALP_PRIVATE_
> >  #include "alp.h"
> >
> > +
> > +static char strI2CBus1[]   = "I2C bus 1";
> > +static char strI2CBus2[]   = "I2C bus 2";
> > +
> > +
> >  /*
> >   * Switch between internal I2C bus and external (DDC) bus.
> >   * There is one I2C port controlled bu SR08 and the programmable
> > @@ -99,7 +104,7 @@ AlpI2CInit(ScrnInfoPtr pScrn)
> >
> > pCir->I2CPtr1 = I2CPtr;
> >
> > -   I2CPtr->BusName= "I2C bus 1";
> > +   I2CPtr->BusName= strI2CBus1;
> > I2CPtr->scrnIndex  = pScrn->scrnIndex;
> > I2CPtr->I2CPutBits = AlpI2CPutBits;
> > I2CPtr->I2CGetBits = AlpI2CGetBits;
> > @@ -113,7 +118,7 @@ AlpI2CInit(ScrnInfoPtr pScrn)
> >
> > pCir->I2CPtr2 = I2CPtr;
> >
> > -   I2CPtr->BusName= "I2C bus 2";
> > +   I2CPtr->BusName= strI2CBus2;
> > I2CPtr->scrnIndex  = pScrn->scrnIndex;
> > I2CPtr->I2CPutBits = AlpI2CPutBits;
> > I2CPtr->I2CGetBits = AlpI2CGetBits;
> > --
> > 2.17.1
> >
> > ___
> > xorg-devel@lists.x.org: X.Org development
> > Archives: http://lists.x.org/archives/xorg-devel
> > Info: https://lists.x.org/mailman/listinfo/xorg-devel
>
>
> --
>
> Subject: Digest Footer
>
> ___
> xorg-devel mailing list
> xorg-devel@lists.x.org
> https://lists.x.org/mailman/listinfo/xorg-devel
>
> --
>
> End of xorg-devel Digest, Vol 126, Issue 8
> **
>
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH xf86-video-sis] Convert text format specifier type to unsigned short

2019-07-18 Thread Kevin Brace
Signed-off-by: Kevin Brace 
---
 src/initextx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/initextx.c b/src/initextx.c
index 1e84d0f..d6cd049 100644
--- a/src/initextx.c
+++ b/src/initextx.c
@@ -252,7 +252,7 @@ SiSBuildBuiltInModeList(ScrnInfoPtr pScrn, BOOLEAN 
includelcdmodes, BOOLEAN isfo

   current = new;

-  sprintf(current->name, "%dx%d", pSiS->SiS_Pr->SiS_RefIndex[i].XRes,
+  sprintf(current->name, "%hu%hu", pSiS->SiS_Pr->SiS_RefIndex[i].XRes,
  pSiS->SiS_Pr->SiS_RefIndex[i].YRes);

   current->status = MODE_OK;
--
2.17.1

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xf86-video-cirrus] Declare an I2C bus name string as a static type for alp_i2c.c

2019-07-18 Thread walter harms
HI,
thx for your patch,
would you like to explain why ?
what problem do you try to solve ?


re,
 wh

Am 18.07.2019 04:55, schrieb Kevin Brace:
> Signed-off-by: Kevin Brace 
> ---
>  src/alp_i2c.c | 9 +++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/src/alp_i2c.c b/src/alp_i2c.c
> index 9341543..b52f2c8 100644
> --- a/src/alp_i2c.c
> +++ b/src/alp_i2c.c
> @@ -16,6 +16,11 @@
>  #define _ALP_PRIVATE_
>  #include "alp.h"
> 
> +
> +static char strI2CBus1[] = "I2C bus 1";
> +static char strI2CBus2[] = "I2C bus 2";
> +
> +
>  /*
>   * Switch between internal I2C bus and external (DDC) bus.
>   * There is one I2C port controlled bu SR08 and the programmable
> @@ -99,7 +104,7 @@ AlpI2CInit(ScrnInfoPtr pScrn)
> 
>   pCir->I2CPtr1 = I2CPtr;
> 
> - I2CPtr->BusName= "I2C bus 1";
> + I2CPtr->BusName= strI2CBus1;
>   I2CPtr->scrnIndex  = pScrn->scrnIndex;
>   I2CPtr->I2CPutBits = AlpI2CPutBits;
>   I2CPtr->I2CGetBits = AlpI2CGetBits;
> @@ -113,7 +118,7 @@ AlpI2CInit(ScrnInfoPtr pScrn)
> 
>   pCir->I2CPtr2 = I2CPtr;
> 
> - I2CPtr->BusName= "I2C bus 2";
> + I2CPtr->BusName= strI2CBus2;
>   I2CPtr->scrnIndex  = pScrn->scrnIndex;
>   I2CPtr->I2CPutBits = AlpI2CPutBits;
>   I2CPtr->I2CGetBits = AlpI2CGetBits;
> --
> 2.17.1
> 
> ___
> xorg-devel@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel