Age | Commit message (Collapse) | Author |
|
This patch fixes the following sparse warnings:
kpc2000_i2c.c:137: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:137: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:137: got void *
kpc2000_i2c.c:146: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:146: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:146: got void *
kpc2000_i2c.c:147: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:147: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:147: got void *
kpc2000_i2c.c:166: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:166: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:166: got void *
kpc2000_i2c.c:166: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:166: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:166: got void *
kpc2000_i2c.c:168: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:168: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:168: got void *
kpc2000_i2c.c:168: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:168: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:168: got void *
kpc2000_i2c.c:171: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:171: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:171: got void *
kpc2000_i2c.c:174: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:174: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:174: got void *
kpc2000_i2c.c:193: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:193: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:193: got void *
kpc2000_i2c.c:194: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:194: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:194: got void *
kpc2000_i2c.c:214: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:214: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:214: got void *
kpc2000_i2c.c:219: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:219: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:219: got void *
kpc2000_i2c.c:226: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:226: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:226: got void *
kpc2000_i2c.c:238: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:238: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:238: got void *
kpc2000_i2c.c:244: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:244: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:244: got void *
kpc2000_i2c.c:252: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:252: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:252: got void *
kpc2000_i2c.c:257: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:257: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:257: got void *
kpc2000_i2c.c:259: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:259: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:259: got void *
kpc2000_i2c.c:267: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:267: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:267: got void *
kpc2000_i2c.c:273: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:273: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:273: got void *
kpc2000_i2c.c:293: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:293: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:293: got void *
kpc2000_i2c.c:294: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:294: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:294: got void *
kpc2000_i2c.c:309: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:309: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:309: got void *
kpc2000_i2c.c:312: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:312: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:312: got void *
kpc2000_i2c.c:317: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:317: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:317: got void *
kpc2000_i2c.c:324: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:324: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:324: got void *
kpc2000_i2c.c:328: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:328: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:328: got void *
kpc2000_i2c.c:329: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:329: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:329: got void *
kpc2000_i2c.c:330: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:330: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:330: got void *
kpc2000_i2c.c:338: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:338: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:338: got void *
kpc2000_i2c.c:340: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:340: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:340: got void *
kpc2000_i2c.c:342: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:342: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:342: got void *
kpc2000_i2c.c:350: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:350: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:350: got void *
kpc2000_i2c.c:350: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:350: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:350: got void *
kpc2000_i2c.c:351: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:351: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:351: got void *
kpc2000_i2c.c:414: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:414: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:414: got void *
kpc2000_i2c.c:420: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:420: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:420: got void *
kpc2000_i2c.c:422: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:422: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:422: got void *
kpc2000_i2c.c:427: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:427: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:427: got void *
kpc2000_i2c.c:428: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:428: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:428: got void *
kpc2000_i2c.c:430: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:430: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:430: got void *
kpc2000_i2c.c:435: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:435: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:435: got void *
kpc2000_i2c.c:436: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:436: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:436: got void *
kpc2000_i2c.c:438: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:438: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:438: got void *
kpc2000_i2c.c:439: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:439: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:439: got void *
kpc2000_i2c.c:445: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:445: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:445: got void *
kpc2000_i2c.c:446: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:446: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:446: got void *
kpc2000_i2c.c:454: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:454: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:454: got void *
kpc2000_i2c.c:459: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:459: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:459: got void *
kpc2000_i2c.c:461: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:461: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:461: got void *
kpc2000_i2c.c:472: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:472: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:472: got void *
kpc2000_i2c.c:472: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:472: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:472: got void *
kpc2000_i2c.c:475: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:475: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:475: got void *
kpc2000_i2c.c:475: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:475: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:475: got void *
kpc2000_i2c.c:493: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:493: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:493: got void *
kpc2000_i2c.c:493: warning: incorrect type in argument 2
(different address spaces)
kpc2000_i2c.c:493: expected void volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:493: got void *
kpc2000_i2c.c:512: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:512: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:512: got void *
kpc2000_i2c.c:516: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:516: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:516: got void *
kpc2000_i2c.c:516: warning: incorrect type in argument 1
(different address spaces)
kpc2000_i2c.c:516: expected void const volatile [noderef] <asn:2> *addr
kpc2000_i2c.c:516: got void *
Signed-off-by: Eduardo Barretto <edusbarretto@gmail.com>
Link: https://lore.kernel.org/r/20190818183555.7167-1-edusbarretto@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The i2c-dev module is for access to I2C buses from user-space.
Kernel drivers do not care about its presence.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Matt Sickler <Matt.Sickler@daktronics.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Fixes checkpatch "CHECK: spaces preferred around that '+' (ctx:VxV)".
Signed-off-by: Simon Sandström <simon@nikanor.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
add space after , for #define outb_p(d,a) writeq(d,(void *)a)
Signed-off-by: Hao Xu <haoxu.linuxkernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
modify void* to void * for #define inb_p(a) readq((void*)a)
and #define outb_p(d,a) writeq(d,(void*)a)
Signed-off-by: Hao Xu <haoxu.linuxkernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The kpc_i2c driver does not unmap its I/O space upon error cases in the
probe() function or upon remove(). Make the driver clean up after itself
more maintainably by using the managed resource API.
Signed-off-by: Geordan Neukum <gneukum1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The kpc2000 driver does not verify whether or not mapping the I/O
space succeeded during probe time. Make the driver verify that the
mapping operation was successful before potentially using that area
in the future.
Signed-off-by: Geordan Neukum <gneukum1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The kpc_i2c driver attempts to map its I/O space without verifying
whether or not the result of platform_get_resource() is NULL. Make the
driver check that platform_get_resource did not return NULL before
attempting to use the value returned to map an I/O space.
Signed-off-by: Geordan Neukum <gneukum1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The kpc_i2c driver stashes private state data in the platform_data
member of its device structure. In general, the platform_data structure
is used for passing data to the driver during probe() rather than as a
storage area for runtime state data. Instead, use the drvdata member
for all state info meant to be accessible in driver callbacks.
Signed-off-by: Geordan Neukum <gneukum1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The kpc2000_i2c.c file contains instances of unnecessary consecutive
newlines which impact the readability of the file. Remove these
unnecessary newlines.
Signed-off-by: Geordan Neukum <gneukum1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The FEATURES_* symbols use bit shifting of the style (1 << k) in order
to assign a certain meaning to the value of inividual bits being set
in the value of a given variable. Instead, use the BIT() macro in
order to improve readability and maintain consistency with the rest
of the kernel.
Signed-off-by: Geordan Neukum <gneukum1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The i2c_device structure contains a member used to stash a pointer to
a platform_device. The driver contains no cases of this member being
used after initialization. Remove the unnecessary struct member and
the initialization of this member in the sole instance where the
driver creates a variable of type: struct i2c_device.
Signed-off-by: Geordan Neukum <gneukum1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
In pi2c_probe, a rw_sem is initialized and stashed off in the
i2c_device private runtime state struct. This rw_sem is never used
after initialization. Remove the rw_sem and cleanup unneeded header
inclusion.
Signed-off-by: Geordan Neukum <gneukum1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
drivers/staging/kpc2000/kpc2000_i2c.c:652:3-8: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Fixes: 43ad38191816 ("staging: kpc2000: kpc_i2c: add static qual to local symbols in kpc_i2c.c")
CC: Geordan Neukum <gneukum1@gmail.com>
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
kpc_i2c.c declares:
- two functions
- pi2c_probe()
- pi2c_remove()
- one struct
- i2c_plat_driver_i
which are local to the file, yet missing the static qualifier. Add the
static qualifier to these symbols.
Signed-off-by: Geordan Neukum <gneukum1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Many of the functions in kpc_i2c log debug-level messages to the
kernel log message buffer upon invocation. This is unnecessary, as
debugging tools like kgdb, kdb, etc. or the tracing tool ftrace
should be able to provide this same information. Therefore, remove
these print statements.
Signed-off-by: Geordan Neukum <gneukum1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
Rather than include asm/io.h, include linux/io.h. Issue reported
by the script checkpatch.pl.
Signed-off-by: Geordan Neukum <gneukum1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The linux coding style document states:
1) That braces should not be used where a single single statement
will do. Therefore all instances of single block statements
wrapped in braces that do not meet the qualifications of any
of the exceptions to the rule should be fixed up.
2) That the declaration of variables local to a given function
should be immediately followed by a blank newline. Therefore,
the single instance of this in kpc2000_i2c.c should be fixed
up.
Signed-off-by: Geordan Neukum <gneukum1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
The module parameter 'disable_features' is currently unused. Therefore,
it should be removed.
Signed-off-by: Geordan Neukum <gneukum1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
There is no need for a subdirectory for just a single .c file. So move
it out of kpc_i2c/ and rename it to the module name that we want the
file to build to, saving one more linking stage.
Cc: Matt Sickler <Matt.Sickler@daktronics.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|