History log of /linux-master/drivers/staging/sm750fb/sm750.h
Revision Date Author Comments
# cc59bde1 27-Jul-2021 Benjamin Philip <benjamin.philip495@gmail.com>

staging: sm750fb: Rename vScreen to v_screen in lynxfb_crtc

The struct lynxfb_crtc has a member named vScreen. This name is
CamelCase and is frowned upon. This commit renames it to v_screen
and makes the necessary changes for the module to build.

This change also fixes the following checkpatch CHECKs:

CHECK: Avoid CamelCase: <vScreen>
454: FILE: sm750.c:454:
+ memset_io(crtc->vScreen, 0x0, crtc->vidmem_size);

CHECK: Avoid CamelCase: <vScreen>
136: FILE: sm750.h:136:
+ unsigned char __iomem *vScreen; /* virtual address of on_screen */

Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>
Link: https://lore.kernel.org/r/52db14bfc2f39e246aed7fdf866845a72e503b36.1627413010.git.benjamin.philip495@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 7bca9543 27-Jul-2021 Benjamin Philip <benjamin.philip495@gmail.com>

staging: sm750fb: Rename vCursor to v_cursor in lynxfb_crtc

The struct lynxfb_crtc has a member named vCursor. This name is
CamelCase and is frowned upon. This commit renames it to v_cursor
and makes the necessary changes for the module to build.

This change also fixes the following checkpatch CHECK:

+ unsigned char __iomem *vCursor; /* virtual address of cursor */

Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>
CHECK: Avoid CamelCase: <vCursor>
135: FILE: sm750.h:135:
Link: https://lore.kernel.org/r/58dfc3f12deabe3a786ff2b9c75ac24f51724974.1627413010.git.benjamin.philip495@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 547265b8 27-Jul-2021 Benjamin Philip <benjamin.philip495@gmail.com>

staging: sm750fb: Rename oCursor to o_cursor in lynxfb_crtc

The struct lynxfb_crtc has a member named oCursor. This name is
CamelCase and is frowned upon. This commit renames it to o_cursor
and makes the necessary changes for the module to build.

This change also fixes the following checkpatch CHECK:

CHECK: Avoid CamelCase: <oCursor>
137: FILE: sm750.h:137:
+ int oCursor; /* cursor address offset in vidmem */

Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>
Link: https://lore.kernel.org/r/aec911b055687892897feb4899644b9463245f1e.1627413010.git.benjamin.philip495@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# fdc234d8 27-Jul-2021 Benjamin Philip <benjamin.philip495@gmail.com>

staging: sm750fb: Rename oScreen to o_screen in lynxfb_crtc

The struct lynxfb_crtc has a member named oScreen. This name is
CamelCase and is frowned upon. This commit renames it to o_screen
and makes the necessary changes for the module to build.

This change also fixes the following checkpatch CHECKs:

CHECK: Avoid CamelCase: <oScreen>
138: FILE: sm750.h:138:
+ int oScreen; /* onscreen address offset in vidmem */

CHECK: Avoid CamelCase: <oScreen>
178: FILE: sm750.c:178:
+ base = par->crtc.oScreen;

Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>
Link: https://lore.kernel.org/r/8d7c72027f7bc31a1c35a34f9909fa04f4cf8972.1627413010.git.benjamin.philip495@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 39f91372 26-Jul-2021 Benjamin Philip <benjamin.philip495@gmail.com>

staging: sm750fb: Rename maxW to max_w in lynx_cursor

The struct lynx_cursor has a member named maxW. This name is
CamelCase and is frowned upon. This commit renames it to max_w
and makes the necessary changes for the module to build.

This change also fixes the following checkpatch CHECK:

CHECK: Avoid CamelCase: <maxW>
115: FILE: drivers/staging/sm750fb/sm750.c:115:
+ if (fbcursor->image.width > cursor->maxW ||

Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>
Link: https://lore.kernel.org/r/c0c84569b155df7b510a505a86863987836e192d.1627304144.git.benjamin.philip495@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# cfdafb76 26-Jul-2021 Benjamin Philip <benjamin.philip495@gmail.com>

staging: sm750fb: Rename maxH to max_h in lynx_cursor

The struct lynx_cursor has a member named maxH. This name is
CamelCase and is frowned upon. This commit renames it to max_h
and makes the necessary changes for the module to build.

This change also fixes the following checkpatch CHECK:

CHECK: Avoid CamelCase: <maxH>
116: FILE: drivers/staging/sm750fb/sm750.c:116:
+ fbcursor->image.height > cursor->maxH ||

Signed-off-by: Benjamin Philip <benjamin.philip495@gmail.com>
Link: https://lore.kernel.org/r/692211000786d76aa41bc24d4ee06b5868d82771.1627304144.git.benjamin.philip495@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d3361373 04-Apr-2021 Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com>

staging: sm750fb: Remove unnecessary blank line

Remove unnecessary extra blank line to improve readability.
Reported by checkpatch.

Signed-off-by: Zhansaya Bagdauletkyzy <zhansayabagdaulet@gmail.com>
Link: https://lore.kernel.org/r/20210404111055.GA22626@zhans
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 99783dd5 19-Feb-2021 shivang upadhyay <oroz3x@gmail.com>

staging: sm750fb: added identifier names for function declarations

checkpatch.pl complains about not having identifiers names in
function declarations . This patch uses the same names as are
used in source file sm750_accel.c , but with snake case.

Signed-off-by: shivang upadhyay <oroz3x@gmail.com>
Link: https://lore.kernel.org/r/20210219100803.5311-1-oroz3x@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a6011493 26-May-2020 Igor Ribeiro Barbosa Duarte <igor.ribeiro.duarte@gmail.com>

staging: sm750fb: Add names to proc_setBLANK args

Add names to proc_setBLANK args.
Found using checkpatch.pl.

Signed-off-by: Igor Ribeiro Barbosa Duarte <igor.ribeiro.duarte@gmail.com>
Link: https://lore.kernel.org/r/20200526224750.GA29722@igor-Aspire-F5-573G
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2596313a 13-Apr-2020 R Veera Kumar <vkor@vkten.in>

staging: sm750fb: Make function arguments alignment match open parenthesis

Make function arguments alignment match open parenthesis.
Found using checkpatch.pl.

Signed-off-by: R Veera Kumar <vkor@vkten.in>
Link: https://lore.kernel.org/r/20200413160753.3787-1-vkor@vkten.in
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b2441318 01-Nov-2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

License cleanup: add SPDX GPL-2.0 license identifier to files with no license

Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.

By default all files without license information are under the default
license of the kernel, which is GPL version 2.

Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.

This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.

How this work was done:

Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,

Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.

The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.

The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.

Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).

All documentation files were explicitly excluded.

The following heuristics were used to determine which SPDX license
identifiers to apply.

- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.

For non */uapi/* files that summary was:

SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139

and resulted in the first patch in this series.

If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:

SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930

and resulted in the second patch in this series.

- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:

SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1

and that resulted in the third patch in this series.

- when the two scanners agreed on the detected license(s), that became
the concluded license(s).

- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.

- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).

- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.

- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.

In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.

Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.

Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.

In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.

Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct

This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.

These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.

Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 3fa4b5e5 24-Jun-2017 Derek Robson <robsonde@gmail.com>

staging: sm750fb - add parameter names

Fixed checkpatch.pl warnings of the form "function definition argument
'foo' should also have an identifier name" in header files.

Signed-off-by: Derek Robson <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d228cf87 13-Mar-2017 Arushi Singhal <arushisinghal19971997@gmail.com>

staging: sm750fb: function prototype argument should have an identifier name

function prototype arguments like 'struct vb_device_info *','unsigned
long' etc. should have an identifier name.

Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# dca633d4 27-Feb-2017 Varsha Rao <rvarsha016@gmail.com>

staging: sm750fb: Added spaces around arithmetic operators.

Added spaces around arithmetic operators (/, *), to fix the checkpatch
issue.

Signed-off-by: Varsha Rao <rvarsha016@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# f5016082 22-Oct-2016 Eric S. Stone <esstone@gmail.com>

staging: sm750fb: restructure multi-line comments to follow CodingStyle

Eliminates all checkpatch.pl BLOCK_COMMENT_STYLE warnings in
sm750fb, and coincidentally eliminates some line-length (80)
warnings.

Signed-off-by: Eric S. Stone <esstone@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 35e4d8ca 28-Sep-2016 Elizabeth Ferdman <gnudevliz@gmail.com>

staging: sm750fb: conform to block comment style

Fix 2 checkpatch errors:
-Block comments use * on subsequent lines,
-Block comments use a trailing */ on a separate line
to conform to block commenting style.

Signed-off-by: Elizabeth Ferdman <gnudevliz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# fbb8c963 25-Jan-2016 Matej Vasek <xvasek1@fi.muni.cz>

staging: sm750fb, fix typos

The code contained typos like "structur", "fointers", etc. Fix that.

No code change, only comments.

Signed-off-by: Matej Vasek <xvasek1@fi.muni.cz>
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <linux-fbdev@vger.kernel.org>
Cc: <devel@driverdev.osuosl.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a3f92cc9 17-Jan-2016 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: replace dual member of sm750_dev with fb_count

Will be used in futher refactoring of driver _probe and _remove methods.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# af28398d 26-Oct-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: remove unused fields from struct sm750_dev

The {x,y}LCD fields of struct sm750_dev are not used and can be removed.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e359b6a8 26-Oct-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: merge lynx_share into sm750_dev

Both struct lynx_share and struct sm750_dev reprsent some parts of the
SM750 graphics adapter. There is no point to keep these parts in
different structures.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 8ac97f19 26-Oct-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: remove unused field in lynx_cursor

The lynx_share field in lynx_cursor structure is never used and can be
removed.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 700591a9 26-Oct-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: replace lynx_share with sm750_dev in function calls

Use sm750_dev rather than lynx_share as parameter for hw_sm750_map,
hw_sm750_inithw and hw_sm750_initAccel functions.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 142de763 26-Oct-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: remove hw_sm750_getVMSize function

The hw_sm750_getVMSize wraps ddk750_getVMSize without any added
functionality. Call ddk750_getVMSize directly and remove
hw_sm750_getVMSize.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# f11fa2a9 26-Oct-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: replace lynx_share with sm750_dev in lynxfb_par

Use sm750_dev instead of lynx_share in the private data of the
frambuffer device.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 1757d106 26-Oct-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: merge struct sm750_state into struct sm750_dev

The struct sm750_state is never used on its own. Merge it into the
struct sm750_dev.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# bc3d48f3 26-Oct-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: rename struct sm750_share to sm750_dev

The struct sm750_share represents the device state and name sm750_dev
seems more appropriate.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 05407e15 26-Oct-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: merge sm750_hw.h into sm750.h

There is no actual need to split type definitions and global function
declarations between lots of small headers.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 492bcecf 26-Oct-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: remove unused smi_indent variable

The smi_indent variable is only declared, but never used. Remove it.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e3a3f9f5 26-Oct-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: replace PADDING macro with ALIGN

The custom macro PADDING differs from standard kernel ALIGN only in
parameters order. Replace PADDING with ALIGN and remove it's definition.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6732071c 26-Oct-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: remove unused SPC_SM750 define

The SPC_SM750 define is not used and can be removed

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# fb7f4055 26-Oct-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: replace lynx_cursor methods with function calls

The methods in lynx_cursor always use the same implementation and there is
no point to use redirection rather than direct function call.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 9821ed04 23-Oct-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: use direct call to hw_sm750_output_setMode

The proc_setMode method in lynx_output always uses the same
implementation and there is no point to use redirection rather than
direct function call.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c202beee 23-Oct-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: replace lynx_crtc methods with function calls

The methods in lynx_crtc always use the same implementation and there is
no point to use redirection rather than direct function call.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 9b2941e2 23-Oct-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: remove unused methods from lynx_share

The suspend and resume methods in lynx_share are not implemented and
never set. Remove them.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b108da75 23-Oct-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: remove defintion of offsetof

There is no need to redefine offsetof

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 4dc4d225 30-Sep-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: remove clear method from lynxfb_{crtc,output}

The clear methods of lynxfb_crtc and lynxfb_output are empty and
therefore they can be removed.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# efca4885b2 30-Sep-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: remove proc_checkMode method from lynxfb_output

The proc_checkMode of lynxfb_output is set to function that always
returns 0. Calling that function and checking for its return value is
meaningless.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6af70030 29-Sep-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: remove unused macros

Several macros defined in sm750.h and sm750_help.h are not used and
therefore they can be removed

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e967d336 21-Sep-2015 Mike Rapoport <rppt@kernel.org>

staging: sm750fb: remove unused MB(x) and KB(x) macros

The MB(x) and KB(x) macros are not used and therefore they can be
removed

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# cc6c16df 14-Aug-2015 Yash Shah <yshah1@visteon.com>

Staging: sm750fb: Fix "foo* bar" should be "foo *bar" errors

Fix "foo* bar" should be "foo *bar" errors as detected by
checkpatch.pl

Signed-off-by: Yash Shah <yshah1@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# adbb90e8 14-Jul-2015 Juston Li <juston.h.li@gmail.com>

staging: sm750fb: add space after semicolon

Fixes checkpatch.pl error:
ERROR: space required after that ';'

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 0d5e63c4 14-Jul-2015 Juston Li <juston.h.li@gmail.com>

staging: sm750fb: add spaces around operators

Fixes checkpath.pl error:
ERROR: spaces required around that operator

Note running checkpatch.pl with '--strict' catches more
of these errors along with cases where spacing is optional
but preferred. Take care of these in a future patch.

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6ab5b6d1 14-Jul-2015 Juston Li <juston.h.li@gmail.com>

staging: sm750fb: consistent spacing around operators

Fixes checkpatch.pl error:
ERROR: need consistent spacing around operator

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# f7d8b69a 14-Jul-2015 Juston Li <juston.h.li@gmail.com>

staging: sm750fb: add space after return type

Fixes checkpatch.pl warning:
WARNING: missing space after return type

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 5d14c13a 14-Jul-2015 Juston Li <juston.h.li@gmail.com>

staging: sm750fb: add space after struct definition

Fixes checkpatch.pl warning:
WARNING: missing space after struct definition

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6338a781 14-Jul-2015 Juston Li <juston.h.li@gmail.com>

staging: sm750fb: add space after close brace

Fixes checkpatch.pl error:
ERROR: space required after that close brace '}'

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 78376535 14-Jul-2015 Juston Li <juston.h.li@gmail.com>

staging: sm750fb: use tabs for indentation

Replace spaces with tabs for indentation to fix the checkpatch.pl error
ERROR: code indent should use tabs where possible
WARNING: please, no spaces at the start of a line

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# eb0f4271 18-Jun-2015 Greg Donald <gdonald@gmail.com>

drivers: staging: sm750fb: Fix "'foo * bar' should be 'foo *bar'" errors

Fix checkpatch.pl "'foo * bar' should be 'foo *bar'" errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 5ee35ea7 12-Jun-2015 Juston Li <juston.h.li@gmail.com>

staging: sm750fb: fix c99 comments

fixed all checkpatch.pl ERROR: do not use C99 // comments

Any C99 comments used to comment out code are simply removed.
Also some of the errors occur inside '#if 0' blocks which I
might as well fix since checkpatch.pl caught them but the blocks
themselves should probably be cleaned up later.

Changes since v1: close a comment block

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e8b976da 02-Jun-2015 Isaac Assegai <isaac.a.travers@gmail.com>

Staging: sm750fb: sm750.h: Insert spaces after commas.

Insert Spaces after commas to rectify the
following checkpatch errors in sm750.h:
ERROR: space required after that ','

Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2e043a92 14-May-2015 Luis R. Rodriguez <mcgrof@suse.com>

staging: sm750fb: use arch_phys_wc_add() and ioremap_wc()

The same area used for ioremap() is used for the MTRR area.
Convert the driver from using the x86 specific MTRR code to
the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
will avoid MTRR if write-combining is available, in order to
take advantage of that also ensure the ioremap'd area is requested
as write-combining.

There are a few motivations for this:

a) Take advantage of PAT when available

b) Help bury MTRR code away, MTRR is architecture specific and on
x86 its replaced by PAT

c) Help with the goal of eventually using _PAGE_CACHE_UC over
_PAGE_CACHE_UC_MINUS on x86 on ioremap_nocache() (see commit
de33c442e titled "x86 PAT: fix performance drop for glx,
use UC minus for ioremap(), ioremap_nocache() and
pci_mmap_page_range()")

The conversion done is expressed by the following Coccinelle
SmPL patch, it additionally required manual intervention to
address all the #ifdery and removal of redundant things which
arch_phys_wc_add() already addresses such as verbose message
about when MTRR fails and doing nothing when we didn't get
an MTRR.

@ mtrr_found @
expression index, base, size;
@@

-index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
+index = arch_phys_wc_add(base, size);

@ mtrr_rm depends on mtrr_found @
expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
@@

-mtrr_del(index, base, size);
+arch_phys_wc_del(index);

@ mtrr_rm_zero_arg depends on mtrr_found @
expression mtrr_found.index;
@@

-mtrr_del(index, 0, 0);
+arch_phys_wc_del(index);

@ mtrr_rm_fb_info depends on mtrr_found @
struct fb_info *info;
expression mtrr_found.index;
@@

-mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
+arch_phys_wc_del(index);

@ ioremap_replace_nocache depends on mtrr_found @
struct fb_info *info;
expression base, size;
@@

-info->screen_base = ioremap_nocache(base, size);
+info->screen_base = ioremap_wc(base, size);

@ ioremap_replace_default depends on mtrr_found @
struct fb_info *info;
expression base, size;
@@

-info->screen_base = ioremap(base, size);
+info->screen_base = ioremap_wc(base, size);

Generated-by: Coccinelle SmPL
Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Suresh Siddha <sbsiddha@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Juergen Gross <jgross@suse.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: devel@driverdev.osuosl.org
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# bf2fbc2a 10-Mar-2015 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Staging: sm750fb: fix build warning with lynx_accel

Change the return value of lynx_accel to be void, to fix the build
warning, and due to the fact that the function can't seem to fail at
all, and no one cares if it does or not.

Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org


# 3009de60 10-Mar-2015 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Staging: sm750fb: fix build warning with proc_panDisplay

Change the options to the proc_panDisplay function pointer to match the
function pointer that we want to assign to it, in order to remove the
build warning.

Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Teddy Wang <teddy.wang@siliconmotion.com>
Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org


# f8b0dced 10-Mar-2015 Lorenzo Stoakes <lstoakes@gmail.com>

staging: sm750fb: Cleanup the type of mmio750

This patch assigns the more appropriate void* type to the mmio750 variable
eliminating an unnecessary volatile qualifier in the process. Additionally it
updates parameter types as necessary where those parameters interact with
mmio750, removes unnecessary casts and updates the type of the
lynx_share->pvReg field which is passed to the ddk750_set_mmio method.

As a consequence, this patch fixes the following sparse warning:-

drivers/staging/sm750fb/ddk750_help.c:12:17: warning: incorrect type in assignment (different address spaces)

Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e936351a 10-Mar-2015 Sudip Mukherjee <sudipm.mukherjee@gmail.com>

staging: sm750fb: wrong type for print

mention correct format specifier while printing.
fixes all the build warnings about incorrect argument type while
printing.
since this is a framebuffer device and it should follow what the
framebuffer layer is suggesting in struct fb_fix_screeninfo at
smem_start and mmio_start, so accordingly changed the datatypes of
vidmem_start, vidreg_start, vidmem_size and vidreg_size.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 81dee67e 03-Mar-2015 Sudip Mukherjee <sudipm.mukherjee@gmail.com>

staging: sm750fb: add sm750 to staging

sm750 of Silicon Motion is pci-e display controller device and has
features like dual display and 2D acceleration. This patch adds the
driver to staging.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>