<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/video/fbdev/matrox, branch v4.14-rc5</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>video: fbdev: make fb_videomode const</title>
<updated>2017-09-04T14:00:49+00:00</updated>
<author>
<name>Bhumika Goyal</name>
<email>bhumirks@gmail.com</email>
</author>
<published>2017-09-04T14:00:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=58ec01cebafd4b9fc039c12c744013e9c71ec802'/>
<id>58ec01cebafd4b9fc039c12c744013e9c71ec802</id>
<content type='text'>
Make these const as they are only passed to a const argument of the
function fb_find_mode.

Done using Coccinelle.

@match disable optional_qualifier@
identifier s;
@@
static struct fb_videomode s = {...};

@ref@
position p;
identifier match.s;
@@
s@p

@good1@
identifier match.s;
expression list[5] es;
position ref.p;
@@
fb_find_mode(es,&amp;s@p,...)

@bad depends on  !good1@
position ref.p;
identifier match.s;
@@
s@p

@depends on forall !bad disable optional_qualifier@
identifier match.s;
@@
static
+ const
struct fb_videomode s;

Signed-off-by: Bhumika Goyal &lt;bhumirks@gmail.com&gt;
Cc: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make these const as they are only passed to a const argument of the
function fb_find_mode.

Done using Coccinelle.

@match disable optional_qualifier@
identifier s;
@@
static struct fb_videomode s = {...};

@ref@
position p;
identifier match.s;
@@
s@p

@good1@
identifier match.s;
expression list[5] es;
position ref.p;
@@
fb_find_mode(es,&amp;s@p,...)

@bad depends on  !good1@
position ref.p;
identifier match.s;
@@
s@p

@depends on forall !bad disable optional_qualifier@
identifier match.s;
@@
static
+ const
struct fb_videomode s;

Signed-off-by: Bhumika Goyal &lt;bhumirks@gmail.com&gt;
Cc: Julia Lawall &lt;julia.lawall@lip6.fr&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Russell King &lt;linux@armlinux.org.uk&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fbdev: matrox: make fb_ops const</title>
<updated>2017-08-21T14:49:58+00:00</updated>
<author>
<name>Bhumika Goyal</name>
<email>bhumirks@gmail.com</email>
</author>
<published>2017-08-21T14:49:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6ff10485262bf1b9f0e2db4a25287796f6a519c3'/>
<id>6ff10485262bf1b9f0e2db4a25287796f6a519c3</id>
<content type='text'>
Make fb_ops const as it is only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal &lt;bhumirks@gmail.com&gt;
Cc: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Cc: Antonino Daplas &lt;adaplas@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make fb_ops const as it is only used during a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal &lt;bhumirks@gmail.com&gt;
Cc: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Cc: Antonino Daplas &lt;adaplas@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fbdev: matrox: hide unused 'hotplug' variable</title>
<updated>2017-08-07T15:22:14+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2017-08-07T15:22:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5ad3f3f6eb1fbec716a61dbe46565dcd9ca94387'/>
<id>5ad3f3f6eb1fbec716a61dbe46565dcd9ca94387</id>
<content type='text'>
The variable has become unused in modular configurations
which triggers a harmless warning:

drivers/video/fbdev/matrox/matroxfb_base.c:1583:12: error: 'hotplug' defined but not used [-Werror=unused-variable]

This moves it into an #ifdef section of the file, matching
all its references.

Fixes: 376b3ff54c9a ("fbdev: Nuke FBINFO_MODULE")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Cc: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The variable has become unused in modular configurations
which triggers a harmless warning:

drivers/video/fbdev/matrox/matroxfb_base.c:1583:12: error: 'hotplug' defined but not used [-Werror=unused-variable]

This moves it into an #ifdef section of the file, matching
all its references.

Fixes: 376b3ff54c9a ("fbdev: Nuke FBINFO_MODULE")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Cc: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fbdev: Nuke FBINFO_MODULE</title>
<updated>2017-08-01T15:33:02+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-08-01T15:33:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=376b3ff54c9a1cd54d71b1102e061fccf56d535e'/>
<id>376b3ff54c9a1cd54d71b1102e061fccf56d535e</id>
<content type='text'>
Instead check info-&gt;ops-&gt;owner, which amounts to the same.

Spotted because I want to remove the pile of broken and cargo-culted
fb_info-&gt;flags assignments in drm drivers.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Reviewed-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead check info-&gt;ops-&gt;owner, which amounts to the same.

Spotted because I want to remove the pile of broken and cargo-culted
fb_info-&gt;flags assignments in drm drivers.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Reviewed-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>video: fbdev: matroxfb: constify pci_device_id.</title>
<updated>2017-08-01T15:20:45+00:00</updated>
<author>
<name>Arvind Yadav</name>
<email>arvind.yadav.cs@gmail.com</email>
</author>
<published>2017-08-01T15:20:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c564dbcdc9914529e2cd18367d8bb98cef417611'/>
<id>c564dbcdc9914529e2cd18367d8bb98cef417611</id>
<content type='text'>
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by &lt;linux/pci.h&gt; work with
const pci_device_id. So mark the non-const structs as const.

File size before:
   text	   data	    bss	    dec	    hex	filename
  19884	   3036	     96	  23016	   59e8	fbdev/matrox/matroxfb_base.o

File size after adding 'const':
   text	   data	    bss	    dec	    hex	filename
  20300	   2620	     96	  23016	   59e8	fbdev/matrox/matroxfb_base.o

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Antonino Daplas &lt;adaplas@gmail.com&gt;
Cc: Maik Broemme &lt;mbroemme@libmpq.org&gt;
Cc: Florian Tobias Schandinat &lt;FlorianSchandinat@gmx.de&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
pci_device_id are not supposed to change at runtime. All functions
working with pci_device_id provided by &lt;linux/pci.h&gt; work with
const pci_device_id. So mark the non-const structs as const.

File size before:
   text	   data	    bss	    dec	    hex	filename
  19884	   3036	     96	  23016	   59e8	fbdev/matrox/matroxfb_base.o

File size after adding 'const':
   text	   data	    bss	    dec	    hex	filename
  20300	   2620	     96	  23016	   59e8	fbdev/matrox/matroxfb_base.o

Signed-off-by: Arvind Yadav &lt;arvind.yadav.cs@gmail.com&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Antonino Daplas &lt;adaplas@gmail.com&gt;
Cc: Maik Broemme &lt;mbroemme@libmpq.org&gt;
Cc: Florian Tobias Schandinat &lt;FlorianSchandinat@gmx.de&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>video: fbdev: matrox: the list iterator can't be NULL</title>
<updated>2017-07-04T15:47:23+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2017-07-04T15:47:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=360772f26407b759ec3a91dda81fdbc74b7f7f2c'/>
<id>360772f26407b759ec3a91dda81fdbc74b7f7f2c</id>
<content type='text'>
My static checker is complaining because we check "drv" for NULL and
then we dereference it to get the next item in the list.  It can't be
NULL so we can remove this check.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
My static checker is complaining because we check "drv" for NULL and
then we dereference it to get the next item in the list.  It can't be
NULL so we can remove this check.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>video: fbdev: matroxfb: use designated initializers</title>
<updated>2017-01-11T16:09:50+00:00</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2017-01-11T16:09:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a641261e999842bee7326b2d0e84bf2214f03022'/>
<id>a641261e999842bee7326b2d0e84bf2214f03022</id>
<content type='text'>
Prepare to mark sensitive kernel structures for randomization by making
sure they're using designated initializers. These were identified during
allyesconfig builds of x86, arm, and arm64, with most initializer fixes
extracted from grsecurity.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prepare to mark sensitive kernel structures for randomization by making
sure they're using designated initializers. These were identified during
allyesconfig builds of x86, arm, and arm64, with most initializer fixes
extracted from grsecurity.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>matroxfb: fix size of memcpy</title>
<updated>2016-09-27T08:43:24+00:00</updated>
<author>
<name>Sudip Mukherjee</name>
<email>sudipm.mukherjee@gmail.com</email>
</author>
<published>2016-08-25T17:44:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=59921b239056fb6389a865083284e00ce0518db6'/>
<id>59921b239056fb6389a865083284e00ce0518db6</id>
<content type='text'>
hw-&gt;DACreg has a size of 80 bytes and MGADACbpp32 has 21. So when
memcpy copies MGADACbpp32 to hw-&gt;DACreg it copies 80 bytes but
only 21 bytes are valid.

Signed-off-by: Sudip Mukherjee &lt;sudip.mukherjee@codethink.co.uk&gt;
Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
hw-&gt;DACreg has a size of 80 bytes and MGADACbpp32 has 21. So when
memcpy copies MGADACbpp32 to hw-&gt;DACreg it copies 80 bytes but
only 21 bytes are valid.

Signed-off-by: Sudip Mukherjee &lt;sudip.mukherjee@codethink.co.uk&gt;
Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>matroxfb: constify local structures</title>
<updated>2016-09-27T08:14:28+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2016-09-11T13:05:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1d2ffbd3e06d852362dbaa3457e0796cb32ee8ff'/>
<id>1d2ffbd3e06d852362dbaa3457e0796cb32ee8ff</id>
<content type='text'>
For structure types defined in the same file or local header files, find
top-level static structure declarations that have the following
properties:
1. Never reassigned.
2. Address never taken
3. Not passed to a top-level macro call
4. No pointer or array-typed field passed to a function or stored in a
variable.
Declare structures having all of these properties as const.

Done using Coccinelle.
Based on a suggestion by Joe Perches &lt;joe@perches.com&gt;.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For structure types defined in the same file or local header files, find
top-level static structure declarations that have the following
properties:
1. Never reassigned.
2. Address never taken
3. Not passed to a top-level macro call
4. No pointer or array-typed field passed to a function or stored in a
variable.
Declare structures having all of these properties as const.

Done using Coccinelle.
Based on a suggestion by Joe Perches &lt;joe@perches.com&gt;.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>PCI: Remove includes of asm/pci-bridge.h</title>
<updated>2016-02-05T22:29:28+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2016-02-05T20:58:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=952bbcb0781bd1341f6a9f5c96fc32737392c04a'/>
<id>952bbcb0781bd1341f6a9f5c96fc32737392c04a</id>
<content type='text'>
Drivers should include asm/pci-bridge.h only when they need the arch-
specific things provided there.  Outside of the arch/ directories, the only
drivers that actually need things provided by asm/pci-bridge.h are the
powerpc RPA hotplug drivers in drivers/pci/hotplug/rpa*.

Remove the includes of asm/pci-bridge.h from the other drivers, adding an
include of linux/pci.h if necessary.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Drivers should include asm/pci-bridge.h only when they need the arch-
specific things provided there.  Outside of the arch/ directories, the only
drivers that actually need things provided by asm/pci-bridge.h are the
powerpc RPA hotplug drivers in drivers/pci/hotplug/rpa*.

Remove the includes of asm/pci-bridge.h from the other drivers, adding an
include of linux/pci.h if necessary.

Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</pre>
</div>
</content>
</entry>
</feed>
